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

Paupir

Dreamer
22
Posts
13
Years
    • UK
    • Seen Mar 7, 2015
    Well I asked this in the other thread to no avail.
    Basically I'm trying to make a map with cracked floor tiles I can fall through. Took a look at Granite cave and tried to clone it. But I get a strange error in the form of a looping text box upon entering the map which reads "This is a test message. This is a signpost"- which renders me unable to move or do anything else.

    Hacking Emerald BPEE.

    Here's 1/3 of the level scripts in Granite Cave:

    Script Type: Validates values, loads handler to 0x03000EB0 (playback) (02)
    Code:
    '---------------
    #org 0x2A8337
    lockall
    pause 0x14
    applymovement MOVE_PLAYER 0x82A8369
    waitmovement 0x0
    sound 0x2B
    pause 0x3C
    warphole 0xFF 0xFF
    waitstate
    end
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x2A8369
    #raw 0x54 'Hide
    #raw 0xFE 'End of Movements

    Note: Sky Pillar uses this same script so I thought using this exactly as it was would be fine. (Ie. same script offset). I also set the flag to the same ($4022) as they were in both Granite Cave and Sky Pillar.
    Also something worth mentioning is that I get the error when testing with only this script active.
    Also, why are there 2 script offsets for this? I can't edit the first one which is what I'm believing to be the cause at the moment- since they're different to the ones in Granite Cave and Sky Pillar.

    The other two scripts on the level would be:

    Script type: On entering map/not on menu close [03]
    Code:
    '---------------
    #org 0x2A8331
    copyvar 0x4022 0x1
    end

    Note: I'm not sure what it does exactly but I reckon I need it XD

    Script Type: On entering map/on menu close [05]
    Code:
    '---------------
    #org 0x22DC6E
    cmda6 0x7
    warp5 0x18 0x6D 0xFF 0x0 0x0
    end

    Note: Then I have that- which I believe tells us where the warps go to. XSE says cmda6 is under investigation, so I went ahead and left it like that.

    That's it really. I hope someone can help D:
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    How do I make a person ID? So their name will show?

    ??????????????????????
    ??????????????????????
    ??????????????????????
    ??????????????????????
    ??????????????????????
    ??????????????????????

    Anyway...
    Please read scripting tutorials so you will know.
    Person I.D.'s are boxes where we put the "flags" if we want that NPC to appear/disappear after an event/script.
     
    5,256
    Posts
    16
    Years
  • I hate to be a pain, but...

    Type: Level Script
    ROM: FireRed
    Script:
    Spoiler:


    Important Segment:
    Spoiler:


    Okay, so, item 0x11E is the root fossil, and 0x11F is the claw fossil.
    In another event, the player is given either one of them.
    The check is supposed to find out which fossil you have and give you the corresponding Pokémon (Lileep or Anorith) accordingly. However, despite the fact that I have the claw fossil, when this script executes, I receive a Lileep, and the Claw Fossil remains.

    Also, an unrelated question, but is there a limit to the amount of buffers in a script?
     
    10
    Posts
    13
    Years
    • Seen May 5, 2013
    Simple, just look at the script of the old lady, from there you can see for yourself how the script works, though I think you can bring ANY of the starters.

    if i'm asking here, perhaps i've already tried to figure it out by myself, so if you have to answer like that, don't even bother.
    her script unfortunatly imply a lot of complex commands and references as i'll post down below:

    Code:
    '---------------
    #org 0x1C4DEC
    special 0x187
    compare LASTRESULT 0x2
    if 0x1 goto 0x81A7AE0
    special 0x188
    lock
    faceplayer
    checkflag 0x2E1
    if 0x1 goto 0x81C4EA1
    checkflag 0x2
    if 0x1 goto 0x81C4E97
    bufferfirstpokemon 0x0
    msgbox 0x81A46C6 MSG_KEEPOPEN '"I perfected the ultimate move of\n..."
    special2 LASTRESULT 0x1A3
    compare LASTRESULT 0x0
    if 0x1 goto 0x81C4F26
    copyvar 0x8009 0x8005
    compare PLAYERFACING 0x2
    if 0x1 call 0x81C4EF0
    compare PLAYERFACING 0x1
    if 0x1 call 0x81C4EFB
    compare PLAYERFACING 0x4
    if 0x1 call 0x81C4F06
    compare PLAYERFACING 0x3
    if 0x1 call 0x81C4F11
    msgbox 0x81A4751 MSG_YESNO '"Oh! This is the one!\nThis is the ..."
    compare LASTRESULT 0x0
    if 0x1 goto 0x81C4F1C
    call 0x81C4F37
    compare LASTRESULT 0x0
    if 0x1 goto 0x81C4F1C
    msgbox 0x81A4814 MSG_KEEPOPEN '"You will allow it?\pThen, let me c..."
    closeonkeypress
    fadescreen 0x1
    goto 0x81C4EDA
    
    '---------------
    #org 0x1A7AE0
    release
    end
    
    '---------------
    #org 0x1C4EA1
    msgbox 0x81A4972 MSG_KEEPOPEN '"After I passed on my knowledge to\..."
    release
    end
    
    '---------------
    #org 0x1C4E97
    msgbox 0x81A48B3 MSG_KEEPOPEN '"I implore you to make the best\nus..."
    release
    end
    
    '---------------
    #org 0x1C4F26
    msgbox 0x81A4737 MSG_KEEPOPEN '"[.]No[.]\nI was just mistaken."
    release
    end
    
    '---------------
    #org 0x1C4EF0
    applymovement 0x1 0x81C4F4C
    waitmovement 0x0
    return
    
    '---------------
    #org 0x1C4EFB
    applymovement 0x1 0x81C4F4E
    waitmovement 0x0
    return
    
    '---------------
    #org 0x1C4F06
    applymovement 0x1 0x81C4F50
    waitmovement 0x0
    return
    
    '---------------
    #org 0x1C4F11
    applymovement 0x1 0x81C4F52
    waitmovement 0x0
    return
    
    '---------------
    #org 0x1C4F1C
    msgbox 0x81A47E5 MSG_KEEPOPEN '"Gaah! You reject it?\nNo, I won't ..."
    release
    end
    
    '---------------
    #org 0x1C4F37
    textcolor 0x3
    special 0x171
    signmsg
    msgbox 0x81A644F MSG_YESNO '"This move can be learned only\nonc..."
    normalmsg
    call 0x81A6675
    return
    
    '---------------
    #org 0x1C4EDA
    call 0x81C4F30
    compare LASTRESULT 0x0
    if 0x1 goto 0x81C4F1C
    goto 0x81C4EAB
    
    '---------------
    #org 0x1A6675
    copyvar 0x8012 0x8013
    return
    
    '---------------
    #org 0x1C4F30
    special 0x18D
    waitstate
    lock
    faceplayer
    return
    
    '---------------
    #org 0x1C4EAB
    copyvar 0x8005 0x8009
    special2 LASTRESULT 0x1A4
    compare LASTRESULT 0x1
    if 0x1 goto 0x81C4ECD
    msgbox 0x81A4865 MSG_KEEPOPEN '"Gasp, gasp, gasp[.]\pI didn't thin..."
    setflag 0x2
    release
    end
    
    '---------------
    #org 0x1C4ECD
    msgbox 0x81A48F3 MSG_KEEPOPEN '"Gasp, gasp, gasp[.]\pI have no reg..."
    setflag 0x2E1
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x1A46C6
    = I perfected the ultimate move of\nits type[.]\pBut will no one take it for\nfuture use?\p[.]Hm? Hmmm!\pY-you[.]\nTh-that [buffer1][.]
    
    #org 0x1A4751
    = Oh! This is the one!\nThis is the POKéMON!\pThis [buffer1] is worthy of\nlearning my ultimate move!\pWill you allow it?\pWill you allow your [buffer1] to\nlearn my [buffer2]?
    
    #org 0x1A4814
    = You will allow it?\pThen, let me confer my ultimate\n[buffer2] on your [buffer1].\pGgggrah-awooo!
    
    #org 0x1A4972
    = After I passed on my knowledge to\nyou, I felt so much relief.\pIn fact, I feel rejuvenated,\nas if I were younger again!
    
    #org 0x1A48B3
    = I implore you to make the best\nuse of that move and gain power!
    
    #org 0x1A4737
    = [.]No[.]\nI was just mistaken.
    
    #org 0x1A47E5
    = Gaah! You reject it?\nNo, I won't be dissuaded!
    
    #org 0x1A644F
    = This move can be learned only\nonce. Is that okay?
    
    #org 0x1A4865
    = Gasp, gasp, gasp[.]\pI didn't think I could teach that\nmove while I still lived[.]
    
    #org 0x1A48F3
    = Gasp, gasp, gasp[.]\pI have no regrets now.\nI've passed on everything I know.\pNow I can live out my life knowing\nmy work is done.
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x1C4F4C
    #raw 0x52 'Jump in Place (Facing Down)
    #raw 0xFE 'End of Movements
    
    #org 0x1C4F4E
    #raw 0x53 'Jump in Place (Facing Up)
    #raw 0xFE 'End of Movements
    
    #org 0x1C4F50
    #raw 0x54 'Jump in Place (Facing Left)
    #raw 0xFE 'End of Movements
    
    #org 0x1C4F52
    #raw 0x55 'Jump in Place (Facing Right)
    #raw 0xFE 'End of Movements

    can anyone tell me for exemple what special 0x187 stands for?

    thank you for reading :)
     
    26
    Posts
    13
    Years
    • Seen Oct 8, 2013
    loadpointer 0x0 0x81923F1 '"[player] received TM47\nfrom MISTY..."

    When I change MISTY to CIMEX tand compile and save, I open script and it doesnt change =(
     
    Last edited:
    5,256
    Posts
    16
    Years
  • I hate to be a pain, but...

    Type: Level Script
    ROM: FireRed
    Script:
    Spoiler:


    Important Segment:
    Spoiler:


    Okay, so, item 0x11E is the root fossil, and 0x11F is the claw fossil.
    In another event, the player is given either one of them.
    The check is supposed to find out which fossil you have and give you the corresponding Pokémon (Lileep or Anorith) accordingly. However, despite the fact that I have the claw fossil, when this script executes, I receive a Lileep, and the Claw Fossil remains.

    Also, an unrelated question, but is there a limit to the amount of buffers in a script?
    This problem is still present. Again, I hate to be a pain, but I can't seem to work this out. ;o;
     

    Paupir

    Dreamer
    22
    Posts
    13
    Years
    • UK
    • Seen Mar 7, 2015
    Variable items

    This problem is still present. Again, I hate to be a pain, but I can't seem to work this out. ;o;

    I think you need a compare line.
    Something like:
    Code:
    checkitem 0x11E 0x1
    compare LASTRESULT 0x1
    if 0x1 goto @snippet1

    And the same for the claw fossil. Lemme know if that works :)

    On another note, I got the cracked floor warps working just fine- was missing copyvar 0x4022 0x1 in Script offset 1
     
    Last edited:

    redriders180

    Mastermind of Pokemon Glazed
    314
    Posts
    13
    Years
  • Alrighty, maybe one of you can help, because I am thorougly confuzzled.

    I'm hacking a FireRed rom. This script is supposed to do something like this:

    The player is asked to give 250 dollars for whatever this person has in their bag. if they say yes, the script does this:

    Pick a random number from 0 to 9. If 0,1, or 2, give no item. If 3, 4, or 5, give a mediocre item. if 6 or 7, give a somewhat better item. if 8, give a nice item, and if 9, give a TM. The items identity is picked by another random number, then certain things are added, and an item is buffered and the player learns what they got or didnt get.

    What it is doing is, instead of saying the player got (insert item here), it's saying player got (insert strange number here). I'd post a snapshot, but not enough posts. Here is my script:

    Spoiler:


    I'm sorry, I don't have it in Dynamic-offset mode. Thanks :D
     
    13
    Posts
    14
    Years
    • Seen Aug 23, 2011
    I'm pretty new to hacking, and I want to have a person that's blocking the way give a pokemon once, then move up 1 step. I did some tutorials and got this
    Spoiler:

    But when I try it ingame it gives me the jingle, the person slides upwards out of the screen (really fast) and I'm locked in place with no music or anything
    Halp pl0x
    xD
    PS. When I try to set just 1 step upwards (0x11), compile and open it up again it automatically changes back to this.
     
    13
    Posts
    14
    Years
    • Seen Aug 23, 2011
    Yes, I can see it's really wrong =)
    Because there are those horrible not working moves =D
    Could you post your original script? (The one with #dynamic)

    Sure thing

    Spoiler:
     
    26
    Posts
    13
    Years
    • Seen Oct 8, 2013
    Sprites wont show

    the trainer in cerulean wont appear when I play. I checked A-Map and the script.

    Script
    '---------------
    #org 0x16AB5B
    trainerbattle 0x0 0xEA 0x0 0x8192524 0x8192547
    setvar 0x8004 0x3
    setvar 0x8005 0x2
    special 0x173
    msgbox 0x8192556 0x6 '"MISTY is a TRAINER who's going to\..."
    end


    '---------
    ' Strings
    '---------
    #org 0x192524
    = Splash!\pI'm first up!\nLet's do it!

    #org 0x192547
    = That can't be!

    #org 0x192556
    = MISTY is a TRAINER who's going to\nkeep improving.\pShe won't lose to someone like you!




    A- Map hes facing left, has normal talking level, movement 11, 3 view radius, offset-0016AB5B
     
    5,256
    Posts
    16
    Years
  • Alrighty, maybe one of you can help, because I am thorougly confuzzled.

    I'm hacking a FireRed rom. This script is supposed to do something like this:

    The player is asked to give 250 dollars for whatever this person has in their bag. if they say yes, the script does this:

    Pick a random number from 0 to 9. If 0,1, or 2, give no item. If 3, 4, or 5, give a mediocre item. if 6 or 7, give a somewhat better item. if 8, give a nice item, and if 9, give a TM. The items identity is picked by another random number, then certain things are added, and an item is buffered and the player learns what they got or didnt get.

    What it is doing is, instead of saying the player got (insert item here), it's saying player got (insert strange number here). I'd post a snapshot, but not enough posts. Here is my script:

    Spoiler:


    I'm sorry, I don't have it in Dynamic-offset mode. Thanks :D

    For the bufferitem codes, you need to write "bufferitem 0x0 0x4003" or change the text to say "buffer2".
     
    43
    Posts
    12
    Years
    • Seen Jul 13, 2012
    Hello everybody.

    I was playtesting my FireRed hack when I noticed that the first Gym Leader battle has none of the special Gym effects (no mugshots, no special battle music, etc) and is treated as a normal trainer battle. However, the scripts for the leader talking still work fine, and the badge-obtained music still plays (a little delayed, but that might just be the ROM). I have the script in hide tags below.
    Spoiler:
    I know, I'm a noob. But how do I fix the leader issue?

    (I tried going to the help menu and got an error :( )
     

    Satoshi Ookami

    Memento Mori
    14,254
    Posts
    15
    Years
  • Sure thing

    Spoiler:
    Okay I see the errors. Changes are in bold.

    the trainer in cerulean wont appear when I play. I checked A-Map and the script.

    Script
    '---------------
    #org 0x16AB5B
    trainerbattle 0x0 0xEA 0x0 0x8192524 0x8192547
    setvar 0x8004 0x3
    setvar 0x8005 0x2
    special 0x173
    msgbox 0x8192556 0x6 '"MISTY is a TRAINER who's going to\..."
    end


    '---------
    ' Strings
    '---------
    #org 0x192524
    = Splash!\pI'm first up!\nLet's do it!

    #org 0x192547
    = That can't be!

    #org 0x192556
    = MISTY is a TRAINER who's going to\nkeep improving.\pShe won't lose to someone like you!

    A- Map hes facing left, has normal talking level, movement 11, 3 view radius, offset-0016AB5B
    Try repointing the script into different offset ;)
    Adding things to old scripts just won't do =D
     
    13
    Posts
    14
    Years
    • Seen Aug 23, 2011

    Okay I see the errors. Changes are in bold.


    Try repointing the script into different offset ;)
    Adding things to old scripts just won't do =D

    It works now, except that there's not a message when I first speak to the person. I do receive the pokemon, but it doesn't show up on the menu...Is that perhaps because it is the first pokemon??
     
    Last edited:
    5,256
    Posts
    16
    Years
  • Um, no, you need to setflag 0x828. Why would he need to add callstd? Unless he has a really out of date version of XSE, in which case he needs a serious update. :/
     
    Status
    Not open for further replies.
    Back
    Top