• 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] Frozen NPC (Help wanted - XSE script - FireRed)

  • 3
    Posts
    1
    Years
    • Seen Jan 17, 2024
    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
     
  • 466
    Posts
    6
    Years
    • Seen yesterday
    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.
     
  • 760
    Posts
    16
    Years
    • Seen Jun 12, 2024
    @cartoon-face

    Literally every example in that post ends with #raw 0xFE?
     
  • 3
    Posts
    1
    Years
    • Seen Jan 17, 2024
    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