• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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] Frozen NPC (Help wanted - XSE script - FireRed)

  • 3
    Posts
    2
    Years
    • Seen Feb 6, 2025
    I've created this script and the aim is to give the player a RALTS as their starter PKMN, while also activating the PKMN menu and running shoes.

    After the player has spoken to the npc, the player cannot move and is seemed to be frozen in place but the NPC is still "looking around" after the movement has been applied to them.

    Here is the script:

    Code:
    // Gives user first PKMN, sets flag for PKMN Menu
    // 
    // cartoon-face
    
    // space
    #dynamic 0x800000
    
    // start of script 
    #org @start
    
    // lock player to npc
    lock
    faceplayer
    
    // check if we've engaged before
    checkflag 0x500
    
    // if we have, goto idle msg
    if 0x1 goto @idle_npc
    
    // show intro msg for npc
    msgbox @intro_msg MSG_KEEPOPEN
    textcolor 0x3
    
    // show image of RALTS (0xA 0x3 = centre screen)
    showpokepic 0x188 0xA 0x3
    
    // give player lv6 RALTS with oran berry
    givepokemon 0x188 0x6 0x8B 0x0 0x0 0x0
    
    // play and wait for music
    fanfare 0x101
    
    // tell player about PKMN but wait for music
    msgbox @got_ralts_msg MSG_KEEPOPEN
    waitfanfare
    
    // hide RALTS image
    hidepokepic
    
    // show final msg
    msgbox @end_msg 0x6
    
    // set needed flags
    setflag 0x500 // this script = given RALTS
    setflag 0x828 // PKMN menu
    setflag 0x82F // running shoes
    
    // move npc out of the way
    applymovement 0x1 @move_npc
    waitmovement 0x0
    
    // end script
    release
    end
    
    #org @idle_npc
    msgbox @end_msg MSG_KEEPOPEN
    release
    end
    
    
    // Strings //
    #org @intro_msg
    = Ahh, good morning [player].
    
    #org @got_ralts_msg
    = [player] obtained an RALTS!
    
    #org @end_msg
    = Take care of RALTS,\nthey will take care of you if you\ltake care of them.\pOh, and by the way...\pHere are some RUNNING SHOES so you\ndon't wear down those shoes\lwalking everywhere, they're\lsupposed to durable.\p[HOLD B TO RUN]
    
    #org @idle_msg
    = Go be the best!
    
    // Movements //
    #org @move_npc
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x2  'Face Left
     
    I've created this script and the aim is to give the player a RALTS as their starter PKMN, while also activating the PKMN menu and running shoes.

    After the player has spoken to the npc, the player cannot move and is seemed to be frozen in place but the NPC is still "looking around" after the movement has been applied to them.

    Here is the script:

    Code:
    // Gives user first PKMN, sets flag for PKMN Menu
    // 
    // cartoon-face
    
    // space
    #dynamic 0x800000
    
    // start of script 
    #org @start
    
    // lock player to npc
    lock
    faceplayer
    
    // check if we've engaged before
    checkflag 0x500
    
    // if we have, goto idle msg
    if 0x1 goto @idle_npc
    
    // show intro msg for npc
    msgbox @intro_msg MSG_KEEPOPEN
    textcolor 0x3
    
    // show image of RALTS (0xA 0x3 = centre screen)
    showpokepic 0x188 0xA 0x3
    
    // give player lv6 RALTS with oran berry
    givepokemon 0x188 0x6 0x8B 0x0 0x0 0x0
    
    // play and wait for music
    fanfare 0x101
    
    // tell player about PKMN but wait for music
    msgbox @got_ralts_msg MSG_KEEPOPEN
    waitfanfare
    
    // hide RALTS image
    hidepokepic
    
    // show final msg
    msgbox @end_msg 0x6
    
    // set needed flags
    setflag 0x500 // this script = given RALTS
    setflag 0x828 // PKMN menu
    setflag 0x82F // running shoes
    
    // move npc out of the way
    applymovement 0x1 @move_npc
    waitmovement 0x0
    
    // end script
    release
    end
    
    #org @idle_npc
    msgbox @end_msg MSG_KEEPOPEN
    release
    end
    
    
    // Strings //
    #org @intro_msg
    = Ahh, good morning [player].
    
    #org @got_ralts_msg
    = [player] obtained an RALTS!
    
    #org @end_msg
    = Take care of RALTS,\nthey will take care of you if you\ltake care of them.\pOh, and by the way...\pHere are some RUNNING SHOES so you\ndon't wear down those shoes\lwalking everywhere, they're\lsupposed to durable.\p[HOLD B TO RUN]
    
    #org @idle_msg
    = Go be the best!
    
    // Movements //
    #org @move_npc
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x2  'Face Left

    I assume the game freezes because @move_npc is not ended with a 0xFE.
     
    Im so stupid haha, I thought the they was on about within the
    Code:
    applymovement ...
    or
    Code:
    waitmovement ...
    Now I see, because of your comment, that I need to add #raw 0xFE to the movement values. Thank you for helping me see this.

    EDIT:
    Can confirm, adding this fixed my issue
     
    Back
    Top