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!