Pokémon FireRed/LeafGreen predefined functions list

From Glitch City Wiki
Revision as of 15:57, 24 July 2019 by >Ryccardo (...and then you find out a relevant website with half of the job already done...)
This article or section is a stub. You can help Glitch City Wiki by expanding it.

All function numbers are hexadecimal.

Void functions

Called with the special (0x25) script opcode, they do not return a value (but can of course work directly on memory anyway).

  • 000 heals the entire team
  • 01F used immediately before 199 to cancel multiplayer link setup
  • 077 load Heracross's size record in the 3rd string buffer
  • 0C4 display Trainer Tower records (with 8004 = 1)
  • 0F6 check for DLC trainer availability?
  • 163 register Pokémon with index number stored in 8004 as seen
  • 173 unlock information in Fame Checker (variable 8004: character [0-?]; 8005: fact number [0-5?])
  • 174 unlock information in Fame Checker (difference with 173 unknown)
  • 182 unknown, used in Saffron Pokémon Center map script
  • 187 unknown, used by {the imitating girl in Saffron}, Pokémart workers, etc
  • 195 display Pokémon Jump minigame records
  • 199 used after 01F to cancel multiplayer link setup
  • 1A6 display Dodrio's Berry Picking minigame records

Int functions

Called with the special2 (0x26) script opcode, they can also return a value into a variable, typically but not necessarily the intended-for-temporary-use LASTRESULT.

  • 084 get number of Pokémon in party
  • 0D4 stores number of caught species in variable 8006
  • 1AE check for illegal Pokémon?
  • 153 check for Pokémon holding DLC berries (illegal to trade)
  • 165 check whether current Box is full
  • 16A check whether wireless adapter is ready
  • 180 check whether Mystery Gift deliveryman should be visible

See also

Article on PokeCommunity