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

M.L

Invisible
761
Posts
13
Years
    • Seen Dec 21, 2017
    oh right sorry i wasnt ment to flip the command my mistake haha wasnt thinking properly ja
     

    stocko

    Toast Engineer
    37
    Posts
    13
    Years
  • Running Shoes Script error

    Hello everyone!

    I wrote a Person Event script to recieve the running shoes earlier on in the game.

    Here is the script:
    Spoiler:


    I am using PocketScript. It's a person script. I am using Fire Red.
    All of the script runs as planned except for the part in which the flag is set to receive the running shoes.
    What is wrong? How can i make the player receive the running shoes?

    Any help would be greatly appreciated.
     

    M.L

    Invisible
    761
    Posts
    13
    Years
    • Seen Dec 21, 2017
    i would like to ask have you put the running shoes setflag in the person Id and it should work if not well then i dunno
     
    27
    Posts
    12
    Years
    • Seen Dec 30, 2012
    I want to change scripts in Advance Map but when I save I need to save as a .rbc file and I save it and when I look again nothing is changed from the persons or sign's script... what do I do?
     

    Waflix

    Silver
    3
    Posts
    13
    Years
  • I want to create the possibility in my Pokémon FireRed hack to obtain the 2 other starters later in the game. My solution to decide which Pokémon was chosen as a starter is creating a new script/event where you talk to a scientist in the lab that gives you your starter.
    I was wondering how I could create a multiple choice script where you choose which Pokémon you get.
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Hello everyone!

    I wrote a Person Event script to recieve the running shoes earlier on in the game.

    Here is the script:
    Spoiler:


    I am using PocketScript. It's a person script. I am using Fire Red.
    All of the script runs as planned except for the part in which the flag is set to receive the running shoes.
    What is wrong? How can i make the player receive the running shoes?

    Any help would be greatly appreciated.

    While I don't use PokeScript, everything looks fine but that is no guarantee. It might be that your map's settings are not allowing you run. Check out this thread as it allows you to run everywhere.

    I want to change scripts in Advance Map but when I save I need to save as a .rbc file and I save it and when I look again nothing is changed from the persons or sign's script... what do I do?

    I'm a bit confused - Are you trying to get a script to run in Advance Map but saving it in XSE? Saving in XSE doesn't insert the script into Advance Map, it just creates a .rbc file that holds the script and can be opened/ edited later in XSE.

    If you're trying to insert a script into Advance Map you should open the script and then your ROM in XSE. You will then need to compile the script (The two blue cogs at the top) and copy the offset given to you. Paste the starting offset into the person/ script you want to have it in Advance Map and everything should work.

    I want to create the possibility in my Pokémon FireRed hack to obtain the 2 other starters later in the game. My solution to decide which Pokémon was chosen as a starter is creating a new script/event where you talk to a scientist in the lab that gives you your starter.
    I was wondering how I could create a multiple choice script where you choose which Pokémon you get.

    Here is an example of a multichoice script:

    Code:
    ...
    multichoice 0x0 0x0 [B]0xY[/B] 0x0
    copyvar 0x8000 0x800D
    compare 0x8000 0x0
    if 0x1 goto @Bulbasaur
    compare 0x8000 0x1
    if 0x1 goto @Charmander
    compare 0x8000 0x2
    if 0x1 goto @Squirtle
    ...
     
    ...
    #org @Bulbasaur
    givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
    ...

    The choices offered to you are based on which multiplechoice variable to you chose (0xY in the script). If you press F2 in XSE and open the scripting guide, you should be able to find a list of all of the multichoice options in the Appendix.

    Unfortunately you can't edit the text of the choices in-game so you'll have to either HEX edit the options, use an editor like this one or use JPAN's hacked engine (If you're using FR) to create a custom multichoice.

    If you want the game to remember which starter you chose, set a different flag for each starter's script and then check all three when needed to run different scripts.
     

    stocko

    Toast Engineer
    37
    Posts
    13
    Years
  • still no luck with getting the running shoes to work!

    I tried setting the person ID to 82F as you said before but no luck!

    This is actually getting quite frustrating... and the other person who linked me to another thread. That is to run indoors not set the running shoes. I might have to wait until later in the game to use them then.

    Thanks anyways.
     
    27
    Posts
    12
    Years
    • Seen Dec 30, 2012
    Thanks but I actually got Advance Text working so... but thanks I may need it later <3
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    Hello everyone!

    I wrote a Person Event script to recieve the running shoes earlier on in the game.

    Here is the script:
    Spoiler:


    I am using PocketScript. It's a person script. I am using Fire Red.
    All of the script runs as planned except for the part in which the flag is set to receive the running shoes.
    What is wrong? How can i make the player receive the running shoes?

    Any help would be greatly appreciated.

    Try this...
    Code:
    #org $dadscript
    lock
    faceplayer
    checkflag 0x1200
    if b_true goto $tired
    checkflag 0x82F
    if b_true goto $tired
    checkflag 0x28
    if b_true goto $gotpoke
    checkflag 0x29
    if b_true goto $gotpoke
    checkflag 0x2A 
    if b_true goto $gotpoke
    checkgender
    compare LASTRESULT 0x0
    if b_true goto $boytalk
    compare LASTRESULT 0x1
    if b_true goto $girltalk
    release
    end
    
    #org $boytalk
    message $talk1
    $talk1 1 =Son, i need to talk to you.\nI think it is time for you to\pget your own Pokemon.\pTalk to Proffesor Palm in his lab.\nWhen you have gotten it\pcome back here and tell me.\pThere is something very important\nI will need to ask of you.
    boxset 6
    release
    end
    
    #org $girltalk
    message $talk2
    $talk2 1 =Honey, I need to talk to you.\nI think it is time for you to\pget your own Pokemon.\pTalk to Proffesor Palm in his lab.\nWhen you have gotten it\pcome back here and tell me.\pThere is something very important\nI will need to ask of you.
    boxset 6
    release
    end
    
    #org $gotpoke
    lock
    faceplayer
    message $poke
    $poke 1 = Ok, now that you have chose your\npokemon.\pI have a very big favour to ask of\nAs may already know,\pTeam Storm's\nbig goal is to take over the world.\nThis is where you come in.\pThe first thing I am asking you to do\nis to go and beat all of the\pgym leaders\pWith them out of the way it will\nmake our plans a lot easier.
    boxset 6
    message @poke2
    @poke2 1 = You must then take out the Elite Four.\nThe master plan will then unfold!\pMWAHAHAHAHA!!!\nI will have sent out some of our men\nto come and check on your progress\pthroughout this grave journey.\pAlso i have a little gift for you.\nYour own pair of Running Shoes!
    boxset 6
    setflag 0x82F
    fanfare 0x13E
    message $recieve
    $recieve 1 = \v\h01 received the running shoes\nfrom Dad!
    boxset 4
    waitfanfare
    setflag 0x1200
    release
    end
    
    #org $tired
    lock
    faceplayer
    message $youlook
    $youlook 1 = You are looking tired.\nI will fix you up in a second!
    boxset 6
    fadescreen 1
    special 0x0
    pause 0x30
    fadescreen 0
    release
    end

    Although I suggest you try and switch into XSE scripting, for PokeScript is buggy. When I first started scripting, I have encountered numerous errors with PokeScript and my script not working properly even if there were no problems with the script whatsoever.
    But it's up to you, though.
     

    stocko

    Toast Engineer
    37
    Posts
    13
    Years
  • Thanks again, but still no luck.
    I am finding XSE a lot easier and have already noticed the difference. Is there something I should be setting in advance map? Like people Id or something?
     
    4
    Posts
    12
    Years
    • Seen Jul 12, 2011
    Hi everyone,
    The last 2 days I started focusing on Pokémon-hacking.
    I started trying to learn how to script today, and of course I already ran into my first problem, which is probably easy to solve.

    I am trying to insert a basic text for a Message-sign next to a house.

    So, first of all I open XSE & FSF, I open the room, find free space, copy paste, and I end up with this script:

    Code:
    #dynamic 0x2DD100
    
    #org @start
    msgbox @bord1 0x3
    end
    
    #org @bord1
    = [PLAYER]s house
    Everything seems fine uptill now in my eyes, however, once I open the rom, and I face the Sign, the music keeps playing, but I am unable to move or take any action, the text also doesn't appear.

    Im using a Fire Red rom.

    Any ideas?
     
    48
    Posts
    12
    Years
  • Since my last questions here, I have learned how to write basic scripts, yet I have run into a problem.

    On all the youtube scripting tutorials, they click "Compile script", yet my computer won't let me do so. Is there a wayaround this (Like the option encode on the menu in pokescript)? I have tried to use encode with verious scripts, even ones that have been used by numerous people, and have worked.
     
    49
    Posts
    14
    Years
    • Seen Sep 10, 2011
    I'd recompile champions' script to free location and added series of check and setflag commands and those set flags would be used in giving starters script =)
    It has advantage in a fact that champion can have different team each run (if you set it of course :D), isn't that great? :D


    Ah, ok I see what you mean. Cool, ty. :)

    Thanks to everyone, actually.
     

    shinyabsol1

    Pokemon DarkJasper!?
    333
    Posts
    13
    Years
    • Seen Nov 23, 2022
    I am attempting to get a simple trainerbattle script to work. When I compile it into a regular FR rom, everything works fine. But when I compile the same script into a rom patched with JPAN's hacked engine, it freezes right before the battle should start and the trainer's music just keeps playing.

    Does anyone know what the problem is here? I'm guessing it is something to do with the engine, but I can't figure out what.

    Any help is appreciated!
    Thanks.
     

    Satoshi Ookami

    Memento Mori
    14,254
    Posts
    15
    Years
  • I am attempting to get a simple trainerbattle script to work. When I compile it into a regular FR rom, everything works fine. But when I compile the same script into a rom patched with JPAN's hacked engine, it freezes right before the battle should start and the trainer's music just keeps playing.

    Does anyone know what the problem is here? I'm guessing it is something to do with the engine, but I can't figure out what.

    Any help is appreciated!
    Thanks.
    I unfortunately did not try JPAN's engine yet but if I remember correctly then it's "stripped" of these things and you need to insert them.
    I'm sorry I really don't know... I hope someone else answers this better.
     

    shinyabsol1

    Pokemon DarkJasper!?
    333
    Posts
    13
    Years
    • Seen Nov 23, 2022
    Ash493 said:
    I unfortunately did not try JPAN's engine yet but if I remember correctly then it's "stripped" of these things and you need to insert them.
    I'm sorry I really don't know... I hope someone else answers this better.

    Thanks for trying to help. I'm not sure what you mean when you say that it is "stripped" of the "things" necessary to make this work.....and what would I need to insert?

    But like you said, you're not really sure...and I'm not sold on the idea that I need to insert something. Wouldn't this stuff have been mentioned in the hacked engine's guide?

    Anyone else have an idea of what the problem is?
    Thanks.
     
    1,619
    Posts
    16
    Years
  • Can anyone help me? I've just got back into hacking and basically forgot how to script.

    I'm having trouble with this script:
    Spoiler:


    Problems:
    1.The rival only does the movements, but doesn't say anything and just walks off.
    2.When I go into a different map and then come back, he is then there again, and then the script can repeat.

    I'd like to solve this quickly as possible, thank you! :)
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Can anyone help me? I've just got back into hacking and basically forgot how to script.

    I'm having trouble with this script:
    Spoiler:


    Problems:
    1.The rival only does the movements, but doesn't say anything and just walks off.
    2.When I go into a different map and then come back, he is then there again, and then the script can repeat.

    I'd like to solve this quickly as possible, thank you! :)

    I have no idea why it isn't displaying the text :<

    Did you set his person ID to 1000? If you haven't that would explain why his sprite is reappearing. I'm not sure why you put 'clearflag 0x1000' in org @done because that would be allowing you to repeat the script again - It may also have something to to with being able to see him again as well.
     

    shinyabsol1

    Pokemon DarkJasper!?
    333
    Posts
    13
    Years
    • Seen Nov 23, 2022
    shinyabsol1 said:
    I am attempting to get a simple trainerbattle script to work. When I compile it into a regular FR rom, everything works fine. But when I compile the same script into a rom patched with JPAN's hacked engine, it freezes right before the battle should start and the trainer's music just keeps playing.

    Does anyone know what the problem is here? I'm guessing it is something to do with the engine, but I can't figure out what.

    Any help is appreciated!
    Thanks.


    Now I tried it on another FR patched with JPAN's engine and it worked! I forgot to mention that the rom that the script didn't work in had already been tampered with (test tiles/palettes and other scripts). Are my previous tamperings with the rom maybe what caused my trainer script to freeze? I just don't want this to happen when I start real scripting for my hack. :)
     

    Anselection

    Malicious Mapper
    174
    Posts
    14
    Years
    • Seen Dec 20, 2011
    Okay, I've re-downloaded XSE, and it didn't work, so it's obviously something with this script. I'm trying to teach myself to script and this script(I thought I was doing it fine) crashes XSE when I try to debug it. A normal talking script works fine, but this crashes the whole program. Can anyone tell me what's wrong with it? This is for Fire Red
    Spoiler:
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top