The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other Legendary Encounter script (https://www.pokecommunity.com/showthread.php?t=350192)

juliannom June 6th, 2015 6:41 PM

Legendary Encounter script
 
Guys, I've been trying to put some legendary encounters in my hack, but I've got an annoying bug, if the player catches the pokémon, it doesn't disappear after battle, it only disappears if the player kills it or if it escapes the battle.

Could anybody please help me find what have I done wrong?

Here's the script I used for RAIKOU:
Code:

#dynamic 810000
#org @start
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
setwildbattle 0xF3 0x32 0x0
checksound
cry 0xF3 0x2
preparemsg @cry '"Grraurgh!"
waitmsg
waitcry
pause 0xA
playsong 0x156 0x0
waitkeypress
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto @flag
compare LASTRESULT 0x4
if 0x1 goto @var
compare LASTRESULT 0x5
if 0x1 goto @var
setflag 0x213
release
end

'---------------
#org 0x1A7AE0
release
end

'---------------
#org @flag
setflag 0x213
goto @fade

'---------------
#org @var
setvar 0x8004 0xF3
goto @escape

'---------------
#org @fade
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end

'---------------
#org @escape
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox @escmsg MSG_KEEPOPEN '"Raikou escaped!"
release
end

'---------
' Strings
'---------
#org @cry
= Grraurgh!

#org @escmsg
= Raikou escaped!




All times are GMT -8. The time now is 2:30 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.