View Single Post
Old 10th August 2013, 07:22 PM  
Join Date: Jul 2013
Location: Israel
Posts: 36
Default [GBA] Wildbattle result checker

Sigh, I am upset about this title. If you have a better title for this, tell me! (no kidding ;-;)

This code is desinged for BPRE 1.0 and not for others.

Okay, let's start.

The "wildbattle result checker" is a command that checks the results of a wildbattle - if you defeated the Pokémon or fled. Example: the Snorlax on FRLG. If you run or or defeat it, the game says
= SNORLAX calmed  down.\nIt gave a huge yawn[.]\lAnd returned to the mountains
and if you caught it, it won't say anything. Same goes to the Electrodes on Rocket Hideout in Pokémon Golden Sun (romhack). I couldn't figure out doing that checker if you caught the Pokémon, so don't bother me about it. Okay, let's get started...

The script looks like this:

wildbattle 0x[Species] 0x[Level] 0x[Item held] \wildbattle...?
special2 0x800D 0xB4 \Checks the results of the battle
compare 0x800D 0x1 \Compares if the player defeated the enemy Pokémon
if 0x1 goto @[Defeat pointer]
compare 0x800D 0x4 \Compares if the player fled from the battle
if 0x1 goto @[Fled pointer]
Unfortunatly, I tried to do that with my music controlling script and it didn't work, so don't bother me about that either.

Enjoy using the code!

- Gal
Gal is offline  
Likes J9794, Pia Carrot liked this post