• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • There is an important update regarding account security and 2FA. Please click here for more information.
  • 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.
  • Imgur has blocked certain regions from viewing any images uploaded to their site. If you use Imgur, please consider replacing any image links/embeds you may have on PokéCommunity so everyone can see your images. Click here to learn more.

[Other] Legendary Encounter script

  • 22
    Posts
    10
    Years
    • Seen Apr 3, 2016
    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!
     
    Last edited:
    Back
    Top