• 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.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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] Check if player has obtained a number of Pokémon

As far as I know, there is no way to do that. So.... we add a way to do it!


In PSystem_PokemonUtilities under def pbHasSpecies?(species), add this:
Code:
# Returns true if the player has caught greater than or equal to than 
# the amount defined  in the variable "amount"
def pbSpeciesOwned?(amount)
  if $Trainer.pokedexOwned>=amount
    return true
  end
  return false
end

Then create a conditional branch that checks for "pbSpeciesOwned?(10)"
 
Last edited:
Back
Top