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

onyx79

Red Dead Revolver
488
Posts
15
Years
  • here's the script

    Spoiler:

    as you can see the flag is 1003 but nothing has changed?do I need to put it on person ID?

    another question is how to make mew obey at fire red?
    can you help me or not?ths is very annoying...
     

    DarkPrince304

    Back to Hacking after exams!!!
    167
    Posts
    14
    Years
  • I need help
    I want to ask that how can I make my player move but he stays on one place...
    What I mean is that the player should move but he should not move forward direction...He should remain on the place but he should be shown walking...and 1 more thing
    is there a command to release a party pokemon
     

    BlitŻ1

    guahh my dog is so cute
    472
    Posts
    15
    Years
  • hack of fire red and I'm using XSE.
    hre's my script
    Spoiler:

    the problem is bolded.
    Everything works, except the movesprites don't happen. The guy just does the movements that are inbetween and go on with the script.
    any help is appreciatd
     
    Last edited:

    Kalsard

    Looking for time travellers.
    95
    Posts
    14
    Years
  • I need help (dont know anything above)
    The movements by the -spearows- at move4, arent happening. Any ideas? Thanks
    Script continues without movements

    Spoiler:
     

    0m3GA ARS3NAL

    Im comin' home...
    1,816
    Posts
    16
    Years
  • I need help (dont know anything above)
    The movements by the -spearows- at move4, arent happening. Any ideas? Thanks
    Script continues without movements

    Spoiler:

    You need waitmovements between each applymovement.
    fixes in the quote.
    Also, Pokemon cant have person numbers of over 254
     

    Quilava's Master

    Shattered Dreams '13
    694
    Posts
    16
    Years
    • Seen Aug 14, 2023
    Okay so i want to make a level script that happens after a flag is set but in order to do that i need to make sure it doesnt happen as soon as i enterr the map. is there a different type of level script that works AFTER a flag is set. The script is below

    Code:
    '---------------
    #org 0x8020D8
    setvar 0x4006 0x1
    checkflag 0x202
    if 0x0 goto 0x8802292
    checkflag 0x203
    if 0x1 goto 0x8802292
    setvar 0x8004 0x98
    special2 LASTRESULT 0x17C
    compare LASTRESULT 0x1
    if 0x1 goto 0x8802131
    setvar 0x8004 0x9B
    special2 LASTRESULT 0x17C
    compare LASTRESULT 0x1
    if 0x1 goto 0x8802192
    setvar 0x8004 0x9E
    special2 LASTRESULT 0x17C
    compare LASTRESULT 0x1
    if 0x1 goto 0x88021F3
    release
    end
    
    '---------------
    #org 0x802292
    release
    end
    
    '---------------
    #org 0x802131
    applymovement 0x6 0x880227E
    waitmovement 0x0
    msgbox 0x88022B0 MSG_NORMAL '"Clair: In that case,\nthis one is ..."
    applymovement 0x5 0x880228D
    waitmovement 0x0
    applymovement 0x7 0x8802285
    waitmovement 0x0
    msgbox 0x88022D9 MSG_NORMAL '"Ace: Then I guess I get this!"
    applymovement 0x4 0x880228D
    waitmovement 0x0
    applymovement 0x1 0x880227B
    waitmovement 0x0
    msgbox 0x88022F9 MSG_NORMAL '"Elm: Now that you have all chosen,..."
    applymovement 0x2 0x880226F
    waitmovement 0x0
    msgbox 0x8802295 MSG_NORMAL '"Elm: The test has begun!"
    setflag 0x203
    end
    
    '---------------
    #org 0x802192
    applymovement 0x6 0x880226A
    waitmovement 0x0
    msgbox 0x88022B0 MSG_NORMAL '"Clair: In that case,\nthis one is ..."
    applymovement 0x3 0x880228D
    waitmovement 0x0
    applymovement 0x7 0x8802261
    waitmovement 0x0
    msgbox 0x88022D9 MSG_NORMAL '"Ace: Then I guess I get this!"
    applymovement 0x5 0x880228D
    waitmovement 0x0
    applymovement 0x1 0x880227B
    waitmovement 0x0
    msgbox 0x88022F9 MSG_NORMAL '"Elm: Now that you have all chosen,..."
    applymovement 0x2 0x880226F
    waitmovement 0x0
    msgbox 0x8802295 MSG_NORMAL '"Elm: The test has begun!"
    setflag 0x203
    end
    
    '---------------
    #org 0x8021F3
    applymovement 0x6 0x880225B
    waitmovement 0x0
    msgbox 0x88022B0 MSG_NORMAL '"Clair: In that case,\nthis one is ..."
    applymovement 0x4 0x880228D
    waitmovement 0x0
    applymovement 0x7 0x8802254
    waitmovement 0x0
    msgbox 0x88022D9 MSG_NORMAL '"Ace: Then I guess I get this!"
    applymovement 0x3 0x880228D
    waitmovement 0x0
    applymovement 0x1 0x880227B
    waitmovement 0x0
    msgbox 0x88022F9 MSG_NORMAL '"Elm: Now that you have all chosen,..."
    applymovement 0x2 0x880226F
    waitmovement 0x0
    msgbox 0x8802295 MSG_NORMAL '"Elm: The test has begun!"
    setflag 0x203
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x8022B0
    = Clair: In that case,\nthis one is mine!
    
    #org 0x8022D9
    = Ace: Then I guess I get this!
    
    #org 0x8022F9
    = Elm: Now that you have all chosen,\nIt's time to begin.\pThere are clues to Golds,\nwhereabout everywhere.\pThe first clue is in [green_fr]Violet City.\p[black_fr]Elm: Now Gold, leave!
    
    #org 0x802295
    = Elm: The test has begun!
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x80227E
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x80228D
    #raw 0x60 'Hide
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x802285
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x80227B
    #raw 0x3 'Face Right
    #raw 0xFE 'End of Movements
    
    #org 0x80226F
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x60 'Hide
    #raw 0x1F 'Step Left (Fast)
    #raw 0x1E 'Step Up (Fast)
    #raw 0x1E 'Step Up (Fast)
    #raw 0xFE 'End of Movements
    
    #org 0x80226A
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x802261
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x80225B
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x802254
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
     
    2
    Posts
    14
    Years
    • Seen Jun 16, 2009
    Im Pretty badly stuck here, could someone please help me...allow me to explain my problem...

    I am hacking myself a new pokemon game and have just begun, im using my very basic scriting knowledge and using the latest version of xse. i made the player wake up at the start of the game in a cave just above an old lady but am having a few major problems, the first of which comes in advance map..
    when i place a sprite of a person into the room it will not appear in the visual boy or have any action within it, even when a script has been applied, please give me some pointers for a possible fix
    number 2 comes from xse and advance map i think, i mad a script to stop anyone leaving the room without first choosing 1 of 2 pokemon, you are ment to walk onto the script and be pushed 1 step back, with a message to appear saying , maby i should talk to the old lady first...
    so i made a script which i will include...but when i attach to the script to a script tile in advance map and play the game, if i walk on the script tile before it has been bypassed by a flag the game freezes, alough the music still plays on a low quality please help and i hope i have not written waaaay to much

    Spoiler:


    please tell me all errors and solutions thanks!
     
    Last edited:

    PlatniumPiano

    You are now breathing manually
    479
    Posts
    15
    Years
  • Final Script for my Alpha Version!!

    As of late my scripting has improved mucho, and am almost ready to release an alpha of my new hack ^_^

    Unfourtunatley, the last script tile in my alpha is... buggy. Here is what is supposed to happen:

    1. Player steps on tile, then script brings him up one tile and diaolouge starts (Problem).
    2. Grunt next to the old guy moves down one step and talks to me. A fight initiates (No Problem).
    3.Grunt displays a message, and then the screen fades, and his sprite is hidden (No Problem).
    4. Old man talks to me, a couple of flags are set, and several sprites dissapear. Forever (Problem).

    Now, the problems are labled in red, but I will explain what happens for each one. First off, even though I included a setvar command, the script tile DOES NOT WORK (and yes, I included setvar as well as labelling the script tiles var number on A-map). I step on it, and pass through it as if the event had already happened. The only way I have been able to get around this is to make the script tile into a person event, but I really don't want that (after all, he will become a gym leader later). The other thing (and I get this with trees using cut) is that as soon as I step away from the tile I was on for the event, the sprites reappear. What's more, the sprites on other maps that the script is supposed to hide also reappear. I have tried almost everything, and if somebody can diagnose and debug it so it works perfectly, I would be greatly appreciatative.

    PlatniumPiano

    Ruby Version AXVE Script:
    (using XSE 1.1.1 and Advance Map 1.92)

    Spoiler:
     

    Weavile Gemini

    Some Ninja
    31
    Posts
    15
    Years
  • ROM: Sapphire
    Event: Person Event
    Script Editor: XSE

    Having trouble with a givepokemon script.

    Spoiler:
     
    14
    Posts
    14
    Years
    • Seen Nov 22, 2011
    Okay, need some help here.

    When you talk to this professor, he gives you a Larvitar and a Pokedex. When the player opens the main menu and goes to any sub-menu that covers the whole screen, (e.g. Pokemon menu, Bag menu, Trainer card etc.) and closes the main menu, the player controls the professor instead of his/her own sprite.

    When the menu is opened again, and the player opens the sub-menus and closes the menu again, the professor sprite changes into the male character sprite (Sprite 0)

    By the way, it also happens with the other guy (the assistant) in the lab.

    Here's my script:
    Spoiler:


    And here's the screenshot.
     
    Last edited:

    Larsie13

    Guest
    0
    Posts
    hack of fire red and I'm using XSE.
    hre's my script
    Spoiler:

    the problem is bolded.
    Everything works, except the movesprites don't happen. The guy just does the movements that are inbetween and go on with the script.
    any help is appreciatd
    Movesprite doesn't use the waitmovement command. Remove them after the movesprite commands. (Of course, leave them for the applymovements.)
    Okay so i want to make a level script that happens after a flag is set but in order to do that i need to make sure it doesnt happen as soon as i enterr the map. is there a different type of level script that works AFTER a flag is set. The script is below

    Code:
    '---------------
    #org 0x8020D8
    setvar 0x4006 0x1
    checkflag 0x202
    if 0x0 goto 0x8802292
    checkflag 0x203
    if 0x1 goto 0x8802292
    setvar 0x8004 0x98
    special2 LASTRESULT 0x17C
    compare LASTRESULT 0x1
    if 0x1 goto 0x8802131
    setvar 0x8004 0x9B
    special2 LASTRESULT 0x17C
    compare LASTRESULT 0x1
    if 0x1 goto 0x8802192
    setvar 0x8004 0x9E
    special2 LASTRESULT 0x17C
    compare LASTRESULT 0x1
    if 0x1 goto 0x88021F3
    release
    end
    
    '---------------
    #org 0x802292
    release
    end
    
    '---------------
    #org 0x802131
    applymovement 0x6 0x880227E
    waitmovement 0x0
    msgbox 0x88022B0 MSG_NORMAL '"Clair: In that case,\nthis one is ..."
    applymovement 0x5 0x880228D
    waitmovement 0x0
    applymovement 0x7 0x8802285
    waitmovement 0x0
    msgbox 0x88022D9 MSG_NORMAL '"Ace: Then I guess I get this!"
    applymovement 0x4 0x880228D
    waitmovement 0x0
    applymovement 0x1 0x880227B
    waitmovement 0x0
    msgbox 0x88022F9 MSG_NORMAL '"Elm: Now that you have all chosen,..."
    applymovement 0x2 0x880226F
    waitmovement 0x0
    msgbox 0x8802295 MSG_NORMAL '"Elm: The test has begun!"
    setflag 0x203
    end
    
    '---------------
    #org 0x802192
    applymovement 0x6 0x880226A
    waitmovement 0x0
    msgbox 0x88022B0 MSG_NORMAL '"Clair: In that case,\nthis one is ..."
    applymovement 0x3 0x880228D
    waitmovement 0x0
    applymovement 0x7 0x8802261
    waitmovement 0x0
    msgbox 0x88022D9 MSG_NORMAL '"Ace: Then I guess I get this!"
    applymovement 0x5 0x880228D
    waitmovement 0x0
    applymovement 0x1 0x880227B
    waitmovement 0x0
    msgbox 0x88022F9 MSG_NORMAL '"Elm: Now that you have all chosen,..."
    applymovement 0x2 0x880226F
    waitmovement 0x0
    msgbox 0x8802295 MSG_NORMAL '"Elm: The test has begun!"
    setflag 0x203
    end
    
    '---------------
    #org 0x8021F3
    applymovement 0x6 0x880225B
    waitmovement 0x0
    msgbox 0x88022B0 MSG_NORMAL '"Clair: In that case,\nthis one is ..."
    applymovement 0x4 0x880228D
    waitmovement 0x0
    applymovement 0x7 0x8802254
    waitmovement 0x0
    msgbox 0x88022D9 MSG_NORMAL '"Ace: Then I guess I get this!"
    applymovement 0x3 0x880228D
    waitmovement 0x0
    applymovement 0x1 0x880227B
    waitmovement 0x0
    msgbox 0x88022F9 MSG_NORMAL '"Elm: Now that you have all chosen,..."
    applymovement 0x2 0x880226F
    waitmovement 0x0
    msgbox 0x8802295 MSG_NORMAL '"Elm: The test has begun!"
    setflag 0x203
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x8022B0
    = Clair: In that case,\nthis one is mine!
    
    #org 0x8022D9
    = Ace: Then I guess I get this!
    
    #org 0x8022F9
    = Elm: Now that you have all chosen,\nIt's time to begin.\pThere are clues to Golds,\nwhereabout everywhere.\pThe first clue is in [green_fr]Violet City.\p[black_fr]Elm: Now Gold, leave!
    
    #org 0x802295
    = Elm: The test has begun!
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x80227E
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x80228D
    #raw 0x60 'Hide
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x802285
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x80227B
    #raw 0x3 'Face Right
    #raw 0xFE 'End of Movements
    
    #org 0x80226F
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x1D 'Step Down (Fast)
    #raw 0x60 'Hide
    #raw 0x1F 'Step Left (Fast)
    #raw 0x1E 'Step Up (Fast)
    #raw 0x1E 'Step Up (Fast)
    #raw 0xFE 'End of Movements
    
    #org 0x80226A
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x802261
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x80225B
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x802254
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    Instead of setting a flag, you can also use a setvar. For instance, if you want the above script (let's call it Script A) only to happen once after Script B has happened. You could just use a setvar in Script B instead of a setflag, like setvar 0x5000 0x1, and give the Level Script A the Var Number 5000, and Var Value 0001, and inside Script A, use setvar 0x5000 0x2. That way, Script A will only happen after Script B, and one time only.
    As of late my scripting has improved mucho, and am almost ready to release an alpha of my new hack ^_^

    Unfourtunatley, the last script tile in my alpha is... buggy. Here is what is supposed to happen:

    1. Player steps on tile, then script brings him up one tile and diaolouge starts (Problem).
    2. Grunt next to the old guy moves down one step and talks to me. A fight initiates (No Problem).
    3.Grunt displays a message, and then the screen fades, and his sprite is hidden (No Problem).
    4. Old man talks to me, a couple of flags are set, and several sprites dissapear. Forever (Problem).

    Now, the problems are labled in red, but I will explain what happens for each one. First off, even though I included a setvar command, the script tile DOES NOT WORK (and yes, I included setvar as well as labelling the script tiles var number on A-map). I step on it, and pass through it as if the event had already happened. The only way I have been able to get around this is to make the script tile into a person event, but I really don't want that (after all, he will become a gym leader later). The other thing (and I get this with trees using cut) is that as soon as I step away from the tile I was on for the event, the sprites reappear. What's more, the sprites on other maps that the script is supposed to hide also reappear. I have tried almost everything, and if somebody can diagnose and debug it so it works perfectly, I would be greatly appreciatative.

    PlatniumPiano

    Ruby Version AXVE Script:
    (using XSE 1.1.1 and Advance Map 1.92)

    Spoiler:
    I don't know about your first problem, did you give the script tile the CORRECT values? Like, Var Number 9651, Var Value 0000? As for your second problem: don't use spriteinvisible, use hidesprite for all sprites on the same map, and after that a setflag, and give the flag number as People ID to every sprite you want to hide, including the ones on other maps.
    ROM: Sapphire
    Event: Person Event
    Script Editor: XSE

    Having trouble with a givepokemon script.

    Spoiler:
    Changes in bold.
    Okay, need some help here.

    When you talk to this professor, he gives you a Larvitar and a Pokedex. When the player opens the main menu and goes to any sub-menu that covers the whole screen, (e.g. Pokemon menu, Bag menu, Trainer card etc.) and closes the main menu, the player controls the professor instead of his/her own sprite.

    When the menu is opened again, and the player opens the sub-menus and closes the menu again, the professor sprite changes into the male character sprite (Sprite 0)

    By the way, it also happens with the other guy (the assistant) in the lab.

    Here's my script:
    Spoiler:


    And here's the screenshot.
    That's caused by Advance Map, it's not a scripting issue. Change the Movement Type of the professor from Look Down to No Movement. Look Down causes glitches when used.
     

    PlatniumPiano

    You are now breathing manually
    479
    Posts
    15
    Years
  • I don't know about your first problem, did you give the script tile the CORRECT values? Like, Var Number 9651, Var Value 0000? As for your second problem: don't use spriteinvisible, use hidesprite for all sprites on the same map, and after that a setflag, and give the flag number as People ID to every sprite you want to hide, including the ones on other maps.

    I thought the command clearflag was used to hide a sprite and setflag to show it?
     

    Quickster

    Dream or Drop?
    351
    Posts
    16
    Years
    • Seen Apr 4, 2016
    In fire red, oaks lab has a level script but doesnt activate when you walk in by yourself, only after oak makes you come in. How does this work? Does it have a checkflag or something?
     

    PlatniumPiano

    You are now breathing manually
    479
    Posts
    15
    Years
  • In fire red, oaks lab has a level script but doesnt activate when you walk in by yourself, only after oak makes you come in. How does this work? Does it have a checkflag or something?

    Nobody really understands the oak script as it is one of the most complex in rom-hacking-dom. The event continues after a warp which is never supposed to happen...
     

    metapod23

    Hardened Trainer
    673
    Posts
    15
    Years
    • Seen Aug 18, 2016
    Okay, I need help with this script. The basic problem is I've got three sprites (event no's 13, 14, and 15) that are supposed to move, but just don't. I've tried to figure out the problem, but haven't been able to. I gave them ID number 270 (the reason for the setflag) and I gave the script var #6042. Now the script works, but first when the 2nd applymovement for MOVEPLAYER goes, the player only steps up one space, and doesn't step right first. Second, the movements for sprites 13, 14, 15 don't work at all. They stay put and it moves onto the next msgbox. Do I need a different var? A different flag? Any help is appreciated. The relevant parts of the script are below:

    Spoiler:
     
    Status
    Not open for further replies.
    Back
    Top