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

[Other] I need help with script

  • 25
    Posts
    8
    Years
    • Seen Feb 19, 2018
    Ok so I need help with my script (Fire red)

    I need one npc to block the path until you have obtained the pokedex from oak and after that move one step left one step up then look down
    (if that is not possible to detect then Like the old man blocking the forest )

    If you talk to him with no pokedex he says "Go see Oak first"
    With pokedex he says "You can now pass" then he moves
    When you talk to him after it has been completed "any text"

    all the text I can change myself I have made the script but I have been having issues with the flags and with it detecting the pokedex part of things and also when I talk to the npc it just freezes but music still plays (other scripts work fine ingame)

    I would like help with my script on the script I have or you could make the script for me and I can replace the offsets. I am using XSE for scripting and I am quite new to scripting but I understand the basics.

    also sorry if I missed any important information off this thread just comment and i will add the missing information if any

    Thanks in advance -Jazzy
     
    I'm using a person event it only lets me use 2 numbers for the unknown should I use the Script event? also where would I put the unknown value in my script?

    thanks - Jazzy
     
    Like this?

    Spoiler:


    insert it into 'SCRIPT' & set its var no. to 4050 and Unknown to 0300
     
    Code:
    '---------------
    #org 0x80035A
    lock
    faceplayer
    checkflag 0x2300
    if 0x1 goto 0x8800373
    msgbox 0x88003A7 MSG_NORMAL '"[red_fr]Go and see Oak!"
    setflag 0x2300
    release
    end
    
    '---------------
    #org 0x800373
    checkflag 0x2300
    if 0x0 goto 0x880039C
    msgbox 0x88003BC MSG_NORMAL '"[blue_fr]You can now pass!"
    applymovement 0x7 0x88003D3
    waitmovement 0x0
    msgbox 0x88003D7 MSG_NORMAL '"[blue_fr]Have fun."
    setflag 0x2300
    release
    end
    
    '---------------
    #org 0x80039C
    msgbox 0x88003E6 MSG_NORMAL '"[blue_fr]Enjoy this route!"
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x8003A7
    = [red_fr]Go and see Oak!
    
    #org 0x8003BC
    = [blue_fr]You can now pass!
    
    #org 0x8003D7
    = [blue_fr]Have fun.
    
    #org 0x8003E6
    = [blue_fr]Enjoy this route!
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x8003D3
    #raw 0xE 'Step Left (Slow)
    #raw 0x11 'Step Up (Normal)
    #raw 0x4 'Face Down (Faster)
     
    Code:
    '---------------
    #org 0x80035A
    lock
    faceplayer
    checkflag 0x2300
    if 0x1 goto 0x8800373
    msgbox 0x88003A7 MSG_NORMAL '"[red_fr]Go and see Oak!"
    setflag 0x2300
    release
    end
    
    '---------------
    #org 0x800373
    checkflag 0x2300
    if 0x0 goto 0x880039C
    msgbox 0x88003BC MSG_NORMAL '"[blue_fr]You can now pass!"
    applymovement 0x7 0x88003D3
    waitmovement 0x0
    msgbox 0x88003D7 MSG_NORMAL '"[blue_fr]Have fun."
    setflag 0x2300
    release
    end
    
    '---------------
    #org 0x80039C
    msgbox 0x88003E6 MSG_NORMAL '"[blue_fr]Enjoy this route!"
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x8003A7
    = [red_fr]Go and see Oak!
    
    #org 0x8003BC
    = [blue_fr]You can now pass!
    
    #org 0x8003D7
    = [blue_fr]Have fun.
    
    #org 0x8003E6
    = [blue_fr]Enjoy this route!
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x8003D3
    #raw 0xE 'Step Left (Slow)
    #raw 0x11 'Step Up (Normal)
    #raw 0x4 'Face Down (Faster)

    your code is probably wrong.
    You haven't put checkflag 0x829, which checks if the player has the Pokedex or not.
    There's no use for checkflag 0x2300 here.
     
    Ok I have updated the script it is a script event this is the new script now nothing happens now. is this any better though?
    Code:
     '---------------
    #org 0x810000
    lockall
    checkflag 0x829
    if 0x1 goto 0x8800373
    msgbox 0x88003A7 MSG_NORMAL '"[red_fr]Go and see Oak!"
    setflag 0x829
    release
    end
    
    '---------------
    #org 0x800373
    checkflag 0x829
    if 0x0 goto 0x880039C
    msgbox 0x88003BC MSG_NORMAL '"[blue_fr]You can now pass!"
    applymovement 0x7 0x88003D3
    waitmovement 0x0
    msgbox 0x88003D7 MSG_NORMAL '"[blue_fr]Have fun."
    setflag 0x829
    release
    end
    
    '---------------
    #org 0x80039C
    msgbox 0x88003E6 MSG_NORMAL '"[blue_fr]Enjoy this route!"
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x8003A7
    = [red_fr]Go and see Oak!
    
    #org 0x8003BC
    = [blue_fr]You can now pass!
    
    #org 0x8003D7
    = [blue_fr]Have fun.
    
    #org 0x8003E6
    = [blue_fr]Enjoy this route!
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x8003D3
    #raw 0xE 'Step Left (Slow)
    #raw 0x11 'Step Up (Normal)
    #raw 0x4 'Face Down (Faster)
     
    What do you actually want do?
    Do you want to give the Pokedex to the player just after the man says 'Go See Prof. Oak'? Coz your Script enables the Pokedex right after the text. It is because you have setflag 0x829.
    if you want it to be enabled by Oak, remove all setflag 0x829 fron this NPC.
    also, did you changed the Unknown & Var number to 0300 & 405x?
     
    Its ok now I have managed to put something together now thanks for your help and letting me know about vars and unknowns
     
    Back
    Top