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

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
    • Seen Dec 23, 2023
    ^ Simple...
    You forgot the 0xFE command in your movement script.
    Code:
    #org @move
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    [COLOR="Red"]#raw 0xFE[/COLOR]

    Always remember to add 0xFE in every end of your movement command scripts. ;)


    edit...
    by the way, for you to avoid the script to repeat, add the 'setflag' command...

    Code:
    #org @start
    checkflag 0x200
    if 0x1 goto @done
    msgbox @1 0x6
    applymovement 0x1 @move
    waitmovement 0x0
    msgbox @2 0x6
    [COLOR="Red"]setflag 0x200[/COLOR]
    release
    end
     

    vietazn654

    A sound soul dwells within me
    371
    Posts
    14
    Years
  • ^ Simple...
    You forgot the 0xFE command in your movement script.
    Code:
    #org @move
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    [COLOR=Red]#raw 0xFE[/COLOR]
    Always remember to add 0xFE in every end of your movement command scripts. ;)


    edit...
    by the way, for you to avoid the script to repeat, add the 'setflag' command...

    Code:
    #org @start
    checkflag 0x200
    if 0x1 goto @done
    msgbox @1 0x6
    applymovement 0x1 @move
    waitmovement 0x0
    msgbox @2 0x6
    [COLOR=Red]setflag 0x200[/COLOR]
    release
    end
    oh man thanks! totally forgot about that part. thank u destinedjagold :]
     

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • That's not scripting. You just need advancemap.
    Find "Inside of Truck" on the list and edit the warps.

    Incorrect. If you look at the truck's warps, they don't lead to Littleroot Town at all. There's data somewhere telling it what map bank, number, and coordinates to drop the player. There's a tool floating around that makes it easy to edit for people that are hexadecimally challenged, lazy, or some combination of the two.
     

    metapod23

    Hardened Trainer
    673
    Posts
    15
    Years
    • Seen Aug 18, 2016
    I've got into doing scripting and im doing quite well but i just want to seek someones advice.

    Im using the pokemon fire red rom and im trying to do a script simular to when oak comes to the player when trying to leave pallet town with no pokemon. what im trying to do is when i stand on a script block i want a person to be seen and walk over to me. how ever i want him to be hidden like prof oak is before the script is activated ive tried to put the sprite as hidden in advancedmaps and when scripting use showsprite command but it just runs the script with the script hidden.

    can anyone help

    thanks
    jon

    Set Prof. Oak's Person ID to 2C and just use showsprite and hidesprite command in the script.
     

    Flowerchild

    fleeting assembly
    8,709
    Posts
    13
    Years
  • help please!!!!
    Rom: Leafgreen
    Problem: Game Freeze
    When you finish talking to this guy your game freezes. Please help!

    Here's the script.

    #org 0x719B18
    checkflag 0x828
    if 0x0 goto 0x88000BC
    if 0x1 goto 0x8800154
    end
    lock
    faceplayer

    #org 0x8000BC
    lock
    msgbox 0x88000D2 '"Dad: Hey [player] how are you ? Yes I kn..."
    callstd 0x6
    applymovement 0x1 0x880014F
    waitmovement 0x0
    release
    end

    #org 0x800154
    release
    end


    #org 0x80014F
    #raw FE 'End of Movements


    #org 0x8000D2
    = Dad: Hey [player] how are you ? Yes I know\nyou can't wait to go to [Rival]'s house.\pOh yeah Prof. Logan wants to see you\n about something.
     
    Last edited:
    45
    Posts
    16
    Years
    • Seen Oct 8, 2010
    Set Prof. Oak's Person ID to 2C and just use showsprite and hidesprite command in the script.

    I want to the script to happen simular to Oak but not to oak i want it to happen to another sprite. But if in advancemaps i put as hidden and i use the showsprite command in scripting it still wont unhide the sprite i need the sprite to be visable asoon as i stand on the script block

    ;]]

    jon
     

    metapod23

    Hardened Trainer
    673
    Posts
    15
    Years
    • Seen Aug 18, 2016
    I want to the script to happen simular to Oak but not to oak i want it to happen to another sprite. But if in advancemaps i put as hidden and i use the showsprite command in scripting it still wont unhide the sprite i need the sprite to be visable asoon as i stand on the script block

    ;]]

    jon

    Well, I can't make it any clearer. Don't set the sprite you want to be hidden to hidden. Just set its person ID to 2C. Any sprite with the person ID "2C" will be hidden on your map when you enter. Use showsprite in a script to show it and hidesprite to hide it again.
     

    vietazn654

    A sound soul dwells within me
    371
    Posts
    14
    Years
  • New error in this script <.<

    Spoiler:


    It works fine, but it keeps on repeating.
     
    45
    Posts
    16
    Years
    • Seen Oct 8, 2010
    Well, I can't make it any clearer. Don't set the sprite you want to be hidden to hidden. Just set its person ID to 2C. Any sprite with the person ID "2C" will be hidden on your map when you enter. Use showsprite in a script to show it and hidesprite to hide it again.

    Sorry it shows how newbish i am, this has worked much appriated.

    Jon
     

    vietazn654

    A sound soul dwells within me
    371
    Posts
    14
    Years
  • nvm fixed meh script -_- Anyways I want a script with the dad but messed up symbols pop out after the script. Is it because I need a special flag? Do I need to decompile a start script? :o becuz i dunno how
     

    dizzyKitty

    The Confuzzled Coding Cat
    16
    Posts
    13
    Years
  • Mmk, this is a bit more of a general question and it could probably use more specifics, but:

    Occasionally when I code dialogue scripts, I'll compile a script and open it again a few minutes later after opening and compiling others, and the old script will borrow text from a newer one and cut it off. This happens with people as well as signposts and they often mix and match, which kinda irritates me.

    For example, I've placed a signpost script on a door that cannot be entered with the text, "The door is locked." (And there is probably a better way to display that script on a door, I'm willing to bet, but this is what I'm using for the time being. Pardon my newbieishness. :3) However, I checked one of my rocket grunts later on, who's script is "What are you looking at?" and it shows up as "What are you looking at?The door is l". At the moment I'm just going back and re-editing things when this happens, and I have a feeling this has something to do with... the offsets running into each other because they're too close together, or something (which doesn't make a lot of sense as there should be enough space for the text?), but I've tried skipping around with offsets as well and it still hiccups occasionally.

    I also run into instances where the script will dump random characters ("\h0F \h7c \h80\h08\h09\h03\h02" and so on) at the end of lines. I thought this might be because of extra whitespace at the end of the code, but that doesn't seem to be it.

    Little help please? I'm using score_under's PKSV by the way.
     
    Last edited:

    vietazn654

    A sound soul dwells within me
    371
    Posts
    14
    Years
  • Code:
    #dynamic 0x26D46C
    
    #org @start
    checkflag 0x1200
    if 0x1 goto @done
    msgbox @1 0x6
    applymovement 0x2 @move
    waitmovement 0x0
    msgbox @2 0x6
    msgbox @pokemon 0x6
    setflag 0x1200
    release
    end
    
    #org @done
    release
    end
    
    #org @move
    #raw 0x62
    #raw 0x11
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x00
    #raw 0xFE
    
    #org @1= Oh, \v\h01!
    
    #org @2= DAD: Since PROF. BIRCH said he\ncouldn't give you a POKEMON, I\lcaught a MUDKIP for you, \v\h01!\pHere's your MUDKIP!
    
    #org @pokemon
    givepokemon 0x283 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @3 0x4
    waitfanfare
    closeonkeypress
    setflag 0x828
    msgbox @4 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    msgbox @5 0x6
    release
    end
    
    #org @name
    call 0x1A74EB
    return
    
    #org @3
    = [black_fr]\v\h01 recieved a MUDKIP!
    
    #org @4
    = [black_fr]Would you like to give a nickname\nto MUDKIP?
    
    #org @5
    = Have fun taking care of the\nMUDKIP, \v\h01!
    The problem is, it has gibberish words after he's about to give me a Pokemon. And yes, this is the strater Pokemon. :\
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    Spoiler:
    The problem is, it has gibberish words after he's about to give me a Pokemon. And yes, this is the strater Pokemon. :\


    The problem in your script is in the part where you call the "pokemon" address.
    In your main body script, you typed the command 'msgbox @pokemon 0x6', which you are telling the ROM that 'pokemon' is a text to be displayed, but down your script, the 'pokemon' you gave to your ROM is not a plain text, but a continuation of your script, which probably gave you that error.

    Code:
    #dynamic 0x26D46C
    
    #org @start
    checkflag 0x1200
    if 0x1 goto @done
    msgbox @1 0x6
    applymovement 0x2 @move
    waitmovement 0x0
    msgbox @2 0x6
    [COLOR="Blue"]call @pokemon[/COLOR]
    setflag 0x1200
    release
    end
    
    #org @done
    release
    end
    
    #org @move
    #raw 0x62
    #raw 0x11
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x00
    #raw 0xFE
    
    #org @1= Oh, \v\h01!
    
    #org @2= DAD: Since PROF. BIRCH said he\ncouldn't give you a POKEMON, I\lcaught a MUDKIP for you, \v\h01!\pHere's your MUDKIP!
    
    #org @pokemon
    givepokemon 0x283 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @3 0x4
    waitfanfare
    closeonkeypress
    setflag 0x828
    msgbox @4 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    msgbox @5 0x6
    [COLOR="Blue"]return[/COLOR]
    
    #org @name
    call 0x1A74EB
    return
    
    #org @3
    = [black_fr]\v\h01 recieved a MUDKIP!
    
    #org @4
    = [black_fr]Would you like to give a nickname\nto MUDKIP?
    
    #org @5
    = Have fun taking care of the\nMUDKIP, \v\h01!
     

    vietazn654

    A sound soul dwells within me
    371
    Posts
    14
    Years
  • Code:
    #dynamic 0x26D46C
    
    #org @start
    checkflag 0x1200
    if 0x1 goto @done
    msgbox @1 0x6
    applymovement 0x2 @move
    waitmovement 0x0
    msgbox @2 0x6
    call @pokemon
    setflag 0x1200
    release
    end
    
    #org @done
    release
    end
    
    #org @move
    #raw 0x62
    #raw 0x11
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x00
    #raw 0xFE
    
    #org @1
    = DAD: Oh, \v\h01!
    
    #org @2
    = Since PROF. BIRCH said he\ncouldn't give you a POKEMON, I\lcaught a MUDKIP for you, \v\h01!\pHere's your MUDKIP!
    
    #org @pokemon
    givepokemon 0x283 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @3 0x4
    waitfanfare
    closeonkeypress
    setflag 0x828
    msgbox @4 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    msgbox @5 0x6
    return
    
    #org @name
    call 0x1A74EB
    return
    
    #org @3
    = [black_fr]\v\h01 recieved a MUDKIP!
    
    #org @4
    = [black_fr]Would you like to give a nickname\nto MUDKIP?
    
    #org @5
    = Have fun taking care of the\nMUDKIP, \v\h01!
    It freezes once the person is about to gimme the Pokemon T_T No gibber but freeze T_T Sorry... =[
     

    Shiny Quagsire

    I'm Still Alive, Elsewhere
    697
    Posts
    14
    Years
  • Code:
    #dynamic 0x26D46C
    
    #org @start
    checkflag 0x1200
    if 0x1 goto @done
    msgbox @1 0x6
    applymovement 0x2 @move
    waitmovement 0x0
    msgbox @2 0x6
    call @pokemon
    setflag 0x1200
    release
    end
    
    #org @done
    release
    end
    
    #org @move
    #raw 0x62
    #raw 0x11
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x00
    #raw 0xFE
    
    #org @1
    = DAD: Oh, \v\h01!
    
    #org @2
    = Since PROF. BIRCH said he\ncouldn't give you a POKEMON, I\lcaught a MUDKIP for you, \v\h01!\pHere's your MUDKIP!
    
    #org @pokemon
    givepokemon 0x283 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @3 0x4
    waitfanfare
    closeonkeypress
    setflag 0x828
    msgbox @4 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    msgbox @5 0x6
    return
    
    #org @name
    call 0x1A74EB
    return
    
    #org @3
    = [black_fr]\v\h01 recieved a MUDKIP!
    
    #org @4
    = [black_fr]Would you like to give a nickname\nto MUDKIP?
    
    #org @5
    = Have fun taking care of the\nMUDKIP, \v\h01!
    It freezes once the person is about to gimme the Pokemon T_T No gibber but freeze T_T Sorry... =[

    The pokemon number has to be in HEX.

    Correct Version:
    Code:
    givepokemon 0x11B 0x5 0x0 0x0 0x0 0x0

    283 is 643 in decimal form. Since there is no 643, it freezes.
     
    45
    Posts
    16
    Years
    • Seen Oct 8, 2010
    Rom - Pokemon Fire Red
    Script editor - PKSV
    Script - Simular to the sign post girl in pallet town

    What im trying todo is a script simular to the script in pallet town with the sign post girl. When you talk to her she will move but if yu talk to her on the right side she will move to the left if you talk to her on the left she will move to the right. does anyone suggest how to make this happen?

    Jon
     
    10
    Posts
    14
    Years
    • Seen Dec 9, 2012
    Hi. Does anyone know the Elite Four Beaten flag in Emerald? Many thanks.

    Besides, is there any idea how to make a sprite appear only after beating Elite Four, given that we have the flag above?
     

    vietazn654

    A sound soul dwells within me
    371
    Posts
    14
    Years
  • The pokemon number has to be in HEX.

    Correct Version:
    Code:
    givepokemon 0x11B 0x5 0x0 0x0 0x0 0x0
    283 is 643 in decimal form. Since there is no 643, it freezes.
    Thanks though. Time to test out. The tut I was reading said that, but I don't know how to make it in Hex.
     

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Seen Apr 7, 2014
    @vietazn654:
    The '0x' in front of a numerical indicates that it is a hex value.

    @herbeon:
    Why not decompile and see?
    As for the second question, you need to use 'checkflag' to check if the flag has been set and continue to the part which shows the sprite. Most suitably a level script?
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top