mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-29 13:50:42 +01:00
102 lines
3.8 KiB
PHP
102 lines
3.8 KiB
PHP
ShoalCave_LowTideEntranceRoom_MapScripts:: @ 8236DBA
|
|
map_script MAP_SCRIPT_ON_TRANSITION, ShoalCave_LowTideEntranceRoom_OnTransition
|
|
.byte 0
|
|
|
|
ShoalCave_LowTideEntranceRoom_OnTransition: @ 8236DC0
|
|
special UpdateShoalTideFlag
|
|
goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideEntranceRoom_EventScript_SetHighTide
|
|
goto ShoalCave_LowTideEntranceRoom_EventScript_SetLowTide
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_SetHighTide:: @ 8236DD1
|
|
setmaplayoutindex LAYOUT_SHOAL_CAVE_HIGH_TIDE_ENTRANCE_ROOM
|
|
end
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_SetLowTide:: @ 8236DD5
|
|
setmaplayoutindex LAYOUT_SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM
|
|
end
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert:: @ 8236DD9
|
|
lock
|
|
faceplayer
|
|
dotimebasedevents
|
|
call_if_set FLAG_SYS_SHOAL_ITEM, ShoalCave_LowTideEntranceRoom_EventScript_ResetShoalItems
|
|
checkitem ITEM_SHOAL_SALT, 4
|
|
compare VAR_RESULT, FALSE
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells
|
|
checkitem ITEM_SHOAL_SHELL, 4
|
|
compare VAR_RESULT, FALSE
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_WouldYouLikeShellBell, MSGBOX_YESNO
|
|
compare VAR_RESULT, NO
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell
|
|
checkitemspace ITEM_SHELL_BELL, 1
|
|
compare VAR_RESULT, FALSE
|
|
call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed
|
|
compare VAR_RESULT, 2
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_MakeShellBellRightAway, MSGBOX_DEFAULT
|
|
removeitem ITEM_SHOAL_SALT, 4
|
|
removeitem ITEM_SHOAL_SHELL, 4
|
|
giveitem ITEM_SHELL_BELL
|
|
compare VAR_RESULT, FALSE
|
|
goto_if_eq Common_EventScript_ShowBagIsFull
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_ExplainShellBell, MSGBOX_DEFAULT
|
|
setflag FLAG_TEMP_2
|
|
release
|
|
end
|
|
|
|
@ If the bag is full, check if a slot will be freed when 4 Shoal Salt or Shells are given
|
|
ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed:: @ 8236E69
|
|
checkitem ITEM_SHOAL_SALT, 5
|
|
compare VAR_RESULT, TRUE
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells
|
|
return
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells:: @ 8236E7A
|
|
checkitem ITEM_SHOAL_SHELL, 5
|
|
compare VAR_RESULT, TRUE
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed
|
|
return
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed:: @ 8236E8B
|
|
setvar VAR_RESULT, 2
|
|
return
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell:: @ 8236E91
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_NoSpaceInYourBag, MSGBOX_DEFAULT
|
|
release
|
|
end
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells:: @ 8236E9B
|
|
checkitem ITEM_SHOAL_SALT, 1
|
|
compare VAR_RESULT, TRUE
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
|
|
checkitem ITEM_SHOAL_SHELL, 1
|
|
compare VAR_RESULT, TRUE
|
|
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_AreYouPlanningOnGoingInThere, MSGBOX_DEFAULT
|
|
release
|
|
end
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell:: @ 8236EC5
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_BringMe4ShoalSaltAndShells, MSGBOX_DEFAULT
|
|
release
|
|
end
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell:: @ 8236ECF
|
|
msgbox ShoalCave_LowTideEntranceRoom_Text_WantedToMakeShellBell, MSGBOX_DEFAULT
|
|
release
|
|
end
|
|
|
|
ShoalCave_LowTideEntranceRoom_EventScript_ResetShoalItems:: @ 8236ED9
|
|
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
|
|
clearflag FLAG_SYS_SHOAL_ITEM
|
|
return
|