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

Bolens

Soul Hacker
359
Posts
14
Years
    • Age 30
    • PA
    • Seen Aug 22, 2016
    Whenever I insert this script into the ROM on Firered... It causes the game to reset itself :( I don't know why?

    Code:
    #dynamic 0x800086
    
    #org @start
    lock
    checkflag 0x250
    if 0x1 goto @done1
    hidesprite 0x02
    applymovement 0x1 @move
    msgbox @1 0x6
    givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @2 0x4
    waitfanfare
    closeonkeypress
    msgbox @3 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    msgbox @4 0x6
    fadescreen 0x3
    showsprite 0x02
    fadescreen 0x2
    msgbox @5 0x6
    applymovement 0x2 @move1
    msgbox @6 0x6
    applymovement 0x2 @move2
    msgbox @7 0x6
    hidesprite 0x02
    setflag 0x250
    applymovement 0x1 @move3
    release
    end
    
    #org @done1
    release
    end
    
    #org @name
    call 0x1A74EB
    return
    
    #org @move1
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    
    #org @move2
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x3
    
    #org @move3
    #raw 0x12
    #raw 0x12
    
    #org @move
    #raw 0x13
    #raw 0x13
    #raw 0x1
    
    #org @1
    = Sky: Hey pops, what's-\nDad: There you are, Sky. Have I\lfound the one for you!\lSky: One what?\lDad: Don't play dumb, you know what\lI'm talking about. And besides,\lhe's the perfect Pokemon for you! I\lcaught him just outside of a swamp\lnear town. It wasn't easy, he was\la tricky one, that's for sure...\lSky: You've found a Pokemon?\lDad: Here, see for yourself.
    
    #org @2
    = [black_fr]You received a Totodile!
    
    #org @3
    = [black_fr]Would you like to give Totodile a\nnickname?
    
    #org @4
    = Sky: Awesome! Okay, come on out!
    
    #org @5
    = ???: Toto? toto to! TOOOO!\nSky: Whoa...You found a Totodile!\l...Uh...
    
    #org @6
    = Dad: Hey, don't do that!
    
    #org @7
    = Sky: He sure is...energetic...I\nthink I'll call him...Spike.\lDad: Good, now that he has a name,\lhe's all your's. Just remember to\ltake care of him, he was pretty\ltough to find...Oh, and...keep him\lfrom running around the house from\lnow on...\lSky: Affermative! Thanks, pops!\lCome on, Spike! First stop: the\lpark!\lSpike: All right! Hanging around\lthese weird humans could be fun!
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    Hello! I am having some trouble designing my game. I made a script for a sign (basic talking) but when I put it in my game, it doesn't work. (Pressing A does nothing) I used PokeScript. Meaning I
    1. Made a script on notepad and made it into a .rbc
    2. Compiled the script, clicked the book to find my fire red rom, then clicked the torch.
    3. Clicked the torch (flashlight?) and clicked the first offset and assigned it
    4. Went File -> Burn on Buf Rite, and got the offset from the offset tab
    5. Wrote down the FIRST offset.
    6. Inserted the first offset into Advance Map, onto the sign where the script is placed on top.

    What did I do wrong? (I can post Screenies)

    Code:
    #org $Showtext
    lock
    faceplayer
    message $Hello
    $Hello 1 = Mr. Zero's House\pDon't try the back door!
    boxset6
    release
    end

    I have already forgotten how to script through PokeScript, but maybe you forgot to add a space between boxset and 6...?

    Whenever I insert this script into the ROM on Firered... It causes the game to reset itself :( I don't know why?

    Code:
    #dynamic 0x800086
    
    #org @start
    lock
    checkflag 0x250
    if 0x1 goto @done1
    hidesprite 0x02
    applymovement 0x1 @move
    [COLOR="Red"]waitmovement 0x1[/COLOR]
    msgbox @1 0x6
    givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @2 0x4
    waitfanfare
    closeonkeypress
    msgbox @3 0x5
    compare LASTRESULT 0x1
    if 0x1 gosub @name
    msgbox @4 0x6
    fadescreen 0x3
    showsprite 0x02
    fadescreen 0x2
    msgbox @5 0x6
    applymovement 0x2 @move1
    [COLOR="red"]waitmovement 0x2[/COLOR]
    msgbox @6 0x6
    applymovement 0x2 @move2
    [COLOR="red"]waitmovement 0x2[/COLOR]
    msgbox @7 0x6
    hidesprite 0x02
    setflag 0x250
    applymovement 0x1 @move3
    [COLOR="red"]waitmovement 0x1[/COLOR]
    release
    end
    
    #org @done1
    release
    end
    
    #org @name
    call 0x1A74EB
    return
    
    #org @move1
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    [COLOR="red"]#raw 0xFE[/COLOR]
    
    #org @move2
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x3
    [COLOR="red"]#raw 0xFE[/COLOR]
    
    #org @move3
    #raw 0x12
    #raw 0x12
    [COLOR="red"]#raw 0xFE[/COLOR]
    
    #org @move
    #raw 0x13
    #raw 0x13
    #raw 0x1
    [COLOR="red"]#raw 0xFE[/COLOR]
    
    #org @1
    = Sky: Hey pops, what's-\nDad: There you are, Sky. Have I\lfound the one for you!\lSky: One what?\lDad: Don't play dumb, you know what\lI'm talking about. And besides,\lhe's the perfect Pokemon for you! I\lcaught him just outside of a swamp\lnear town. It wasn't easy, he was\la tricky one, that's for sure...\lSky: You've found a Pokemon?\lDad: Here, see for yourself.
    
    #org @2
    = [black_fr]You received a Totodile!
    
    #org @3
    = [black_fr]Would you like to give Totodile a\nnickname?
    
    #org @4
    = Sky: Awesome! Okay, come on out!
    
    #org @5
    = ???: Toto? toto to! TOOOO!\nSky: Whoa...You found a Totodile!\l...Uh...
    
    #org @6
    = Dad: Hey, don't do that!
    
    #org @7
    = Sky: He sure is...energetic...I\nthink I'll call him...Spike.\lDad: Good, now that he has a name,\lhe's all your's. Just remember to\ltake care of him, he was pretty\ltough to find...Oh, and...keep him\lfrom running around the house from\lnow on...\lSky: Affermative! Thanks, pops!\lCome on, Spike! First stop: the\lpark!\lSpike: All right! Hanging around\lthese weird humans could be fun!

    You forgot to add waitmovement commands after your applymovement commands, and you forgot to end your movement scripts with the 0xFE code.

    I am not sure if it fixes your problem, but try it out.
     
    4
    Posts
    13
    Years
    • Seen Sep 14, 2018
    Hi everyone !

    I want to ask something bit tricky !
    So everyone look :

    -Story:

    I am hacking fire red , and the [player] is at jail . Then he destroys a rock tile and he escapes from the jail . Then he walks on a tile 2 cops stop him and battle him ..

    -Problem :

    IF i lose to the cops , i want to spawn again from the jail WITH healed pokemon and **all things that were done restart **

    **...**= the rock that blocks the way from the jail i use the "setmaptile" command to get the rock away . and the cops REfight you. when you walk up to the scriptbox.

    progress.gif
    http://www.pokecommunity.com/editpost.php?do=editpost&p=6493381
     

    SPG

    Pyroblock
    88
    Posts
    13
    Years
    • Seen May 4, 2013
    this script works fine but.... when you enter the one of the 3 tiles the script it is placed on more than once it keeps happening how do i fix this? (the script was put in the game so the offset is fine so dont both to correct that)

    Spoiler:
     

    metapod23

    Hardened Trainer
    673
    Posts
    15
    Years
    • Seen Aug 18, 2016
    this script works fine but.... when you enter the one of the 3 tiles the script it is placed on more than once it keeps happening how do i fix this? (the script was put in the game so the offset is fine so dont both to correct that)

    Spoiler:

    Which variable # are you using in A-Map to activate the script? (You should use different variables for different scripts.) If you were using variable 5000, then put setvar 0x5000 0x1 at the end of your script to deactivate it.

    Is it possible to have more choice than yes or no in a yes or no script

    No. You'd have to use the multichoice command.
     

    Controversial?

    Bored musician, bad programmer
    639
    Posts
    13
    Years
    • UK
    • Seen Oct 11, 2020
    Hey, I'm a MASSIVE newb to hacking (I've never actually made a script before until this one, I'm just a mapper really) and Im trying to make this recurring character - she's meant to walk up to you, battle you, then go. I know I'm doing something wrong here - I just don't know what. (it doesn't work, so...)

    Game: FireRed
    Type: Trigger
    Editor: XSE
    Script:
    Spoiler:
    Spoiler:
     

    adamb241

    Pokémon Raging Fury
    656
    Posts
    16
    Years
  • Hello guys, I've run into a little (well major actually) So this script involves the player getting a Pokemon then battling the rival. The problem occurs at the end of the script, the rival and the father are suppose to walk away towards the north end of the map and disappear. For some reason, the camera locks onto the father and follows him up north then off to the side when he disappears and the player cannot move.

    Here's a picture
    aaa-1.png


    Another odd thing happens, after the battle, the rival's sprite gets all messed up and changes colors, it some times turns into copy of the players sprite (default one fr one).

    Any help would be greatly appreciated!.

    Spoiler:
     
    8
    Posts
    15
    Years
    • Seen Mar 17, 2014
    hey could some one tell me whats wrong here im hacking fire red and creating a fourth starter but the problem is the rivals pokeball doesnt disappear after he chooses his starter(only if i choose the fourth starter) and the fourth starters pokeball disappears but when i leave the lab and come back its still there help please

    Spoiler:
     

    pyscho_red

    will give it another shot !
    15
    Posts
    15
    Years
  • Fluppin' flags.

    A little background information
    Spoiler:

    Question
    Spoiler:

    Ruby
    Person
    XSE
    Script
    Spoiler:
    Spoiler:
    So if anyone could help me out with this one, I'd be most appreciative.
    EDIT: I don't know why the spoiler has split the code into two parts.. just show them both, and combine the "0x" from the end of the third spoiler.
    With the "6B0B74" at the beginning of the fourth spoiler
    And sorry for the long unnecessary post >.>'
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • #dynamic 0x6B0B5C
    #org @start
    checkflag 0x801
    checkflag 0x200
    checkflag 0x800
    if 0x0 goto @Continue1
    setflag 0x200
    setflag 0x800
    setflag 0x801
    if 0x1 goto 0x6B0B74
    msgbox @GoodLuck 0x2
    release
    end


    #org @Continue1
    msgbox @givepokemanz 0x06
    givepokemon 0x16B 0xA 0xBD 0x0 0x0 0x0
    setflag 0x801
    setflag 0x800
    clearflag 0x200
    end

    #org @givepokemanz
    = Steven: [player]!\nI've been looking for you.\lI have something for you.\lIt's a Roselia!\lQuite an amazing POKéMON\lreally!

    #org @GoodLuck
    = Steven: Good luck\non your journey!

    Changes in red, deletions in yellow.

    No, you'll have to do each flag individually rather than three at once, but I'm not sure why you'd need to do all three in this script anyway. You're setting/ clearing them all at the same time so you might as well get rid of flag 0x200 since you'll only need to check either 0x800 or 0x801.

    You were setting your flags in an incorrect in part of the script so they would never activate because they had to be set in order to reach it. You were also trying to link to the second part of the text immediately, rather than continuing to a different area of the script which held the msgbox command so you could use it correctly. Hopefully this sorts everything out.
     
    55
    Posts
    14
    Years
    • Seen Feb 1, 2023
    If you only want a small number of available trainers, then TheDarkShark's method will be perfectly manageable. However, if you're looking for a more general solution, you'll have to disassemble the routines associated with the 'trainerbattle' command and edit them so that if the second parameter is a variable, the game will load the value stored in that variable. It's not too hard if you know what you're doing but if you don't, it's most likely impossible.

    Can anyone help me out with the above problem? (I need 'trainerbattle' to work with variables, not just flags) I would really appreciate it!

    P.S. please don't just say "google it." I tried that, and the results weren't even pokemon-related (maybe I used the wrong keywords?)
     

    pyscho_red

    will give it another shot !
    15
    Posts
    15
    Years
  • Dr. Fuji sir, you are my hero<3
    That was terribly easy and I don't see how I missed that D;
    But thanks alot!
     
    108
    Posts
    13
    Years
    • Seen Mar 31, 2024
    I'm trying to make a basic script but once I copy and paste the offset into the line required in Advanced Map and save it and try it in the game, nothing happens.

    www.youtube.com/watch?v=2oVgjHMmCO4


    In the video I go step by step of what I'm doing. What am I doing wrong?
     

    masterquestmq

    Enthusiastic Rom Hacker
    194
    Posts
    13
    Years
    • Seen Nov 19, 2023
    I'm trying to make a basic script but once I copy and paste the offset into the line required in Advanced Map and save it and try it in the game, nothing happens.

    www.youtube.com/watch?v=2oVgjHMmCO4


    In the video I go step by step of what I'm doing. What am I doing wrong?


    Hey buddy, the script is correct, it was a long video so i didnt really finish it, my only advice
    USE XSE

    poke script is ancient

    if you do the same thing in XSE (burning to the rom is just a click away fyi)
    you will not encounter any problem

    my advice
    http://www.pokecommunity.com/showthread.php?t=164276

    this will do wonders for you.

    trust me

    good luck and all the best.
     
    108
    Posts
    13
    Years
    • Seen Mar 31, 2024
    Hey buddy, the script is correct, it was a long video so i didnt really finish it, my only advice
    USE XSE

    poke script is ancient

    if you do the same thing in XSE (burning to the rom is just a click away fyi)
    you will not encounter any problem

    my advice
    http://www.pokecommunity.com/showthread.php?t=164276

    this will do wonders for you.

    trust me

    good luck and all the best.




    Just tried XSE using the same script. I saved the file as rbc. Then did the same procedure I did in the video. It has the same end result. I also tried to compile the script after saving it as rbc file in xse. It compiled and gave me two offsets. One is @gls the other is @text. I'm paranoid so I made went in and made two people events and gave each one one of those offsets. The result is STILL the same! Of course I don't see where you burn anything in XSE. After it compiled it had "clear" "close" and "save as" but saving it only saves it as a log file. I see no where to burn anything to the game. Using notepad should work anyways. Youtube people do it all the time on there. I have to be doing something wrong in that video. Can someone please watch it the whole way and tell me what I'm doing wrong?
     

    DeepKickSavior

    is readin' up on his XSE :3
    10
    Posts
    13
    Years
  • HEX code ##01?

    I'm trying to give a Pokémon from a list of HEX #'s I got off of one of foullump's videos, and I'm trying to give a Sableye. The HEX for Sableye is 4201, not 4200. When I put 0x42 for the give Pokémon part, I get Machop (whose HEX is 4200) instead of Sableye. I tried changing the 0x42 to 1x42, and I got a Bulbasaur. I tried changing the code to 0x4201, and I didn't get a Pokémon at all :P

    What can I do to get a Pokémon with HEX end digits not 00? Here's the section of the script btw:

    fanfare 0x13E
    givepokemon 0x?? 5 0x8B
    message $LOL
    $LOL 1 = \v\h01 got a SABLEYE!
    boxset 4
    waitfanfare

    Also, I'm using PoketScript not XSE

    Game is a FireRed Hack
     
    Last edited:

    Learath2

    Scripter
    114
    Posts
    14
    Years
  • I'm trying to give a Pokémon from a list of HEX #'s I got off of one of foullump's videos, and I'm trying to give a Sableye. The HEX for Sableye is 4201, not 4200. When I put 0x42 for the give Pokémon part, I get Machop (whose HEX is 4200) instead of Sableye. I tried changing the 0x42 to 1x42, and I got a Bulbasaur. I tried changing the code to 0x4201, and I didn't get a Pokémon at all :P

    What can I do to get a Pokémon with HEX end digits not 00? Here's the section of the script btw:

    fanfare 0x13E
    givepokemon 0x?? 5 0x8B
    message $LOL
    $LOL 1 = \v\h01 got a SABLEYE!
    boxset 4
    waitfanfare

    Also, I'm using PoketScript not XSE

    Game is a FireRed Hack

    Hmm Long Time No See Pokescript but Im Pretty Sure Its 0x142

    Don't Forget Closeonkeypress without that boxset 4 wont be closeable
     
    Last edited:
    108
    Posts
    13
    Years
    • Seen Mar 31, 2024
    Can someone explain to me if when you use Pokescript and wordpad to make a script like a battle or just someone to talk to, how is this better than using a-text to change what people say? I was using a text and found in my game people are saying the same things as what someone else was assigned. how is pokescript and xse going to help this from not happening?
     
    1,421
    Posts
    13
    Years
  • Can someone explain to me if when you use Pokescript and wordpad to make a script like a battle or just someone to talk to, how is this better than using a-text to change what people say? I was using a text and found in my game people are saying the same things as what someone else was assigned. how is pokescript and xse going to help this from not happening?
    If you edit the text in A-Text and by any chance exceed the size of the script by typing in more characters than the original piece of text, the entire script will get messed up. The extra bits of text sometimes goes into other scripts and messes them up as well. On the other hand if you're using XSE or Pokescript, you can write the script into a new offset with as much text as you want.
     
    Status
    Not open for further replies.
    Back
    Top