pokeemerald/data/maps/Route103/scripts.inc

356 lines
11 KiB
PHP
Raw Permalink Normal View History

.set LOCALID_RIVAL, 2
2021-07-20 21:18:31 +02:00
Route103_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, Route103_OnTransition
2019-10-22 22:53:49 +02:00
map_script MAP_SCRIPT_ON_LOAD, Route103_OnLoad
2017-11-10 02:21:31 +01:00
.byte 0
2021-07-20 21:18:31 +02:00
Route103_OnTransition:
call Common_EventScript_SetupRivalGfxId
2019-10-07 07:13:34 +02:00
call ProfBirch_EventScript_UpdateLocation
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_OnLoad:
2019-10-22 22:53:49 +02:00
call_if_set FLAG_SYS_GAME_CLEAR, Route103_EventScript_OpenAlteringCave
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_OpenAlteringCave::
2021-11-16 23:12:16 +01:00
setmetatile 45, 5, METATILE_General_CaveEntrance_Top, TRUE
setmetatile 45, 6, METATILE_General_CaveEntrance_Bottom, FALSE
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
Route103_EventScript_Rival::
2017-11-10 02:21:31 +01:00
lockall
checkplayergender
goto_if_eq VAR_RESULT, MALE, Route103_EventScript_RivalMay
goto_if_eq VAR_RESULT, FEMALE, Route103_EventScript_RivalBrendan
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_RivalMay::
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_MayRoute103Pokemon, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
2021-05-21 22:08:00 +02:00
playbgm MUS_ENCOUNTER_MAY, TRUE
applymovement LOCALID_RIVAL, Common_Movement_FacePlayer
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement LOCALID_RIVAL, Common_Movement_Delay48
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_MayLetsBattle, MSGBOX_DEFAULT
switch VAR_STARTER_MON
2019-10-22 22:53:49 +02:00
case 0, Route103_EventScript_StartMayBattleTreecko
case 1, Route103_EventScript_StartMayBattleTorchic
case 2, Route103_EventScript_StartMayBattleMudkip
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_RivalBrendan::
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_BrendanRoute103Pokemon, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
2021-05-21 22:08:00 +02:00
playbgm MUS_ENCOUNTER_BRENDAN, TRUE
applymovement LOCALID_RIVAL, Common_Movement_FacePlayer
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement LOCALID_RIVAL, Common_Movement_Delay48
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_BrendanLetsBattle, MSGBOX_DEFAULT
switch VAR_STARTER_MON
2019-10-22 22:53:49 +02:00
case 0, Route103_EventScript_StartBrendanBattleTreecko
case 1, Route103_EventScript_StartBrendanBattleTorchic
case 2, Route103_EventScript_StartBrendanBattleMudkip
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_StartMayBattleTreecko::
2019-12-26 04:39:06 +01:00
trainerbattle_no_intro TRAINER_MAY_ROUTE_103_TREECKO, Route103_Text_MayDefeated
2019-10-22 22:53:49 +02:00
goto Route103_EventScript_AfterMayBattle
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_StartMayBattleTorchic::
2019-12-26 04:39:06 +01:00
trainerbattle_no_intro TRAINER_MAY_ROUTE_103_TORCHIC, Route103_Text_MayDefeated
2019-10-22 22:53:49 +02:00
goto Route103_EventScript_AfterMayBattle
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_StartMayBattleMudkip::
2019-12-26 04:39:06 +01:00
trainerbattle_no_intro TRAINER_MAY_ROUTE_103_MUDKIP, Route103_Text_MayDefeated
2019-10-22 22:53:49 +02:00
goto Route103_EventScript_AfterMayBattle
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_StartBrendanBattleTreecko::
2019-12-26 04:39:06 +01:00
trainerbattle_no_intro TRAINER_BRENDAN_ROUTE_103_TREECKO, Route103_Text_BrendanDefeated
2019-10-22 22:53:49 +02:00
goto Route103_EventScript_AfterBrendanBattle
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_StartBrendanBattleTorchic::
2019-12-26 04:39:06 +01:00
trainerbattle_no_intro TRAINER_BRENDAN_ROUTE_103_TORCHIC, Route103_Text_BrendanDefeated
2019-10-22 22:53:49 +02:00
goto Route103_EventScript_AfterBrendanBattle
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_StartBrendanBattleMudkip::
2019-12-26 04:39:06 +01:00
trainerbattle_no_intro TRAINER_BRENDAN_ROUTE_103_MUDKIP, Route103_Text_BrendanDefeated
2019-10-22 22:53:49 +02:00
goto Route103_EventScript_AfterBrendanBattle
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_AfterMayBattle::
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_MayTimeToHeadBack, MSGBOX_DEFAULT
goto Route103_EventScript_RivalExit
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_AfterBrendanBattle::
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_BrendanTimeToHeadBack, MSGBOX_DEFAULT
goto Route103_EventScript_RivalExit
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_RivalExit::
2017-11-10 02:21:31 +01:00
closemessage
switch VAR_FACING
2019-10-22 22:53:49 +02:00
case DIR_SOUTH, Route103_EventScript_RivalExitFacingSouth
case DIR_NORTH, Route103_EventScript_RivalExitFacingNorth
case DIR_WEST, Route103_EventScript_RivalExitFacingEastOrWest
case DIR_EAST, Route103_EventScript_RivalExitFacingEastOrWest
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_RivalExitFacingNorth::
applymovement OBJ_EVENT_ID_PLAYER, Route103_Movement_WatchRivalExitFacingNorth
applymovement LOCALID_RIVAL, Route103_Movement_RivalExitFacingNorth1
2017-11-10 02:21:31 +01:00
waitmovement 0
2020-08-21 00:02:00 +02:00
playse SE_LEDGE
applymovement LOCALID_RIVAL, Route103_Movement_RivalExitFacingNorth2
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-22 22:53:49 +02:00
goto Route103_EventScript_RivalEnd
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_RivalExitFacingEastOrWest::
applymovement OBJ_EVENT_ID_PLAYER, Route103_Movement_WatchRivalExitFacingEastOrWest
applymovement LOCALID_RIVAL, Route103_Movement_RivalExit1
2017-11-10 02:21:31 +01:00
waitmovement 0
2020-08-21 00:02:00 +02:00
playse SE_LEDGE
applymovement LOCALID_RIVAL, Route103_Movement_RivalExit2
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-22 22:53:49 +02:00
goto Route103_EventScript_RivalEnd
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_RivalExitFacingSouth::
applymovement LOCALID_RIVAL, Route103_Movement_RivalExit1
2017-11-10 02:21:31 +01:00
waitmovement 0
2020-08-21 00:02:00 +02:00
playse SE_LEDGE
applymovement LOCALID_RIVAL, Route103_Movement_RivalExit2
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-22 22:53:49 +02:00
goto Route103_EventScript_RivalEnd
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_RivalEnd::
removeobject LOCALID_RIVAL
setvar VAR_BIRCH_LAB_STATE, 4
2018-10-18 21:28:59 +02:00
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_RIVAL
2019-01-02 22:12:43 +01:00
setflag FLAG_DEFEATED_RIVAL_ROUTE103
2019-08-05 17:23:45 +02:00
setvar VAR_OLDALE_RIVAL_STATE, 1
2018-10-18 21:28:59 +02:00
clearflag FLAG_HIDE_OLDALE_TOWN_RIVAL
2017-12-22 08:46:19 +01:00
savebgm MUS_DUMMY
2017-11-10 02:21:31 +01:00
fadedefaultbgm
releaseall
end
2021-07-20 21:18:31 +02:00
Route103_Movement_RivalExitFacingNorth1:
walk_left
walk_down
2017-11-10 02:21:31 +01:00
step_end
Route103_Movement_RivalExitFacingNorth2:
jump_2_down
delay_16
walk_down
walk_down
walk_down
walk_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
Route103_Movement_WatchRivalExitFacingNorth:
delay_16
delay_4
walk_in_place_faster_left
delay_16
walk_in_place_faster_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
Route103_Movement_RivalExit1:
walk_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
Route103_Movement_RivalExit2:
jump_2_down
delay_16
walk_down
walk_down
walk_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
Route103_Movement_WatchRivalExitFacingEastOrWest:
delay_16
walk_in_place_faster_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Boy::
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_ShouldHaveBroughtPotion, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Man::
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_ShortcutToOldale, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_RouteSign::
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_RouteSign, MSGBOX_SIGN
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Daisy::
2019-10-22 22:53:49 +02:00
trainerbattle_single TRAINER_DAISY, Route103_Text_DaisyIntro, Route103_Text_DaisyDefeated
msgbox Route103_Text_DaisyPostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Amy::
2019-10-22 22:53:49 +02:00
trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_AmyIntro, Route103_Text_AmyDefeated, Route103_Text_AmyNotEnoughPokemon, Route102_EventScript_AmyRegisterMatchCallAfterBattle
2017-12-01 21:25:13 +01:00
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, Route102_EventScript_AmyRematch
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_AmyPostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route102_EventScript_AmyRegisterMatchCallAfterBattle::
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_AmyLivRegister, MSGBOX_DEFAULT
2018-12-02 12:04:59 +01:00
register_matchcall TRAINER_AMY_AND_LIV_1
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
Route102_EventScript_AmyRematch::
2019-10-22 22:53:49 +02:00
trainerbattle_rematch_double TRAINER_AMY_AND_LIV_1, Route103_Text_AmyRematchIntro, Route103_Text_AmyRematchDefeated, Route103_Text_AmyRematchNotEnoughPokemon
msgbox Route103_Text_AmyRematchPostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Liv::
2019-10-22 22:53:49 +02:00
trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_LivIntro, Route103_Text_LivDefeated, Route103_Text_LivNotEnoughPokemon, Route102_EventScript_LivRegisterMatchCallAfterBattle
2017-12-01 21:25:13 +01:00
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, Route102_EventScript_LivRematch
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_LivPostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route102_EventScript_LivRegisterMatchCallAfterBattle::
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_AmyLivRegister, MSGBOX_DEFAULT
2018-12-02 12:04:59 +01:00
register_matchcall TRAINER_AMY_AND_LIV_1
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
Route102_EventScript_LivRematch::
2019-10-22 22:53:49 +02:00
trainerbattle_rematch_double TRAINER_AMY_AND_LIV_1, Route103_Text_LivRematchIntro, Route103_Text_LivRematchDefeated, Route103_Text_LivRematchNotEnoughPokemon
msgbox Route103_Text_LivRematchPostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Andrew::
2019-10-22 22:53:49 +02:00
trainerbattle_single TRAINER_ANDREW, Route103_Text_AndrewIntro, Route103_Text_AndrewDefeated
msgbox Route103_Text_AndrewPostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Miguel::
2019-10-22 22:53:49 +02:00
trainerbattle_single TRAINER_MIGUEL_1, Route103_Text_MiguelIntro, Route103_Text_MiguelDefeated, Route102_EventScript_MiguelRegisterMatchCallAfterBattle
2017-12-01 21:25:13 +01:00
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, Route103_EventScript_MiguelRematch
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_MiguelPostBattle, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
Route102_EventScript_MiguelRegisterMatchCallAfterBattle::
2019-11-01 08:41:55 +01:00
special PlayerFaceTrainerAfterBattle
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-22 22:53:49 +02:00
msgbox Route103_Text_MiguelRegister, MSGBOX_DEFAULT
2018-12-02 12:04:59 +01:00
register_matchcall TRAINER_MIGUEL_1
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_MiguelRematch::
2019-10-22 22:53:49 +02:00
trainerbattle_rematch TRAINER_MIGUEL_1, Route103_Text_MiguelRematchIntro, Route103_Text_MiguelRematchDefeated
msgbox Route103_Text_MiguelRematchPostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Marcos::
2019-10-22 22:53:49 +02:00
trainerbattle_single TRAINER_MARCOS, Route103_Text_MarcosIntro, Route103_Text_MarcosDefeated
msgbox Route103_Text_MarcosPostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Rhett::
2019-10-22 22:53:49 +02:00
trainerbattle_single TRAINER_RHETT, Route103_Text_RhettIntro, Route103_Text_RhettDefeated
msgbox Route103_Text_RhettPostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Pete::
2019-10-22 22:53:49 +02:00
trainerbattle_single TRAINER_PETE, Route103_Text_PeteIntro, Route103_Text_PeteDefeated
msgbox Route103_Text_PetePostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_EventScript_Isabelle::
2019-10-22 22:53:49 +02:00
trainerbattle_single TRAINER_ISABELLE, Route103_Text_IsabelleIntro, Route103_Text_IsabelleDefeated
msgbox Route103_Text_IsabellePostBattle, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
Route103_Text_MayRoute103Pokemon:
2018-12-07 16:41:08 +01:00
.string "MAY: Let's see… The POKéMON found\n"
2017-11-10 02:21:31 +01:00
.string "on ROUTE 103 include…$"
2021-07-20 21:18:31 +02:00
Route103_Text_MayLetsBattle:
2017-11-10 02:21:31 +01:00
.string "Oh, hi, {PLAYER}{KUN}!\p"
.string "…Oh, I see, my dad gave you\n"
.string "a POKéMON as a gift.\p"
2018-12-07 16:41:08 +01:00
.string "Since we're here, let's have a quick\n"
2017-11-10 02:21:31 +01:00
.string "battle!\p"
2018-12-07 16:41:08 +01:00
.string "I'll give you a taste of what being\n"
2017-11-10 02:21:31 +01:00
.string "a TRAINER is like.$"
2021-07-20 21:18:31 +02:00
Route103_Text_MayDefeated:
2018-12-07 16:41:08 +01:00
.string "Wow! That's great!\n"
.string "{PLAYER}{KUN}, you're pretty good!$"
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
Route103_Text_MayTimeToHeadBack:
2017-11-10 02:21:31 +01:00
.string "MAY: I think I know why my dad has\n"
.string "an eye out for you now.\p"
.string "I mean, you just got that POKéMON,\n"
.string "but it already likes you.\p"
.string "You might be able to befriend any\n"
.string "kind of POKéMON easily.\p"
2018-12-07 16:41:08 +01:00
.string "Well, it's time to head back to\n"
2017-11-10 02:21:31 +01:00
.string "the LAB.$"
2021-07-20 21:18:31 +02:00
Route103_Text_BrendanRoute103Pokemon:
2018-12-07 16:41:08 +01:00
.string "BRENDAN: Okay, so it's this one and\n"
2017-11-10 02:21:31 +01:00
.string "that one that live on ROUTE 103…$"
2021-07-20 21:18:31 +02:00
Route103_Text_BrendanLetsBattle:
2018-12-07 16:41:08 +01:00
.string "Hey, it's {PLAYER}!\p"
2017-11-10 02:21:31 +01:00
.string "…Oh, yeah, Dad gave you a POKéMON.\p"
2018-12-07 16:41:08 +01:00
.string "Since we're here, how about a little\n"
2017-11-10 02:21:31 +01:00
.string "battle?\p"
2018-12-07 16:41:08 +01:00
.string "I'll teach you what being a TRAINER's\n"
2017-11-10 02:21:31 +01:00
.string "about!$"
2021-07-20 21:18:31 +02:00
Route103_Text_BrendanDefeated:
2018-12-07 16:41:08 +01:00
.string "Huh, {PLAYER}, you're not too shabby.$"
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
Route103_Text_BrendanTimeToHeadBack:
2017-11-10 02:21:31 +01:00
.string "BRENDAN: I think I get it.\n"
.string "I think I know why my dad has his eye\l"
.string "out for you now.\p"
.string "Look, your POKéMON already likes you,\n"
.string "even though you just got it.\p"
.string "{PLAYER}, I get the feeling that you\n"
.string "could befriend any POKéMON with ease.\p"
.string "We should head back to the LAB.$"
2021-07-20 21:18:31 +02:00
Route103_Text_ShouldHaveBroughtPotion:
2017-11-10 02:21:31 +01:00
.string "My POKéMON is staggeringly tired…\n"
.string "I should have brought a POTION…$"
2021-07-20 21:18:31 +02:00
Route103_Text_ShortcutToOldale:
2017-11-10 02:21:31 +01:00
.string "If you cross the sea from here,\n"
2018-12-07 16:41:08 +01:00
.string "it'll be a shortcut to OLDALE TOWN.\p"
.string "Fufufu, that's useful, isn't it?$"
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
Route103_Text_RouteSign:
2017-11-10 02:21:31 +01:00
.string "ROUTE 103\n"
.string "{DOWN_ARROW} OLDALE TOWN$"
2017-11-10 02:21:31 +01:00