• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • 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.

[Other] Legendary Encounter script

  • 22
    Posts
    9
    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