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

[Scripting Question] Displaying an option on the Party screen if Pokemon selected is one of several certain species

30
Posts
13
Years
  • Seen Jan 28, 2024
I'm trying to make a new command when viewing the party, and it depends on the species whether or not this option appears. This is what I've got:

Code:
...
      cmdMail=-1
      cmdEvent=-1
      # Build the commands
      commands[cmdSummary=commands.length]=_INTL("Summary")
...
      if pkmn.species==PBSpecies::CHARIZARD || PBSpecies::BLASTOISE || PBSpecies::VENUSAUR ||
                       PBSpecies::TYPHLOSION || PBSpecies::FERALIGATR || PBSpecies::MEGANIUM ||
                       PBSpecies::BLAZIKEN || PBSpecies::SWAMPERT || PBSpecies::SCEPTILE ||
                       PBSpecies::INFERNAPE || PBSpecies::EMPOLEON || PBSpecies::TORTERRA ||
                       PBSpecies::EMBOAR || PBSpecies::SAMUROTT || PBSpecies::SERPERIOR ||
                       PBSpecies::DELPHOX || PBSpecies::GRENINJA || PBSpecies::CHESNAUGHT ||
                       PBSpecies::INCINEROAR || PBSpecies::PRIMARINA || PBSpecies::DECIDUEYE ||
                       PBSpecies::RAICHU || PBSpecies::FLAREON || PBSpecies::VAPOREON ||
                       PBSpecies::JOLTEON || PBSpecies::UMBREON || PBSpecies::ESPEON ||
                       PBSpecies::GLACEON || PBSpecies::LEAFEON || PBSpecies::SYLVEON
       commands[cmdEvent=commands.length]=_INTL("Event")
...
      elsif cmdEvent>=0 && command==cmdEvent
        command=pbDisplay(_INTL("This is a fully evolved starter Pokemon! Good job!"))
        end

However, the 'Event' option also appears on Salamence, so I know it is not working as intended. I'm using Essentials v15 if that helps.
 
30
Posts
13
Years
  • Seen Jan 28, 2024
I fixed it. I needed to use the "isConst?(pkmn.species,PBSpecies,:<Pokemon species name>) function for each Pokemon.
 
Back
Top