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

Checking the number of owned species in a Regional Dex

  • 12
    Posts
    10
    Years
    • Seen Nov 5, 2013
    I have a problem with a text, i want show the number of pokémon owned registered in the first region pokédex (not national).
    for example
    Oak : Hello player, you have caught "NUMBER OF POKéMON IN THE FIRST POKéDEX" pokémon!

    Any one can help me?
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Code:
    [COLOR=DimGray]Script: pbSet(1,$Trainer.pokedexOwned(0))[/COLOR]
    Text: Oak: Hello \PN, you have caught \v[1] Pokémon so far.
    Try that.
     
  • 12
    Posts
    10
    Years
    • Seen Nov 5, 2013
    Amazing, it works.
    Thanks.
    The script pbSet add to variable number, in that case 1, all pokèmon in the script pokedexOwned, right?
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    $Trainer.pokedexOwned returns the total number of species owned by the player. By default (i.e. with no number), it counts all species in the game. If you put a number there, it'll only count the species that appear in the Regional Dex with that number - 0 is the first Regional Dex, 1 is the second Regional Dex, etc.

    pbSet takes this number and stores it in Variable 1, as you said.
     
    Back
    Top