2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_MapScripts::
|
2017-11-10 02:21:31 +01:00
|
|
|
.byte 0
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_Attendant::
|
2017-11-10 02:21:31 +01:00
|
|
|
lock
|
|
|
|
faceplayer
|
|
|
|
setvar VAR_0x8004, 0
|
2019-11-04 22:41:42 +01:00
|
|
|
call_if_unset FLAG_TEMP_2, LilycoveCity_DepartmentStoreElevator_EventScript_SetFloor
|
2017-11-10 02:21:31 +01:00
|
|
|
copyvar VAR_0x8005, VAR_DEPT_STORE_FLOOR
|
2019-09-14 02:22:09 +02:00
|
|
|
special ShowDeptStoreElevatorFloorSelect
|
2019-08-15 05:38:42 +02:00
|
|
|
message gText_WhichFloorWouldYouLike
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmessage
|
|
|
|
setvar VAR_0x8004, 0
|
2019-09-13 20:24:07 +02:00
|
|
|
specialvar VAR_RESULT, GetDeptStoreDefaultFloorChoice
|
2017-11-10 02:21:31 +01:00
|
|
|
switch VAR_RESULT
|
2019-11-04 22:41:42 +01:00
|
|
|
case 0, LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom5th
|
|
|
|
case 1, LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom4th
|
|
|
|
case 2, LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom3rd
|
|
|
|
case 3, LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom2nd
|
|
|
|
case 4, LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom1st
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2019-11-04 22:41:42 +01:00
|
|
|
@ Below scripts ensure the cursor for floor select always starts on the current floor
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom5th::
|
2021-03-31 06:35:56 +02:00
|
|
|
multichoicedefault 0, 0, MULTI_FLOORS, 0, FALSE
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom4th::
|
2021-03-31 06:35:56 +02:00
|
|
|
multichoicedefault 0, 0, MULTI_FLOORS, 1, FALSE
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom3rd::
|
2021-03-31 06:35:56 +02:00
|
|
|
multichoicedefault 0, 0, MULTI_FLOORS, 2, FALSE
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom2nd::
|
2021-03-31 06:35:56 +02:00
|
|
|
multichoicedefault 0, 0, MULTI_FLOORS, 3, FALSE
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloorFrom1st::
|
2021-03-31 06:35:56 +02:00
|
|
|
multichoicedefault 0, 0, MULTI_FLOORS, 4, FALSE
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor::
|
2017-11-10 02:21:31 +01:00
|
|
|
switch VAR_RESULT
|
2019-11-04 22:41:42 +01:00
|
|
|
case 0, LilycoveCity_DepartmentStoreElevator_EventScript_5thFloor
|
|
|
|
case 1, LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor
|
|
|
|
case 2, LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor
|
|
|
|
case 3, LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor
|
|
|
|
case 4, LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor
|
|
|
|
case 5, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
|
|
|
case MULTI_B_PRESSED, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor::
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_1F
|
2018-06-15 05:00:09 +02:00
|
|
|
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 255, 2, 1
|
2019-09-13 20:24:07 +02:00
|
|
|
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
|
|
|
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor::
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_2F
|
2018-06-15 05:00:09 +02:00
|
|
|
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 255, 2, 1
|
2019-09-13 20:24:07 +02:00
|
|
|
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
|
|
|
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor::
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_3F
|
2018-06-15 05:00:09 +02:00
|
|
|
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 255, 2, 1
|
2019-09-13 20:24:07 +02:00
|
|
|
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
|
|
|
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor::
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_4F
|
2018-06-15 05:00:09 +02:00
|
|
|
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 255, 2, 1
|
2019-09-13 20:24:07 +02:00
|
|
|
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
|
|
|
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_5thFloor::
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_5F
|
2018-06-15 05:00:09 +02:00
|
|
|
setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 255, 2, 1
|
2019-09-13 20:24:07 +02:00
|
|
|
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
|
|
|
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
|
2019-09-13 20:24:07 +02:00
|
|
|
setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F
|
2019-11-04 22:41:42 +01:00
|
|
|
goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect::
|
2019-09-14 02:22:09 +02:00
|
|
|
special CloseDeptStoreElevatorWindow
|
2017-11-10 02:21:31 +01:00
|
|
|
release
|
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator::
|
2019-09-14 02:22:09 +02:00
|
|
|
special CloseDeptStoreElevatorWindow
|
2017-11-10 02:21:31 +01:00
|
|
|
closemessage
|
2019-10-06 19:55:30 +02:00
|
|
|
applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
|
|
|
waitse
|
2019-09-14 02:22:09 +02:00
|
|
|
special MoveElevator
|
2017-11-10 02:21:31 +01:00
|
|
|
waitstate
|
2018-10-17 18:25:12 +02:00
|
|
|
setflag FLAG_TEMP_2
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
LilycoveCity_DepartmentStoreElevator_EventScript_SetFloor::
|
2019-09-13 20:24:07 +02:00
|
|
|
special SetDeptStoreFloor
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|