pokeemerald/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc

126 lines
4.0 KiB
PHP
Raw Normal View History

2017-11-10 02:21:31 +01:00
AbandonedShip_HiddenFloorRooms_MapScripts:: @ 8238C49
2019-11-06 15:31:04 +01:00
map_script MAP_SCRIPT_ON_FRAME_TABLE, AbandonedShip_HiddenFloorRooms_OnFrame
2017-11-10 02:21:31 +01:00
.byte 0
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_OnFrame: @ 8238C4F
map_script_2 VAR_TEMP_1, 0, AbandonedShip_HiddenFloorRooms_EventScript_DoHiddenItemSparkle
2017-11-10 02:21:31 +01:00
.2byte 0
2019-11-06 15:31:04 +01:00
@ After the below calculation, VAR_TEMP_4 is the room number of the door the player entered
@ Bottom row, left column (Rm 1)
@ Bottom row, middle column (Rm 2)
@ Bottom row, right column (Rm 3)
@ Upper row, left column (Rm 4)
@ Upper row, middle column (Rm 5)
@ Upper row, right column (Rm 6)
AbandonedShip_HiddenFloorRooms_EventScript_DoHiddenItemSparkle:: @ 8238C59
2018-05-19 18:02:43 +02:00
setvar VAR_TEMP_1, 1
getplayerxy VAR_TEMP_2, VAR_TEMP_3
setvar VAR_TEMP_4, 1
compare VAR_TEMP_2, 21
2019-11-06 15:31:04 +01:00
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InMiddleRoomColumn
2018-05-19 18:02:43 +02:00
compare VAR_TEMP_2, 36
2019-11-06 15:31:04 +01:00
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InRightRoomColumn
2018-05-19 18:02:43 +02:00
compare VAR_TEMP_3, 2
2019-11-06 15:31:04 +01:00
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InUpperRoomRow
2018-05-19 18:02:43 +02:00
switch VAR_TEMP_4
2019-11-06 15:31:04 +01:00
case 1, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm1
case 2, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm2
case 3, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm3
case 4, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm4
case 5, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm5
case 6, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm6
2017-11-10 02:21:31 +01:00
end
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_InMiddleRoomColumn:: @ 8238CD1
2018-05-19 18:02:43 +02:00
addvar VAR_TEMP_4, 1
2017-11-10 02:21:31 +01:00
return
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_InRightRoomColumn:: @ 8238CD7
2018-05-19 18:02:43 +02:00
addvar VAR_TEMP_4, 2
2017-11-10 02:21:31 +01:00
return
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_InUpperRoomRow:: @ 8238CDD
2018-05-19 18:02:43 +02:00
addvar VAR_TEMP_4, 3
2017-11-10 02:21:31 +01:00
return
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm1:: @ 8238CE3
2017-11-10 02:21:31 +01:00
delay 20
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 10, 10, 0
specialvar VAR_RESULT, FoundAbandonedShipRoom4Key
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, FALSE
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm4KeySparkle
waitfieldeffect FLDEFF_SPARKLE
2017-11-10 02:21:31 +01:00
delay 10
end
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm2:: @ 8238D0C
2017-11-10 02:21:31 +01:00
end
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm3:: @ 8238D0D
specialvar VAR_RESULT, FoundAbandonedShipRoom1Key
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, TRUE
goto_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm3NoSparkle
2017-11-10 02:21:31 +01:00
delay 20
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, FALSE
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm1KeySparkle
waitfieldeffect FLDEFF_SPARKLE
2017-11-10 02:21:31 +01:00
delay 10
end
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm3NoSparkle:: @ 8238D32
2017-11-10 02:21:31 +01:00
end
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm4:: @ 8238D33
2017-11-10 02:21:31 +01:00
delay 20
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 8, 5, 0
dofieldeffectsparkle 11, 3, 0
specialvar VAR_RESULT, FoundAbandonedShipRoom6Key
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, FALSE
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm6KeySparkle
waitfieldeffect FLDEFF_SPARKLE
2017-11-10 02:21:31 +01:00
delay 10
end
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm5:: @ 8238D6B
2017-11-10 02:21:31 +01:00
delay 20
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 16, 3, 0
dofieldeffectsparkle 25, 2, 0
dofieldeffectsparkle 24, 6, 0
specialvar VAR_RESULT, FoundAbandonedShipRoom2Key
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, FALSE
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm2KeySparkle
waitfieldeffect FLDEFF_SPARKLE
2017-11-10 02:21:31 +01:00
delay 10
end
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm6:: @ 8238DB2
2017-11-10 02:21:31 +01:00
end
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm1KeySparkle:: @ 8238DB3
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 42, 10, 0
2017-11-10 02:21:31 +01:00
return
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm2KeySparkle:: @ 8238DC3
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 20, 5, 0
2017-11-10 02:21:31 +01:00
return
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm4KeySparkle:: @ 8238DD3
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 1, 12, 0
2017-11-10 02:21:31 +01:00
return
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm6KeySparkle:: @ 8238DE3
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 1, 2, 0
2017-11-10 02:21:31 +01:00
return
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_EventScript_Trash:: @ 8238DF3
2017-11-10 02:21:31 +01:00
lockall
2019-11-06 15:31:04 +01:00
msgbox AbandonedShip_HiddenFloorRooms_Text_BrightShinyTrash, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
2019-11-06 15:31:04 +01:00
AbandonedShip_HiddenFloorRooms_Text_BrightShinyTrash: @ 8238DFE
2018-12-07 16:41:08 +01:00
.string "It's bright and shiny!\n"
.string "But it's just trash…$"
2017-11-10 02:21:31 +01:00