pokeemerald/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
2020-08-20 19:06:14 -04:00

423 lines
14 KiB
PHP

.set LOCALID_MOM, 1
.set LOCALID_RIVAL_MOM, 4
.set LOCALID_RIVAL, 7
LittlerootTown_MaysHouse_1F_MapScripts:: @ 81F88A5
map_script MAP_SCRIPT_ON_LOAD, LittlerootTown_MaysHouse_1F_OnLoad
map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_1F_OnTransition
map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_MaysHouse_1F_OnFrame
.byte 0
LittlerootTown_MaysHouse_1F_OnLoad: @ 81F88B5
compare VAR_LITTLEROOT_INTRO_STATE, 6
call_if_lt LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes
call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual
end
LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes:: @ 81F88CA
setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1
setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1
return
LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual:: @ 81F88DD
checkplayergender
compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual
return
LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual:: @ 81F88EA
setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, 1
return
LittlerootTown_MaysHouse_1F_OnTransition: @ 81F88F4
compare VAR_LITTLEROOT_INTRO_STATE, 3
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToDoor
compare VAR_LITTLEROOT_INTRO_STATE, 5
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs
compare VAR_LITTLEROOT_INTRO_STATE, 6
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToTV
end
LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs:: @ 81F8916
setobjectxyperm LOCALID_MOM, 2, 4
setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_UP
return
LittlerootTown_MaysHouse_1F_EventScript_MoveMomToTV:: @ 81F8922
setobjectxyperm LOCALID_MOM, 6, 5
setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_UP
return
LittlerootTown_MaysHouse_1F_EventScript_MoveMomToDoor:: @ 81F892E
setobjectxyperm LOCALID_MOM, 1, 8
setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_UP
return
@ Many of the below scripts have no gender check because they assume youre in the correct house
LittlerootTown_MaysHouse_1F_OnFrame: @ 81F893A
map_script_2 VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_MaysHouse_1F_EventScript_EnterHouseMovingIn
map_script_2 VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_MaysHouse_1F_EventScript_GoUpstairsToSetClock
map_script_2 VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_MaysHouse_1F_EventScript_PetalburgGymReport
map_script_2 VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 1, LittlerootTown_MaysHouse_1F_EventScript_YoureNewNeighbor
map_script_2 VAR_LITTLEROOT_HOUSES_STATE_MAY, 3, PlayersHouse_1F_EventScript_GetSSTicketAndSeeLatiTV
.2byte 0
LittlerootTown_MaysHouse_1F_EventScript_GoUpstairsToSetClock:: @ 81F8964
lockall
msgbox PlayersHouse_1F_Text_GoSetTheClock, MSGBOX_DEFAULT
closemessage
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs
applymovement LOCALID_MOM, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs
waitmovement 0
warp MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 255, 1, 1
waitstate
releaseall
end
LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs: @ 81F898A
walk_up
step_end
LittlerootTown_MaysHouse_1F_EventScript_EnterHouseMovingIn:: @ 81F898C
lockall
setvar VAR_0x8004, LOCALID_MOM
setvar VAR_0x8005, FEMALE
goto PlayersHouse_1F_EventScript_EnterHouseMovingIn
end
LittlerootTown_MaysHouse_1F_EventScript_PetalburgGymReport:: @ 81F899D
lockall
setvar VAR_0x8004, FEMALE
setvar VAR_0x8005, LOCALID_MOM
goto PlayersHouse_1F_EventScript_PetalburgGymReportFemale
end
LittlerootTown_MaysHouse_1F_EventScript_YoureNewNeighbor:: @ 81F89AE
lockall
playse SE_PIN
applymovement LOCALID_RIVAL_MOM, Common_Movement_ExclamationMark
waitmovement 0
applymovement LOCALID_RIVAL_MOM, Common_Movement_Delay48
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
applymovement LOCALID_RIVAL_MOM, LittlerootTown_MaysHouse_1F_Movement_RivalMomApproach
waitmovement 0
special GetRivalSonDaughterString
msgbox RivalsHouse_1F_Text_OhYoureTheNewNeighbor, MSGBOX_DEFAULT
setflag FLAG_MET_RIVAL_MOM
setvar VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 2
releaseall
end
LittlerootTown_MaysHouse_1F_Movement_RivalMomApproach: @ 81F89EC
walk_down
walk_left
walk_left
walk_left
walk_left
walk_left
step_end
RivalsHouse_1F_EventScript_RivalMom:: @ 81F89F3
lock
faceplayer
goto_if_set FLAG_DEFEATED_RIVAL_ROUTE103, RivalsHouse_1F_EventScript_GoHomeEverySoOften
goto_if_set FLAG_SYS_POKEMON_GET, RivalsHouse_1F_EventScript_RivalIsOnRoute103
compare VAR_LITTLEROOT_RIVAL_STATE, 3
goto_if_eq RivalsHouse_1F_EventScript_RivalTooBusy
special GetRivalSonDaughterString
msgbox RivalsHouse_1F_Text_LikeChildLikeFather, MSGBOX_DEFAULT
release
end
RivalsHouse_1F_EventScript_RivalTooBusy:: @ 81F8A1F
msgbox RivalsHouse_1F_Text_TooBusyToNoticeVisit, MSGBOX_DEFAULT
release
end
RivalsHouse_1F_EventScript_RivalIsOnRoute103:: @ 81F8A29
msgbox RivalsHouse_1F_Text_WentOutToRoute103, MSGBOX_DEFAULT
release
end
RivalsHouse_1F_EventScript_GoHomeEverySoOften:: @ 81F8A33
msgbox RivalsHouse_1F_Text_ShouldGoHomeEverySoOften, MSGBOX_DEFAULT
release
end
RivalsHouse_1F_EventScript_RivalSibling:: @ 81F8A3D
lock
faceplayer
special GetPlayerBigGuyGirlString
msgbox RivalsHouse_1F_Text_DoYouHavePokemon, MSGBOX_DEFAULT
release
end
LittlerootTown_MaysHouse_1F_EventScript_GoSeeRoom:: @ 81F8A4C
lockall
setvar VAR_0x8004, LOCALID_MOM
setvar VAR_0x8005, FEMALE
applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestRight
waitmovement 0
goto PlayersHouse_1F_EventScript_MomGoSeeRoom
end
LittlerootTown_MaysHouse_1F_EventScript_MeetRival0:: @ 81F8A67
lockall
setvar VAR_0x8008, 0
goto LittlerootTown_MaysHouse_1F_EventScript_MeetRival
end
LittlerootTown_MaysHouse_1F_EventScript_MeetRival1:: @ 81F8A73
lockall
setvar VAR_0x8008, 1
goto LittlerootTown_MaysHouse_1F_EventScript_MeetRival
end
LittlerootTown_MaysHouse_1F_EventScript_MeetRival2:: @ 81F8A7F
lockall
setvar VAR_0x8008, 2
goto LittlerootTown_MaysHouse_1F_EventScript_MeetRival
end
LittlerootTown_MaysHouse_1F_EventScript_MeetRival:: @ 81F8A8B
playse SE_EXIT
delay 10
addobject LOCALID_RIVAL
delay 30
playse SE_PIN
applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark
waitmovement 0
applymovement LOCALID_RIVAL, Common_Movement_Delay48
waitmovement 0
compare VAR_0x8008, 1
call_if_ne LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay
playbgm MUS_ENCOUNTER_MAY, 1
compare VAR_0x8008, 0
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer0
compare VAR_0x8008, 1
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer1
compare VAR_0x8008, 2
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2
msgbox RivalsHouse_1F_Text_MayWhoAreYou, MSGBOX_DEFAULT
closemessage
compare VAR_0x8008, 0
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs0
compare VAR_0x8008, 1
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1
compare VAR_0x8008, 2
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2
playse SE_EXIT
removeobject LOCALID_RIVAL
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MAY
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL
clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM
delay 30
setvar VAR_LITTLEROOT_RIVAL_STATE, 3
setvar VAR_LITTLEROOT_TOWN_STATE, 1
savebgm MUS_DUMMY
fadedefaultbgm
releaseall
end
LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay:: @ 81F8B2A
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown
waitmovement 0
return
LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer0:: @ 81F8B35
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer0
waitmovement 0
return
LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer1:: @ 81F8B40
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer1
waitmovement 0
return
LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2:: @ 81F8B4B
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer2
waitmovement 0
return
LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer0: @ 81F8B56
walk_in_place_fastest_left
walk_left
walk_in_place_fastest_up
walk_up
walk_up
walk_up
walk_up
step_end
LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer1: @ 81F8B5E
walk_up
walk_up
walk_up
step_end
LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer2: @ 81F8B62
walk_in_place_fastest_right
walk_right
walk_in_place_fastest_up
walk_up
walk_up
walk_up
walk_up
step_end
LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs0:: @ 81F8B6A
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit0
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs0
waitmovement 0
return
LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1:: @ 81F8B7C
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit1
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs1
waitmovement 0
return
LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2:: @ 81F8B8E
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit2
applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs2
waitmovement 0
return
LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit0: @ 81F8BA0
delay_16
delay_8
walk_in_place_fastest_right
step_end
LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit1: @ 81F8BA4
delay_16
delay_8
walk_in_place_fastest_right
delay_16
delay_16
walk_in_place_fastest_up
step_end
LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit2: @ 81F8BAB
delay_16
delay_8
walk_in_place_fastest_left
step_end
LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs0: @ 81F8BAF
walk_in_place_fastest_right
walk_right
walk_in_place_fastest_up
walk_up
walk_up
step_end
LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs1: @ 81F8BB5
walk_in_place_fastest_right
walk_right
walk_in_place_fastest_up
walk_up
walk_up
walk_in_place_fastest_left
walk_left
walk_in_place_fastest_up
walk_up
step_end
LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs2: @ 81F8BBF
walk_in_place_fastest_left
walk_left
walk_in_place_fastest_up
walk_up
walk_up
step_end
RivalsHouse_1F_Text_OhYoureTheNewNeighbor: @ 81F8BC5
.string "Oh, hello. And you are?\p"
.string "… … … … … … … … …\n"
.string "… … … … … … … … …\p"
.string "Oh, you're {PLAYER}{KUN}, our new next-door\n"
.string "neighbor! Hi!\p"
.string "We have a {STR_VAR_1} about the same\n"
.string "age as you.\p"
.string "Our {STR_VAR_1} was excited about making\n"
.string "a new friend.\p"
.string "Our {STR_VAR_1} is upstairs, I think.$"
RivalsHouse_1F_Text_LikeChildLikeFather: @ 81F8CA5
.string "Like child, like father.\p"
.string "My husband is as wild about POKéMON\n"
.string "as our child.\p"
.string "If he's not at his LAB, he's likely\n"
.string "scrabbling about in grassy places.$"
RivalsHouse_1F_Text_TooBusyToNoticeVisit: @ 81F8D37
.string "That {RIVAL}!\p"
.string "I guess our child is too busy with\n"
.string "POKéMON to notice that you came\l"
.string "to visit, {PLAYER}{KUN}.$"
RivalsHouse_1F_Text_WentOutToRoute103: @ 81F8D93
.string "Oh, {RIVAL} went out to ROUTE 103\n"
.string "just a little while ago.\p"
.string "Like father, like child.\n"
.string "{RIVAL} can't stay quietly at home.$"
RivalsHouse_1F_Text_ShouldGoHomeEverySoOften: @ 81F8E01
.string "I think it's wonderful for people to\n"
.string "travel with POKéMON.\p"
.string "But you should go home every so often\n"
.string "to let your mother know you're okay.\p"
.string "She might not say it, but I'm sure she\n"
.string "worries about you, {PLAYER}{KUN}.$"
RivalsHouse_1F_Text_MayWhoAreYou: @ 81F8EC6
.string "Huh?\n"
.string "Who… Who are you?\p"
.string "… … … … … … … …\n"
.string "… … … … … … … …\p"
.string "Oh, you're {PLAYER}{KUN}.\n"
.string "So your move was today.\p"
.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"
.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"
.string "{PLAYER}{KUN}, I'll catch you later!$"
RivalsHouse_1F_Text_BrendanWhoAreYou: @ 81F90B4
.string "Hey!\n"
.string "You…\p"
.string "Who are you?\p"
.string "Oh, you're {PLAYER}, aren't you?\n"
.string "Moved in next door, right?\p"
.string "I didn't know that you're a girl.\p"
.string "Dad, PROF. BIRCH, said that our new\n"
.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"
.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"
.string "I'm supposed to go help my dad catch\n"
.string "some wild POKéMON.\p"
.string "Some other time, okay?$"
RivalsHouse_1F_Text_DoYouHavePokemon: @ 81F9262
.string "Hi, neighbor!\p"
.string "Do you already have your\n"
.string "own POKéMON?$"