#dynamic 0x740000
'---------------
#org @start
lock
faceplayer
checkflag 0x600
if 0x1 goto @snippet1
checkgender
compare LASTRESULT 0x0
if 0x1 call @snippet2
compare LASTRESULT 0x1
if 0x1 call @snippet3
msgbox @string1 MSG_KEEPOPEN '"First off, what's your name?\n...[..."
closeonkeypress
msgbox @string2 MSG_KEEPOPEN '"Oh, yes, you aren't here just to\n..."
closeonkeypress
textcolor 0x3
fanfare 0x13E
preparemsg @string3 '"[player] received 5 POKéBALLS and ..."
waitmsg
waitfanfare
additem 0x4 0x5
setflag 0x829
special 0x181
textcolor 0x0
msgbox @string4 MSG_KEEPOPEN '"Now, in order to become a full\nPO..."
clearflag 0x20A
showsprite 0x4
getplayerpos 0x4000 0x4001
compare 0x4000 0x6
if 0x1 call @snippet4
compare 0x4001 0x2
if 0x1 call @snippet5
waitmovement 0x0
msgbox @string5 MSG_KEEPOPEN '"Hi there! PROF. OAK told me I'd be..."
closeonkeypress
msgbox @string6 MSG_KEEPOPEN '"[rival], I want you to fight\n[pla..."
closeonkeypress
msgbox @string7 MSG_KEEPOPEN '"Okay, are you ready, [player]? I'm..."
closeonkeypress
setvar 0x4002 0x129
setvar 0x4004 0x10A
trainerbattle 0x9 0x146 0x3 @string8 @string9
special 0x0
setvar 0x4002 0x10A
setvar 0x4004 0x129
msgbox @string10 MSG_KEEPOPEN '"Well, I need to head to the\nPOKéM..."
getplayerpos 0x4000 0x4001
compare 0x4000 0x6
if 0x1 call @snippet6
compare 0x4001 0x2
if 0x1 call @snippet7
waitmovement 0x0
hidesprite 0x4
setflag 0x20A
fadesong 0x12D
waitmovement 0x0
msgbox @string11 MSG_KEEPOPEN '"[player], making you battle an\nal..."
closeonkeypress
setflag 0x846
textcolor 0x3
fanfare 0x101
preparemsg @string12 '"[player] received a TRAINER CARD\n..."
waitmsg
waitfanfare
textcolor 0x0
msgbox @string13 MSG_KEEPOPEN '"Now that you're done here, you\nmi..."
closeonkeypress
setflag 0x600
clearflag 0x205
setvar 0x5003 0x2
release
end
'---------------
#org @snippet1
msgbox @string14 MSG_KEEPOPEN '"It would be great if one day one\n..."
closeonkeypress
release
end
'---------------
#org @snippet2
msgbox @string15 MSG_KEEPOPEN '"OAK: Oh! You're that boy I met in\..."
closeonkeypress
return
'---------------
#org @snippet3
msgbox @string16 MSG_KEEPOPEN '"OAK: Oh! You're that girl I met in..."
closeonkeypress
return
'---------------
#org @snippet4
applymovement 0x4 @move1
applymovement MOVE_PLAYER @move2
return
'---------------
#org @snippet5
compare 0x4000 0x7
if 0x1 call @snippet8
compare 0x4000 0x5
if 0x1 call @snippet9
return
'---------------
#org @snippet6
applymovement 0x4 @move3
return
'---------------
#org @snippet7
compare 0x4000 0x7
if 0x1 call @snippet10
compare 0x4000 0x5
if 0x1 call @snippet11
return
'---------------
#org @snippet8
applymovement 0x4 @move4
applymovement MOVE_PLAYER @move5
return
'---------------
#org @snippet9
applymovement 0x4 @move6
applymovement MOVE_PLAYER @move5
return
'---------------
#org @snippet10
applymovement 0x4 @move3
return
'---------------
#org @snippet11
applymovement 0x4 @move7
return
'---------
' Strings
'---------
#org @string1
= First off, what's your name?\n...[player], is it? Okay, it's nice\lto formally meet you, [player]. So\lhow is my MARILL doing? It seems\lto enjoy being with you.
#org @string2
= Oh, yes, you aren't here just to\nchat. Since you already have a\lPOKéMON and probably a little bit\lof battle experience, we can skip\lsome of the other steps of\lcertification. I'm going to give\lyou your POKéDEX and 5 POKéBALLS.
#org @string3
= [player] received 5 POKéBALLS and a\nPOKéDEX from PROF. OAK!\l[player] put the POKéBALLS in the\lBALLS pocket.
#org @string4
= Now, in order to become a full\nPOKéMON TRAINER, you need to pass\la test. I'm going to have you\lbattle one of my already-certified\lstudents. His name is [rival].
#org @string5
= Hi there! PROF. OAK told me I'd be\nbattling his next student.
#org @string6
= [rival], I want you to fight\n[player] for the certification test.\lDon't hold back; [player] needs to\lsee what a real POKéMON battle is\llike.
#org @string7
= Okay, are you ready, [player]? I'm\nnot going to make this easy for\lyou!
#org @string8
= W-what? You're good!
#org @string9
= I told you I wouldn't make it\neasy!
#org @string10
= Well, I need to head to the\nPOKéMON CENTER, and after that I'm\lgoing to WALDEN CITY. Later, OAK!\lLater, [player]!
#org @string11
= [player], making you battle an\nalready certified student for your\ltest wasn't fair. I'm not going to\lmake that battle count. You fought\lthrough it anyway though, so I'm\lgiving you your certified TRAINER\lCARD. Congratulations!
#org @string12
= [player] received a TRAINER CARD\nfrom PROF. OAK!
#org @string13
= Now that you're done here, you\nmight want to go look for POKéMON.\lFilling the POKéDEX is quite a\ltask. Head toward WALDEN CITY.\l[rival] might be able to help you\lout, if you run into him.
#org @string14
= It would be great if one day one\nof my students filled the entire\lNATIONAL POKéDEX. Maybe you'll be\lthat student, [player]!
#org @string15
= OAK: Oh! You're that boy I met in\nROUTE 49, aren't you? It's great\lto see you here!
#org @string16
= OAK: Oh! You're that girl I met in\nROUTE 49, aren't you? It's great\lto see you here!
'-----------
' Movements
'-----------
#org @move1
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x2 'Face Left
#raw 0xFE 'End of Movements
#org @move2
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements
#org @move3
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
#org @move4
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org @move5
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements
#org @move6
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements
#org @move7
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements