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

[Archive] Script help thread

Status
Not open for further replies.

Hiche..

 
  • 979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    That's a lot easier. I didn't know that till now. You have been very much of help Hackmew. Now it works perfectly.
    If I want to replace the "pressing B" command(0x7F) and I want that when I press it, it shows me another multi choices. Like for example:
    Eevee
    Vulpix
    Growlithe
    More

    When I press more, it will open another multi:

    Charmander
    Cyndaquil
    Mew
    end

    Thanks again.
     

    HackMew

    Mewtwo Strikes Back
  • 1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    That's a lot easier. I didn't know that till now. You have been very much of help Hackmew. Now it works perfectly.
    If I want to replace the "pressing B" command(0x7F) and I want that when I press it, it shows me another multi choices. Like for example:
    Eevee
    Vulpix
    Growlithe
    More

    When I press more, it will open another multi:

    Charmander
    Cyndaquil
    Mew
    end

    Thanks again.

    Pretty simple. The script would be similar to the previous one except you don't just check if the user pressed B. In fact this time you need to see if the user chose the last item, which is "More". Being the 4th one, it's 0x3.
    See the spoiler below. It should work fine.

    Spoiler:
     

    Ninja Caterpie

    AAAAAAAAAAAAA
  • 5,979
    Posts
    16
    Years
    There was something about boxsets in the ROM Hacking Newsletter
    Ah - here it is!
    Tips and Tricks
    A cool new trick that you may not have known about

    This weeks tips come from HackMew. This time its all about msgboxes. Below is a description, script example and in-game shot of the different msgbox types.

    0x2

    Spoiler:

    0x3

    Spoiler:

    0x4

    Spoiler:

    0x5

    Spoiler:

    0x6

    Spoiler:
    Tip donated by HackMew
     

    Thrace

    @tion
  • 1,048
    Posts
    16
    Years
    • Seen Oct 2, 2016
    Does boxset 0x4 open up a multi-choice box?

    If so, could someone give me an example?
    multi [leftCoordinate] [rightCoordinate] [boxNumber] [B usable to cancel? (1: yes, 0: no)]
    copyvar 0x8000 LASTRESULT
    compare 0x8000 0x0
    if 0x1 goto @option1

    You need to repeat the last two for each possible option. Obviously you have to change the compare 0x8000 line and the if 0x1 goto line.

    Here is a list of the different multi-choice boxes available.
     

    Ninja Caterpie

    AAAAAAAAAAAAA
  • 5,979
    Posts
    16
    Years
    I've got a small problem...
    Code:
    #org 0x2DD4E4
    checkflag 0x828
    if 0x1 goto 0x82DD69D
    applymovement 0x2 0x82DD734
    waitmovement 0x0
    applymovement MOVE_PLAYER 0x82DD737
    waitmovement 0x0
    msgbox 0x82DD74C MSG_NORMAL '"[blue_fr]Wait a second!"
    applymovement 0x2 0x82DD739
    waitmovement 0x0
    msgbox 0x82DD760 MSG_NORMAL '"[blue_fr]Hey, [player]!\nSomething..."
    givepokemon 0x85 0x5 0xD 0x0 0x0 0x0
    fanfare 0x13E
    msgbox 0x82DD7BA MSG_KEEPOPEN '"You got a Pokemon!"
    waitfanfare
    closeonkeypress
    setflag 0x828
    msgbox 0x82DD7CF MSG_YESNO '"Would you like to give it\na nickn..."
    compare LASTRESULT 0x0
    if 0x0 call 0x82DD7F7
    msgbox 0x82DD7FE MSG_NORMAL '"[blue_fr]See you later bro!"
    applymovement 0x2 0x82DD73F
    waitmovement 0x0
    applymovement 0x1 0x82DD745
    waitmovement 0x0
    msgbox 0x82DD816 MSG_NORMAL '"[red_fr]Oh, stay safe honey!\nReme..."
    applymovement 0x1 0x82DD749
    waitmovement 0x0
    end
    
    '---------------
    #org 0x2DD69D
    release
    end
    
    '---------------
    #org 0x2DD7F7
    call 0x1A74EB
    return
    
    
    '---------
    ' Strings
    '---------
    #org 0x2DD74C
    = [blue_fr]Wait a second!
    
    #org 0x2DD760
    = [blue_fr]Hey, [player]!\nSomething came in the mail\pfor you.\nIt's a Pokemon, I think.\pHere, take it.
    
    #org 0x2DD7BA
    = You got a Pokemon!
    
    #org 0x2DD7CF
    = Would you like to give it\na nickname?
    
    #org 0x2DD7FE
    = [blue_fr]See you later bro!
    
    #org 0x2DD816
    = [red_fr]Oh, stay safe honey!\nRemember that you can always come\lhere to rest!
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x2DD734
    #raw 62 'Exclamation Mark (!)
    #raw FE 'End of Movements
    
    #org 0x2DD737
    #raw 1 'Face Up
    #raw FE 'End of Movements
    
    #org 0x2DD739
    #raw 12 'Step Left (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw FE 'End of Movements
    
    #org 0x2DD73F
    #raw 13 'Step Right (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw FE 'End of Movements
    
    #org 0x2DD745
    #raw 62 'Exclamation Mark (!)
    #raw 0 'Face Down
    #raw FE 'End of Movements
    
    #org 0x2DD749
    #raw 2 'Face Left
    #raw FE 'End of Movements

    The problem is the nickname part. It keeps going if it's yes and freezes if it's no.
    I've tried
    Code:
    Compare 0x0
    if 0x1 goto
    
    and
    
    Compare 0x1
    if 0x0 goto...
    
    and
    compare 0x1
    if 0x1 goto...

    But none of them work.
     

    Thrace

    @tion
  • 1,048
    Posts
    16
    Years
    • Seen Oct 2, 2016
    I've got a small problem...
    Code:
    #dynamic 0x800000
    
    #org @new
    checkflag 0x828
    if 0x1 goto 0x82DD69D
    applymovement 0x2 0x82DD734
    waitmovement 0x0
    applymovement MOVE_PLAYER 0x82DD737
    waitmovement 0x0
    msgbox 0x82DD74C MSG_NORMAL '"[blue_fr]Wait a second!"
    applymovement 0x2 0x82DD739
    waitmovement 0x0
    msgbox 0x82DD760 MSG_NORMAL '"[blue_fr]Hey, [player]!\nSomething..."
    givepokemon 0x85 0x5 0xD 0x0 0x0 0x0
    fanfare 0x13E
    msgbox 0x82DD7BA MSG_KEEPOPEN '"You got a Pokemon!"
    waitfanfare
    closeonkeypress
    setflag 0x828
    msgbox 0x82DD7CF MSG_YESNO '"Would you like to give it\na nickn..."
    compare LASTRESULT 0x1
    if 0x1 call [B]@answerYes[/B]
    [B]compare LASTRESULT 0x0
    if 0x1 call @answerNo
    end
    
    #org @answerNo[/B]
    msgbox 0x82DD7FE MSG_NORMAL '"[blue_fr]See you later bro!"
    applymovement 0x2 0x82DD73F
    waitmovement 0x0
    applymovement 0x1 0x82DD745
    waitmovement 0x0
    msgbox 0x82DD816 MSG_NORMAL '"[red_fr]Oh, stay safe honey!\nReme..."
    applymovement 0x1 0x82DD749
    waitmovement 0x0
    end
    
    '---------------
    #org 0x2DD69D
    release
    end
    
    '---------------
    #org @answerYes
    call 0x1A74EB
    call @answerNo
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x2DD74C
    = [blue_fr]Wait a second!
    
    #org 0x2DD760
    = [blue_fr]Hey, [player]!\nSomething came in the mail\pfor you.\nIt's a Pokemon, I think.\pHere, take it.
    
    #org 0x2DD7BA
    = You got a Pokemon!
    
    #org 0x2DD7CF
    = Would you like to give it\na nickname?
    
    #org 0x2DD7FE
    = [blue_fr]See you later bro!
    
    #org 0x2DD816
    = [red_fr]Oh, stay safe honey!\nRemember that you can always come\lhere to rest!
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x2DD734
    #raw 62 'Exclamation Mark (!)
    #raw FE 'End of Movements
    
    #org 0x2DD737
    #raw 1 'Face Up
    #raw FE 'End of Movements
    
    #org 0x2DD739
    #raw 12 'Step Left (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw FE 'End of Movements
    
    #org 0x2DD73F
    #raw 13 'Step Right (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw FE 'End of Movements
    
    #org 0x2DD745
    #raw 62 'Exclamation Mark (!)
    #raw 0 'Face Down
    #raw FE 'End of Movements
    
    #org 0x2DD749
    #raw 2 'Face Left
    #raw FE 'End of Movements

    The problem is the nickname part. It keeps going if it's yes and freezes if it's no.
    I've tried
    Code:
    Compare 0x0
    if 0x1 goto
    
    and
    
    Compare 0x1
    if 0x0 goto...
    
    and
    compare 0x1
    if 0x1 goto...

    But none of them work.

    I wa going to say that you were missing the boxsets but I guess you're using that new version of XSE. Anyway changes in bold, you can just copy and paste it in.
     

    Ninja Caterpie

    AAAAAAAAAAAAA
  • 5,979
    Posts
    16
    Years
    With your additions, it's all great if you say no. But it freezes if you say yes. Izzat a problem with the thing I'm calling to? Because I copied it right out of Thethethethe's tut.
     

    Thrace

    @tion
  • 1,048
    Posts
    16
    Years
    • Seen Oct 2, 2016
    With your additions, it's all great if you say no. But it freezes if you say yes. Izzat a problem with the thing I'm calling to? Because I copied it right out of Thethethethe's tut.

    Replace
    Code:
    compare LASTRESULT 0x1
    if 0x1 call @answerYes
    compare LASTRESULT 0x0
    if 0x1 call @answerNo
    with
    Code:
    compare LASTRESULT 0x1
    if 0x1 goto @answerYes
    compare LASTRESULT 0x0
    if 0x1 goto @answerNo

    Also change
    Code:
    #org @answerYes
    call 0x1A74EB
    call @answerNo
    end
    to
    Code:
    #org @answerYes
    call 0x1A74EB
    goto @answerNo

    I think that should work.
     

    Hiche..

     
  • 979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    Does Darken and Lighten commands work in FireReD?
    I want it like Ruby, in the second gym, when you battle trainers, and it's dark, the dark part starts decreasing every time you beat a trainer.
     

    Thrace

    @tion
  • 1,048
    Posts
    16
    Years
    • Seen Oct 2, 2016
    Does Darken and Lighten commands work in FireReD?
    I want it like Ruby, in the second gym, when you battle trainers, and it's dark, the dark part starts decreasing every time you beat a trainer.

    It does. You need to do checks in your script though. Both Lighten and Darken require a parameter that says dictates the level of darkness. Lighten 0x1 will increase Light but using it again will not increase the level of light it will simply show the level 1 animation. So for level 2 light you need to use Lighten 0x2.
     

    Dratii

    Working on something new...
  • 195
    Posts
    15
    Years
    • Seen Oct 24, 2023
    Hey all I need some help with this level script,
    Code:
    '-----------------------
    #org 0x71A2A4
    #raw 02
    #raw pointer 0x871A24A
    #raw 00
    
    '-----------------------
    #org 0x71A24A
    #raw word 0x4033
    #raw word 0x0
    #raw pointer 0x871BE21
    #raw word 0x0
    
    '-----------------------
    #org 0x71BE21
    lockall
    special 0x113
    applymovement MOVE_CAMERA 0x871BE8B
    waitmovement 0x0
    pause 0x20
    msgbox 0x871BE78 '"...\n...\l...\p.."
    callstd 0x6
    applymovement 0x3 0x871BEB9
    waitmovement 0x0
    pause 0x20
    hidesprite 0x3
    setflag 0x9100
    applymovement 0x2 0x871BE98
    applymovement MOVE_CAMERA 0x871BEA7
    waitmovement 0x0
    applymovement MOVE_PLAYER 0x871BEB6
    waitmovement 0x0
    msgbox 0x871BEBD '"[blue_fr]Hmm. So your're up\pI gues..."
    callstd 0x6
    setvar 0x4033 0x0
    releaseall
    end
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x71BE8B
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw FE 'End of Movements
    
    #org 0x71BEB9
    #raw 10 'Step Down (Normal)
    #raw 60 'Hide
    #raw FE 'End of Movements
    
    #org 0x71BE98
    #raw 1 'Face Up
    #raw 62 'Exclamation Mark (!)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 1 'Face Up
    #raw FE 'End of Movements
    
    #org 0x71BEA7
    #raw 1 'Face Up
    #raw 62 'Exclamation Mark (!)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 1 'Face Up
    #raw FE 'End of Movements
    
    #org 0x71BEB6
    #raw 0 'Face Down
    #raw FE 'End of Movements
    
    
    '---------
    ' Strings
    '---------
    #org 0x71BE78
    = ...\n...\l...\p..
    
    #org 0x71BEBD
    = [blue_fr]Hmm. So your're up\pI guess you should know anyway.\nI think something has happened\lto your mum.\pCome on follow me.
    It works but it always repeats, forever.
     

    Thrace

    @tion
  • 1,048
    Posts
    16
    Years
    • Seen Oct 2, 2016
    Hey all I need some help with this level script,
    Spoiler:
    It works but it always repeats, forever.
    It needs to be setvar 0x4033 0x1 to stop the level script.
     

    Dratii

    Working on something new...
  • 195
    Posts
    15
    Years
    • Seen Oct 24, 2023
    Thanks I had it like that before but I had to restore from a back-up and I must of forgot to do the 0x1.

    Now an even stranger thing happens, the camera doesn't move when with the player.

    Edit:
    It works now forgot to add special 0x114. stupid back up
     
  • 66
    Posts
    15
    Years
    • Seen Dec 26, 2009
    Can anyone help me with this movement script? It's getting kind of hard to understand.
    Code:
    #Dynamic 0x194
    #org @BadgeOne
    checkflag 0x820
    if 0x0 goto @needbadge1
    if 0x1 goto @havebadge1
    end
     
    #org @needbadge1
    lock
    msgbox @nobadge
    boxset 0x6
    applymovement 0xFF @goback
    waitmovement 0x0
    release
    end
     
    #org @nobadge
    = Wait, I don't have a badge/nwithout that I can't go!
     
    #org @goback
    #raw 0x03
    #raw 0x07
    #raw 0x07
    #raw 0x00
    #raw 0x04
    #raw 0x04
    #raw 0x04
    #raw 0x04
    #raw 0xFE
     
    #org @havebadge1
    release
    end

    I don't know what the "applymovement 0xFF" is for. Isn't that the command that tells which character will be moved in the script? If so I want my character to be moved which FF is my character hex number from what I understand.

    Also, I've tried the script, with the right offset and everything (I used FSF) and whenever I try the script out all I get is a frozen character. I can't move and the textbox doesn't appear.

    Thank's a lot.


    Also, I'll get the compiled version soon if needed. I'm at school right now so not much I can do.
     
  • 185
    Posts
    16
    Years
    Can anyone help me with this movement script? It's getting kind of hard to understand.
    Code:
    #Dynamic 0x194
    #org @BadgeOne
    checkflag 0x820
    if 0x0 goto @needbadge1
    if 0x1 goto @havebadge1
    end
     
    #org @needbadge1
    lock
    msgbox @nobadge
    boxset 0x6
    applymovement 0xFF @goback
    waitmovement 0x0
    release
    end
     
    #org @nobadge
    = Wait, I don't have a badge/nwithout that I can't go!
     
    #org @goback
    #raw 0x03
    #raw 0x07
    #raw 0x07
    #raw 0x00
    #raw 0x04
    #raw 0x04
    #raw 0x04
    #raw 0x04
    #raw 0xFE
     
    #org @havebadge1
    release
    end

    I don't know what the "applymovement 0xFF" is for. Isn't that the command that tells which character will be moved in the script? If so I want my character to be moved which FF is my character hex number from what I understand.

    Also, I've tried the script, with the right offset and everything (I used FSF) and whenever I try the script out all I get is a frozen character. I can't move and the textbox doesn't appear.

    Thank's a lot.


    Also, I'll get the compiled version soon if needed. I'm at school right now so not much I can do.

    Code:
    #Dynamic [b]0x800000[/b]
    #org @BadgeOne
    checkflag 0x820
    if 0x0 goto @needbadge1
    [b]checkflag 0x820[/b]
    if 0x1 goto @havebadge1
    end
     
    #org @needbadge1
    [b]lockall[/b]
    msgbox @nobadge
    boxset 0x6
    applymovement 0xFF @goback
    waitmovement 0x0
    [b]releaseall[/b]
    end
     
    #org @nobadge
    = Wait, I don't have a badge/nwithout that I can't go!
     
    #org @goback
    #raw 0x03
    #raw 0x07
    #raw 0x07
    #raw 0x00
    #raw 0x04
    #raw 0x04
    #raw 0x04
    #raw 0x04
    #raw 0xFE
     
    #org @havebadge1
    [b]releaseall[/b]
    end

    Fixes in bold. Try this one...
    Also, "applymovement 0xFF" is very simple to understand. "Applymovement" itself is the movement command, while 0x(hex number), in this case 0xFF, means to move which sprite on the map where the script currently is, and 0xFF is to number of the player
     

    Surf

    ...
  • 1,196
    Posts
    15
    Years
    • Age 29
    • Rust
    • Seen Jul 31, 2011
    Hey Guys i have a problem with this level script

    #dynamic 0x800000
    #org @start
    lockall
    checkflag 0x828
    if 0x1 goto @no
    setvar 4033 0x1
    applymovement 0x02 @dadmove1
    applymovement 0x02 @dadmove2
    msgbox @dadtalk
    givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
    applymovement 0x02 @dadmove3
    releaseall
    end

    #org @no
    releaseall
    end


    #org @dadmove1
    #raw 0x65
    #raw 0xFE

    #org @dadmove2
    #raw 11
    #raw 13
    #raw 13
    #raw 13
    #raw 13
    #raw 13
    #raw 01
    #raw FE


    #org @dadmove3
    #raw 12
    #raw 12
    #raw 12
    #raw 12
    #raw 12
    #raw 10
    #raw FE


    #org @dadtalk
    = Hey [player]\nYour mother and I have decided\lthat you are old enough to go on\n an adventure.\lSo i got you this Cinderquil.


    yes i know i spelt Cqindaquil wrong

    Heres what happens
    [Archive] Script help thread

    this just keeps repeating


    Please Help
     

    Thrace

    @tion
  • 1,048
    Posts
    16
    Years
    • Seen Oct 2, 2016
    Hey Guys i have a problem with this level script
    Spoiler:

    Please Help

    Go to the offset of the level script in a hex editor. You should see the following:
    [varNumber] [varValue] [pointerToScript] FFFF
    You need to change that FFFF to 0000.
     
    Status
    Not open for further replies.
    Back
    Top