pokeemerald/data/maps/OldaleTown/scripts.inc

404 lines
9.7 KiB
PHP
Raw Normal View History

2017-11-10 02:21:31 +01:00
OldaleTown_MapScripts:: @ 81E8EA2
map_script MAP_SCRIPT_ON_TRANSITION, OldaleTown_OnTransition
2017-11-10 02:21:31 +01:00
.byte 0
OldaleTown_OnTransition: @ 81E8EA8
call Common_EventScript_SetupRivalGfxId
2017-11-10 02:21:31 +01:00
setflag FLAG_VISITED_OLDALE_TOWN
2019-10-21 01:30:25 +02:00
call_if_unset FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_BlockWestEntrance
call_if_unset FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_MoveMartEmployee
call_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_SetOldaleState
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
@ This script seems pointless because nothing uses VAR_OLDALE_TOWN_STATE
OldaleTown_EventScript_SetOldaleState:: @ 81E8ECC
2019-08-05 17:23:45 +02:00
setvar VAR_OLDALE_TOWN_STATE, 1
2017-11-10 02:21:31 +01:00
return
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_BlockWestEntrance:: @ 81E8ED2
2017-11-10 02:21:31 +01:00
setobjectxyperm 3, 1, 11
setobjectmovementtype 3, MOVEMENT_TYPE_FACE_LEFT
2017-11-10 02:21:31 +01:00
return
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_MoveMartEmployee:: @ 81E8EDE
2017-11-10 02:21:31 +01:00
setobjectxyperm 2, 13, 14
setobjectmovementtype 2, MOVEMENT_TYPE_FACE_DOWN
2017-11-10 02:21:31 +01:00
return
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_CitySign:: @ 81E8EEA
msgbox OldaleTown_Text_CitySign, MSGBOX_SIGN
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_Girl:: @ 81E8EF3
msgbox OldaleTown_Text_SavingMyProgress, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_MartEmployee:: @ 81E8EFC
2017-11-10 02:21:31 +01:00
lock
faceplayer
2019-10-21 01:30:25 +02:00
goto_if_set FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_ExplainPotion
goto_if_set FLAG_TEMP_1, OldaleTown_EventScript_ExplainPotion
2018-10-17 18:25:12 +02:00
setflag FLAG_TEMP_1
2017-12-22 08:46:19 +01:00
playbgm MUS_TSURETEK, 0
2019-10-21 01:30:25 +02:00
msgbox OldaleTown_Text_IWorkAtPokemonMart, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
switch VAR_FACING
2019-10-21 01:30:25 +02:00
case DIR_SOUTH, OldaleTown_EventScript_GoToMartSouth
case DIR_NORTH, OldaleTown_EventScript_GoToMartNorth
case DIR_EAST, OldaleTown_EventScript_GoToMartEast
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_GoToMartSouth:: @ 81E8F47
applymovement 2, OldaleTown_Movement_EmployeeSouth
applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_PlayerSouth
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-21 01:30:25 +02:00
goto OldaleTown_EventScript_ExplainPokemonMart
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_GoToMartNorth:: @ 81E8F5E
applymovement 2, OldaleTown_Movement_EmployeeNorth
applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_PlayerNorth
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-21 01:30:25 +02:00
goto OldaleTown_EventScript_ExplainPokemonMart
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_GoToMartEast:: @ 81E8F75
applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_PlayerEast
applymovement 2, OldaleTown_Movement_EmployeeEast
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-21 01:30:25 +02:00
goto OldaleTown_EventScript_ExplainPokemonMart
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_ExplainPokemonMart:: @ 81E8F8C
msgbox OldaleTown_Text_ThisIsAPokemonMart, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
giveitem_std ITEM_POTION
compare VAR_RESULT, 0
2019-10-21 01:30:25 +02:00
goto_if_eq OldaleTown_EventScript_BagIsFull
msgbox OldaleTown_Text_PotionExplanation, MSGBOX_DEFAULT
2019-01-02 22:12:43 +01:00
setflag FLAG_RECEIVED_POTION_OLDALE
2017-11-10 02:21:31 +01:00
fadedefaultbgm
release
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_ExplainPotion:: @ 81E8FB9
msgbox OldaleTown_Text_PotionExplanation, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_BagIsFull:: @ 81E8FC3
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
fadedefaultbgm
release
end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_EmployeeEast: @ 81E8FCE
walk_up
walk_up
walk_up
walk_up
walk_up
walk_up
walk_up
walk_in_place_fastest_down
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_EmployeeSouth: @ 81E8FD7
walk_left
walk_up
walk_up
walk_right
walk_up
walk_up
walk_up
walk_up
walk_up
walk_in_place_fastest_down
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_EmployeeNorth: @ 81E8FE2
walk_up
walk_up
walk_up
walk_up
walk_up
walk_up
walk_up
walk_in_place_fastest_down
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_Unknown1: @ 81E8FEB
walk_up
walk_up
walk_right
walk_right
walk_right
walk_right
walk_up
walk_up
walk_up
walk_up
walk_up
delay_8
walk_in_place_fastest_down
step_end
2017-11-10 02:21:31 +01:00
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_PlayerEast: @ 81E8FF9
walk_right
walk_up
walk_up
walk_up
walk_up
walk_up
walk_up
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_PlayerSouth: @ 81E9001
delay_16
delay_16
delay_16
delay_16
walk_up
walk_up
walk_up
walk_up
walk_up
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_PlayerNorth: @ 81E900B
walk_up
walk_up
walk_up
walk_up
walk_up
walk_up
walk_up
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_Unknown2: @ 81E9013
walk_left
walk_up
walk_up
walk_right
walk_right
walk_right
walk_right
walk_up
walk_up
walk_up
walk_up
step_end
2017-11-10 02:21:31 +01:00
OldaleTown_EventScript_1E901F:: @ 81E901F
lock
faceplayer
2019-10-21 01:30:25 +02:00
goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_NotBlockingPath
msgbox OldaleTown_Text_DiscoveredFootprints, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
applymovement 3, Common_Movement_FaceOriginalDirection
2017-11-10 02:21:31 +01:00
waitmovement 0
release
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_BlockedPath:: @ 81E903F
2017-11-10 02:21:31 +01:00
lockall
2019-10-21 01:30:25 +02:00
applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_PlayerStepBack
applymovement 3, OldaleTown_Movement_BackUp
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-21 01:30:25 +02:00
msgbox OldaleTown_Text_WaitDontComeInHere, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
2019-10-21 01:30:25 +02:00
applymovement 3, OldaleTown_Movement_ReturnToOriginalPosition
2017-11-10 02:21:31 +01:00
waitmovement 0
releaseall
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_NotBlockingPath:: @ 81E9066
msgbox OldaleTown_Text_FinishedSketchingFootprints, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_Rival:: @ 81E9070
2017-11-10 02:21:31 +01:00
lockall
applymovement 4, Common_Movement_FacePlayer
2017-11-10 02:21:31 +01:00
waitmovement 0
setvar VAR_0x8009, 0
2019-10-21 01:30:25 +02:00
goto OldaleTown_EventScript_ShowRivalMessage
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_RivalTrigger1:: @ 81E9086
2017-11-10 02:21:31 +01:00
lockall
2019-10-21 01:30:25 +02:00
applymovement 4, OldaleTown_Movement_RivalApproachPlayer1
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-06 19:55:30 +02:00
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
2017-11-10 02:21:31 +01:00
waitmovement 0
setvar VAR_0x8009, 1
2019-10-21 01:30:25 +02:00
goto OldaleTown_EventScript_ShowRivalMessage
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_RivalTrigger2:: @ 81E90A6
2017-11-10 02:21:31 +01:00
lockall
2019-10-21 01:30:25 +02:00
applymovement 4, OldaleTown_Movement_RivalApproachPlayer2
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-06 19:55:30 +02:00
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
2017-11-10 02:21:31 +01:00
waitmovement 0
setvar VAR_0x8009, 1
2019-10-21 01:30:25 +02:00
goto OldaleTown_EventScript_ShowRivalMessage
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_RivalTrigger3:: @ 81E90C6
2017-11-10 02:21:31 +01:00
lockall
2019-10-21 01:30:25 +02:00
applymovement 4, OldaleTown_Movement_RivalApproachPlayer3
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-06 19:55:30 +02:00
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
2017-11-10 02:21:31 +01:00
waitmovement 0
setvar VAR_0x8009, 1
2019-10-21 01:30:25 +02:00
goto OldaleTown_EventScript_ShowRivalMessage
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_ShowRivalMessage:: @ 81E90E6
2017-11-10 02:21:31 +01:00
checkplayergender
compare VAR_RESULT, MALE
2019-10-21 01:30:25 +02:00
goto_if_eq OldaleTown_EventScript_ShowMayMessage
compare VAR_RESULT, FEMALE
2019-10-21 01:30:25 +02:00
goto_if_eq OldaleTown_EventScript_ShowBrendanMessage
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_ShowMayMessage:: @ 81E90FE
msgbox OldaleTown_Text_MayLetsGoBack, MSGBOX_DEFAULT
goto OldaleTown_EventScript_RivalFinish
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_ShowBrendanMessage:: @ 81E910C
msgbox OldaleTown_Text_BrendanLetsGoBack, MSGBOX_DEFAULT
goto OldaleTown_EventScript_RivalFinish
2017-11-10 02:21:31 +01:00
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_RivalFinish:: @ 81E911A
2017-11-10 02:21:31 +01:00
closemessage
compare VAR_0x8009, 0
2019-10-21 01:30:25 +02:00
call_if_eq OldaleTown_EventScript_DoExitMovement1
compare VAR_0x8009, 1
2019-10-21 01:30:25 +02:00
call_if_eq OldaleTown_EventScript_DoExitMovement2
applymovement 4, OldaleTown_Movement_RivalExit
2017-11-10 02:21:31 +01:00
waitmovement 0
removeobject 4
2019-08-05 17:23:45 +02:00
setvar VAR_OLDALE_RIVAL_STATE, 2
2018-10-18 21:28:59 +02:00
setflag FLAG_HIDE_OLDALE_TOWN_RIVAL
2017-11-10 02:21:31 +01:00
releaseall
end
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_DoExitMovement1:: @ 81E9148
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_SOUTH
2019-10-21 01:30:25 +02:00
goto_if_ne OldaleTown_EventScript_DoExitMovement2
applymovement 4, OldaleTown_Movement_RivalExit
2017-11-10 02:21:31 +01:00
waitmovement 0
return
2019-10-21 01:30:25 +02:00
OldaleTown_EventScript_DoExitMovement2:: @ 81E915E
applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_WatchRivalExit
applymovement 4, OldaleTown_Movement_RivalExit
2017-11-10 02:21:31 +01:00
waitmovement 0
return
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_RivalApproachPlayer1: @ 81E9170
walk_left
walk_left
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_RivalApproachPlayer2: @ 81E9173
walk_left
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_RivalApproachPlayer3: @ 81E9175
face_left
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_RivalExit: @ 81E9177
walk_down
walk_down
walk_down
walk_down
walk_down
walk_down
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_WatchRivalExit: @ 81E917E
delay_8
delay_4
walk_in_place_fastest_down
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_PlayerStepBack: @ 81E9182
delay_8
walk_right
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_BackUp: @ 81E9185
walk_fast_up
walk_in_place_fastest_left
lock_facing_direction
walk_right
unlock_facing_direction
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Movement_ReturnToOriginalPosition: @ 81E918B
walk_down
walk_left
2017-11-10 02:21:31 +01:00
step_end
2019-10-21 01:30:25 +02:00
OldaleTown_Text_SavingMyProgress: @ 81E918E
2018-12-07 16:41:08 +01:00
.string "I want to take a rest, so I'm saving my\n"
2017-11-10 02:21:31 +01:00
.string "progress.$"
2019-10-21 01:30:25 +02:00
OldaleTown_Text_IWorkAtPokemonMart: @ 81E91C0
2017-11-10 02:21:31 +01:00
.string "Hi!\n"
.string "I work at a POKéMON MART.\p"
.string "Can I get you to come with me?$"
2019-10-21 01:30:25 +02:00
OldaleTown_Text_ThisIsAPokemonMart: @ 81E91FD
2017-11-10 02:21:31 +01:00
.string "This is a POKéMON MART.\n"
.string "Just look for our blue roof.\p"
.string "We sell a variety of goods including\n"
.string "POKé BALLS for catching POKéMON.\p"
2018-12-07 16:41:08 +01:00
.string "Here, I'd like you to have this as\n"
2017-11-10 02:21:31 +01:00
.string "a promotional item.$"
2019-10-21 01:30:25 +02:00
OldaleTown_Text_PotionExplanation: @ 81E92AF
2018-12-07 16:41:08 +01:00
.string "A POTION can be used anytime, so it's\n"
2017-11-10 02:21:31 +01:00
.string "even more useful than a POKéMON CENTER\l"
.string "in certain situations.$"
2019-10-21 01:30:25 +02:00
OldaleTown_Text_WaitDontComeInHere: @ 81E9313
2017-11-10 02:21:31 +01:00
.string "Aaaaah! Wait!\n"
2018-12-07 16:41:08 +01:00
.string "Please don't come in here.\p"
2017-11-10 02:21:31 +01:00
.string "I just discovered the footprints of\n"
.string "a rare POKéMON!\p"
.string "Wait until I finish sketching\n"
.string "them, okay?$"
2019-10-21 01:30:25 +02:00
OldaleTown_Text_DiscoveredFootprints: @ 81E939A
2017-11-10 02:21:31 +01:00
.string "I just discovered the footprints of\n"
.string "a rare POKéMON!\p"
.string "Wait until I finish sketching\n"
.string "them, okay?$"
2019-10-21 01:30:25 +02:00
OldaleTown_Text_FinishedSketchingFootprints: @ 81E93F8
2017-11-10 02:21:31 +01:00
.string "I finished sketching the footprints of\n"
.string "a rare POKéMON.\p"
.string "But it turns out they were only my\n"
.string "own footprints…$"
2019-10-21 01:30:25 +02:00
OldaleTown_Text_MayLetsGoBack: @ 81E9462
2017-11-10 02:21:31 +01:00
.string "MAY: {PLAYER}{KUN}!\n"
.string "Over here!\l"
2018-12-07 16:41:08 +01:00
.string "Let's hurry home!$"
2017-11-10 02:21:31 +01:00
2019-10-21 01:30:25 +02:00
OldaleTown_Text_BrendanLetsGoBack: @ 81E948A
2018-12-07 16:41:08 +01:00
.string "BRENDAN: I'm heading back to my dad's\n"
2017-11-10 02:21:31 +01:00
.string "LAB now.\l"
.string "{PLAYER}, you should hustle back, too.$"
2019-10-21 01:30:25 +02:00
OldaleTown_Text_CitySign: @ 81E94DA
2017-11-10 02:21:31 +01:00
.string "OLDALE TOWN\n"
.string "“Where things start off scarce.”$"