pokeemerald/data/maps/SafariZone_South/scripts.inc

153 lines
4.0 KiB
PHP
Raw Normal View History

.set LOCALID_ATTENDANT, 1
2021-07-20 21:18:31 +02:00
SafariZone_South_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, SafariZone_South_OnTransition
2019-10-20 09:46:05 +02:00
map_script MAP_SCRIPT_ON_FRAME_TABLE, SafariZone_South_OnFrame
2017-11-10 02:21:31 +01:00
.byte 0
2021-07-20 21:18:31 +02:00
SafariZone_South_OnFrame:
2019-10-20 09:46:05 +02:00
map_script_2 VAR_SAFARI_ZONE_STATE, 2, SafariZone_South_EventScript_EnterSafariZone
2017-11-10 02:21:31 +01:00
.2byte 0
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_EnterSafariZone::
2017-11-10 02:21:31 +01:00
lockall
applymovement OBJ_EVENT_ID_PLAYER, SafariZone_South_Movement_PlayerEnter
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement LOCALID_ATTENDANT, SafariZone_South_Movement_ExitAttendantBlockDoor
2017-11-10 02:21:31 +01:00
waitmovement 0
setobjectxyperm LOCALID_ATTENDANT, 32, 34
2019-02-22 10:18:43 +01:00
setvar VAR_SAFARI_ZONE_STATE, 0
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SafariZone_South_OnTransition:
call_if_eq VAR_SAFARI_ZONE_STATE, 2, SafariZone_South_EventScript_SetExitAttendantAside
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_SetExitAttendantAside::
setobjectxyperm LOCALID_ATTENDANT, 31, 34
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SafariZone_South_Movement_PlayerEnter:
walk_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SafariZone_South_Movement_ExitAttendantBlockDoor:
walk_right
walk_in_place_faster_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_Boy::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_South_Text_Boy, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_Man::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_South_Text_Man, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_Youngster::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_South_Text_Youngster, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_ExitAttendant::
2017-11-10 02:21:31 +01:00
lock
faceplayer
2019-10-20 09:46:05 +02:00
goto_if_unset FLAG_GOOD_LUCK_SAFARI_ZONE, SafariZone_South_EventScript_GoodLuck
msgbox SafariZone_South_Text_StillHaveTimeExit, MSGBOX_YESNO
goto_if_eq VAR_RESULT, YES, SafariZone_South_EventScript_ExitEarly
2019-10-20 09:46:05 +02:00
msgbox SafariZone_South_Text_EnjoyTheRestOfYourAdventure, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_GoodLuck::
2019-01-02 22:12:43 +01:00
setflag FLAG_GOOD_LUCK_SAFARI_ZONE
2019-10-20 09:46:05 +02:00
msgbox SafariZone_South_Text_GoodLuck, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_ExitEarly::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_South_Text_ExitEarlyThankYouForPlaying, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
switch VAR_FACING
2019-10-20 09:46:05 +02:00
case DIR_NORTH, SafariZone_South_EventScript_ExitEarlyNorth
case DIR_EAST, SafariZone_South_EventScript_ExitEarlyEast
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_ExitEarlyNorth::
applymovement LOCALID_ATTENDANT, SafariZone_South_Movement_MoveExitAttendantNorth
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, SafariZone_South_Movement_PlayerExitNorth
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-20 09:46:05 +02:00
goto SafariZone_South_EventScript_Exit
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_ExitEarlyEast::
applymovement LOCALID_ATTENDANT, SafariZone_South_Movement_MoveExitAttendantEast
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, SafariZone_South_Movement_PlayerExitEast
2017-11-10 02:21:31 +01:00
waitmovement 0
2019-10-20 09:46:05 +02:00
goto SafariZone_South_EventScript_Exit
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_Exit::
2019-02-22 10:18:43 +01:00
setvar VAR_SAFARI_ZONE_STATE, 1
2017-11-10 02:21:31 +01:00
special ExitSafariMode
warpdoor MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 2, 5
2017-11-10 02:21:31 +01:00
waitstate
end
2021-07-20 21:18:31 +02:00
SafariZone_South_Movement_PlayerExitNorth:
walk_up
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SafariZone_South_Movement_PlayerExitEast:
walk_right
walk_in_place_faster_up
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SafariZone_South_Movement_MoveExitAttendantNorth:
walk_left
walk_in_place_faster_right
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SafariZone_South_Movement_MoveExitAttendantEast:
walk_down
walk_in_place_faster_up
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_ConstructionWorker1::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_South_Text_AreaOffLimits1, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_Southeast_EventScript_ExpansionZoneAttendant::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_Southeast_Text_ExpansionIsFinished, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_South_EventScript_ConstructionWorker2::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_South_Text_AreaOffLimits2, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_Southeast_EventScript_LittleGirl::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_Southeast_Text_LittleGirl, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_Southeast_EventScript_FatMan::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_Southeast_Text_FatMan, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_Southeast_EventScript_RichBoy::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_Southeast_Text_RichBoy, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_Northeast_EventScript_Boy::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_Northeast_Text_Boy, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_Northeast_EventScript_Woman::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_Northeast_Text_Woman, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SafariZone_Northeast_EventScript_Girl::
2019-10-20 09:46:05 +02:00
msgbox SafariZone_Northeast_Text_Girl, MSGBOX_NPC
2017-11-10 02:21:31 +01:00
end