• 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 Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

thetripplenine

tripple.
98
Posts
11
Years
  • You need to set the flag in his person ID and the do a hidesprite command after he walks away. That should do the trick.

    So I did that but you have to talk to her again in order for her to move and hide, while I just want her to walk away after the script

    Here's my script:
    Spoiler:
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • So I did that but you have to talk to her again in order for her to move and hide, while I just want her to walk away after the script

    Here's my script:
    Spoiler:

    It is the trainerbattle command. You need to use trainerbattle type 3. I can't remember which parameter exactly it is, but when XSE prompts you for a type of battle, use 3. It is the only one that allows the script to continue.
     

    thetripplenine

    tripple.
    98
    Posts
    11
    Years
  • It is the trainerbattle command. You need to use trainerbattle type 3. I can't remember which parameter exactly it is, but when XSE prompts you for a type of battle, use 3. It is the only one that allows the script to continue.

    I figured out from diegoisawesome's walkthrough that its trainerbattle 0x1 etc, but thanks anyways!
     
    Last edited:
    2
    Posts
    10
    Years
    • Seen Jun 4, 2013
    Hello! i have a question heres some info first though
    Hacking: emerald
    Tools of use: pokescript, XSE, Adv. Map
    type of event: person script
    topic of interest: wild/legendary pokemon battles
    Question: okey, so i've been searching around the net for a few hours because i can't find the right codes to start the wild battle script on my emerald game, cause almost every-
    where has the FR battle scripts but when i use them, it never starts the battle, the script (i think) would just skip the battle and do the fade in, fade out and then i would be free to move.
    Spoiler:

    so basicly i just want to know what i am doing wrong, and what to fix. (possibly the right codes to use)
    thank you, Prinnykaze
     
    3
    Posts
    10
    Years
    • Seen Jun 15, 2022
    Ok, so I tried to do a scripted warp and when i try and reach the area I want (Pallet Town (map bank 4,0)) It the screen goes black and 'freezes'. I have tried other areas and they work but not to the intended area.
    I am using PKSV-UI
    Pokemon Fire Red v1.0
    Script Event
    topic : Scripted Warps

    Spoiler:


    Everything else works except the warp, sorry if this has been answered already but scrolling through 100s of pages seems longer than asking for help :3
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • Ok, so I tried to do a scripted warp and when i try and reach the area I want (Pallet Town (map bank 4,0)) It the screen goes black and 'freezes'. I have tried other areas and they work but not to the intended area.
    I am using PKSV-UI
    Pokemon Fire Red v1.0
    Script Event
    topic : Scripted Warps

    Spoiler:


    Everything else works except the warp, sorry if this has been answered already but scrolling through 100s of pages seems longer than asking for help :3

    Try putting a "waitstate" on the line after the warp. If that doesn't work, go and make sure the map isn't corrupt by getting there by other means.
     
    3
    Posts
    10
    Years
    • Seen Jun 15, 2022
    Try putting a "waitstate" on the line after the warp. If that doesn't work, go and make sure the map isn't corrupt by getting there by other means.

    it seems waitstate is not considered a command on PKSV

    message which appears in compilers log : Warning: Unknown command "waitstate"

    Thanks for trying though
     
    5,256
    Posts
    16
    Years
  • To be honest, most people here are much more familiar with XSE's syntax and it is generally seen to be the better script editor - I think you'd have an easier time if you switched to XSE 1.1.1. There's a mega-huge tutorial just waiting for you here, too!

    This is what your script would look like in XSE's syntax:

    Code:
    #dynamic 0x800000
    
    //---------------
    #org @start
    lock
    faceplayer
    msgbox @string1 MSG_YESNO //"Cap'n, are you ready to leave?"
    compare LASTRESULT 0x1
    if 0x1 goto @snippet1
    msgbox @string2 MSG_FACE //"Ok, come back when ye ready."
    release
    end
    
    //---------------
    #org @snippet1
    msgbox @string3 MSG_FACE //"YOU: Yes, Ace, get the boat ready\..."
    applymovement MOVE_PLAYER @move1
    waitmovement 0x0
    msgbox @string4 MSG_FACE //"YOU: You know why you are here\nto..."
    applymovement MOVE_PLAYER @move1
    waitmovement 0x0
    msgbox @string5 MSG_FACE //"YOU: There is one pirate.\pHe sail..."
    applymovement MOVE_PLAYER @move1
    waitmovement 0x0
    warp 0x4 0x0 0xFF 0x8 0x12
    waitstate
    release
    end
    
    
    //---------
    // Strings
    //---------
    #org @string1
    = Cap'n, are you ready to leave?
    
    #org @string2
    = Ok, come back when ye ready.
    
    #org @string3
    = YOU: Yes, Ace, get the boat ready\nin a bit, I need to speak to all\lof you.\pAdmiral Ace: Ok Cap'n, I can do\nthat for ye.\pI will gather their attention.\pMercanarys!\pOur great leader would like to\nspeak!
    
    #org @string4
    = YOU: You know why you are here\ntoday.\pYou are here so that this boat\nreaches the new region of\lDesertusaum.\pThis region is full o' pirates,\nus being mercenarys will be able\lto handle them, they are thieves,\lnot fighters.\pHowever...
    
    #org @string5
    = YOU: There is one pirate.\pHe sails under the name of\nRasarchi.\pHe is known for being one of the\nbest pirates to have lived.\pHe is notorius.\pHe is like the Flying Dutchman,\nonly appears every so often, and\lwe happen to travel in the season\lwhen he never appears!\pDon't fear the tales, we will\nreach our destination!
    
    
    //-----------
    // Movements
    //-----------
    #org @move1
    #raw 0x1 //Face Up
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x2 //Face Left
    #raw 0x3 //Face Right
    #raw 0x0 //Face Down
    #raw 0xFE //End of Movements
     
    Last edited:

    LaDestitute

    Razor Sharp
    84
    Posts
    11
    Years
  • I need some help with un-bugging an XSE script I wrote. It's one of those "rival follows player" sort of things, and I'm using setvar/compare as checkpoints, so the rest of the script can continue from separate maps until the destination is reached. The first part (the interaction with your rival in the Professor's lab) works fine, but when I step back outside and activate the second script event, the dialog from the first part (the rival's dialog) is played instead of how I want, where the rival comes out of the door, and follows the player to the exit of the town. A friend even helped me with trying to fix it, but no luck with that.

    Code:
    #dynamic 0x800000
    
    //---------------
    #org @start
    checkflag 0x828
    if 0x1 goto @snippet1
    compare 0x4001 0x1
    if 0x1 goto @snippet2
    release
    end
    
    //---------------
    #org @snippet1
    applymovement 0x7 @move1
    waitmovement 0x0
    msgbox @string1 MSG_NORMAL //"Hey, where are you going? You're\n..."
    applymovement MOVE_PLAYER @move2
    waitmovement 0x0
    applymovement MOVE_PLAYER @move3
    waitmovement 0x0
    applymovement 0x7 @move4
    waitmovement 0x0
    setvar 0x4001 0x1
    release
    end
    
    //---------------
    #org @snippet2
    applymovement MOVE_PLAYER @move5
    waitmovement 0x0
    applymovement 0x3 @move6
    waitmovement 0x0
    applymovement MOVE_PLAYER @move7
    applymovement 0x3 @move8
    waitmovement 0x0
    release
    end
    
    
    //---------
    // Strings
    //---------
    #org @string1
    = Hey, where are you going?\pYou're going to go see Professor\nPine at the Wildlife Reserve,\laren't you?\pI'm coming with you.\pNo ["]if"s or ["]but"s about it!
    
    
    //-----------
    // Movements
    //-----------
    #org @move1
    #raw 0x62 //Exclamation Mark (!)
    #raw 0x1D //Step Down (Fast)
    #raw 0x1D //Step Down (Fast)
    #raw 0x1D //Step Down (Fast)
    #raw 0xFE //End of Movements
    
    #org @move2
    #raw 0x1 //Face Up
    #raw 0xFE //End of Movements
    
    #org @move3
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move4
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move5
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move6
    #raw 0x61 //Show
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move7
    #raw 0x10 //Step Down (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0xFE //End of Movements
    
    #org @move8
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0xFE //End of Movements
     

    TweenyTodd

    Quitting cuz i got a job
    95
    Posts
    11
    Years
  • You forgot to set the flag.

    Code:
    #dynamic 0x800000
    
    //---------------
    #org @start
    checkflag 0x828 [COLOR="Red"]HERE IS WHERE THE DIVISION IS[/COLOR]
    if 0x1 goto @snippet1
    compare 0x4001 0x1
    if 0x1 goto @snippet2
    release
    end
    
    //---------------
    #org @snippet1
    applymovement 0x7 @move1
    waitmovement 0x0
    msgbox @string1 MSG_NORMAL //"Hey, where are you going? You're\n..."
    applymovement MOVE_PLAYER @move2
    waitmovement 0x0
    applymovement MOVE_PLAYER @move3
    waitmovement 0x0
    applymovement 0x7 @move4
    waitmovement 0x0
    [COLOR="Red"]setflag 0x828 [/COLOR][COLOR="Black"]Or somewhere else before the script is activated a second time.[/COLOR]
    setvar 0x4001 0x1
    release
    end
    
    //---------------
    #org @snippet2
    applymovement MOVE_PLAYER @move5
    waitmovement 0x0
    applymovement 0x3 @move6
    waitmovement 0x0
    applymovement MOVE_PLAYER @move7
    applymovement 0x3 @move8
    waitmovement 0x0
    release
    end
    
    
    //---------
    // Strings
    //---------
    #org @string1
    = Hey, where are you going?\pYou're going to go see Professor\nPine at the Wildlife Reserve,\laren't you?\pI'm coming with you.\pNo ["]if"s or ["]but"s about it!
    
    
    //-----------
    // Movements
    //-----------
    #org @move1
    #raw 0x62 //Exclamation Mark (!)
    #raw 0x1D //Step Down (Fast)
    #raw 0x1D //Step Down (Fast)
    #raw 0x1D //Step Down (Fast)
    #raw 0xFE //End of Movements
    
    #org @move2
    #raw 0x1 //Face Up
    #raw 0xFE //End of Movements
    
    #org @move3
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move4
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move5
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move6
    #raw 0x61 //Show
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move7
    #raw 0x10 //Step Down (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0xFE //End of Movements
    
    #org @move8
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x11 //Step Up (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0x12 //Step Left (Normal)
    #raw 0xFE //End of Movements
     
    2
    Posts
    10
    Years
    • Seen May 16, 2013
    I need help with a tile script. It's supposed to be a rival battle, which works fine, but afterwards I want him to walk away and then delete the sprite. The first and biggest problem is that after the battle the person I was battling becomes a gray version of my sprite and I end up controling him instead of my actual character. I don't really know how to delete the sprite but I can work around that I think, I just need to know why I'm suddenly changing characters.

    My script: (Pokescript)


    #org $battle
    jingle
    message $talk
    $talk 1 = WAIT!
    boxset 6
    applymovement 4 $walk
    $walk 1 ; #binary 0x10 0x10 0x10 0xFE
    pausemove 0
    applymovement 0xFF $walk1
    $walk1 1 ; #binary 0x01 0xFE
    pausemove 0
    setflag 0x1204
    trainerbattle 0x01 0x001 $see $win $after
    $see 1 = You must be itching for a battle,\nlet's see how good your new POKEMON\lis!
    $win 1 = Wow...\lYour pokemon is impressive

    #org $after
    checkflag 0x1204
    if 0x01 goto $leave
    release
    end

    #org $leave
    message $talk1
    $talk1 1 = You really are a natural...\nI have a feeling you and your\lPOKEMON are going to have quite the\lstory to tell before all is said\land done.
    boxset 6
    applymovement 4 $gone
    $gone 1 ; #binary 0x13 0x10 0x10 0xFE
    pausemove 0
    applymovement 0xFF $look
    $look 1 ; #binary 0x04 0xFE
    pausemove 0
    applymovement 4 $gone1
    $gone1 1 ; #binary 0x10 0x10 0x10 0x60 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0xFE
    pausemove 0
    setvar 0x6003 0x0001
    release
    end
     
    5,256
    Posts
    16
    Years
  • Jesus, how do people still end up using PokéScript?

    I think you'd have an easier time if you switched to XSE 1.1.1. There's a mega-huge tutorial just waiting for you here, too!

    Your script would then look like this in XSE's syntax:

    Code:
    #dynamic 0x800000
    
    //---------------
    #org @start
    checkflag 0x1204
    if 0x1 goto @snippet1
    msgbox @string1 MSG_NORMAL //"WAIT!"
    applymovement 0x4 @move1
    waitmovement 0x0
    spriteface 0xFF 0x2
    trainerbattle 0x1 0x1 0x0 @string2 @string3 @snippet2
    
    //---------------
    #org @snippet1
    release
    end
    
    //---------------
    #org @snippet2
    setflag 0x1204
    msgbox @string3 MSG_NORMAL //"Wow...\pYour POKéMON is impressive..."
    applymovement 0x4 @move2
    waitmovement 0x0
    spriteface 0xFF 0x4
    applymovement 0x4 @move3
    waitmovement 0x0
    setvar 0x6003 0x1
    release
    end
    
    
    //---------
    // Strings
    //---------
    #org @string1
    = WAIT!
    
    #org @string2
    = You must be itching for a battle,\nlet's see how good your new\lPOKéMON is!
    
    #org @string3
    = Wow...\pYour POKéMON is impressive!
    
    
    //-----------
    // Movements
    //-----------
    #org @move1
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move2
    #raw 0x13 //Step Right (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move3
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x60 //Hide
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0xFE //End of Movements

    In any case, the variables and flags you have used are unsafe! Try using these instead.

    Code:
    #dynamic 0x800000
    
    //---------------
    #org @start
    [B]checkflag 0x200[/B]
    if 0x1 goto @snippet1
    msgbox @string1 MSG_NORMAL //"WAIT!"
    applymovement 0x4 @move1
    waitmovement 0x0
    spriteface 0xFF 0x2
    trainerbattle 0x1 0x1 0x0 @string2 @string3 @snippet2
    
    //---------------
    #org @snippet1
    release
    end
    
    //---------------
    #org @snippet2
    [B]setflag 0x200[/B]
    msgbox @string3 MSG_NORMAL //"Wow...\pYour POKéMON is impressive..."
    applymovement 0x4 @move2
    waitmovement 0x0
    spriteface 0xFF 0x4
    applymovement 0x4 @move3
    waitmovement 0x0
    [B]setvar 0x4000 0x1[/B]
    release
    end
    
    
    //---------
    // Strings
    //---------
    #org @string1
    = WAIT!
    
    #org @string2
    = You must be itching for a battle,\nlet's see how good your new\lPOKéMON is!
    
    #org @string3
    = Wow...\pYour POKéMON is impressive!
    
    
    //-----------
    // Movements
    //-----------
    #org @move1
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move2
    #raw 0x13 //Step Right (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move3
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x60 //Hide
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0xFE //End of Movements

    As karatekid has said many a time, the only truly safe flags and variables are 0x200 - 0x2FF for flags and 0x4000 to 0x40FF for variables.
     
    3
    Posts
    10
    Years
    • Seen Jun 15, 2022
    To be honest, most people here are much more familiar with XSE's syntax and it is generally seen to be the better script editor - I think you'd have an easier time if you switched to XSE 1.1.1. There' s a mega-huge tutorial just waiting for you here, too!

    Spoiler:
    Spoiler:



    OK, Thanks :D I'll start learning this editor now.
     
    2
    Posts
    10
    Years
    • Seen May 16, 2013
    Jesus, how do people still end up using PokéScript?

    *

    Your script would then look like this in XSE's syntax:

    Code:
    #dynamic 0x800000
    
    //---------------
    #org @start
    checkflag 0x1204
    if 0x1 goto @snippet1
    msgbox @string1 MSG_NORMAL //"WAIT!"
    applymovement 0x4 @move1
    waitmovement 0x0
    spriteface 0xFF 0x2
    trainerbattle 0x1 0x1 0x0 @string2 @string3 @snippet2
    
    //---------------
    #org @snippet1
    release
    end
    
    //---------------
    #org @snippet2
    setflag 0x1204
    msgbox @string3 MSG_NORMAL //"Wow...\pYour POKéMON is impressive..."
    applymovement 0x4 @move2
    waitmovement 0x0
    spriteface 0xFF 0x4
    applymovement 0x4 @move3
    waitmovement 0x0
    setvar 0x6003 0x1
    release
    end
    
    
    //---------
    // Strings
    //---------
    #org @string1
    = WAIT!
    
    #org @string2
    = You must be itching for a battle,\nlet's see how good your new\lPOKéMON is!
    
    #org @string3
    = Wow...\pYour POKéMON is impressive!
    
    
    //-----------
    // Movements
    //-----------
    #org @move1
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move2
    #raw 0x13 //Step Right (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move3
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x60 //Hide
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0xFE //End of Movements
    In any case, the variables and flags you have used are unsafe! Try using these instead.

    Code:
    #dynamic 0x800000
    
    //---------------
    #org @start
    [B]checkflag 0x200[/B]
    if 0x1 goto @snippet1
    msgbox @string1 MSG_NORMAL //"WAIT!"
    applymovement 0x4 @move1
    waitmovement 0x0
    spriteface 0xFF 0x2
    trainerbattle 0x1 0x1 0x0 @string2 @string3 @snippet2
    
    //---------------
    #org @snippet1
    release
    end
    
    //---------------
    #org @snippet2
    [B]setflag 0x200[/B]
    msgbox @string3 MSG_NORMAL //"Wow...\pYour POKéMON is impressive..."
    applymovement 0x4 @move2
    waitmovement 0x0
    spriteface 0xFF 0x4
    applymovement 0x4 @move3
    waitmovement 0x0
    [B]setvar 0x4000 0x1[/B]
    release
    end
    
    
    //---------
    // Strings
    //---------
    #org @string1
    = WAIT!
    
    #org @string2
    = You must be itching for a battle,\nlet's see how good your new\lPOKéMON is!
    
    #org @string3
    = Wow...\pYour POKéMON is impressive!
    
    
    //-----------
    // Movements
    //-----------
    #org @move1
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move2
    #raw 0x13 //Step Right (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0xFE //End of Movements
    
    #org @move3
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x10 //Step Down (Normal)
    #raw 0x60 //Hide
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0x1F //Step Left (Fast)
    #raw 0xFE //End of Movements
    As karatekid has said many a time, the only truly safe flags and variables are 0x200 - 0x2FF for flags and 0x4000 to 0x40FF for variables.


    Well i switched to XSE and tried the changes you gave me but I'm still having the same problem. The trainer i battle turns into a gray/red version of my character and i end up controlling him instead of the actual player. Basically I just want to know if its because my script is messed up somewhere or if its my rom?
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    The trainer i battle turns into a gray/red version of my character and i end up controlling him instead of the actual player.

    That is a common bug when editing the NPCs found on a map.
    There had been multiple suggestions to try, like for instance, change the direction of the NPC is facing, or remove the NPCs' variable numbers through Advance Map.
     

    Aethestode

    Hacker
    1,700
    Posts
    16
    Years
    • Seen Aug 14, 2023
    There is a tutorial (that I wrote) about making new evolution stones in the tutorials section.

    New types of evolution; it's possible but will require ASM.

    This is a feature of JPAN's Hacked Engine for FireRed. It is called "runtime character customization".

    Thank you so much! Really appreciate it =)
     

    Gyrath

    Pokemon Lurid Creator
    23
    Posts
    11
    Years
  • So thanks to KarateKid552 I got my script working perfectly.
    Later I realised something need to be added to the script.
    My scripts is basically an introduction. Oak greets you and gives you a new pokemon. When I realised that if you talk to him again that he will give you the pokemon another time. So I tried to take that away but adding in a message which will just say something rather then repeat the script.

    #dyn 0x740000
    #org @main
    lock
    faceplayer
    message @intro
    callstd MSG_NORMAL
    setflag 0x200
    checkflag 0x203
    if == jump @complete
    checkflag 0x201
    if 0x1 jump @end
    setflag FR_POKEMON
    countpokemon
    compare LASTRESULT 6
    if == jump @noroom
    addpokemon EEVEE 0x5 ORANBERRY 0 0 0
    setflag 0x201
    storepokemon 0 EEVEE
    message @getmsg
    fanfare 0x101
    showmsg
    waitfanfare
    waitbutton
    @end
    release
    end

    #org @complete
    setflag 0x203
    message @finish
    callstd MSG_NORMAL
    release
    end

    #org @noroom
    msgbox @noroomlol
    callstd MSG_NOCLOSE
    release
    end

    #org @noroomlol
    = You don't have enough room in your party.

    #org @getmsg
    = You got a \v\h02!\pNow, my Grandson will be waiting\nfor you in Dream City.\pWith him you will look for Martin.\pThe legend of Rayquaza might be\ntrue.\pFind Martin and he will tell you\neverything you need to know.
    #org @intro
    = Hello \v\h01!.\pIt is your 13th birthday and I\npromised that I would give you a...\pPokemon!!

    #org @finish
    = Be the best trainer that ever lived!

    Any issues?
     
    241
    Posts
    11
    Years
  • I've got a level script that just stopped happening. It's Script 3 on One Island in the PC in FireRed...

    I haven't (consciously) made any changes, but now the script doesn't run the first time you enter the pokemon center, so when you approach Bill and Cielo you're just sent straight home as part of the other script there.

    Here is the unaltered level script...
    Code:
    '---------------
    #org 0x170CB1
    lockall
    textcolor 0x0
    applymovement MOVE_PLAYER 0x8170E7D
    applymovement 0x2 0x8170E86
    waitmovement 0x0
    msgbox 0x81A0CDE MSG_KEEPOPEN '"BILL: Hey, there!\nCELIO!"
    applymovement MOVE_PLAYER 0x81A75EB
    waitmovement 0x0
    sound 0x15
    applymovement 0x3 0x81A75DB
    waitmovement 0x0
    applymovement 0x3 0x81A75E7
    waitmovement 0x0
    applymovement 0x3 0x81A75DD
    waitmovement 0x0
    msgbox 0x81A0CF7 MSG_KEEPOPEN '"CELIO: BILL!\nI can't believe you ..."
    msgbox 0x81A0D27 MSG_KEEPOPEN '"BILL: Well, absolutely!\nHow's you..."
    applymovement 0x2 0x81A75ED
    applymovement MOVE_PLAYER 0x81A75E9
    waitmovement 0x0
    msgbox 0x81A0D72 MSG_KEEPOPEN '"[player], this is my buddy CELIO.\..."
    applymovement 0x2 0x81A75EB
    waitmovement 0x0
    applymovement MOVE_PLAYER 0x81A75EB
    waitmovement 0x0
    checkflag 0x82C
    if 0x1 call 0x8170E34
    checkflag 0x82C
    if 0x0 call 0x8170E3D
    applymovement 0x3 0x81A75ED
    waitmovement 0x0
    msgbox 0x81A0E17 MSG_KEEPOPEN '"CELIO: That's really impressive.\p..."
    msgbox 0x81A0E90 MSG_KEEPOPEN '"BILL: So, bring me up to speed.\nH..."
    applymovement 0x3 0x81A75E7
    waitmovement 0x0
    msgbox 0x81A0ECC MSG_KEEPOPEN '"CELIO: It's running fine, but we'r..."
    closeonkeypress
    applymovement 0x2 0x81A75E9
    waitmovement 0x0
    msgbox 0x81A0F40 MSG_KEEPOPEN '"BILL: Oh, yeah?\nOkay, let me take..."
    applymovement 0x2 0x81A75ED
    waitmovement 0x0
    applymovement MOVE_PLAYER 0x81A75E9
    waitmovement 0x0
    msgbox 0x81A0FB1 MSG_KEEPOPEN '"[player], can I get you to wait fo..."
    loadpointer 0x0 0x81A10EE '"[player] accepted the METEORITE\nf..."
    giveitem2 0x118 0x1 0x13E
    additem 0x118 0x1
    applymovement 0x3 0x81A75ED
    waitmovement 0x0
    msgbox 0x81A1113 MSG_KEEPOPEN '"CELIO: [player], if you are going\..."
    additem 0x16F 0x1
    loadpointer 0x0 0x81A231B '"Obtained the TRI-PASS!"
    giveitem2 0x16F 0x1 0x13E
    msgbox 0x81A1150 MSG_KEEPOPEN '"It's a PASS for the ferry service\..."
    compare 0x4058 0x2
    if 0x4 call 0x8170E46
    compare 0x4058 0x2
    if 0x0 call 0x8170E58
    setflag 0x845
    msgbox 0x81A1230 MSG_KEEPOPEN '"BILL: I'll catch you later!\nSay h..."
    closeonkeypress
    applymovement 0x2 0x81A75E9
    waitmovement 0x0
    applymovement 0x3 0x81A75E9
    waitmovement 0x0
    setflag 0x841
    setvar 0x4076 0x1
    releaseall
    end
    
    '---------------
    #org 0x170E34
    msgbox 0x81A0DE8 MSG_KEEPOPEN '"CELIO, this is [player], the\nreig..."
    return
    
    '---------------
    #org 0x170E3D
    msgbox 0x81A0DAC MSG_KEEPOPEN '"CELIO, this is [player], a rising\..."
    return
    
    '---------------
    #org 0x170E46
    textcolor 0x3
    fanfare 0x13E
    preparemsg 0x81A11EC '"[player] received an extra page\nf..."
    waitmsg
    waitfanfare
    call 0x81A6675
    return
    
    '---------------
    #org 0x170E58
    setflag 0x39
    setvar 0x4058 0x2
    additem 0x169 0x1
    loadpointer 0x0 0x81A1218 '"[player] received\na TOWN MAP!"
    giveitem2 0x169 0x1 0x13E
    return
    
    '---------------
    #org 0x1A6675
    copyvar 0x8012 0x8013
    return
    
    
    '---------
    ' Strings
    '---------
    #org 0x1A0CDE
    = BILL: Hey, there!\nCELIO!
    
    #org 0x1A0CF7
    = CELIO: BILL!\nI can't believe you came out here.
    
    #org 0x1A0D27
    = BILL: Well, absolutely!\nHow's your research coming along?\p[.]Oh, wait a sec.
    
    #org 0x1A0D72
    = [player], this is my buddy CELIO.\nHe's one dedicated PC MANIAC!
    
    #org 0x1A0E17
    = CELIO: That's really impressive.\pI hate to say it, but I have zero\naptitude for battling.\pAnyways, I'm glad to meet you.
    
    #org 0x1A0E90
    = BILL: So, bring me up to speed.\nHow's your machine running?
    
    #org 0x1A0ECC
    = CELIO: It's running fine, but we're\ntoo remote out here.\pThe PCs on this island just can't\nlink with your PC, BILL.
    
    #org 0x1A0F40
    = BILL: Oh, yeah?\nOkay, let me take a look-see.\p[.]Hang on here[.]\nI think we can make it work.\lLet me help you, okay?
    
    #org 0x1A0FB1
    = [player], can I get you to wait for\nme just a bit?\p[.]Actually, can I get you to do\nme a favor?\pThe island next to this one's\ncalled TWO ISLAND.\pThere's a guy there that runs\na GAME CORNER.\pHe has this thing for rare rocks\nand gems.\pWe keep in touch, being fellow\nmaniacs.\pSo, can I get you to deliver this\nMETEORITE to him?
    
    #org 0x1A10EE
    = [player] accepted the METEORITE\nfrom BILL.
    
    #org 0x1A1113
    = CELIO: [player], if you are going\nto TWO ISLAND, please take this.
    
    #org 0x1A231B
    = Obtained the TRI-PASS!
    
    #org 0x1A1150
    = It's a PASS for the ferry service\nserving the local islands.\pIt will let you travel between the\nISLANDS ONE, TWO, and THREE.\pOh, you should have this, too.
    
    #org 0x1A1230
    = BILL: I'll catch you later!\nSay hi to the guy for me!
    
    #org 0x1A0DE8
    = CELIO, this is [player], the\nreigning POKéMON CHAMP!
    
    #org 0x1A0DAC
    = CELIO, this is [player], a rising\ncontender as the POKéMON CHAMP!
    
    #org 0x1A11EC
    = [player] received an extra page\nfor the TOWN MAP!
    
    #org 0x1A1218
    = [player] received\na TOWN MAP!
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x170E7D
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x2E 'Face Up (Delayed)
    #raw 0xFE 'End of Movements
    
    #org 0x170E86
    #raw 0x11 'Step Up (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x30 'Face Right (Delayed)
    #raw 0xFE 'End of Movements
    
    #org 0x1A75EB
    #raw 0x30 'Face Right (Delayed)
    #raw 0xFE 'End of Movements
    
    #org 0x1A75DB
    #raw 0x62 'Exclamation Mark (!)
    #raw 0xFE 'End of Movements
    
    #org 0x1A75E7
    #raw 0x2F 'Face Left (Delayed)
    #raw 0xFE 'End of Movements
    
    #org 0x1A75DD
    #raw 0x1C 'Delay5
    #raw 0x1C 'Delay5
    #raw 0x1C 'Delay5
    #raw 0xFE 'End of Movements
    
    #org 0x1A75ED
    #raw 0x2D 'Face Down (Delayed)
    #raw 0xFE 'End of Movements
    
    #org 0x1A75E9
    #raw 0x2E 'Face Up (Delayed)
    #raw 0xFE 'End of Movements

    And the flag in AMap is set to 4076 and the value is 0. Is there any way to fix this? Even something like adding a setvar or clearflag or whatever to the gym match script in Cinnabar, so that it works when you leave the gym...
     
    Status
    Not open for further replies.
    Back
    Top