2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_MapScripts::
|
2019-04-22 16:31:51 -04:00
|
|
|
map_script MAP_SCRIPT_ON_TRANSITION, ShoalCave_LowTideEntranceRoom_OnTransition
|
2017-11-09 19:21:31 -06:00
|
|
|
.byte 0
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_OnTransition:
|
2017-12-28 02:09:11 -06:00
|
|
|
special UpdateShoalTideFlag
|
2019-11-07 12:17:28 -05:00
|
|
|
goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideEntranceRoom_EventScript_SetHighTide
|
|
|
|
goto ShoalCave_LowTideEntranceRoom_EventScript_SetLowTide
|
2017-11-09 19:21:31 -06:00
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_SetHighTide::
|
2019-01-31 15:51:20 -06:00
|
|
|
setmaplayoutindex LAYOUT_SHOAL_CAVE_HIGH_TIDE_ENTRANCE_ROOM
|
2017-11-09 19:21:31 -06:00
|
|
|
end
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_SetLowTide::
|
2019-01-31 15:51:20 -06:00
|
|
|
setmaplayoutindex LAYOUT_SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM
|
2017-11-09 19:21:31 -06:00
|
|
|
end
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert::
|
2017-11-09 19:21:31 -06:00
|
|
|
lock
|
|
|
|
faceplayer
|
2019-02-12 00:40:34 -06:00
|
|
|
dotimebasedevents
|
2019-11-07 12:17:28 -05:00
|
|
|
call_if_set FLAG_SYS_SHOAL_ITEM, ShoalCave_LowTideEntranceRoom_EventScript_ResetShoalItems
|
2017-11-09 19:21:31 -06:00
|
|
|
checkitem ITEM_SHOAL_SALT, 4
|
2019-11-07 12:17:28 -05:00
|
|
|
compare VAR_RESULT, FALSE
|
|
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells
|
2017-11-09 19:21:31 -06:00
|
|
|
checkitem ITEM_SHOAL_SHELL, 4
|
2019-11-07 12:17:28 -05:00
|
|
|
compare VAR_RESULT, FALSE
|
|
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells
|
|
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_WouldYouLikeShellBell, MSGBOX_YESNO
|
2019-11-02 12:34:53 -04:00
|
|
|
compare VAR_RESULT, NO
|
2019-11-07 12:17:28 -05:00
|
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell
|
2017-11-09 19:21:31 -06:00
|
|
|
checkitemspace ITEM_SHELL_BELL, 1
|
2019-11-07 12:17:28 -05:00
|
|
|
compare VAR_RESULT, FALSE
|
|
|
|
call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed
|
2017-12-21 13:47:52 -06:00
|
|
|
compare VAR_RESULT, 2
|
2019-11-07 12:17:28 -05:00
|
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell
|
|
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_MakeShellBellRightAway, MSGBOX_DEFAULT
|
2020-01-12 23:24:52 -05:00
|
|
|
removeitem ITEM_SHOAL_SALT, 4
|
|
|
|
removeitem ITEM_SHOAL_SHELL, 4
|
2020-01-11 12:02:58 -05:00
|
|
|
giveitem ITEM_SHELL_BELL
|
2019-11-07 12:17:28 -05:00
|
|
|
compare VAR_RESULT, FALSE
|
2019-02-22 19:52:11 -05:00
|
|
|
goto_if_eq Common_EventScript_ShowBagIsFull
|
2019-11-07 12:17:28 -05:00
|
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_ExplainShellBell, MSGBOX_DEFAULT
|
2018-10-17 12:25:12 -04:00
|
|
|
setflag FLAG_TEMP_2
|
2017-11-09 19:21:31 -06:00
|
|
|
release
|
|
|
|
end
|
|
|
|
|
2019-11-07 12:17:28 -05:00
|
|
|
@ If the bag is full, check if a slot will be freed when 4 Shoal Salt or Shells are given
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed::
|
2017-11-09 19:21:31 -06:00
|
|
|
checkitem ITEM_SHOAL_SALT, 5
|
2019-11-07 12:17:28 -05:00
|
|
|
compare VAR_RESULT, TRUE
|
|
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells
|
2017-11-09 19:21:31 -06:00
|
|
|
return
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells::
|
2017-11-09 19:21:31 -06:00
|
|
|
checkitem ITEM_SHOAL_SHELL, 5
|
2019-11-07 12:17:28 -05:00
|
|
|
compare VAR_RESULT, TRUE
|
|
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed
|
2017-11-09 19:21:31 -06:00
|
|
|
return
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed::
|
2017-11-09 19:21:31 -06:00
|
|
|
setvar VAR_RESULT, 2
|
|
|
|
return
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell::
|
2019-11-07 12:17:28 -05:00
|
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_NoSpaceInYourBag, MSGBOX_DEFAULT
|
2017-11-09 19:21:31 -06:00
|
|
|
release
|
|
|
|
end
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells::
|
2017-11-09 19:21:31 -06:00
|
|
|
checkitem ITEM_SHOAL_SALT, 1
|
2019-11-07 12:17:28 -05:00
|
|
|
compare VAR_RESULT, TRUE
|
|
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
|
2017-11-09 19:21:31 -06:00
|
|
|
checkitem ITEM_SHOAL_SHELL, 1
|
2019-11-07 12:17:28 -05:00
|
|
|
compare VAR_RESULT, TRUE
|
|
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
|
|
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_AreYouPlanningOnGoingInThere, MSGBOX_DEFAULT
|
2017-11-09 19:21:31 -06:00
|
|
|
release
|
|
|
|
end
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell::
|
2019-11-07 12:17:28 -05:00
|
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_BringMe4ShoalSaltAndShells, MSGBOX_DEFAULT
|
2017-11-09 19:21:31 -06:00
|
|
|
release
|
|
|
|
end
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell::
|
2019-11-07 12:17:28 -05:00
|
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_WantedToMakeShellBell, MSGBOX_DEFAULT
|
2017-11-09 19:21:31 -06:00
|
|
|
release
|
|
|
|
end
|
|
|
|
|
2021-07-20 15:18:31 -04:00
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_ResetShoalItems::
|
2019-01-03 01:54:55 +00:00
|
|
|
clearflag FLAG_RECEIVED_SHOAL_SALT_1
|
|
|
|
clearflag FLAG_RECEIVED_SHOAL_SALT_2
|
|
|
|
clearflag FLAG_RECEIVED_SHOAL_SALT_3
|
|
|
|
clearflag FLAG_RECEIVED_SHOAL_SALT_4
|
|
|
|
clearflag FLAG_RECEIVED_SHOAL_SHELL_1
|
|
|
|
clearflag FLAG_RECEIVED_SHOAL_SHELL_2
|
|
|
|
clearflag FLAG_RECEIVED_SHOAL_SHELL_3
|
|
|
|
clearflag FLAG_RECEIVED_SHOAL_SHELL_4
|
2017-11-09 19:21:31 -06:00
|
|
|
clearflag FLAG_SYS_SHOAL_ITEM
|
|
|
|
return
|