• 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?".
  • 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.

[Script] Help legendary static encounter script Emerald

18
Posts
3
Years
    • Seen Apr 17, 2023
    Hello everyone!

    I'm trying to set a static encounter for Zapdos, Moltres and Articuno. I put the 3 sprites but and set the battle too but I don't know how to hide the sprite if I kill the bird or I catch it.
    I haven't founded any detailed guide for static encounter.
     

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen May 8, 2024
    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    faceplayer
    msgbox @1 0x6
    cry 0x6 0x0
    wildbattle 0x6 0x1E 0x8B
    fadescreen 0x1
    fadescreen 0x0
    [I][B]hidesprite 0x2
    setflag 0x200[/B][/I]
    release
    end
    
    #org @1
    = CHARIZARD: Raaarrgghh!

    Never hacked emerald or did a static encounter but this script I found on this forum should have everything you need. Pretty sure these commands don't change between FR and Emerald.
    The two commands you have to use are after wildbattle; hidesprite and setflag. Hidesprite hides the sprite with the person event number in the argument (0x2 here). setflag is then used here to make the sprite with that flag ID permanently disappear. For the example script to work, the sprite's "person event no" in advance map must be 2, and the sprite's "Person ID" must be 200. You can switch out those values for your birds' sprites, just make sure the script matches what you put on the sprite in advance map.
    The fadescreen is not necessary but looks nice.
    If you clear that flag in any script later the sprite will reappear.
     
    18
    Posts
    3
    Years
    • Seen Apr 17, 2023
    It works but how can I hide it OLNY if I catch the bird or kill it?
    The script for the other static encounter use LASTRESULT but I haven't founded nothing about that command

    Thx for the help Asith
     
    Last edited:

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen May 8, 2024
    It works but how can I hide it OLNY if I catch the bird or kill it?
    The script for the other static encounter use LASTRESULT but I haven't founded nothing about that command

    Thx for the help Asith
    Other than catching or killing the bird, the only other option is the player running, right?
    Unless I'm totally forgetting something, I don't know if there's any way to detect the player running away from battle. LASTRESULT is just a variable that stores data from many processes like YES/NO questions. However, if you post that script you're talking about we can look at it and figure out more
     
    18
    Posts
    3
    Years
    • Seen Apr 17, 2023
    Other than catching or killing the bird, the only other option is the player running, right?
    Unless I'm totally forgetting something, I don't know if there's any way to detect the player running away from battle. LASTRESULT is just a variable that stores data from many processes like YES/NO questions. However, if you post that script you're talking about we can look at it and figure out more

    '---------------
    #org 0x23905A
    lock
    faceplayer
    checksound
    cry 0x193 0x2
    pause 0x28
    waitcry
    setwildbattle 0x193 0x28 0x0
    setflag 0x8C1
    special 0x13B
    waitstate
    clearflag 0x8C1
    special2 LASTRESULT 0xB7
    compare LASTRESULT 0x1
    if 0x1 goto 0x82390A1
    compare LASTRESULT 0x4
    if 0x1 goto 0x82390AA
    compare LASTRESULT 0x5
    if 0x1 goto 0x82390AA
    setflag 0x1BD
    release
    end

    '---------------
    #org 0x2390A1
    setflag 0x1BD
    goto 0x827376D

    '---------------
    #org 0x2390AA
    setvar 0x8004 0x193
    goto 0x8273776

    '---------------
    #org 0x27376D
    fadescreen3 0x1
    hidesprite LASTTALKED
    fadescreen3 0x0
    release
    end

    '---------------
    #org 0x273776
    fadescreen3 0x1
    hidesprite LASTTALKED
    fadescreen3 0x0
    bufferpokemon 0x0 0x8004
    msgbox 0x8273204 MSG_KEEPOPEN '"The [buffer1] flew away!"
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x273204
    = The [buffer1] flew away!

    This is for a regi battle
     

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen May 8, 2024
    I'm still unsure what you want to accomplish. In the game's usual static encounters, like the one you showed, the pokemon will disappear when you catch it, kill it, or run away from it. The only difference is that there's also a message if you just run. Do you want to make it so the bird doesn't fly away if you run? If so, you can use the script you've shown but change the block at 0x273776 (the last big block). That's the block for running away. Just remove the hidesprite command from that block, and the rest if you want, and the sprite will stay.
     
    18
    Posts
    3
    Years
    • Seen Apr 17, 2023
    If I use the script you put for Charizard, it wanishes but when I walk it riappears.
    And I don't know how to insert the battle music I want or a message like "zapdos flew away" if you beat it.
    Sorry, I know they're a lot of things but this zapdos is giving me so much problems ahahah
     

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen May 8, 2024
    If I use the script you put for Charizard, it wanishes but when I walk it riappears.
    And I don't know how to insert the battle music I want or a message like "zapdos flew away" if you beat it.
    Sorry, I know they're a lot of things but this zapdos is giving me so much problems ahahah

    Remember the setflag 0x200 in the Charizard script. For that to work you have to put 0200 in the Person ID box of Charizard's sprite. It's right under script offset in advance map.

    Just use a simple message box for the message, put it after the wildbattle in the charizard script. If you don't know how to message box, read a basic scripting tutorial like this.

    I don't know about battle music, probably a special. Try searching for a tutorial
     
    18
    Posts
    3
    Years
    • Seen Apr 17, 2023
    Remember the setflag 0x200 in the Charizard script. For that to work you have to put 0200 in the Person ID box of Charizard's sprite. It's right under script offset in advance map.

    Just use a simple message box for the message, put it after the wildbattle in the charizard script. If you don't know how to message box, read a basic scripting tutorial like this.

    I don't know about battle music, probably a special. Try searching for a tutorial

    thx mate. Now zapdos go away after the battle. I know hot to use msgbox but now the problem is 'put the message only if I beat it' ahahah

    I'll try to resolve by myself.

    Thanks a lot!
     
    Back
    Top