Binary ROM HackingNeed a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.
Don't use warp command to move people, it's meant to warp the player. Remove warp commands. Use disappear and flag setting to create the illusion he warped back. Also after fanfare you need waitfanfare, and is this right syntax : giveitem 0xD 0x5 MSG_OBTAIN ? I don't know not a very XSE kinda guy.
OH WARP IS FOR THE PLAYER I thought it could be for anyone...
Don't use warp command to move people, it's meant to warp the player. Remove warp commands. Use disappear and flag setting to create the illusion she warped back. Also after fanfare you need waitfanfare, and is this right syntax : giveitem 0xD 0x5 MSG_OBTAIN ? I don't know not a very XSE kinda guy. Compile your script after those changes.
EDIT: I just noticed you're trying to script door animations and stuff inside the movement block. You can't do that you can only have your #raw movements in those. Everthing else for you goes in the main block of code.
The new XSE should tell the nesesary parameters as you type. Honestly, my favorite feature. I got tired of searching through the command database everytime I needed to know how many fillers a command had..:)
#org @1
= WAIT [player]! You cannot be a recruit\nwithout the propper attier.
#org @received
= [Player] received the \c\h01ÊRUNNING\nSHOES!
#org @received2
= [Player] received \c\h01ÊPokéballs!
#org @received3
= [Player] received \c\h01ÊPotions!
When you're using an applymovement command your pointer should only be comprised of #raws unlike what you have in your @move sections of the script. Don't place other commands such as hidesprite or setdooropen in those sections as they will be interpreted differently by the ROM when compiled. Also, you haven't fully closed off your script at the end of your @take pointer.
I'm not trying to offend you but honestly, the whole script is a pretty big mess of jumbled commands and I don't think you have really learned the basics of what each command does or how it should be used. While you said that you want to become advanced and move on to bigger scripts, you're not at that point yet. Just slow down, try to get the grasp of individual commands, work on basic scripts in a practicing ROM and keep re-reading the tutorials available (particularly diegoisawesome's one if you're using XSE). Once again, I'm not trying to be mean/ a downer but from what I can see you're biting off more than you can chew at this point.
When you're using an applymovement command your pointer should only be comprised of #raws unlike what you have in your @move sections of the script. Don't place other commands such as hidesprite or setdooropen in those sections as they will be interpreted differently by the ROM when compiled. Also, you haven't fully closed off your script at the end of your @take pointer.
I'm not trying to offend you but honestly, the whole script is a pretty big mess of jumbled commands and I don't think you have really learned the basics of what each command does or how it should be used. While you said that you want to become advanced and move on to bigger scripts, you're not at that point yet. Just slow down, try to get the grasp of individual commands, work on basic scripts in a practicing ROM and keep re-reading the tutorials available (particularly diegoisawesome's one if you're using XSE). Once again, I'm not trying to be mean/ a downer but from what I can see you're biting off more than you can chew at this point.
Well I stopped trying to do the advanced part,
now all i need help on is getting 5 pokeballs, 5 potions, and the running shoes after the movement, everything else is fine....
Here's my new script:
Spoiler:
#dynamic 0x9C0000
#org @start
checkflag 0x200
if 0x1 goto @done
setflag 0x200
applymovement 0x0 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x0 @move_back
waitmovement 0x0
if 0x1 goto @take
release
end
Well I stopped trying to do the advanced part,
now all i need help on is getting 5 pokeballs, 5 potions, and the running shoes after the movement, everything else is fine....
Here's my new script:
Spoiler:
#dynamic 0x9C0000
#org @start
checkflag 0x200
if 0x1 goto @done
setflag 0x200
applymovement 0x0 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x0 @move_back
waitmovement 0x0
if 0x1 goto @take
release
end
Hey guys!
How can I compare, if i defeated or lost at the last trainer battled?
with trainerbattle 0x9 0x0 0x3 @win @loose i can just pop up messageboxes but
i cant write code..
Trace the routine defined for making the blackout to occur. That way, you'll find out which byte value is changed determining whether you win or lost the match. Of course it doesn't have to work like this, but it does in G/S/C and the same developers made FRLG and RSE so it likely does.
This ram address (where the byte is) is possibly called later on to check whether or not the match was won. Call a subroutine, at this point, for making this byte value being set to "battle won" even if you lost the battle against this certain opponent (whom I believe you're planning to use this routine with).
Hey guys!
How can I compare, if i defeated or lost at the last trainer battled?
with trainerbattle 0x9 0x0 0x3 @win @loose i can just pop up messageboxes but
i cant write code..
You can figure out whether you won or lost a battle by using the command 'special2 0xYYYY 0xB4', where 0xYYYY is a variable which you can read the result from later. Special 0xB4 works by storing a value to the variable indicating what the result of the battle was. If the value is equal to 0x1 then the enemy was defeated, if it is 0x4 then the enemy ran away and if it is 0x7 then they were captured. While most of the results are for wild Pokemon, if you compare the variable to 0x1 after a trainer battle then it works in much the same way.
Here's an example of it in use:
Code:
#dynamic 0x800000
#org @start
trainerbattle 0x9 0x1 0x3 @Victory @Defeat
special2 0x800D 0xB4
compare 0x800D 0x1
if 0x1 goto @Beaten
msgbox @Winner 0x2
release
end
#org @Beaten
msgbox @Loser 0x2
release
end
#org @Victory
= I'm the best!
#org @After
= Disappointing.
#org @Winner
= I won!
#org @Loser
= I lost...
'---------------
#org 0x169DE4
msgbox 0x818EA45 MSG_KEEPOPEN
release
end
'---------------
#org @continue
applymovement 0x4 0x81A75EF
waitmovement 0x0
showpokepic 0x4002 0xA 0x3
textcolor 0x0
bufferpokemon 0x0 0x4002
compare 0x4001 0x0
if 0x1 goto 0x8169C14
compare 0x4001 0x1
if 0x1 goto 0x8169C33
compare 0x4001 0x2
if 0x1 goto 0x8169C52
end
'---------------
#org 0x169C14
msgbox 0x818E272 MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end
'---------------
#org 0x169C33
msgbox 0x818E207 MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end
'---------------
#org 0x169C52
msgbox 0x818E194 MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end
'---------------
#org 0x169C74
hidepokepic
hidesprite LASTTALKED
msgbox 0x818E2E5 MSG_KEEPOPEN '"This POKéMON is really quite\nener..."
call 0x81A6675
setflag 0x828
setflag 0x291
givepokemon 0x4002 0x5 0x0 0x0 0x0 0x0
copyvar 0x4031 0x4001
bufferpokemon 0x0 0x4002
preparemsg 0x818E30D '"[player] received the [buffer1]\nf..."
waitmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CCC
compare LASTRESULT 0x0
if 0x1 goto 0x8169CDC
end
'---------------
#org 0x169C71
hidepokepic
release
end
'---------------
#org 0x1A6675
copyvar 0x8012 0x8013
return
'---------------
#org 0x169CCC
setvar 0x8004 0x0
call 0x81A74EB
goto 0x8169CDC
'---------------
#org 0x169CDC
closeonkeypress
compare 0x4001 0x0
if 0x1 goto 0x8169CFF
compare 0x4001 0x1
if 0x1 goto 0x8169D1F
compare 0x4001 0x2
if 0x1 goto 0x8169D0F
end
'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return
'---------------
#org 0x169CFF
applymovement 0x8 0x8169D62
waitmovement 0x0
goto 0x8169D2F
'---------------
#org 0x169D1F
applymovement 0x8 0x8169D72
waitmovement 0x0
goto 0x8169D2F
'---------------
#org 0x169D0F
applymovement 0x8 0x8169D6B
waitmovement 0x0
goto 0x8169D2F
'---------------
#org 0x169D2F
textcolor 0x0
msgbox 0x818DD34 MSG_KEEPOPEN '"[rival]: I'll take this one, then!"
hidesprite 0x4004
textcolor 0x3
bufferpokemon 0x0 0x4003
preparemsg 0x818DD52 '"[rival] received the [buffer1]\nfr..."
waitmsg
fanfare 0x13E
waitfanfare
setvar 0x4055 0x3
checkflag 0x83E
if 0x1 call 0x8169D5C
release
end
'---------------
#org 0x169D5C
setvar 0x4070 0x1
return
'---------
' Strings
'---------
#org 0x18EA19
= Those are POKé BALLS.\nThey contain POKéMON!
#org 0x18EA45
= That's PROF. OAK's last POKéMON.
#org 0x18E272
= I see! [buffer1] is your choice.\nIt's very easy to raise.\pSo, [player], you want to go with\nthe GRASS POKéMON [buffer1]?
#org 0x18E207
= Hm! [buffer1] is your choice.\nIt's one worth raising.\pSo, [player], you've decided on the\nWATER POKéMON [buffer1]?
#org 0x18E194
= Ah! [buffer1] is your choice.\nYou should raise it patiently.\pSo, [player], you're claiming the\nFIRE POKéMON [buffer1]?
#org 0x18E2E5
= This POKéMON is really quite\nenergetic!
#org 0x18E30D
= [player] received the [buffer1]\nfrom PROF. OAK!
#org 0x1A56A7
= Do you want to give a nickname to\nthis [buffer1]?
#org 0x18DD34
= [rival]: I'll take this one, then!
#org 0x18DD52
= [rival] received the [buffer1]\nfrom PROF. OAK!
'-----------
' Movements
'-----------
#org 0x1A75EF
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements
#org 0x169D62
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (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 0x169D72
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
#org 0x169D6B
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
When I only insert the script into the first pokeball and not the others, it always returns a nidoran male. And if you talk to a different pokeball before the first one, the game glitches up and restarts.
If I insert the scripts to all three, the first still shows a nidoran male and the second two always glitch, no matter what order you talk to them in.
If I remove the bufferpokemon from the continue script and message scripts, the first ball returns nidoran male and the second two don't seem to have a value, as the picture is a question mark and the game freezes when you accept the (non)pokemon.
Hey, quick question. I am trying to make an applymovement script, but this isn't the applymovement after you talk to a sprite. It is a "level script" I believe it's called. Anyways, every time I step on the tile where the script is, the ROM just freezes. I know it doesn't have anything to do with the script because it works fine if I apply it directly to a sprite. Does this have anything to do with SetVar? I hope I'm not being to vague and hope someone can help me out as soon as possible. Thanks!
Hey, quick question. I am trying to make an applymovement script, but this isn't the applymovement after you talk to a sprite. It is a "level script" I believe it's called. Anyways, every time I step on the tile where the script is, the ROM just freezes. I know it doesn't have anything to do with the script because it works fine if I apply it directly to a sprite. Does this have anything to do with SetVar? I hope I'm not being to vague and hope someone can help me out as soon as possible. Thanks!
That's not a level script, I think you're talking about the green script tile in advance map. Open A-map and change:
'---------------
#org 0x169DE4
msgbox 0x818EA45 MSG_KEEPOPEN
release
end
'---------------
#org @continue
applymovement 0x4 0x81A75EF
waitmovement 0x0
showpokepic 0x4002 0xA 0x3
textcolor 0x0
bufferpokemon 0x0 0x4002
compare 0x4001 0x0
if 0x1 goto 0x8169C14
compare 0x4001 0x1
if 0x1 goto 0x8169C33
compare 0x4001 0x2
if 0x1 goto 0x8169C52
end
'---------------
#org 0x169C14
msgbox 0x818E272 MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end
'---------------
#org 0x169C33
msgbox 0x818E207 MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end
'---------------
#org 0x169C52
msgbox 0x818E194 MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end
'---------------
#org 0x169C74
hidepokepic
hidesprite LASTTALKED
msgbox 0x818E2E5 MSG_KEEPOPEN '"This POKéMON is really quite\nener..."
call 0x81A6675
setflag 0x828
setflag 0x291
givepokemon 0x4002 0x5 0x0 0x0 0x0 0x0
copyvar 0x4031 0x4001
bufferpokemon 0x0 0x4002
preparemsg 0x818E30D '"[player] received the [buffer1]\nf..."
waitmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CCC
compare LASTRESULT 0x0
if 0x1 goto 0x8169CDC
end
'---------------
#org 0x169C71
hidepokepic
release
end
'---------------
#org 0x1A6675
copyvar 0x8012 0x8013
return
'---------------
#org 0x169CCC
setvar 0x8004 0x0
call 0x81A74EB
goto 0x8169CDC
'---------------
#org 0x169CDC
closeonkeypress
compare 0x4001 0x0
if 0x1 goto 0x8169CFF
compare 0x4001 0x1
if 0x1 goto 0x8169D1F
compare 0x4001 0x2
if 0x1 goto 0x8169D0F
end
'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return
'---------------
#org 0x169CFF
applymovement 0x8 0x8169D62
waitmovement 0x0
goto 0x8169D2F
'---------------
#org 0x169D1F
applymovement 0x8 0x8169D72
waitmovement 0x0
goto 0x8169D2F
'---------------
#org 0x169D0F
applymovement 0x8 0x8169D6B
waitmovement 0x0
goto 0x8169D2F
'---------------
#org 0x169D2F
textcolor 0x0
msgbox 0x818DD34 MSG_KEEPOPEN '"[rival]: I'll take this one, then!"
hidesprite 0x4004
textcolor 0x3
bufferpokemon 0x0 0x4003
preparemsg 0x818DD52 '"[rival] received the [buffer1]\nfr..."
waitmsg
fanfare 0x13E
waitfanfare
setvar 0x4055 0x3
checkflag 0x83E
if 0x1 call 0x8169D5C
release
end
'---------------
#org 0x169D5C
setvar 0x4070 0x1
return
'---------
' Strings
'---------
#org 0x18EA19
= Those are POKé BALLS.\nThey contain POKéMON!
#org 0x18EA45
= That's PROF. OAK's last POKéMON.
#org 0x18E272
= I see! [buffer1] is your choice.\nIt's very easy to raise.\pSo, [player], you want to go with\nthe GRASS POKéMON [buffer1]?
#org 0x18E207
= Hm! [buffer1] is your choice.\nIt's one worth raising.\pSo, [player], you've decided on the\nWATER POKéMON [buffer1]?
#org 0x18E194
= Ah! [buffer1] is your choice.\nYou should raise it patiently.\pSo, [player], you're claiming the\nFIRE POKéMON [buffer1]?
#org 0x18E2E5
= This POKéMON is really quite\nenergetic!
#org 0x18E30D
= [player] received the [buffer1]\nfrom PROF. OAK!
#org 0x1A56A7
= Do you want to give a nickname to\nthis [buffer1]?
#org 0x18DD34
= [rival]: I'll take this one, then!
#org 0x18DD52
= [rival] received the [buffer1]\nfrom PROF. OAK!
'-----------
' Movements
'-----------
#org 0x1A75EF
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements
#org 0x169D62
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (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 0x169D72
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
#org 0x169D6B
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
When I only insert the script into the first pokeball and not the others, it always returns a nidoran male. And if you talk to a different pokeball before the first one, the game glitches up and restarts.
If I insert the scripts to all three, the first still shows a nidoran male and the second two always glitch, no matter what order you talk to them in.
If I remove the bufferpokemon from the continue script and message scripts, the first ball returns nidoran male and the second two don't seem to have a value, as the picture is a question mark and the game freezes when you accept the (non)pokemon.
#org @startersel1
random 0x3
copyvar 0x8008 LASTRESULT
compare 0x8008 0x0
if 0x1 call @bulbasaur
compare 0x8008 0x1
if 0x1 call @chikorita
compare 0x8008 0x2
if 0x1 call @treeko setflag 0x900
return
You are setting the flag at a subroutine that's executed only if the flag is set. This the subroutine is never executed and whatever value is in variable 0x9002 is being displayed @continue instead. My hunch is 0x9002 holds nidoran male's number.
Ball #2 and Ball #3 have the same problem ^^
Quote:
Originally Posted by SpadeEdge16
hey, FBI agent, why do you say change it to 5240? Just wondering cause i put mine at 4050, is 5240 better or something? o-o
If 4050 works, use 4050 ;D
5240 works for me everytime because 5240 is never used. If you set variable 0x5240 to something other than 0 somewhere it'll stop working (same with 4050). I'm not sure if 4050 is used anywhere, but should be safe I think. Theoretically unimportant temporary variables are probably ideal.
Ok, so here are your problems on your script why have if 0x1 in the pointer that goes to @take you don't need that you just put goto @take in there.
And for your fanfares remove the fadedefault there that is used for music not for fanfares instead put a waitfanfare after your msgbox.
And remove the release at the end of your script since you didn't put a lock code in your script.
I got some problems, so when the mom talks to the player i want the player to face the mom, I do not receive the running shoes from her either and it says Received pokeballs in not what i want it to say like it says it twice once in light green and the other regular, it is the same with potions.
You are setting the flag at a subroutine that's executed only if the flag is set. This the subroutine is never executed and whatever value is in variable 0x9002 is being displayed @continue instead. My hunch is 0x9002 holds nidoran male's number.
But if the flag isn't set that's then it goes to to the pointer rather than the other way around. The if command was comparing the flag's status to 0x0 rather than 0x1.
I'm not entirely sure what could be causing the problem though. Have you decompiled the script to see if any commands are messed up (since you're working with already inserted scripts), Nossab Blue?
Quote:
Originally Posted by thetripplenine
I got some problems, so when the mom talks to the player i want the player to face the mom, I do not receive the running shoes from her either and it says Received pokeballs in not what i want it to say like it says it twice once in light green and the other regular, it is the same with potions.
#org @1
= Wait [player]! You cannot be a recruit\nwithout the propper attier.
#org @received
= [Player] received the \c\h01ÊRUNNING\nSHOES!
#org @received2
= [Player] received \c\h01ÊPokéballs!
#org @received3
= [Player] received \c\h01ÊPotions!
There's no need to have the script branch off to the @take section if you want everything to activate. You can also turn the play by using the applymovement command but instead of using the mother's Event Number, use 0xFF (which is the player's). The running shoes are given by setting the flag 0x8C0. Finally, the command 'giveitem' always displays an automatic message whenever you use it. If you want it to be silent then it would be better to use 'additem' instead.
All-in-all, this script should be closer to what you want:
Code:
#dynamic 0x9C0000
#org @start
checkflag 0x8C0 // Changed to 0x8C0 since it is going to be set later on during the script anyway
if 0x1 goto @done
applymovement 0x0 @move
applymovement 0xFF @turn // Added movement command for the player so they will face the mother
waitmovement 0x0
msgbox @1 0x6 // Moved the @take section of the script here
additem 0x4 0x5 // Changed to additem
msgbox @received2 0x6
additem 0xD 0x5 // Changed to additem
msgbox @received3 0x6
setflag 0x8C0 // In Pokemon Emerald the Running Shoes are activated by the flag 0x8C0
msgbox @received 0x6
applymovement 0x0 @move_back
waitmovement 0x0
end
#org @done
release
end
#org @move
#raw 0x08
#raw 0x08
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE
#org @move_back
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x09
#raw 0x09
#raw 0x03
#raw 0xFE
#org @turn // Player movements
#raw 0x2
#raw 0xFE
#org @1
= Wait [player]! You cannot be a recruit\nwithout the propper attier.
#org @received
= [Player] received the \c\h01ÊRUNNING\nSHOES!
#org @received2
= [Player] received \c\h01ÊPokéballs!
#org @received3
= [Player] received \c\h01ÊPotions![/spoiler]
But if the flag isn't set that's then it goes to to the pointer rather than the other way around. The if command was comparing the flag's status to 0x0 rather than 0x1.
I'm not entirely sure what could be causing the problem though. Have you decompiled the script to see if any commands are messed up (since you're working with already inserted scripts), Nossab Blue?
Good eye, I didn't notice the if statement didn't check true. I sorta assumed it did because I always check for true. That being said, I can't find an error either. Are you sure your script is not overwriting other things? By that I'm asking if you repointed the script.
I haven't decompiled it...I didn't know that would do anything actually. But I'm glad I'm not alone in having trouble finding the error...I'll try it and edit this post with the result.
EDIT: I tried decompiling and recompiling it, and all it did was take off the first letter of each of the 3 strings when you are choosing the pokemon...
EDIT2: @FBI agent- I'm fairly certain, because I used dynamic offsets for everything I changed...and the script caries out perfectly otherwise. The problem seems to be with recalling the variables, given the question mark pics I get on the second two balls. Are variables stored permanently, or only as long as the script runs?
But if the flag isn't set that's then it goes to to the pointer rather than the other way around. The if command was comparing the flag's status to 0x0 rather than 0x1.
I'm not entirely sure what could be causing the problem though. Have you decompiled the script to see if any commands are messed up (since you're working with already inserted scripts), Nossab Blue?
There's no need to have the script branch off to the @take section if you want everything to activate. You can also turn the play by using the applymovement command but instead of using the mother's Event Number, use 0xFF (which is the player's). The running shoes are given by setting the flag 0x8C0. Finally, the command 'giveitem' always displays an automatic message whenever you use it. If you want it to be silent then it would be better to use 'additem' instead.
All-in-all, this script should be closer to what you want:
Code:
#dynamic 0x9C0000
#org @start
checkflag 0x8C0 // Changed to 0x8C0 since it is going to be set later on during the script anyway
if 0x1 goto @done
applymovement 0x0 @move
applymovement 0xFF @turn // Added movement command for the player so they will face the mother
waitmovement 0x0
msgbox @1 0x6 // Moved the @take section of the script here
additem 0x4 0x5 // Changed to additem
msgbox @received2 0x6
additem 0xD 0x5 // Changed to additem
msgbox @received3 0x6
setflag 0x8C0 // In Pokemon Emerald the Running Shoes are activated by the flag 0x8C0
msgbox @received 0x6
applymovement 0x0 @move_back
waitmovement 0x0
end
#org @done
release
end
#org @move
#raw 0x08
#raw 0x08
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE
#org @move_back
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x09
#raw 0x09
#raw 0x03
#raw 0xFE
#org @turn // Player movements
#raw 0x2
#raw 0xFE
#org @1
= Wait [player]! You cannot be a recruit\nwithout the propper attier.
#org @received
= [Player] received the \c\h01ÊRUNNING\nSHOES!
#org @received2
= [Player] received \c\h01ÊPokéballs!
#org @received3
= [Player] received \c\h01ÊPotions![/spoiler]
Thanks for helping me with all those times i needed help :D and now.
I haven't decompiled it...I didn't know that would do anything actually. But I'm glad I'm not alone in having trouble finding the error...I'll try it and edit this post with the result.
EDIT: I tried decompiling and recompiling it, and all it did was take off the first letter of each of the 3 strings when you are choosing the pokemon...
EDIT2: @FBI agent- I'm fairly certain, because I used dynamic offsets for everything I changed...and the script caries out perfectly otherwise. The problem seems to be with recalling the variables, given the question mark pics I get on the second two balls. Are variables stored permanently, or only as long as the script runs?
Post the decompiled script? They are stored permanently (with the exception of temporary variables).
'---------------
#org 0x800000
lock
faceplayer
setvar 0x4001 0x0
checkflag 0x900
if 0x0 call 0x8800040
copyvar 0x4002 0x9000
setvar 0x4003 0x4
setvar 0x4004 0x7
compare 0x4055 0x3
if 0x4 goto 0x8169DE4
compare 0x4055 0x2
if 0x1 goto 0x8169BE1
msgbox 0x818EA19 MSG_KEEPOPEN '"Those are POKé BALLS.\nThey contai..."
release
end
'---------------
#org 0x800040
random 0x3
copyvar 0x8008 LASTRESULT
compare 0x8008 0x0
if 0x1 call 0x880006E
compare 0x8008 0x1
if 0x1 call 0x8800075
compare 0x8008 0x2
if 0x1 call 0x880007C
setflag 0x900
return
'---------------
#org 0x169DE4
msgbox 0x818EA45 MSG_KEEPOPEN '"That's PROF. OAK's last POKéMON."
release
end
'---------------
#org 0x169BE1
applymovement 0x4 0x81A75EF
waitmovement 0x0
showpokepic 0x4002 0xA 0x3
textcolor 0x0
compare 0x4001 0x0
if 0x1 goto 0x8169C14
compare 0x4001 0x1
if 0x1 goto 0x8169C33
compare 0x4001 0x2
if 0x1 goto 0x8169C52
end
'---------------
#org 0x80006E
setvar 0x9000 0x1
return
'---------------
#org 0x800075
setvar 0x9000 0x98
return
'---------------
#org 0x80007C
setvar 0x9000 0x115
return
'---------------
#org 0x169C14
msgbox 0x818E272 MSG_YESNO '" see! BULBASAUR is your choice.\n..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end
'---------------
#org 0x169C33
msgbox 0x818E207 MSG_YESNO '" m! SQUIRTLE is your choice.\nIt's..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end
'---------------
#org 0x169C52
msgbox 0x818E194 MSG_YESNO '"Ah! CHARMANDER is your choice.\nYo..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end
'---------------
#org 0x169C74
hidepokepic
hidesprite LASTTALKED
msgbox 0x818E2E5 MSG_KEEPOPEN '"This POKéMON is really quite\nener..."
call 0x81A6675
setflag 0x828
setflag 0x291
givepokemon 0x4002 0x5 0x0 0x0 0x0 0x0
copyvar 0x4031 0x4001
bufferpokemon 0x0 0x4002
preparemsg 0x818E30D '"[player] received the [buffer1]\nf..."
waitmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CCC
compare LASTRESULT 0x0
if 0x1 goto 0x8169CDC
end
'---------------
#org 0x169C71
hidepokepic
release
end
'---------------
#org 0x1A6675
copyvar 0x8012 0x8013
return
'---------------
#org 0x169CCC
setvar 0x8004 0x0
call 0x81A74EB
goto 0x8169CDC
'---------------
#org 0x169CDC
closeonkeypress
compare 0x4001 0x0
if 0x1 goto 0x8169CFF
compare 0x4001 0x1
if 0x1 goto 0x8169D1F
compare 0x4001 0x2
if 0x1 goto 0x8169D0F
end
'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return
'---------------
#org 0x169CFF
applymovement 0x8 0x8169D62
waitmovement 0x0
goto 0x8169D2F
'---------------
#org 0x169D1F
applymovement 0x8 0x8169D72
waitmovement 0x0
goto 0x8169D2F
'---------------
#org 0x169D0F
applymovement 0x8 0x8169D6B
waitmovement 0x0
goto 0x8169D2F
'---------------
#org 0x169D2F
textcolor 0x0
msgbox 0x818DD34 MSG_KEEPOPEN '"[rival]: I'll take this one, then!"
hidesprite 0x4004
textcolor 0x3
bufferpokemon 0x0 0x4003
preparemsg 0x818DD52 '"[rival] received the [buffer1]\nfr..."
waitmsg
fanfare 0x13E
waitfanfare
setvar 0x4055 0x3
checkflag 0x83E
if 0x1 call 0x8169D5C
release
end
'---------------
#org 0x169D5C
setvar 0x4070 0x1
return
'---------
' Strings
'---------
#org 0x18EA19
= Those are POKé BALLS.\nThey contain POKéMON!
#org 0x18EA45
= That's PROF. OAK's last POKéMON.
#org 0x18E272
= see! BULBASAUR is your choice.\nIt's very easy to raise.\pSo, [player], you want to go with\nthe GRASS POKéMON BULBASAUR?
#org 0x18E207
= m! SQUIRTLE is your choice.\nIt's one worth raising.\pSo, [player], you've decided on the\nWATER POKéMON SQUIRTLE?
#org 0x18E194
= Ah! CHARMANDER is your choice.\nYou should raise it patiently.\pSo, [player], you're claiming the\nFIRE POKéMON CHARMANDER?
#org 0x18E2E5
= This POKéMON is really quite\nenergetic!
#org 0x18E30D
= [player] received the [buffer1]\nfrom PROF. OAK!
#org 0x1A56A7
= Do you want to give a nickname to\nthis [buffer1]?
#org 0x18DD34
= [rival]: I'll take this one, then!
#org 0x18DD52
= [rival] received the [buffer1]\nfrom PROF. OAK!
'-----------
' Movements
'-----------
#org 0x1A75EF
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements
#org 0x169D62
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (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 0x169D72
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
#org 0x169D6B
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
OH RIGHT! I remember now. Flags in the 900s overwrite variables in the 4000s!
Change your variables to the 500s or the flag to the 200/201/203/204 (there are unused flags, but any unused, non-temporary flag would no).