tumbledemerald-legacy/data/maps/SlateportCity_Harbor/scripts.inc

547 lines
18 KiB
PHP

.set LOCALID_CAPT_STERN, 4
.set LOCALID_SS_TIDAL, 5
.set LOCALID_GRUNT, 6
.set LOCALID_ARCHIE, 7
.set LOCALID_SUBMARINE, 8
SlateportCity_Harbor_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_Harbor_OnTransition
.byte 0
SlateportCity_Harbor_OnTransition:
setescapewarp MAP_SLATEPORT_CITY, 28, 13
setvar VAR_TEMP_1, 0
call_if_eq VAR_SLATEPORT_HARBOR_STATE, 1, SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene
call_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_ShowSSTidal
end
SlateportCity_Harbor_EventScript_ShowSSTidal::
clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_SS_TIDAL
return
SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene::
savebgm MUS_ENCOUNTER_AQUA
setobjectxyperm LOCALID_CAPT_STERN, 12, 13
setobjectmovementtype LOCALID_CAPT_STERN, MOVEMENT_TYPE_FACE_LEFT
setflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_PATRONS
return
SlateportCity_Harbor_EventScript_AquaEscapeTrigger0::
lockall
setvar VAR_0x8008, 0
goto SlateportCity_Harbor_EventScript_AquaEscapeScene
end
SlateportCity_Harbor_EventScript_AquaEscapeTrigger1::
lockall
setvar VAR_0x8008, 1
goto SlateportCity_Harbor_EventScript_AquaEscapeScene
end
SlateportCity_Harbor_EventScript_AquaEscapeTrigger2::
lockall
setvar VAR_0x8008, 2
goto SlateportCity_Harbor_EventScript_AquaEscapeScene
end
SlateportCity_Harbor_EventScript_AquaEscapeTrigger3::
lockall
setvar VAR_0x8008, 3
applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Harbor_Movement_PlayerWalkUp
waitmovement 0
goto SlateportCity_Harbor_EventScript_AquaEscapeScene
end
SlateportCity_Harbor_EventScript_AquaEscapeScene::
applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterDown
waitmovement 0
applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterDown
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp
waitmovement 0
msgbox SlateportCity_Harbor_Text_ArchieYouAgainHideoutInLilycove, MSGBOX_DEFAULT
closemessage
applymovement LOCALID_GRUNT, SlateportCity_Harbor_Movement_AquaBoardSub
applymovement LOCALID_ARCHIE, SlateportCity_Harbor_Movement_AquaBoardSub
applymovement LOCALID_SUBMARINE, SlateportCity_Harbor_Movement_SubmarineExit
waitmovement 0
removeobject LOCALID_GRUNT
removeobject LOCALID_ARCHIE
removeobject LOCALID_SUBMARINE
setvar VAR_SLATEPORT_HARBOR_STATE, 2
setflag FLAG_MET_TEAM_AQUA_HARBOR
setflag FLAG_HIDE_LILYCOVE_MOTEL_SCOTT
call_if_eq VAR_0x8008, 0, SlateportCity_Harbor_EventScript_SternApproachPlayer0
call_if_eq VAR_0x8008, 1, SlateportCity_Harbor_EventScript_SternApproachPlayer1
call_if_eq VAR_0x8008, 2, SlateportCity_Harbor_EventScript_SternApproachPlayer
call_if_eq VAR_0x8008, 3, SlateportCity_Harbor_EventScript_SternApproachPlayer
msgbox SlateportCity_Harbor_Text_CaptSternWhyStealMySubmarine, MSGBOX_DEFAULT
closemessage
setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_1_BLOCKING_ENTRANCE
setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_2_BLOCKING_ENTRANCE
copyobjectxytoperm LOCALID_CAPT_STERN
setobjectmovementtype LOCALID_CAPT_STERN, MOVEMENT_TYPE_FACE_RIGHT
releaseall
end
SlateportCity_Harbor_EventScript_SternApproachPlayer0::
applymovement LOCALID_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer0
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown
waitmovement 0
return
SlateportCity_Harbor_EventScript_SternApproachPlayer1::
applymovement LOCALID_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer1
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight
waitmovement 0
return
SlateportCity_Harbor_EventScript_SternApproachPlayer::
applymovement LOCALID_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight
waitmovement 0
return
SlateportCity_Harbor_Movement_AquaBoardSub:
delay_16
delay_16
jump_up
set_invisible
step_end
@ Unused, Archie instead shares above identical movement script with Grunt
SlateportCity_Harbor_Movement_ArchieBoardSub:
delay_16
delay_16
jump_up
set_invisible
step_end
SlateportCity_Harbor_Movement_SubmarineExit:
delay_16
delay_16
delay_16
delay_16
walk_right
walk_right
walk_right
walk_fast_right
walk_fast_right
walk_fast_right
walk_fast_right
walk_fast_right
walk_fast_right
step_end
SlateportCity_Harbor_Movement_SternApproachPlayer0:
walk_left
walk_left
walk_left
walk_left
walk_up
step_end
SlateportCity_Harbor_Movement_SternApproachPlayer1:
walk_left
walk_left
walk_up
walk_left
step_end
SlateportCity_Harbor_Movement_SternApproachPlayer:
walk_left
walk_left
walk_left
step_end
SlateportCity_Harbor_Movement_PlayerWalkUp:
walk_up
step_end
SlateportCity_Harbor_EventScript_FerryAttendant::
lock
faceplayer
goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_AskForTicket
msgbox SlateportCity_Harbor_Text_FerryServiceUnavailable, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_AskForTicket::
msgbox SlateportCity_Harbor_Text_MayISeeYourTicket, MSGBOX_DEFAULT
message SlateportCity_Harbor_Text_FlashedTicketWhereTo
waitmessage
goto SlateportCity_Harbor_EventScript_ChooseDestination
end
SlateportCity_Harbor_EventScript_ChooseDestination::
goto_if_set FLAG_MET_SCOTT_ON_SS_TIDAL, SlateportCity_Harbor_EventScript_ChooseDestinationWithBattleFrontier
multichoicedefault 18, 8, MULTI_SSTIDAL_SLATEPORT_NO_BF, 2, FALSE
switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_Lilycove
case 1, SlateportCity_Harbor_EventScript_CancelDestinationSelect
case MULTI_B_PRESSED, SlateportCity_Harbor_EventScript_CancelDestinationSelect
end
SlateportCity_Harbor_EventScript_ChooseDestinationWithBattleFrontier::
multichoicedefault 17, 6, MULTI_SSTIDAL_SLATEPORT_WITH_BF, 2, FALSE
switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_Lilycove
case 1, SlateportCity_Harbor_EventScript_BattleFrontier
case 2, SlateportCity_Harbor_EventScript_CancelDestinationSelect
case MULTI_B_PRESSED, SlateportCity_Harbor_EventScript_CancelDestinationSelect
end
@ Unused. Should be impossible for player to reach Ferry without having received SS Tidal ticket
SlateportCity_Harbor_EventScript_NoTicket::
msgbox SlateportCity_Harbor_Text_YouMustHaveTicket, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_Lilycove::
msgbox SlateportCity_Harbor_Text_LilycoveItIs, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseNewDestination
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_SLATEPORT
call SlateportCity_Harbor_EventScript_BoardFerry
warp MAP_SS_TIDAL_CORRIDOR, 1, 10
waitstate
release
end
SlateportCity_Harbor_EventScript_BattleFrontier::
msgbox SlateportCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseNewDestination
call SlateportCity_Harbor_EventScript_BoardFerry
warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67
waitstate
release
end
SlateportCity_Harbor_EventScript_ChooseNewDestination::
message SlateportCity_Harbor_Text_WhereWouldYouLikeToGo
waitmessage
goto SlateportCity_Harbor_EventScript_ChooseDestination
end
SlateportCity_Harbor_EventScript_BoardFerry::
msgbox SlateportCity_Harbor_Text_PleaseBoardFerry, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterUp
waitmovement 0
delay 30
hideobjectat VAR_LAST_TALKED, MAP_SLATEPORT_CITY_HARBOR
call_if_eq VAR_FACING, DIR_NORTH, SlateportCity_Harbor_EventScript_BoardFerryNorth
call_if_eq VAR_FACING, DIR_EAST, SlateportCity_Harbor_EventScript_BoardFerryEast
delay 30
hideobjectat OBJ_EVENT_ID_PLAYER, 0
setvar VAR_0x8004, LOCALID_SS_TIDAL
call Common_EventScript_FerryDepart
return
SlateportCity_Harbor_EventScript_CancelDestinationSelect::
msgbox SlateportCity_Harbor_Text_SailAnotherTime, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_BoardFerryEast::
applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Harbor_Movement_BoardFerryEast
waitmovement 0
return
SlateportCity_Harbor_EventScript_BoardFerryNorth::
applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Harbor_Movement_BoardFerryNorth
waitmovement 0
return
SlateportCity_Harbor_Movement_BoardFerryEast:
walk_right
walk_in_place_faster_up
step_end
SlateportCity_Harbor_Movement_BoardFerryNorth:
walk_up
step_end
SlateportCity_Harbor_EventScript_Sailor::
lock
faceplayer
goto_if_unset FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_SailorNoAbnormalWeather
setvar VAR_0x8004, 0
call_if_set FLAG_DEFEATED_KYOGRE, SlateportCity_Harbor_EventScript_CountDefeatedLegendary
call_if_set FLAG_DEFEATED_GROUDON, SlateportCity_Harbor_EventScript_CountDefeatedLegendary
goto_if_eq VAR_0x8004, 2, SlateportCity_Harbor_EventScript_SailorNoAbnormalWeather @ Defeated both
msgbox SlateportCity_Harbor_Text_AbnormalWeather, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_SailorNoAbnormalWeather::
msgbox SlateportCity_Harbor_Text_LoveToGoDeepUnderwaterSomeday, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_CountDefeatedLegendary::
addvar VAR_0x8004, 1
return
SlateportCity_Harbor_EventScript_FatMan::
msgbox SlateportCity_Harbor_Text_SubTooSmallForMe, MSGBOX_NPC
end
SlateportCity_Harbor_EventScript_CaptStern::
lock
faceplayer
goto_if_set FLAG_BADGE07_GET, SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment
goto_if_set FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE, SlateportCity_Harbor_EventScript_NeedDive
goto_if_set FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, SlateportCity_Harbor_EventScript_TeamAquaLeftNeedDive
goto_if_eq VAR_SLATEPORT_HARBOR_STATE, 2, SlateportCity_Harbor_EventScript_WhyStealSubmarine
msgbox SlateportCity_Harbor_Text_SameThugsTriedToRobAtMuseum, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
SlateportCity_Harbor_EventScript_WhyStealSubmarine::
msgbox SlateportCity_Harbor_Text_CaptSternWhyStealMySubmarine, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_TeamAquaLeftNeedDive::
setflag FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE
msgbox SlateportCity_Harbor_Text_TeamAquaLeftNeedDive, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_NeedDive::
msgbox SlateportCity_Harbor_Text_NeedDiveToCatchSub, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment::
goto_if_eq VAR_TEMP_1, 1, SlateportCity_Harbor_EventScript_TradedScanner
checkitem ITEM_SCANNER
goto_if_eq VAR_RESULT, TRUE, SlateportCity_Harbor_EventScript_AskToTradeScanner
goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_FerryFinished
msgbox SlateportCity_Harbor_Text_WontBeLongBeforeWeFinishFerry, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_FerryFinished::
msgbox SlateportCity_Harbor_Text_FinishedMakingFerry, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_AskToTradeScanner::
message SlateportCity_Harbor_Text_WouldYouTradeScanner
waitmessage
goto SlateportCity_Harbor_EventScript_ChooseScannerTrade
end
SlateportCity_Harbor_EventScript_ChooseScannerTrade::
multichoice 0, 0, MULTI_STERN_DEEPSEA, FALSE
switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_DeepSeaTooth
case 1, SlateportCity_Harbor_EventScript_DeepSeaScale
case 2, SlateportCity_Harbor_EventScript_DeclineTrade
case MULTI_B_PRESSED, SlateportCity_Harbor_EventScript_DeclineTrade
end
SlateportCity_Harbor_EventScript_DeepSeaTooth::
msgbox SlateportCity_Harbor_Text_TradeForDeepSeaTooth, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseDifferentTrade
giveitem ITEM_DEEP_SEA_TOOTH
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
removeitem ITEM_SCANNER
msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT
setflag FLAG_EXCHANGED_SCANNER
goto SlateportCity_Harbor_EventScript_TradedScanner
end
SlateportCity_Harbor_EventScript_DeepSeaScale::
msgbox SlateportCity_Harbor_Text_TradeForDeepSeaScale, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseDifferentTrade
giveitem ITEM_DEEP_SEA_SCALE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
removeitem ITEM_SCANNER
msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT
setflag FLAG_EXCHANGED_SCANNER
goto SlateportCity_Harbor_EventScript_TradedScanner
end
SlateportCity_Harbor_EventScript_DeclineTrade::
msgbox SlateportCity_Harbor_Text_IfYouWantToTradeLetMeKnow, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_EventScript_ChooseDifferentTrade::
message SlateportCity_Harbor_Text_WhichOneDoYouWant
waitmessage
goto SlateportCity_Harbor_EventScript_ChooseScannerTrade
end
SlateportCity_Harbor_EventScript_TradedScanner::
setvar VAR_TEMP_1, 1
msgbox SlateportCity_Harbor_Text_ThisWillHelpResearch, MSGBOX_DEFAULT
release
end
SlateportCity_Harbor_Text_FerryServiceUnavailable:
.string "I beg your pardon?\n"
.string "You're looking for a ship?\p"
.string "I'm sorry, the ferry service isn't\n"
.string "available at present…$"
SlateportCity_Harbor_Text_MayISeeYourTicket:
.string "Hello, are you here for the ferry?\n"
.string "May I see your Ticket?$"
SlateportCity_Harbor_Text_YouMustHaveTicket:
.string "{PLAYER} doesn't have the Ticket…\p"
.string "I'm terribly sorry.\p"
.string "You must have a Ticket to board\n"
.string "the ferry.$"
SlateportCity_Harbor_Text_FlashedTicketWhereTo:
.string "{PLAYER} flashed the Ticket.\p"
.string "Perfect! That's all you need!\p"
.string "And where would you like to go?$"
SlateportCity_Harbor_Text_SailAnotherTime:
.string "Please sail with us another time!$"
SlateportCity_Harbor_Text_LilycoveItIs:
.string "Lilycove City it is, then!$"
SlateportCity_Harbor_Text_BattleFrontierItIs:
.string "Battle Frontier it is, then!$"
SlateportCity_Harbor_Text_PleaseBoardFerry:
.string "Please board the ferry and wait for\n"
.string "departure.$"
SlateportCity_Harbor_Text_WhereWouldYouLikeToGo:
.string "Then, where would you like to go?$"
SlateportCity_Harbor_Text_LoveToGoDeepUnderwaterSomeday:
.string "A journey to the bottom of the sea…\n"
.string "I wonder what it'd be like?\p"
.string "I'd love to go deep underwater like\n"
.string "that someday.$"
SlateportCity_Harbor_Text_AbnormalWeather:
.string "For a ship to sail safely, we need to\n"
.string "know about the weather!\p"
.string "Speaking of weather, I heard something\n"
.string "from a guy at the Weather Institute.\p"
.string "He was saying abnormal weather has\n"
.string "been reported all over the place!\p"
.string "You should visit the Weather Institute\n"
.string "and ask around!$"
SlateportCity_Harbor_Text_SubTooSmallForMe:
.string "I wanted to go with Capt. Stern on\n"
.string "the ocean floor exploration.\p"
.string "But the sub's too small for me.\p"
.string "If I squeezed in, there wouldn't be\n"
.string "any room for the Captain…$"
SlateportCity_Harbor_Text_SameThugsTriedToRobAtMuseum:
.string "Capt. Stern: Those thugs…\p"
.string "They're the same lot who tried to rob\n"
.string "the Devon Goods at the Museum.$"
SlateportCity_Harbor_Text_ArchieYouAgainHideoutInLilycove:
.string "Archie: Oh?\n"
.string "Not you again…\p"
.string "You are tenacious to track us here,\n"
.string "that much I will give you.\p"
.string "But now…\n"
.string "No one can stop us! No one!\p"
.string "Or, will you follow us back to our\n"
.string "Hideout in Lilycove City?\p"
.string "Fwahahahaha…$"
SlateportCity_Harbor_Text_CaptSternWhyStealMySubmarine:
.string "Capt. Stern: Why…\p"
.string "Why would Team Aqua steal my\n"
.string "Submarine Explorer 1?\p"
.string "They can't be after the slumbering\n"
.string "Pokémon at the bottom of the sea…\p"
.string "But even if I were to chase them,\n"
.string "I don't stand a chance against them…$"
SlateportCity_Harbor_Text_TeamAquaLeftNeedDive:
.string "Capt. Stern: Oh, {PLAYER}{KUN}…\p"
.string "Okay… So Team Aqua left before you\n"
.string "could stop them…\p"
.string "Oh, no, don't blame yourself.\n"
.string "You're not responsible for this.\p"
.string "Trying to catch a submarine…\n"
.string "It's impossible for most people.\p"
.string "You would need a Pokémon that knows\n"
.string "how to Dive…\p"
.string "Perhaps if you went out to\n"
.string "Mossdeep City…\p"
.string "A lot of divers live out there, so\n"
.string "someone might teach you…$"
SlateportCity_Harbor_Text_NeedDiveToCatchSub:
.string "Capt. Stern: Trying to catch a\n"
.string "submarine… It's impossible.\p"
.string "You would need a Pokémon that knows\n"
.string "how to Dive…\p"
.string "Perhaps if you went out to\n"
.string "Mossdeep City…\p"
.string "A lot of divers live out there, so\n"
.string "someone might teach you…$"
SlateportCity_Harbor_Text_WontBeLongBeforeWeFinishFerry:
.string "Capt. Stern: Oh, yes.\n"
.string "Mr. Briney came to our Shipyard.\p"
.string "It won't be long now before we finish\n"
.string "making the ferry!$"
SlateportCity_Harbor_Text_FinishedMakingFerry:
.string "Capt. Stern: {PLAYER}{KUN}!\p"
.string "We finally finished making the ferry\n"
.string "S.S. Tidal!\p"
.string "We couldn't have done it without\n"
.string "your friend Mr. Briney.\p"
.string "Please go for a short cruise on it!$"
SlateportCity_Harbor_Text_WouldYouTradeScanner:
.string "Capt. Stern: Oh?\n"
.string "{PLAYER}{KUN}, that item you have…\p"
.string "That's a Scanner! That would sure\n"
.string "help us on our explorations.\p"
.string "{PLAYER}{KUN}, would you trade your\n"
.string "Scanner for something?\p"
.string "Like, say, a Deepseatooth or\n"
.string "a Deepseascale that I have?$"
SlateportCity_Harbor_Text_IfYouWantToTradeLetMeKnow:
.string "Capt. Stern: Are you certain?\n"
.string "It's useless to you, {PLAYER}{KUN}…\p"
.string "Well, okay, then. If you want to trade\n"
.string "your Scanner, let me know.$"
SlateportCity_Harbor_Text_TradeForDeepSeaTooth:
.string "Capt. Stern: So you'll trade it for\n"
.string "my Deepseatooth?$"
SlateportCity_Harbor_Text_TradeForDeepSeaScale:
.string "Capt. Stern: So you'll trade it for\n"
.string "my Deepseascale?$"
SlateportCity_Harbor_Text_WhichOneDoYouWant:
.string "Capt. Stern: Which one do you want?$"
SlateportCity_Harbor_Text_HandedScannerToStern:
.string "{PLAYER} handed the Scanner to\n"
.string "Capt. Stern.$"
SlateportCity_Harbor_Text_ThisWillHelpResearch:
.string "Capt. Stern: Thanks, {PLAYER}{KUN}!\n"
.string "This will help our research a lot!$"