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:
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:
So press CTRL + H to get the advanced header version. Then copy the Map script offset:
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:
You'll see an area where there is an 0xFFFF. Change it to 0x0.
Before:
After:
Then click the Compile button like you would any other script and you're done. Open your ROM and test it:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
Test out your script:
You're welcome