pokeemerald/data/maps/SSTidalCorridor/scripts.inc

347 lines
10 KiB
PHP
Raw Normal View History

.set LOCALID_SAILOR, 1
.set LOCALID_SCOTT, 5
2021-07-20 21:18:31 +02:00
SSTidalCorridor_MapScripts::
2019-11-08 09:37:46 +01:00
map_script MAP_SCRIPT_ON_FRAME_TABLE, SSTidalCorridor_OnFrame
2017-11-10 02:21:31 +01:00
.byte 0
2021-07-20 21:18:31 +02:00
SSTidalCorridor_OnFrame:
2019-11-08 09:37:46 +01:00
map_script_2 VAR_SS_TIDAL_SCOTT_STATE, 0, SSTidalCorridor_EventScript_ScottScene
map_script_2 VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_SLATEPORT, SSTidalCorridor_EventScript_DepartSlateportForLilycove
map_script_2 VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_LILYCOVE, SSTidalCorridor_EventScript_DepartLilycoveForSlateport
map_script_2 VAR_SS_TIDAL_STATE, SS_TIDAL_EXIT_CURRENTS_RIGHT, SSTidalCorridor_EventScript_HalfwayToLilycove
map_script_2 VAR_SS_TIDAL_STATE, SS_TIDAL_EXIT_CURRENTS_LEFT, SSTidalCorridor_EventScript_ArrivedInSlateport
2017-11-10 02:21:31 +01:00
.2byte 0
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_DepartSlateportForLilycove::
special SetSSTidalFlag
2019-11-08 09:37:46 +01:00
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT
2017-11-10 02:21:31 +01:00
lockall
2020-08-21 00:02:00 +02:00
playse SE_DING_DONG
2019-11-08 09:37:46 +01:00
msgbox SSTidal_Text_FastCurrentsHopeYouEnjoyVoyage, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_DepartLilycoveForSlateport::
2019-11-08 09:37:46 +01:00
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_LILYCOVE
2017-11-10 02:21:31 +01:00
lockall
2020-08-21 00:02:00 +02:00
playse SE_DING_DONG
2019-11-08 09:37:46 +01:00
msgbox SSTidal_Text_HopeYouEnjoyVoyage, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SSTidalRooms_EventScript_HalfwayToSlateport::
special SetSSTidalFlag
2019-11-08 09:37:46 +01:00
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT
2020-08-21 00:02:00 +02:00
playse SE_DING_DONG
2019-11-08 09:37:46 +01:00
msgbox SSTidal_Text_FastCurrentsHopeYouEnjoyVoyage, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SSTidalRooms_EventScript_ArrivedInLilycove::
special ResetSSTidalFlag
2019-11-08 09:37:46 +01:00
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_LILYCOVE
2020-08-21 00:02:00 +02:00
playse SE_DING_DONG
2019-11-08 09:37:46 +01:00
msgbox SSTidal_Text_MadeLandInLilycove, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_ReachedStepCount::
2019-11-08 09:37:46 +01:00
compare VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT
goto_if_eq SSTidalCorridor_EventScript_HalfwayToLilycove
compare VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT
goto_if_eq SSTidalCorridor_EventScript_ArrivedInSlateport
2017-11-10 00:40:08 +01:00
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_HalfwayToLilycove::
special ResetSSTidalFlag
2019-11-08 09:37:46 +01:00
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_LILYCOVE
2017-11-10 00:40:08 +01:00
lockall
2020-08-21 00:02:00 +02:00
playse SE_DING_DONG
2019-11-08 09:37:46 +01:00
msgbox SSTidal_Text_HopeYouEnjoyVoyage, MSGBOX_DEFAULT
2017-11-10 00:40:08 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_ArrivedInSlateport::
special ResetSSTidalFlag
2019-11-08 09:37:46 +01:00
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_SLATEPORT
2017-11-10 00:40:08 +01:00
lockall
2020-08-21 00:02:00 +02:00
playse SE_DING_DONG
2019-11-08 09:37:46 +01:00
msgbox SSTidal_Text_MadeLandInSlateport, MSGBOX_DEFAULT
2017-11-10 00:40:08 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SSTidalRooms_EventScript_ArrivedInSlateport::
special ResetSSTidalFlag
2019-11-08 09:37:46 +01:00
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_SLATEPORT
2020-08-21 00:02:00 +02:00
playse SE_DING_DONG
2019-11-08 09:37:46 +01:00
msgbox SSTidal_Text_MadeLandInSlateport, MSGBOX_DEFAULT
2017-11-10 00:40:08 +01:00
return
2021-07-20 21:18:31 +02:00
SSTidalRooms_EventScript_ProgessCruiseAfterBed::
2019-11-08 09:37:46 +01:00
switch VAR_SS_TIDAL_STATE
case SS_TIDAL_DEPART_SLATEPORT, SSTidalRooms_EventScript_ArrivedInLilycove
case SS_TIDAL_HALFWAY_LILYCOVE, SSTidalRooms_EventScript_ArrivedInLilycove
case SS_TIDAL_DEPART_LILYCOVE, SSTidalRooms_EventScript_HalfwayToSlateport
case SS_TIDAL_HALFWAY_SLATEPORT, SSTidalRooms_EventScript_ArrivedInSlateport
2017-11-10 00:40:08 +01:00
return
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_Briney::
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_BrineyWelcomeAboard, MSGBOX_NPC
2017-11-10 00:40:08 +01:00
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_Peeko::
2017-11-10 00:40:08 +01:00
lock
faceplayer
waitse
2021-11-07 18:58:11 +01:00
playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_Peeko, MSGBOX_DEFAULT
2017-11-10 00:40:08 +01:00
waitmoncry
release
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_Cabin1Sign::
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_Cabin1, MSGBOX_SIGN
2017-11-10 00:40:08 +01:00
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_Cabin2Sign::
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_Cabin2, MSGBOX_SIGN
2017-11-10 00:40:08 +01:00
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_Cabin3Sign::
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_Cabin3, MSGBOX_SIGN
2017-11-10 00:40:08 +01:00
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_Cabin4Sign::
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_Cabin4, MSGBOX_SIGN
2017-11-10 00:40:08 +01:00
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_ExitSailor::
2017-11-10 00:40:08 +01:00
lock
faceplayer
2019-11-08 09:37:46 +01:00
compare VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_LILYCOVE
goto_if_eq SSTidalCorridor_EventScript_ExitLilycove
compare VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_SLATEPORT
goto_if_eq SSTidalCorridor_EventScript_ExitSlateport
msgbox SSTidalCorridor_Text_CanRestInCabin2, MSGBOX_DEFAULT
2017-11-10 00:40:08 +01:00
release
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_ExitLilycove::
setrespawn HEAL_LOCATION_LILYCOVE_CITY
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT
call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver
warp MAP_LILYCOVE_CITY_HARBOR, 8, 11
2017-11-10 00:40:08 +01:00
waitstate
release
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_ExitSlateport::
setrespawn HEAL_LOCATION_SLATEPORT_CITY
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT
call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver
warp MAP_SLATEPORT_CITY_HARBOR, 8, 11
2017-11-10 00:40:08 +01:00
waitstate
release
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_HideSnatchGiver::
2018-10-19 03:32:21 +02:00
setflag FLAG_HIDE_SS_TIDAL_ROOMS_SNATCH_GIVER
2017-11-10 00:40:08 +01:00
return
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_Porthole::
2017-11-10 00:40:08 +01:00
lockall
2019-11-08 09:37:46 +01:00
compare VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT
goto_if_eq SSTidalCorridor_EventScript_LookThroughPorthole
compare VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT
goto_if_eq SSTidalCorridor_EventScript_LookThroughPorthole
msgbox SSTidalCorridor_Text_HorizonSpreadsBeyondPorthole, MSGBOX_DEFAULT
2017-11-10 00:40:08 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_LookThroughPorthole::
2019-11-08 09:37:46 +01:00
special LookThroughPorthole
2017-11-10 00:40:08 +01:00
waitstate
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_Sailor::
2017-11-10 00:40:08 +01:00
lock
faceplayer
2019-11-08 09:37:46 +01:00
goto_if_set FLAG_DEFEATED_SS_TIDAL_TRAINERS, SSTidalCorridor_EventScript_EnjoyYourCruise
call SSTidalCorridor_EventScript_CheckIfTrainersDefeated
msgbox SSTidalCorridor_Text_VisitOtherCabins, MSGBOX_DEFAULT
2017-11-10 00:40:08 +01:00
release
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_EnjoyYourCruise::
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_EnjoyYourCruise, MSGBOX_DEFAULT
2017-11-10 00:40:08 +01:00
release
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_CheckIfTrainersDefeated::
2020-01-13 02:20:02 +01:00
goto_if_not_defeated TRAINER_PHILLIP, SSTidalCorridor_EventScript_TrainerNotDefeated
goto_if_not_defeated TRAINER_LEONARD, SSTidalCorridor_EventScript_TrainerNotDefeated
goto_if_not_defeated TRAINER_COLTON, SSTidalCorridor_EventScript_TrainerNotDefeated
goto_if_not_defeated TRAINER_MICAH, SSTidalCorridor_EventScript_TrainerNotDefeated
goto_if_not_defeated TRAINER_THOMAS, SSTidalCorridor_EventScript_TrainerNotDefeated
goto_if_not_defeated TRAINER_LEA_AND_JED, SSTidalCorridor_EventScript_TrainerNotDefeated
goto_if_not_defeated TRAINER_GARRET, SSTidalCorridor_EventScript_TrainerNotDefeated
goto_if_not_defeated TRAINER_NAOMI, SSTidalCorridor_EventScript_TrainerNotDefeated
2019-01-02 22:12:43 +01:00
setflag FLAG_DEFEATED_SS_TIDAL_TRAINERS
2019-11-08 09:37:46 +01:00
goto SSTidalCorridor_EventScript_EnjoyYourCruise
2017-11-10 00:40:08 +01:00
return
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_TrainerNotDefeated::
2017-11-10 00:40:08 +01:00
return
2021-07-20 21:18:31 +02:00
SSTidalCorridor_EventScript_ScottScene::
2017-11-10 00:40:08 +01:00
lockall
applymovement LOCALID_SCOTT, SSTidalCorridor_Movement_ScottApproachPlayer
2017-11-10 00:40:08 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight
2017-11-10 00:40:08 +01:00
waitmovement 0
2019-11-08 09:37:46 +01:00
msgbox SSTidalCorridor_Text_ScottBattleFrontierInvite, MSGBOX_DEFAULT
2017-11-10 00:40:08 +01:00
closemessage
applymovement OBJ_EVENT_ID_PLAYER, SSTidalCorridor_Movement_PlayerWatchScottExit
applymovement LOCALID_SAILOR, SSTidalCorridor_Movement_SailorMoveForScott
applymovement LOCALID_SCOTT, SSTidalCorridor_Movement_ScottExit
2017-11-10 00:40:08 +01:00
waitmovement 0
2020-08-21 00:02:00 +02:00
playse SE_EXIT
2017-11-10 00:40:08 +01:00
waitse
removeobject LOCALID_SCOTT
applymovement LOCALID_SAILOR, SSTidalCorridor_Movement_SailorReturn
2017-11-10 00:40:08 +01:00
waitmovement 0
delay 30
2019-01-02 22:12:43 +01:00
setflag FLAG_MET_SCOTT_ON_SS_TIDAL
setvar VAR_SS_TIDAL_SCOTT_STATE, 1
2017-11-10 00:40:08 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Movement_ScottApproachPlayer:
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
2017-11-10 00:40:08 +01:00
step_end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Movement_ScottExit:
walk_in_place_faster_down
delay_16
delay_16
delay_16
delay_16
walk_down
walk_left
2017-11-10 00:40:08 +01:00
step_end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Movement_PlayerWatchScottExit:
delay_16
delay_16
delay_16
delay_16
delay_8
walk_in_place_faster_down
2017-11-10 00:40:08 +01:00
step_end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Movement_SailorMoveForScott:
delay_16
walk_right
walk_right
walk_in_place_faster_up
delay_16
walk_in_place_faster_left
2017-11-10 00:40:08 +01:00
step_end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Movement_SailorReturn:
walk_left
walk_left
walk_in_place_faster_up
2017-11-10 00:40:08 +01:00
step_end
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_ScottBattleFrontierInvite:
2017-11-10 00:40:08 +01:00
.string "SCOTT: Well, hi, hi!\n"
.string "{PLAYER}{KUN}, {PLAYER}{KUN}!\p"
2018-12-07 16:41:08 +01:00
.string "Something's come up, so I have to\n"
2017-11-10 00:40:08 +01:00
.string "disembark, but am I glad to see you!\p"
.string "Congratulations, LEAGUE CHAMPION!\p"
2018-12-07 16:41:08 +01:00
.string "There's a place I'd like to invite\n"
2017-11-10 00:40:08 +01:00
.string "someone like you.\p"
2018-12-07 16:41:08 +01:00
.string "It's the…\n"
2017-11-10 00:40:08 +01:00
.string "BATTLE FRONTIER!\p"
2018-12-07 16:41:08 +01:00
.string "What's the place like?\n"
.string "You'll understand when you see it!\p"
.string "I've spoken with the ship's CAPTAIN\n"
2017-11-10 00:40:08 +01:00
.string "about this.\p"
.string "The next time you take a ferry,\n"
.string "you should be able to sail to\l"
.string "the BATTLE FRONTIER.\p"
2018-12-07 16:41:08 +01:00
.string "Okay, {PLAYER}{KUN}, I'll be waiting for you\n"
2017-11-10 00:40:08 +01:00
.string "at the BATTLE FRONTIER!$"
2021-07-20 21:18:31 +02:00
SSTidal_Text_FastCurrentsHopeYouEnjoyVoyage:
2017-11-10 00:40:08 +01:00
.string "This ferry is built to plow through\n"
.string "fast-running currents.\p"
.string "We hope you enjoy your voyage with us.\n"
.string "Feel free to explore the ship.$"
2021-07-20 21:18:31 +02:00
SSTidal_Text_HopeYouEnjoyVoyage:
2017-11-10 00:40:08 +01:00
.string "We hope you enjoy your voyage on\n"
.string "our ferry.$"
2021-07-20 21:18:31 +02:00
SSTidal_Text_MadeLandInSlateport:
2017-11-10 00:40:08 +01:00
.string "We have made land in SLATEPORT CITY.\n"
.string "Thank you for sailing with us.$"
2021-07-20 21:18:31 +02:00
SSTidal_Text_MadeLandInLilycove:
2017-11-10 00:40:08 +01:00
.string "We have made land in LILYCOVE CITY.\n"
.string "Thank you for sailing with us.$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_CanRestInCabin2:
2018-12-07 16:41:08 +01:00
.string "It'll be some time before we make land,\n"
2017-11-10 00:40:08 +01:00
.string "I reckon.\p"
2018-12-07 16:41:08 +01:00
.string "You can rest up in your cabin if you'd\n"
.string "like. Your cabin's No. 2.\p"
2017-11-10 00:40:08 +01:00
.string "The bed in there is soft and plushy.\n"
.string "I can attest to how comfy it is!$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_WeveArrived:
2018-12-07 16:41:08 +01:00
.string "We've arrived!$"
2017-11-10 00:40:08 +01:00
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_VisitOtherCabins:
2017-11-10 00:40:08 +01:00
.string "Go visit other cabins.\n"
.string "TRAINERS bored of the boat trip will\l"
.string "be itching to battle.$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_EnjoyYourCruise:
2017-11-10 00:40:08 +01:00
.string "Enjoy your cruise!$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_HorizonSpreadsBeyondPorthole:
2017-11-10 00:40:08 +01:00
.string "The horizon spreads beyond\n"
.string "the porthole.$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_BrineyWelcomeAboard:
2017-11-10 00:40:08 +01:00
.string "MR. BRINEY: Welcome aboard, {PLAYER}{KUN}!\p"
.string "They made me honorary captain of\n"
.string "the S.S. TIDAL!\p"
.string "You can call me CAPTAIN BRINEY now!\p"
.string "You know, I retired once before,\n"
.string "but when I saw this majestic ship…\p"
.string "Let me just say, it stirred my sleeping\n"
.string "soul as a sailor!$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_Peeko:
2017-11-10 00:40:08 +01:00
.string "PEEKO: Pihyo pihyohyo…$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_Cabin1:
2017-11-10 00:40:08 +01:00
.string "Cabin 1$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_Cabin2:
2017-11-10 00:40:08 +01:00
.string "Cabin 2$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_Cabin3:
2017-11-10 00:40:08 +01:00
.string "Cabin 3$"
2021-07-20 21:18:31 +02:00
SSTidalCorridor_Text_Cabin4:
2017-11-10 00:40:08 +01:00
.string "Cabin 4$"