• 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.

How to trade for a specific type?

PokemonLunarVersion

Bringer of Nightmares
17
Posts
9
Years
    • Seen Jun 24, 2021
    Hi, I was wondering, like it says on the wiki
    "Alternatively, you can make the trade less specific, or at least different. Why not require the player to hand over an egg, or a Pokémon in the Water 2 breeding category, or any Fire-type Pokémon?"
    "any ___-Type Pokémon" is what I'm looking for.
    Which script would I use instead of something like this?

    poke.species==PBSpecies::DRAGONAIR

    Is there a poke.type=PBType::FIRE ?
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Code:
    poke.hasType?(:FIRE)
    That'll do you.
     
    Back
    Top