pokeemerald/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc

419 lines
13 KiB
PHP
Raw Normal View History

.set LOCALID_RIVAL, 1
2017-11-10 02:21:31 +01:00
LittlerootTown_MaysHouse_2F_MapScripts:: @ 81F9296
map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_2F_OnTransition
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_MaysHouse_2F_OnWarp
2017-11-10 02:21:31 +01:00
.byte 0
LittlerootTown_MaysHouse_2F_OnTransition: @ 81F92A1
compare VAR_LITTLEROOT_RIVAL_STATE, 2
call_if_lt LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay
compare VAR_LITTLEROOT_RIVAL_STATE, 3
call_if_ge LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos
compare VAR_LITTLEROOT_INTRO_STATE, 4
call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet
call SecretBase_EventScript_SetDecorationFlags
2019-02-27 21:18:56 +01:00
setvar VAR_SECRET_BASE_INITIALIZED, 0
2017-11-10 02:21:31 +01:00
end
LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos:: @ 81F92CD
goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos
compare VAR_BIRCH_LAB_STATE, 2
goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret
goto LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos
2017-11-10 02:21:31 +01:00
LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos:: @ 81F92E6
2017-11-10 02:21:31 +01:00
checkplayergender
2019-09-16 05:47:07 +02:00
compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_Ret
2019-08-03 20:12:48 +02:00
compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2
goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret
setobjectxyperm LOCALID_RIVAL, 8, 2
setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP
2017-11-10 02:21:31 +01:00
return
LittlerootTown_MaysHouse_2F_EventScript_Ret:: @ 81F9309
2017-11-10 02:21:31 +01:00
return
LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay:: @ 81F930A
2017-11-10 02:21:31 +01:00
checkplayergender
2019-09-16 05:47:07 +02:00
compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay
2017-11-10 02:21:31 +01:00
return
LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay:: @ 81F9317
setvar VAR_LITTLEROOT_RIVAL_STATE, 2
2017-11-10 02:21:31 +01:00
return
LittlerootTown_MaysHouse_2F_OnWarp: @ 81F931D
map_script_2 VAR_SECRET_BASE_INITIALIZED, 0, LittlerootTown_MaysHouse_2F_EventScript_CheckInitDecor
2017-11-10 02:21:31 +01:00
.2byte 0
LittlerootTown_MaysHouse_2F_EventScript_CheckInitDecor:: @ 81F9327
2017-11-10 02:21:31 +01:00
checkplayergender
2019-09-16 05:47:07 +02:00
compare VAR_RESULT, FEMALE
goto_if_eq SecretBase_EventScript_InitDecorations
2017-11-10 02:21:31 +01:00
end
LittlerootTown_MaysHouse_2F_EventScript_RivalsPokeBall:: @ 81F9334
2017-11-10 02:21:31 +01:00
lockall
compare VAR_LITTLEROOT_RIVAL_STATE, 2
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMay
msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
LittlerootTown_MaysHouse_2F_EventScript_MeetMay:: @ 81F934A
2017-11-10 02:21:31 +01:00
delay 10
addobject LOCALID_RIVAL
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayEnters
2017-11-10 02:21:31 +01:00
waitmovement 0
playse SE_PIN
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
delay 10
2020-08-21 00:02:00 +02:00
playbgm MUS_ENCOUNTER_MAY, 1
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_NORTH
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_SOUTH
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_WEST
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_EAST
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast
setvar VAR_LITTLEROOT_RIVAL_STATE, 3
2018-10-18 21:28:59 +02:00
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL
clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM
2019-08-05 17:23:45 +02:00
setvar VAR_LITTLEROOT_TOWN_STATE, 1
2017-12-22 08:46:19 +01:00
savebgm MUS_DUMMY
2017-11-10 02:21:31 +01:00
fadedefaultbgm
releaseall
end
LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth:: @ 81F93BA
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerNorth
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft
2017-11-10 02:21:31 +01:00
waitmovement 0
msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayNorth
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCNorth
2017-11-10 02:21:31 +01:00
waitmovement 0
return
LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth:: @ 81F93E9
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerSouth
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft
2017-11-10 02:21:31 +01:00
waitmovement 0
msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMaySouth
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCSouth
2017-11-10 02:21:31 +01:00
waitmovement 0
return
LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest:: @ 81F9418
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerWest
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp
2017-11-10 02:21:31 +01:00
waitmovement 0
msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCWest
2017-11-10 02:21:31 +01:00
waitmovement 0
return
LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast:: @ 81F9440
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerEast
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft
2017-11-10 02:21:31 +01:00
waitmovement 0
msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayEast
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCEast
2017-11-10 02:21:31 +01:00
waitmovement 0
return
LittlerootTown_MaysHouse_2F_Movement_MayEnters: @ 81F946F
walk_down
walk_down
walk_in_place_fastest_right
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerNorth: @ 81F9473
walk_right
walk_right
walk_down
walk_down
walk_right
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCNorth: @ 81F9479
walk_up
walk_up
walk_up
walk_in_place_fastest_right
walk_right
walk_right
walk_right
walk_right
walk_in_place_fastest_up
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayNorth: @ 81F9483
delay_16
walk_in_place_fastest_up
delay_16
delay_16
delay_16
delay_16
walk_in_place_fastest_right
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerSouth: @ 81F948B
walk_right
walk_right
walk_right
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCSouth: @ 81F948F
walk_up
walk_in_place_fastest_right
walk_right
walk_right
walk_right
walk_right
walk_in_place_fastest_up
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMaySouth: @ 81F9497
delay_16
walk_in_place_fastest_up
delay_16
delay_16
walk_in_place_fastest_right
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerWest: @ 81F949D
walk_right
walk_right
walk_right
walk_right
walk_right
walk_in_place_fastest_down
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCWest: @ 81F94A4
walk_up
walk_right
walk_right
walk_in_place_fastest_up
2017-11-10 02:21:31 +01:00
step_end
@ Unused, the player is already facing this direction so its unneeded
LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayWest: @ 81F94A9
delay_16
delay_16
walk_in_place_fastest_right
step_end
2017-11-10 02:21:31 +01:00
LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerEast: @ 81F94AD
walk_right
walk_right
walk_down
walk_in_place_fastest_right
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCEast: @ 81F94B2
walk_up
walk_up
walk_right
walk_right
walk_right
walk_right
walk_right
walk_in_place_fastest_up
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayEast: @ 81F94BB
delay_16
walk_in_place_fastest_up
delay_16
delay_16
walk_in_place_fastest_right
2017-11-10 02:21:31 +01:00
step_end
RivalsHouse_2F_EventScript_Rival:: @ 81F94C1
2017-11-10 02:21:31 +01:00
lockall
goto_if_set FLAG_MET_RIVAL_LILYCOVE, RivalsHouse_2F_EventScript_RivalPostLilycove
2017-11-10 02:21:31 +01:00
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq RivalsHouse_2F_EventScript_May
compare VAR_RESULT, FEMALE
goto_if_eq RivalsHouse_2F_EventScript_Brendan
2017-11-10 02:21:31 +01:00
end
RivalsHouse_2F_EventScript_May:: @ 81F94E3
msgbox RivalsHouse_2F_Text_MayGettingReady, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
RivalsHouse_2F_EventScript_Brendan:: @ 81F94ED
msgbox RivalsHouse_2F_Text_BrendanGettingReady, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
RivalsHouse_2F_EventScript_RivalPostLilycove:: @ 81F94F7
applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
2017-11-10 02:21:31 +01:00
waitmovement 0
checkplayergender
compare VAR_RESULT, MALE
call_if_eq RivalsHouse_2F_EventScript_MayPostLilycove
compare VAR_RESULT, FEMALE
call_if_eq RivalsHouse_2F_EventScript_BrendanPostLilycove
2019-01-02 22:12:43 +01:00
setflag FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE
2017-11-10 02:21:31 +01:00
releaseall
end
RivalsHouse_2F_EventScript_MayPostLilycove:: @ 81F951D
goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, RivalsHouse_2F_EventScript_MayWhereShouldIGoNext
msgbox RivalsHouse_2F_Text_MayJustCheckingMyPokedex, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
return
RivalsHouse_2F_EventScript_BrendanPostLilycove:: @ 81F952F
2019-10-28 14:28:08 +01:00
goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, RivalsHouse_2F_EventScript_BrendanWhereShouldIGoNext
msgbox RivalsHouse_2F_Text_BrendanJustCheckingMyPokedex, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
return
RivalsHouse_2F_EventScript_MayWhereShouldIGoNext:: @ 81F9541
msgbox RivalsHouse_2F_Text_MayWhereShouldIGoNext, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
return
2019-10-28 14:28:08 +01:00
RivalsHouse_2F_EventScript_BrendanWhereShouldIGoNext:: @ 81F954A
msgbox RivalsHouse_2F_Text_BrendanWhereShouldIGoNext, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
return
LittlerootTown_MaysHouse_2F_EventScript_PC:: @ 81F9553
lockall
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC
compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC
end
LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC:: @ 81F956C
2019-08-15 05:38:42 +02:00
msgbox gText_PokemonTrainerSchoolEmail, MSGBOX_DEFAULT
releaseall
end
LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC:: @ 81F9576
setvar VAR_0x8004, 2
special DoPCTurnOnEffect
playse SE_PC_ON
msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT
2018-03-12 09:26:20 +01:00
special BedroomPC
waitstate
releaseall
end
LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC:: @ 81F958F
2017-11-10 09:24:21 +01:00
setvar VAR_0x8004, 2
playse SE_PC_OFF
special DoPCTurnOffEffect
2017-11-10 09:24:21 +01:00
releaseall
end
RivalsHouse_2F_Text_MayWhoAreYou: @ 81F959C
.string "Huh?\n"
.string "Who… Who are you?\p"
.string "… … … … … … … …\n"
.string "… … … … … … … …\p"
2018-12-07 16:41:08 +01:00
.string "Oh, you're {PLAYER}{KUN}.\n"
.string "So your move was today.\p"
2018-12-07 16:41:08 +01:00
.string "Um… I'm MAY.\n"
.string "Glad to meet you!\p"
.string "I…\n"
.string "I have this dream of becoming friends\l"
.string "with POKéMON all over the world.\p"
.string "I… I heard about you, {PLAYER}{KUN}, from\n"
.string "my dad, PROF. BIRCH.\p"
.string "I was hoping that you would be nice,\n"
.string "{PLAYER}{KUN}, and that we could be friends.\p"
2018-12-07 16:41:08 +01:00
.string "Oh, this is silly, isn't it?\n"
.string "I… I've just met you, {PLAYER}{KUN}.\p"
.string "Eheheh…\p"
.string "Oh, no! I forgot!\p"
.string "I was supposed to go help Dad catch\n"
.string "some wild POKéMON!\p"
2018-12-07 16:41:08 +01:00
.string "{PLAYER}{KUN}, I'll catch you later!$"
RivalsHouse_2F_Text_MayGettingReady: @ 81F978A
.string "POKéMON fully restored!\n"
.string "Items ready, and…$"
RivalsHouse_2F_Text_BrendanWhoAreYou: @ 81F97B4
.string "Hey!\n"
.string "You…\p"
.string "Who are you?\p"
2018-12-07 16:41:08 +01:00
.string "Oh, you're {PLAYER}, aren't you?\n"
.string "Moved in next door, right?\p"
2018-12-07 16:41:08 +01:00
.string "I didn't know that you're a girl.\p"
.string "Dad, PROF. BIRCH, said that our new\n"
2018-12-07 16:41:08 +01:00
.string "next-door neighbor is a GYM LEADER's\l"
.string "kid, so I assumed you'd be a guy.\p"
.string "My name's BRENDAN.\n"
.string "So, hi, neighbor!\p"
2018-12-07 16:41:08 +01:00
.string "Huh? Hey, {PLAYER}, don't you have\n"
.string "a POKéMON?\p"
.string "Do you want me to go catch you one?\p"
.string "Aw, darn, I forgot…\p"
2018-12-07 16:41:08 +01:00
.string "I'm supposed to go help my dad catch\n"
.string "some wild POKéMON.\p"
.string "Some other time, okay?$"
RivalsHouse_2F_Text_BrendanGettingReady: @ 81F9962
.string "POKéMON fully restored…\n"
.string "Items all packed, and…$"
RivalsHouse_2F_Text_ItsRivalsPokeBall: @ 81F9991
2018-12-07 16:41:08 +01:00
.string "It's {RIVAL}'s POKé BALL!\p"
.string "Better leave it right where it is.$"
RivalsHouse_2F_Text_MayJustCheckingMyPokedex: @ 81F99C9
.string "MAY: {PLAYER}{KUN}!\p"
.string "I was just checking my POKéDEX.\p"
2018-12-07 16:41:08 +01:00
.string "There's still a lot of POKéMON that\n"
.string "I've seen but haven't caught.\p"
.string "And there are many others that\n"
.string "I think will evolve.\p"
.string "I wonder where I should go catch\n"
.string "some POKéMON next?$"
RivalsHouse_2F_Text_MayWhereShouldIGoNext: @ 81F9A9E
.string "MAY: I wonder where I should go catch\n"
.string "some POKéMON next?\p"
2018-12-07 16:41:08 +01:00
.string "Wouldn't it be funny if we ran into each\n"
.string "other, {PLAYER}{KUN}?$"
RivalsHouse_2F_Text_BrendanJustCheckingMyPokedex: @ 81F9B0D
2018-12-07 16:41:08 +01:00
.string "BRENDAN: Hey, it's {PLAYER}.\p"
.string "I was just checking out my POKéDEX.\p"
.string "There are still many POKéMON that\n"
.string "I need to catch, I know, but this\l"
.string "is looking pretty good.\p"
.string "Checking this POKéDEX out gives me\n"
.string "the urge to hit the road again.$"
RivalsHouse_2F_Text_BrendanWhereShouldIGoNext: @ 81F9BE7
2018-12-07 16:41:08 +01:00
.string "BRENDAN: I'm having a hard time deciding\n"
.string "where I should catch POKéMON next.\p"
2018-12-07 16:41:08 +01:00
.string "Hey, {PLAYER}, if I see you while I'm out\n"
.string "catching POKéMON, I can pitch you a\l"
2018-12-07 16:41:08 +01:00
.string "battle if you'd like.$"