• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Trade From PC (v15+)

  • 1,224
    Posts
    11
    Years
    This script can be utilized to initiate trades that allow you to choose a pokemon from your PC or party to trade, rather than just your party.
    Add this script in a separate section above the main (and below the PScreen_Stroage)


    Script is here

    To call, simply make an event with something like this
    Code:
    pbTradeFromPC(:KINGDRA,35,"Fred",0,nil,proc {|poke|
     !poke.isEgg? &&
     !(poke.isShadow? rescue false) &&
     poke.gender==1 &&
     poke.species==PBSpecies::DRAGONAIR
    })
    This is trading a Kindra for a female Dragonair
     
    Last edited:
    In 16.1 appears message error.

    You have to add a .is in Egg
    Code:
    pbTradeFromPC(:KINGDRA,35,"Fred",0,nil,proc {|poke|  
    !poke.[B]is[/B]Egg? &&  
    !(poke.isShadow? rescue false) &&  
    poke.gender==1 &&  
    poke.species==PBSpecies::DRAGONAIR
    })
     
    I like the script and am using it in Lightning yellow, one issue i found was that if the user cancelled the trade when selecting a pokemon the even still carries on as if the trade went through.

    Also ,can you make it so that you can select from the party as well, currently the party option doesn't do anything
     
    I like the script and am using it in Lightning yellow, one issue i found was that if the user cancelled the trade when selecting a pokemon the even still carries on as if the trade went through.

    Also ,can you make it so that you can select from the party as well, currently the party option doesn't do anything

    The first part doesn't happen for me. I did update the code so that if you canceled while selecting a pokemon it doesn't quit the trade. Maybe that's what you meant.

    As to the second part, the reason this happens is because of this line
    Code:
    @scene.pbStartBox(self,0)
    I've changed it in the code to 2 instead of 0, but these numbers correspond the commands on your pc. This was originally in the Gen 6 project, in which I had switched the "Move" and "Withdraw" commands. In default essentials, 2 corresponds to "Move", which will allow you to select both from your party and the pc.
     
    Back
    Top