pokeemerald/data/maps/SlateportCity_BattleTentLobby/scripts.inc

310 lines
11 KiB
PHP
Raw Normal View History

.set LOCALID_ATTENDANT, 1
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_MapScripts::
2019-12-15 06:55:21 +01:00
map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentLobby_OnFrame
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentLobby_OnWarp
2017-11-10 02:21:31 +01:00
.byte 0
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_OnWarp:
2019-12-15 06:55:21 +01:00
map_script_2 VAR_TEMP_1, 0, SlateportCity_BattleTentLobby_EventScript_TurnPlayerNorth
2017-11-10 02:21:31 +01:00
.2byte 0
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_TurnPlayerNorth::
2018-05-19 18:02:43 +02:00
setvar VAR_TEMP_1, 1
turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_OnFrame:
2023-08-04 20:17:28 +02:00
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, SlateportCity_BattleTentLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, SlateportCity_BattleTentLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, SlateportCity_BattleTentLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, SlateportCity_BattleTentLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, SlateportCity_BattleTentLobby_EventScript_LostChallenge
2017-11-10 02:21:31 +01:00
.2byte 0
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_GetChallengeStatus::
2019-11-24 22:58:40 +01:00
frontier_getstatus
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_QuitWithoutSaving::
2017-11-10 02:21:31 +01:00
lockall
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_DidntSaveBeforeQuitting, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
2023-08-04 20:17:28 +02:00
setvar VAR_TEMP_CHALLENGE_STATUS, 255
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_WonChallenge::
2017-11-10 02:21:31 +01:00
lockall
2019-12-15 06:55:21 +01:00
message SlateportCity_BattleTentLobby_Text_WonThreeMatchesReturnMons
2017-11-10 02:21:31 +01:00
waitmessage
2019-12-02 20:49:22 +01:00
slateporttent_setrandomprize
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
2019-12-02 20:49:22 +01:00
slateporttent_save 0
2017-11-10 02:21:31 +01:00
playse SE_SAVE
waitse
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_GivePrize::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_AwardYouThisPrize, MSGBOX_DEFAULT
2019-12-02 20:49:22 +01:00
slateporttent_giveprize
2017-11-10 02:21:31 +01:00
switch VAR_RESULT
2019-12-15 06:55:21 +01:00
case FALSE, SlateportCity_BattleTentLobby_EventScript_NoRoomForPrize
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
2019-12-15 06:55:21 +01:00
message BattleFrontier_BattleTowerLobby_Text_ReceivedPrize @ Odd that it uses Tower's instead of Factory's or its own
2017-11-10 02:21:31 +01:00
waitmessage
2020-08-21 00:02:00 +02:00
playfanfare MUS_OBTAIN_ITEM
2017-11-10 02:21:31 +01:00
waitfanfare
2019-12-15 06:55:21 +01:00
goto SlateportCity_BattleTentLobby_EventScript_EndGivePrize
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_NoRoomForPrize::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_NoRoomInBagMakeRoom, MSGBOX_DEFAULT
goto SlateportCity_BattleTentLobby_EventScript_EndGivePrize
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_LostChallenge::
2017-11-10 02:21:31 +01:00
lockall
2019-12-15 06:55:21 +01:00
message SlateportCity_BattleTentLobby_Text_ReturnRentalMonsSaveResults
2017-11-10 02:21:31 +01:00
waitmessage
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
2019-12-02 20:49:22 +01:00
slateporttent_save 0
2017-11-10 02:21:31 +01:00
playse SE_SAVE
waitse
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_EndGivePrize::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
2023-08-04 20:17:28 +02:00
setvar VAR_TEMP_CHALLENGE_STATUS, 255
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_ResumeChallenge::
2017-11-10 02:21:31 +01:00
lockall
2019-12-15 06:55:21 +01:00
message SlateportCity_BattleTentLobby_Text_BeenWaitingForYou
2017-11-10 02:21:31 +01:00
waitmessage
2019-12-02 20:49:22 +01:00
slateporttent_save CHALLENGE_STATUS_SAVING
2017-11-10 02:21:31 +01:00
playse SE_SAVE
waitse
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_PAUSED, FALSE
2023-08-04 20:17:28 +02:00
setvar VAR_TEMP_CHALLENGE_STATUS, 255
2017-11-10 02:21:31 +01:00
setvar VAR_0x8006, 2
2019-12-15 06:55:21 +01:00
goto SlateportCity_BattleTentLobby_EventScript_EnterChallenge
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_Attendant::
2017-11-10 02:21:31 +01:00
lock
faceplayer
2019-12-02 20:49:22 +01:00
slateporttent_getprize
goto_if_ne VAR_RESULT, ITEM_NONE, SlateportCity_BattleTentLobby_EventScript_GivePrize
2018-04-29 14:21:59 +02:00
special SavePlayerParty
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_AskEnterChallenge::
2019-12-15 06:55:21 +01:00
message SlateportCity_BattleTentLobby_Text_TakeChallenge
2017-11-10 02:21:31 +01:00
waitmessage
2021-03-31 06:35:56 +02:00
multichoice 17, 6, MULTI_CHALLENGEINFO, FALSE
2017-11-10 02:21:31 +01:00
switch VAR_RESULT
2019-12-15 06:55:21 +01:00
case 0, SlateportCity_BattleTentLobby_EventScript_TryEnterChallenge
case 1, SlateportCity_BattleTentLobby_EventScript_ExplainChallenge
case 2, SlateportCity_BattleTentLobby_EventScript_CancelChallenge
case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_CancelChallenge
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_TryEnterChallenge::
2019-11-24 22:58:40 +01:00
setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_FACTORY
setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO
2017-11-10 02:21:31 +01:00
switch VAR_RESULT
2019-12-15 06:55:21 +01:00
case NO, SlateportCity_BattleTentLobby_EventScript_LoadPartyCancelChallenge
case YES, SlateportCity_BattleTentLobby_EventScript_SaveBeforeChallenge
case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_LoadPartyCancelChallenge
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_SaveBeforeChallenge::
2023-08-04 20:17:28 +02:00
setvar VAR_TEMP_CHALLENGE_STATUS, 0
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
2019-12-02 20:49:22 +01:00
slateporttent_init
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
frontier_set FRONTIER_DATA_PAUSED, FALSE
2017-11-10 02:21:31 +01:00
closemessage
delay 2
call Common_EventScript_SaveGame
2023-08-04 20:17:28 +02:00
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, SlateportCity_BattleTentLobby_EventScript_CancelChallengeSaveFailed
2017-11-10 02:21:31 +01:00
setvar VAR_0x8006, 0
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_EnterChallenge::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_StepThisWay, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
2019-12-15 06:55:21 +01:00
call SlateportCity_BattleTentLobby_EventScript_WalkToDoor
warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 2, 7
2023-08-04 20:17:28 +02:00
setvar VAR_TEMP_CHALLENGE_STATUS, 0
2017-11-10 02:21:31 +01:00
waitstate
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_WalkToDoor::
applymovement LOCALID_ATTENDANT, SlateportCity_BattleTentLobby_Movement_AttendantWalkToDoor
applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_BattleTentLobby_Movement_PlayerWalkToDoor
2017-11-10 02:21:31 +01:00
waitmovement 0
opendoor 6, 1
waitdooranim
applymovement LOCALID_ATTENDANT, SlateportCity_BattleTentLobby_Movement_AttendantEnterDoor
applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_BattleTentLobby_Movement_PlayerEnterDoor
2017-11-10 02:21:31 +01:00
waitmovement 0
closedoor 6, 1
waitdooranim
return
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Movement_AttendantWalkToDoor:
walk_up
walk_up
walk_up
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Movement_AttendantEnterDoor:
walk_up
set_invisible
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Movement_PlayerWalkToDoor:
walk_up
walk_up
walk_up
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Movement_PlayerEnterDoor:
walk_up
walk_up
set_invisible
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_ExplainChallenge::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_ExplainSlateportTent, MSGBOX_DEFAULT
goto SlateportCity_BattleTentLobby_EventScript_AskEnterChallenge
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_CancelChallengeSaveFailed::
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
2019-12-15 06:55:21 +01:00
goto SlateportCity_BattleTentLobby_EventScript_CancelChallenge
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_LoadPartyCancelChallenge::
2018-04-29 14:21:59 +02:00
special LoadPlayerParty
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_CancelChallenge::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2019-12-15 06:55:21 +01:00
@ Unused
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Movement_UnusedEnterDoor::
walk_up
walk_up
walk_up
set_invisible
step_end
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_TormentGiver::
2017-11-10 02:21:31 +01:00
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM_TORMENT, SlateportCity_BattleTentLobby_EventScript_ReceivedTorment
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_CouldntFindMonForMe, MSGBOX_DEFAULT
giveitem ITEM_TM_TORMENT
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM_TORMENT
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_ExplainTorment, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_ReceivedTorment::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_ExplainTorment, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_Man::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_IllTryUsingBugMons, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_Girl::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_BattleEvenWithoutToughMons, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_Woman::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_NiceIfMoreSelection, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_RulesBoard::
2017-11-10 02:21:31 +01:00
lockall
2019-12-09 20:00:13 +01:00
msgbox BattleFrontier_BattleFactoryLobby_Text_RulesAreListed, MSGBOX_DEFAULT
2019-12-15 06:55:21 +01:00
goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard::
2019-12-09 20:00:13 +01:00
message BattleFrontier_BattleFactoryLobby_Text_ReadWhichHeading
2017-11-10 02:21:31 +01:00
waitmessage
2021-03-31 06:35:56 +02:00
multichoice 17, 0, MULTI_SLATEPORT_TENT_RULES, FALSE
2017-11-10 02:21:31 +01:00
switch VAR_RESULT
2019-12-15 06:55:21 +01:00
case 0, SlateportCity_BattleTentLobby_EventScript_RulesBasics
case 1, SlateportCity_BattleTentLobby_EventScript_RulesSwapPartner
case 2, SlateportCity_BattleTentLobby_EventScript_RulesSwapNumber
case 3, SlateportCity_BattleTentLobby_EventScript_RulesSwapNotes
case 4, SlateportCity_BattleTentLobby_EventScript_RulesMons
case 5, SlateportCity_BattleTentLobby_EventScript_ExitRules
case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_ExitRules
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_RulesBasics::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_ExplainBasicRules, MSGBOX_DEFAULT
goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_RulesSwapPartner::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_ExplainSwapPartnerRules, MSGBOX_DEFAULT
goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_RulesSwapNumber::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_ExplainSwapNumberRules, MSGBOX_DEFAULT
goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_RulesSwapNotes::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_ExplainSwapNotes, MSGBOX_DEFAULT
goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_RulesMons::
2019-12-15 06:55:21 +01:00
msgbox SlateportCity_BattleTentLobby_Text_ExplainMonRules, MSGBOX_DEFAULT
goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_EventScript_ExitRules::
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Text_CouldntFindMonForMe:
2018-12-07 16:41:08 +01:00
.string "So, like, I couldn't find myself any\n"
2017-11-10 02:21:31 +01:00
.string "POKéMON that were, like, for me.\p"
.string "So, I figured, like, hey, I should file\n"
.string "a complaint to the guy there?\p"
2018-12-07 16:41:08 +01:00
.string "And he wouldn't hear me out, like, hey!\n"
2017-11-10 02:21:31 +01:00
.string "So, like, total bummer, man!\p"
.string "Hey, like, you! Zip it, you know?\n"
.string "Just, you know, take this!$"
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Text_ExplainTorment:
2018-12-07 16:41:08 +01:00
.string "That's, like, TM41, you know?\n"
.string "Hey, it's TORMENT, you hearing me?\p"
.string "Like, it won't let the other guy\n"
2017-11-10 02:21:31 +01:00
.string "use the same move twice in a row, see?\p"
.string "Hey, now, you listen here, like,\n"
2018-12-07 16:41:08 +01:00
.string "I'm not laying a torment on you!$"
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Text_IllTryUsingBugMons:
2018-12-07 16:41:08 +01:00
.string "I don't really like BUG POKéMON,\n"
.string "but maybe I'll try using some for\l"
2017-11-10 02:21:31 +01:00
.string "a change of pace.\p"
.string "Who knows, I might even get to like\n"
.string "them!$"
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Text_BattleEvenWithoutToughMons:
2017-11-10 02:21:31 +01:00
.string "You can battle all you want here even\n"
2018-12-07 16:41:08 +01:00
.string "if you don't have any tough POKéMON.$"
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SlateportCity_BattleTentLobby_Text_NiceIfMoreSelection:
2018-12-07 16:41:08 +01:00
.string "Wouldn't it be nice if they had more of\n"
2017-11-10 02:21:31 +01:00
.string "a selection?$"