Document Trainer Tower scripts

This commit is contained in:
GriffinR
2020-01-23 14:46:03 -05:00
parent e97d3532d4
commit ef1f9ead0b
123 changed files with 2099 additions and 1959 deletions
+125
View File
@@ -0,0 +1,125 @@
{
"id": "MAP_TRAINER_TOWER_LOBBY",
"name": "TrainerTower_Lobby",
"layout": "LAYOUT_TRAINER_TOWER_LOBBY",
"music": "MUS_T_TOWER",
"region_map_section": "MAPSEC_TRAINER_TOWER_2",
"requires_flash": false,
"weather": "WEATHER_NONE",
"map_type": "MAP_TYPE_8",
"unknown_18": 0,
"unknown_19": 2,
"elevator_flag": 0,
"battle_scene": "BATTLE_SCENE_0",
"connections": null,
"object_events": [
{
"graphics_id": "OBJECT_EVENT_GFX_NURSE",
"x": 4,
"y": 9,
"elevation": 3,
"movement_type": "MOVEMENT_TYPE_FACE_DOWN",
"movement_range_x": 1,
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
"script": "TrainerTower_Lobby_EventScript_Nurse",
"flag": "0"
},
{
"graphics_id": "OBJECT_EVENT_GFX_UNION_ROOM_RECEPTIONIST",
"x": 14,
"y": 9,
"elevation": 3,
"movement_type": "MOVEMENT_TYPE_FACE_DOWN",
"movement_range_x": 1,
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
"script": "TrainerTower_Lobby_EventScript_MartClerk",
"flag": "0"
},
{
"graphics_id": "OBJECT_EVENT_GFX_UNION_ROOM_RECEPTIONIST",
"x": 11,
"y": 7,
"elevation": 3,
"movement_type": "MOVEMENT_TYPE_FACE_LEFT",
"movement_range_x": 1,
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
"script": "TrainerTower_Lobby_EventScript_Receptionist",
"flag": "0"
},
{
"graphics_id": "OBJECT_EVENT_GFX_COOLTRAINER_F",
"x": 12,
"y": 13,
"elevation": 3,
"movement_type": "MOVEMENT_TYPE_WANDER_AROUND",
"movement_range_x": 1,
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
"script": "TrainerTower_Lobby_EventScript_CooltrainerF",
"flag": "0"
},
{
"graphics_id": "OBJECT_EVENT_GFX_BALDING_MAN",
"x": 2,
"y": 12,
"elevation": 3,
"movement_type": "MOVEMENT_TYPE_LOOK_AROUND",
"movement_range_x": 1,
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
"script": "TrainerTower_Lobby_EventScript_BaldingMan",
"flag": "0"
}
],
"warp_events": [
{
"x": 9,
"y": 2,
"elevation": 3,
"dest_map": "MAP_TRAINER_TOWER_1F",
"dest_warp_id": 1
},
{
"x": 9,
"y": 15,
"elevation": 3,
"dest_map": "MAP_SEVEN_ISLAND_TRAINER_TOWER",
"dest_warp_id": 0
},
{
"x": 17,
"y": 8,
"elevation": 0,
"dest_map": "MAP_TRAINER_TOWER_ELEVATOR",
"dest_warp_id": 0
}
],
"coord_events": [
{
"type": "trigger",
"x": 9,
"y": 7,
"elevation": 3,
"var": "VAR_MAP_SCENE_TRAINER_TOWER",
"var_value": 0,
"script": "TrainerTower_Lobby_EventScript_EntryTrigger"
}
],
"bg_events": [
{
"type": "bg_event_type_1",
"x": 8,
"y": 10,
"elevation": 0,
"script": "TrainerTower_Lobby_EventScript_ShowRecords"
}
]
}
+226
View File
@@ -0,0 +1,226 @@
TrainerTower_Lobby_MapScripts:: @ 8164839
map_script MAP_SCRIPT_ON_RESUME, TrainerTower_Lobby_OnResume
map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, TrainerTower_Lobby_OnReturnToField
map_script MAP_SCRIPT_ON_TRANSITION, TrainerTower_Lobby_OnTransition
map_script MAP_SCRIPT_ON_LOAD, TrainerTower_Lobby_OnLoad
map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerTower_Lobby_OnFrame
.byte 0
TrainerTower_Lobby_OnResume:: @ 8164853
setvar VAR_TEMP_2, 0
ttower_resumetimer
ttower_shouldexit
compare VAR_RESULT, FALSE
goto_if_eq TrainerTower_Lobby_OnResumeEnd
@ Never reached, above always FALSE
setvar VAR_TEMP_0, 0
setobjectxy OBJ_EVENT_ID_PLAYER, 9, 7
applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_FaceReceptionist
TrainerTower_Lobby_OnResumeEnd:: @ 8164886
end
TrainerTower_Lobby_OnReturnToField:: @ 8164887
addobject 1
addobject 2
addobject 3
addobject 4
addobject 5
end
TrainerTower_Lobby_OnLoad:: @ 8164897
compare VAR_TEMP_D, 17
call_if_eq TrainerTower_Lobby_OpenCounterBarrier
end
TrainerTower_Lobby_OpenCounterBarrier:: @ 81648A3
setmetatile 17, 10, METATILE_TrainerTower_Floor_ShadeBottomLeft, 0
return
TrainerTower_Lobby_OnTransition:: @ 81648AD
setworldmapflag FLAG_WORLD_MAP_TRAINER_TOWER_LOBBY
getplayerxy VAR_TEMP_D, VAR_RESULT
end
TrainerTower_Lobby_OnFrame:: @ 81648B6
map_script_2 VAR_TEMP_0, 0, TrainerTower_Lobby_EventScript_Enter
map_script_2 VAR_TEMP_D, 17, TrainerTower_Lobby_EventScript_ExitElevator
.2byte 0
TrainerTower_Lobby_EventScript_ExitElevator:: @ 81648C8
lockall
applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_ExitElevator
waitmovement 0
setmetatile 17, 10, METATILE_TrainerTower_CounterBarrier, 1
special DrawWholeMapView
playse SE_TK_KASYA
waitse
setvar VAR_TEMP_D, 0
releaseall
end
TrainerTower_Lobby_Movement_ExitElevator:: @ 81648EA
walk_down
walk_down
step_end
TrainerTower_Lobby_EventScript_Enter:: @ 81648ED
setvar VAR_TEMP_0, 1
ttower_getchallengestatus
switch VAR_RESULT
case CHALLENGE_STATUS_LOST, TrainerTower_Lobby_EventScript_LostChallenge
case CHALLENGE_STATUS_UNK, TrainerTower_Lobby_EventScript_164938
case CHALLENGE_STATUS_NORMAL, TrainerTower_Lobby_EventScript_EnterEnd
TrainerTower_Lobby_EventScript_LostChallenge:: @ 8164920
lock
faceplayer
applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_FaceReceptionist
textcolor 1
msgbox TrainerTower_Lobby_Text_TooBadComeBackTryAgain
goto TrainerTower_Lobby_EventScript_ExitChallenge
@ Presumably E-Reader related
TrainerTower_Lobby_EventScript_164938:: @ 8164938
lock
faceplayer
applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_FaceReceptionist
textcolor 1
msgbox TrainerTower_Lobby_Text_MoveCounterHereWhenTrainersSwitch
TrainerTower_Lobby_EventScript_ExitChallenge:: @ 816494B
closemessage
applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_WalkDown
waitmovement 0
setvar VAR_MAP_SCENE_TRAINER_TOWER, 0
release
TrainerTower_Lobby_EventScript_EnterEnd:: @ 816495C
end
TrainerTower_Lobby_EventScript_Nurse:: @ 816495D
lock
faceplayer
call EventScript_PkmnCenterNurse
release
end
TrainerTower_Lobby_EventScript_Receptionist:: @ 8164966
lock
faceplayer
ttower_getbeatchallenge
compare VAR_RESULT, TRUE
goto_if_eq TrainerTower_Lobby_EventScript_ThanksForCompeting
msgbox TrainerTower_Lobby_Text_GiveItYourBest
goto TrainerTower_Lobby_EventScript_ReceptionistEnd
TrainerTower_Lobby_EventScript_ThanksForCompeting:: @ 8164988
msgbox TrainerTower_Lobby_Text_ThanksForCompeting
TrainerTower_Lobby_EventScript_ReceptionistEnd:: @ 8164990
release
end
TrainerTower_Lobby_EventScript_MartClerk:: @ 8164992
goto_if_questlog EventScript_ReleaseEnd
lock
faceplayer
message Text_MayIHelpYou
waitmessage
pokemart TrainerTower_Lobby_Mart_Items
msgbox Text_PleaseComeAgain
release
end
.align 2
TrainerTower_Lobby_Mart_Items:: @ 81649B8
.2byte ITEM_ULTRA_BALL
.2byte ITEM_GREAT_BALL
.2byte ITEM_FULL_RESTORE
.2byte ITEM_MAX_POTION
.2byte ITEM_HYPER_POTION
.2byte ITEM_REVIVE
.2byte ITEM_FULL_HEAL
.2byte ITEM_ESCAPE_ROPE
.2byte ITEM_MAX_REPEL
.2byte ITEM_NONE
release
end
TrainerTower_Lobby_EventScript_EntryTrigger:: @ 81649CE
lockall
applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_FaceReceptionist
textcolor 1
msgbox TrainerTower_Lobby_Text_WelcomeToTrainerTower
ttower_getnumfloors
compare VAR_RESULT, FALSE
goto_if_eq TrainerTower_Lobby_EventScript_AllFloorsUsed
msgbox TrainerTower_Lobby_Text_TrainersUpToFloorNum
goto TrainerTower_Lobby_EventScript_AskEnterChallenge
TrainerTower_Lobby_EventScript_AllFloorsUsed:: @ 8164A00
msgbox TrainerTower_Lobby_Text_TrainersUpEighthFloor
TrainerTower_Lobby_EventScript_AskEnterChallenge:: @ 8164A08
message TrainerTower_Lobby_Text_LikeToChallengeTrainers
waitmessage
multichoice 18, 6, MULTICHOICE_YES_NO_INFO, FALSE
switch VAR_RESULT
case 0, TrainerTower_Lobby_EventScript_ChooseChallenge
case 1, TrainerTower_Lobby_EventScript_DeclineChallenge
case 2, TrainerTower_Lobby_EventScript_ChallengeInfo
case SCR_MENU_CANCEL, TrainerTower_Lobby_EventScript_DeclineChallenge
end
TrainerTower_Lobby_EventScript_ChallengeInfo:: @ 8164A45
msgbox TrainerTower_Lobby_Text_ExplainTrainerTower
goto TrainerTower_Lobby_EventScript_AskEnterChallenge
end
TrainerTower_Lobby_EventScript_ChooseChallenge:: @ 8164A53
multichoice 13, 3, MULTICHOICE_TRAINER_TOWER_MODE, FALSE
switch VAR_RESULT
case 0, TrainerTower_Lobby_EventScript_BeginChallenge
case 1, TrainerTower_Lobby_EventScript_BeginChallenge
case 2, TrainerTower_Lobby_EventScript_BeginChallenge
case 3, TrainerTower_Lobby_EventScript_BeginChallenge
case 4, TrainerTower_Lobby_EventScript_DeclineChallenge
case SCR_MENU_CANCEL, TrainerTower_Lobby_EventScript_DeclineChallenge
end
TrainerTower_Lobby_EventScript_BeginChallenge:: @ 8164AA0
copyvar VAR_0x8005, VAR_RESULT
setvar VAR_MAP_SCENE_TRAINER_TOWER, 1
special HealPlayerParty
msgbox TrainerTower_Lobby_Text_StartClockGetSetGo
ttower_startchallenge
releaseall
end
TrainerTower_Lobby_EventScript_DeclineChallenge:: @ 8164ABF
msgbox TrainerTower_Lobby_Text_PleaseVisitUsAgain
closemessage
applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_WalkDown
waitmovement 0
releaseall
end
TrainerTower_Lobby_Movement_FaceReceptionist:: @ 8164AD4
face_right
step_end
TrainerTower_Lobby_Movement_WalkDown:: @ 8164AD6
walk_down
step_end
TrainerTower_Lobby_EventScript_ShowRecords:: @ 8164AD8
lockall
fadescreen FADE_TO_BLACK
setvar VAR_0x8004, 1
special Special_BattleRecords
waitstate
releaseall
end
TrainerTower_Lobby_EventScript_CooltrainerF:: @ 8164AE6
msgbox TrainerTower_Lobby_Text_WonderWhatKindsOfTrainers, MSGBOX_NPC
end
TrainerTower_Lobby_EventScript_BaldingMan:: @ 8164AEF
msgbox TrainerTower_Lobby_Text_StairsTougherThanAnyBattle, MSGBOX_NPC
end
+120
View File
@@ -0,0 +1,120 @@
@ All Trainer Tower text (Lobby and Roof) is interleaved here
TrainerTower_Lobby_Text_WelcomeToTrainerTower:: @ 817C794
.string "Hello!\p"
.string "Welcome to TRAINER TOWER where\n"
.string "TRAINERS gather from all over!$"
TrainerTower_Lobby_Text_TrainersUpToFloorNum:: @ 817C7D9
.string "TRAINERS from all over the world\n"
.string "gather here to battle.\p"
.string "Let me see…\p"
.string "Right now, there are TRAINERS only\n"
.string "up to Floor {STR_VAR_1}.$"
TrainerTower_Lobby_Text_TrainersUpEighthFloor:: @ 817C850
.string "TRAINERS are awaiting your\n"
.string "challenge up to the eighth floor.$"
TrainerTower_Lobby_Text_LikeToChallengeTrainers:: @ 817C88D
.string "Would you like to challenge the\n"
.string "waiting TRAINERS?$"
TrainerTower_Lobby_Text_StartClockGetSetGo:: @ 817C8BF
.string "Okay, I'll get the clock started,\n"
.string "so give it everything you have.\p"
.string "On your marks…\p"
.string "Get set…\p"
.string "Go!$"
TrainerTower_Lobby_Text_PleaseVisitUsAgain:: @ 817C91D
.string "Please do visit us again!$"
TrainerTower_Lobby_Text_TooBadComeBackTryAgain:: @ 817C937
.string "That was too bad.\p"
.string "I think you put in a tremendous\n"
.string "effort in your battling.\p"
.string "Please come back and try again!$"
TrainerTower_Lobby_Text_GiveItYourBest:: @ 817C9A2
.string "I hope you give it your best.$"
TrainerTower_Lobby_Text_MoveCounterHereWhenTrainersSwitch:: @ 817C9C0
.string "When the TRAINERS switch places,\n"
.string "the movement can be hectic.\p"
.string "To avoid the stampede, we moved\n"
.string "the reception counter here.\p"
.string "I'm sorry for the inconvenience.$"
TrainerTower_Roof_Text_ImOwnerBattledPerfectly:: @ 817CA5A
.string "Hello…\p"
.string "I am the owner of this TOWER…\p"
.string "How the sky soars above this\n"
.string "rooftop…\p"
.string "The caress of the winds up here…\p"
.string "It's all so perfect…\p"
.string "The way you battled…\n"
.string "It, too, was perfection…$"
TrainerTower_Roof_Text_ThisIsForYou:: @ 817CB09
.string "This is for you…$"
TrainerTower_Roof_Text_DoneItInRecordTime:: @ 817CB1A
.string "Oh!\n"
.string "Stupendous!\p"
.string "It's marvelous how you've come up\n"
.string "here so quickly.\p"
.string "The fact is, you've done it in\n"
.string "record time…\p"
.string "I'll have your record posted at\n"
.string "the reception counter.$"
TrainerTower_Roof_Text_TookSweetTimeGettingHere:: @ 817CBC0
.string "You seem to have taken your sweet\n"
.string "time getting here…$"
TrainerTower_Roof_Text_IdLikeToSeeBetterTime:: @ 817CBF5
.string "What I would like to see is a\n"
.string "better time out of you…\p"
.string "I'm counting on you.\p"
.string "Until then, farewell…$"
TrainerTower_Text_XMinYZSec:: @ 817CC56
.string "{STR_VAR_1} min. {STR_VAR_2}.{STR_VAR_3} sec.$"
TrainerTower_Lobby_Text_HereAreTheResults:: @ 817CC69
.string "せいせきひょうです$"
TrainerTower_Lobby_Text_NeedTwoMonsForDouble:: @ 817CC73
.string "This is a two-on-two battle.\p"
.string "You may not battle unless you have\n"
.string "at least two POKéMON.$"
TrainerTower_Lobby_Text_ExplainTrainerTower:: @ 817CCC9
.string "Here at TRAINER TOWER, there is an\n"
.string "event called TIME ATTACK.\p"
.string "You will be timed on how quickly\n"
.string "you can get from the reception\l"
.string "counter to the OWNER on the roof.\p"
.string "The best times will be recorded on\n"
.string "the Time Board.\p"
.string "Try competing with friends to see\n"
.string "who can beat it the fastest.\p"
.string "You will not earn any EXP. Points\n"
.string "or money by beating TRAINERS here.$"
TrainerTower_Lobby_Text_ThanksForCompeting:: @ 817CE1F
.string "Thank you for competing!$"
TrainerTower_Lobby_Text_WonderWhatKindsOfTrainers:: @ 817CE38
.string "I'm here to see how good I am.\p"
.string "I wonder what kinds of TRAINERS\n"
.string "are waiting for me?\p"
.string "It's nerve-racking!$"
TrainerTower_Lobby_Text_StairsTougherThanAnyBattle:: @ 817CE9F
.string "Gasp, gasp…\n"
.string "Gasp…\p"
.string "Never mind battling! These stairs…\n"
.string "They're tougher than any battle…$"