• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
10
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:
    199
    Posts
    14
    Years
    • Seen Jul 6, 2022
    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
    })
     
    772
    Posts
    13
    Years
    • UK
    • Seen Apr 19, 2024
    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
     
    1,224
    Posts
    10
    Years
  • 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