top of page

How to Check Pokedex Seen/Caught Count

5.6

Explaining the GetPokedexCount and an example script for how to use it!


Gotta Catch 'Em All!

HMA Discord Link 2.png

Credits:

Defa

YeahPotato


How To

GetPokedexCount works like this:

  • Set var4 to 0 if you want to count Pokémon in the Kanto Dex, otherwise you set var4 to any other number to count Pokémon in the National Dex.

  • The number of species seen is stored in var5 and the number of species caught is stored in var6.

    • In the Aide's script, this is why after GetPokedexCount var6 is buffered in buffer3, so that the Aide will say "you caught n species", and why there's the check for var6 < 50 (you need at least 50 species caught for the Exp Share).

  • GetPokedexCount uses special2 because the given variable (varResult) is set to 1 if the National Dex is enabled, or 0 if not enabled.


See below for an example script:

Section0:
  lock
  faceplayer
  setvar var4 0
  special2 varResult GetPokedexCount
  buffernumber buffer1 0x8006
  msgbox.default <auto>
{
Hi there!

I sell high quality Poke Balls, but
only to trainers who have proven
their ability to handle them by
catching lots of Pokemon in Kanto!

You've caught [buffer1] Pokemon in
Kanto.
}
  if.compare.goto var6 < 60 <section1>
  msgbox.default <auto>
{
You've proven you're capable of using
these.
}
  if.compare.goto var6 >= 180 <section2>
  if.compare.goto var6 >= 120 <section3>
  if.compare.goto var6 >= 60 <section4>

section1:
  msgbox.npc <auto>
{
Come back when you've caught more
kinds of Pokemon in Kanto!
}
  release
  end

section2:
  pokemart <auto>
{
"Great Ball"
"Ultra Ball"
"Master Ball"
}
  release
  end

section3:
  pokemart <auto>
{
"Great Ball"
"Ultra Ball"
}
  goto <section1>

section4:
  pokemart <auto>
{
"Great Ball"
}
  goto <section1>

Happy Hacking!

 


bottom of page