• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

[Other✓] Running Shoe Script

  • 11
    Posts
    12
    Years
    • Fl
    • Seen Apr 14, 2017
    Hi all, I need help with my script. I want to give my Player the Running Shoes right away and make him talk as well. My goal is to remind the Player to get his Running Shoes on. My code will be at the bottom so someone can help me out. I appreciate any help. Thanks


    #dynamic 0x800ED7

    #org @start
    lock
    msgbox @talk1 0x6
    setflag 0x82F
    fanfare 0x13E
    waitfanfare
    release
    end

    #org @talk1
    = Whoops, I almost forgot to put my\nRunning shoes on.
     
    Last edited:
    Spoiler:

    First of all, I recommend taking this entire event out and just change it to where you start out already wearing shoes, as well as add into your hack the ability to run in-doors like many other hacks have. For that resource, click here: click

    But if you insist on keeping it to where the hero is not so bright and forgets to put his shoes on, then this will help you:

    I'm assuming you want to have it to where the player starts out with this script rather than you walk onto a tile and it is activated so with that, you'll need to use a level script. For more on level scripts, click here: click

    So first, to fix your script:

    #dynamic 0x800ED7

    #org @start
    msgbox @talk1 0x6
    setflag 0x82F
    checkgender '"Checks to see if the player is a boy or girl
    compare 0x800D 0x1 '"When you use checkgender, it puts the value for if you are a boy/girl into a var known as LASTRESULT or 0x800D. 0x1 = girl, 0x0 = boy
    if 0x1 goto @female '"for if statements, 0x1 means yes, 0x0 means no
    compare 0x800D 0x0
    if 0x1 goto @male

    end

    #org @female
    fanfare 0x13E
    msgbox @obtaingirl 0x6
    waitfanfare
    setvar 0x4000 0x1 ""You need to set a var for the script so the script doesn't play again if the player steps on the script tile. You can use vars from 0x4000 - 0x5000 safely. I chose one at random
    release
    end

    #org @male
    fanfare 0x13E
    msgbox @obtainboy 0x6
    waitfanfare
    setvar 0x4000 0x1
    release
    end

    #org @obtainboy ""Make sure to have two different text messages for both genders
    = [player] put on his Running shoes!

    #org @obtaingirl
    = [player] put on her Running shoes!


    #org @talk1
    = Whoops, I almost forgot to put my\nRunning shoes on.

    Now that you have your script, compile it to the offset you want. I'll use the offset you have already selected for example. Open up Advance Map and click the Header option on the starter map. You'll probably have level scripts already and that's fine, just click Add button under Map Script section. Select the new map script entry and from the drop down, select: "Validates values, loads handler to 0x03000EB0 (playback) [02]"
    Under flag, put the var you put in your script. I used 0x4000. If you set the var to 0x2 instead of 0x1, you'd put $0001 in Value, but we used 0x1 so leave Value as $0000. In script offset 2, put the offset to our script which should read $00800ED7. See below image:
    [PokeCommunity.com] Running Shoe Script


    Now just click Save map scripts and make sure to save your map prior to trying out the script. Now, this next step is also very important every time or your level script won't work. Here's an example of it not working if you don't do this next step:
    [PokeCommunity.com] Running Shoe Script


    So press CTRL + H to get the advanced header version. Then copy the Map script offset:
    [PokeCommunity.com] Running Shoe Script


    Now we need to decompile it in XSE. So insert your offset into XSE, click the Level script button to the level of the Decompile but, then click Decompile:
    [PokeCommunity.com] Running Shoe Script


    You'll see an area where there is an 0xFFFF. Change it to 0x0.
    Before:
    [PokeCommunity.com] Running Shoe Script

    After:
    [PokeCommunity.com] Running Shoe Script


    Then click the Compile button like you would any other script and you're done. Open your ROM and test it:
    [PokeCommunity.com] Running Shoe Script


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If you want it as a script tile instead, then go ahead and add two new script tiles and put them where the player usually warps and then put the script offset in the box, make sure Unknown = 3 and then put your var, 0x4000 in the box.
    [PokeCommunity.com] Running Shoe Script


    Test out your script:
    [PokeCommunity.com] Running Shoe Script




    You're welcome
     
    First of all, I recommend taking this entire event out and just change it to where you start out already wearing shoes, as well as add into your hack the ability to run in-doors like many other hacks have. For that resource, click here: click

    But if you insist on keeping it to where the hero is not so bright and forgets to put his shoes on, then this will help you:

    I'm assuming you want to have it to where the player starts out with this script rather than you walk onto a tile and it is activated so with that, you'll need to use a level script. For more on level scripts, click here: click

    So first, to fix your script:



    Now that you have your script, compile it to the offset you want. I'll use the offset you have already selected for example. Open up Advance Map and click the Header option on the starter map. You'll probably have level scripts already and that's fine, just click Add button under Map Script section. Select the new map script entry and from the drop down, select: "Validates values, loads handler to 0x03000EB0 (playback) [02]"
    Under flag, put the var you put in your script. I used 0x4000. If you set the var to 0x2 instead of 0x1, you'd put $0001 in Value, but we used 0x1 so leave Value as $0000. In script offset 2, put the offset to our script which should read $00800ED7. See below image:
    [PokeCommunity.com] Running Shoe Script


    Now just click Save map scripts and make sure to save your map prior to trying out the script. Now, this next step is also very important every time or your level script won't work. Here's an example of it not working if you don't do this next step:
    [PokeCommunity.com] Running Shoe Script


    So press CTRL + H to get the advanced header version. Then copy the Map script offset:
    [PokeCommunity.com] Running Shoe Script


    Now we need to decompile it in XSE. So insert your offset into XSE, click the Level script button to the level of the Decompile but, then click Decompile:
    [PokeCommunity.com] Running Shoe Script


    You'll see an area where there is an 0xFFFF. Change it to 0x0.
    Before:
    [PokeCommunity.com] Running Shoe Script

    After:
    [PokeCommunity.com] Running Shoe Script


    Then click the Compile button like you would any other script and you're done. Open your ROM and test it:
    [PokeCommunity.com] Running Shoe Script


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If you want it as a script tile instead, then go ahead and add two new script tiles and put them where the player usually warps and then put the script offset in the box, make sure Unknown = 3 and then put your var, 0x4000 in the box.
    [PokeCommunity.com] Running Shoe Script


    Test out your script:
    [PokeCommunity.com] Running Shoe Script




    You're welcome

    How would I make so the player "already has the running shoes on"?

    I would like to have the player already wearing them at the beginning.

    Thanks :D
     
    Back
    Top