2021-07-20 21:18:31 +02:00
|
|
|
NewMauville_Entrance_MapScripts::
|
2019-11-07 16:32:21 +01:00
|
|
|
map_script MAP_SCRIPT_ON_LOAD, NewMauville_Entrance_OnLoad
|
2019-04-05 01:28:37 +02:00
|
|
|
map_script MAP_SCRIPT_ON_TRANSITION, NewMauville_Entrance_OnTransition
|
2017-11-10 02:21:31 +01:00
|
|
|
.byte 0
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
NewMauville_Entrance_OnLoad:
|
2019-02-22 10:18:43 +01:00
|
|
|
compare VAR_NEW_MAUVILLE_STATE, 0
|
2019-11-07 16:32:21 +01:00
|
|
|
call_if_eq NewMauville_Entrance_EventScript_CloseDoor
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
NewMauville_Entrance_EventScript_CloseDoor::
|
2019-06-12 21:07:32 +02:00
|
|
|
setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile0, 1
|
|
|
|
setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile1, 1
|
|
|
|
setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile2, 1
|
|
|
|
setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile3, 1
|
|
|
|
setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile4, 1
|
|
|
|
setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile5, 1
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
NewMauville_Entrance_OnTransition:
|
2017-12-27 04:20:29 +01:00
|
|
|
setflag FLAG_LANDMARK_NEW_MAUVILLE
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
NewMauville_Entrance_EventScript_Door::
|
2017-11-10 02:21:31 +01:00
|
|
|
lockall
|
2019-11-21 05:12:51 +01:00
|
|
|
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
2019-11-07 16:32:21 +01:00
|
|
|
msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT
|
2017-11-10 02:21:31 +01:00
|
|
|
checkitem ITEM_BASEMENT_KEY, 1
|
2019-11-07 16:32:21 +01:00
|
|
|
compare VAR_RESULT, FALSE
|
|
|
|
goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor
|
|
|
|
msgbox NewMauville_Entrance_Text_UseBasementKey, MSGBOX_YESNO
|
2019-11-02 17:34:53 +01:00
|
|
|
compare VAR_RESULT, NO
|
2019-11-07 16:32:21 +01:00
|
|
|
goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor
|
|
|
|
msgbox NewMauville_Entrance_Text_UsedBasementKey, MSGBOX_DEFAULT
|
2019-06-12 21:07:32 +02:00
|
|
|
setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, 0
|
|
|
|
setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, 0
|
|
|
|
setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile2, 0
|
|
|
|
setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile3, 1
|
|
|
|
setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile4, 0
|
|
|
|
setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile5, 1
|
2017-11-10 02:21:31 +01:00
|
|
|
special DrawWholeMapView
|
2020-08-21 00:02:00 +02:00
|
|
|
playse SE_BANG
|
2019-02-22 10:18:43 +01:00
|
|
|
setvar VAR_NEW_MAUVILLE_STATE, 1
|
2017-11-10 02:21:31 +01:00
|
|
|
releaseall
|
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
NewMauville_Entrance_EventScript_DontOpenDoor::
|
2017-11-10 02:21:31 +01:00
|
|
|
releaseall
|
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
NewMauville_Entrance_Text_DoorIsLocked:
|
2017-11-10 02:21:31 +01:00
|
|
|
.string "The door is locked.$"
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
NewMauville_Entrance_Text_UseBasementKey:
|
2017-11-10 02:21:31 +01:00
|
|
|
.string "Use the BASEMENT KEY?$"
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
NewMauville_Entrance_Text_UsedBasementKey:
|
2017-11-10 02:21:31 +01:00
|
|
|
.string "{PLAYER} used the BASEMENT KEY.\p"
|
|
|
|
.string "The door opened!$"
|
|
|
|
|