2021-08-05 18:46:11 +02:00
|
|
|
.set ITEMID, VAR_0x8000
|
|
|
|
.set AMOUNT, VAR_0x8001
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
Std_ObtainItem::
|
2021-08-05 18:46:11 +02:00
|
|
|
additem ITEMID, AMOUNT
|
2019-10-21 12:46:57 +02:00
|
|
|
copyvar VAR_0x8007, VAR_RESULT
|
2019-10-22 23:56:47 +02:00
|
|
|
call EventScript_ObtainItemMessage
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_ObtainItemMessage::
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT
|
2021-08-05 18:46:11 +02:00
|
|
|
checkitemtype ITEMID
|
2019-10-22 23:56:47 +02:00
|
|
|
call EventScript_BufferPocketNameAndTryFanfare
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_0x8007, TRUE, EventScript_ObtainedItem
|
|
|
|
call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForItem
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_BufferPocketNameAndTryFanfare::
|
2019-10-21 12:46:57 +02:00
|
|
|
switch VAR_RESULT
|
2021-08-05 18:46:11 +02:00
|
|
|
case POCKET_ITEMS, EventScript_BufferItemsPocket
|
|
|
|
case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket
|
2019-10-22 23:56:47 +02:00
|
|
|
case POCKET_POKE_BALLS, EventScript_BufferPokeballsPocket
|
2021-08-05 18:46:11 +02:00
|
|
|
case POCKET_TM_HM, EventScript_BufferTMHMsPocket
|
|
|
|
case POCKET_BERRIES, EventScript_BufferBerriesPocket
|
2019-10-21 12:46:57 +02:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_BufferItemsPocket::
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferstdstring STR_VAR_3, STDSTRING_ITEMS
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_BufferKeyItemsPocket::
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferstdstring STR_VAR_3, STDSTRING_KEYITEMS
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_BufferPokeballsPocket::
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_BufferTMHMsPocket::
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferstdstring STR_VAR_3, STDSTRING_TMHMS
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedTMHM
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_BufferBerriesPocket::
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferstdstring STR_VAR_3, STDSTRING_BERRIES
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_ObtainedItem::
|
2019-10-21 12:46:57 +02:00
|
|
|
message gText_ObtainedTheItem
|
|
|
|
waitfanfare
|
|
|
|
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
2021-08-05 18:46:11 +02:00
|
|
|
setvar VAR_RESULT, TRUE
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_NoRoomForItem::
|
2021-08-05 18:46:11 +02:00
|
|
|
setvar VAR_RESULT, FALSE
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_PlayFanfareObtainedItem::
|
2020-08-21 00:02:00 +02:00
|
|
|
playfanfare MUS_OBTAIN_ITEM
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_PlayFanfareObtainedTMHM::
|
2020-08-21 00:02:00 +02:00
|
|
|
playfanfare MUS_OBTAIN_TMHM
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
Std_ObtainDecoration::
|
2021-08-05 18:46:11 +02:00
|
|
|
adddecoration ITEMID
|
2019-10-21 12:46:57 +02:00
|
|
|
copyvar VAR_0x8007, VAR_RESULT
|
2019-10-22 23:56:47 +02:00
|
|
|
call EventScript_ObtainDecorationMessage
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_ObtainDecorationMessage::
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferdecorationname STR_VAR_2, ITEMID
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_0x8007, TRUE, EventScript_ObtainedDecor
|
|
|
|
call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForDecor
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_ObtainedDecor::
|
2020-08-21 00:02:00 +02:00
|
|
|
playfanfare MUS_OBTAIN_ITEM
|
2019-10-21 12:46:57 +02:00
|
|
|
message gText_ObtainedTheDecor
|
|
|
|
waitfanfare
|
|
|
|
msgbox gText_TheDecorWasTransferredToThePC, MSGBOX_DEFAULT
|
2021-08-05 18:46:11 +02:00
|
|
|
setvar VAR_RESULT, TRUE
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_NoRoomForDecor::
|
2021-08-05 18:46:11 +02:00
|
|
|
setvar VAR_RESULT, FALSE
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
Std_FindItem::
|
2019-10-21 12:46:57 +02:00
|
|
|
lock
|
|
|
|
faceplayer
|
|
|
|
waitse
|
2021-08-05 18:46:11 +02:00
|
|
|
copyvar VAR_0x8004, ITEMID
|
|
|
|
copyvar VAR_0x8005, AMOUNT
|
|
|
|
checkitemspace ITEMID, AMOUNT
|
2019-10-21 12:46:57 +02:00
|
|
|
copyvar VAR_0x8007, VAR_RESULT
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT
|
2021-08-05 18:46:11 +02:00
|
|
|
checkitemtype ITEMID
|
2019-10-22 23:56:47 +02:00
|
|
|
call EventScript_BufferPocketNameAndTryFanfare
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_0x8007, TRUE, EventScript_PickUpItem
|
|
|
|
call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomToPickUpItem
|
2019-10-21 12:46:57 +02:00
|
|
|
release
|
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_PickUpItem::
|
2019-10-21 12:46:57 +02:00
|
|
|
removeobject VAR_LAST_TALKED
|
2020-01-11 18:02:58 +01:00
|
|
|
additem VAR_0x8004, VAR_0x8005
|
2019-10-21 12:46:57 +02:00
|
|
|
specialvar VAR_RESULT, BufferTMHMMoveName
|
|
|
|
copyvar VAR_0x8008, VAR_RESULT
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_0x8008, TRUE, EventScript_FoundTMHM
|
|
|
|
call_if_eq VAR_0x8008, FALSE, EventScript_FoundItem
|
2019-10-21 12:46:57 +02:00
|
|
|
waitfanfare
|
|
|
|
waitmessage
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferitemnameplural STR_VAR_2, VAR_0x8004, VAR_0x8005
|
2019-12-02 15:52:16 +01:00
|
|
|
pyramid_inchallenge
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_eq VAR_RESULT, TRUE, EventScript_PutBattlePyramidItemInBag
|
2019-10-21 12:46:57 +02:00
|
|
|
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_PutBattlePyramidItemInBag::
|
2019-10-21 12:46:57 +02:00
|
|
|
msgbox gText_PlayerPutItemInBag, MSGBOX_DEFAULT
|
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_FoundTMHM::
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferitemnameplural STR_VAR_1, VAR_0x8004, VAR_0x8005
|
2019-10-22 23:56:47 +02:00
|
|
|
message gText_PlayerFoundOneTMHM
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_FoundItem::
|
2019-10-21 12:46:57 +02:00
|
|
|
message gText_PlayerFoundOneItem
|
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_NoRoomToPickUpItem::
|
2019-10-21 12:46:57 +02:00
|
|
|
msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT
|
|
|
|
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
|
2021-08-05 18:46:11 +02:00
|
|
|
setvar VAR_RESULT, FALSE
|
2019-10-21 12:46:57 +02:00
|
|
|
return
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_HiddenItemScript::
|
2019-10-21 12:46:57 +02:00
|
|
|
lockall
|
|
|
|
waitse
|
2020-01-11 18:02:58 +01:00
|
|
|
additem VAR_0x8005
|
2019-10-21 12:46:57 +02:00
|
|
|
copyvar VAR_0x8007, VAR_RESULT
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferitemnameplural STR_VAR_2, VAR_0x8005, 1
|
2019-10-21 12:46:57 +02:00
|
|
|
checkitemtype VAR_0x8005
|
2019-10-22 23:56:47 +02:00
|
|
|
call EventScript_BufferPocketNameAndTryFanfare
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_eq VAR_0x8007, TRUE, EventScript_PickUpHiddenItem
|
|
|
|
goto_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForHiddenItem
|
2019-10-21 12:46:57 +02:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_PickUpHiddenItem::
|
2019-10-21 12:46:57 +02:00
|
|
|
copyvar VAR_0x8008, VAR_0x8004
|
|
|
|
copyvar VAR_0x8004, VAR_0x8005
|
|
|
|
specialvar VAR_RESULT, BufferTMHMMoveName
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_eq VAR_RESULT, TRUE, EventScript_FoundHiddenTMHM
|
|
|
|
goto_if_eq VAR_RESULT, FALSE, EventScript_FoundHiddenItem
|
2019-10-21 12:46:57 +02:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_FoundHiddenTMHM::
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferitemnameplural STR_VAR_1, VAR_0x8004, 1
|
2019-10-22 23:56:47 +02:00
|
|
|
message gText_PlayerFoundOneTMHM
|
|
|
|
goto EventScript_PutHiddenItemInPocket
|
2019-10-21 12:46:57 +02:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_FoundHiddenItem::
|
2019-10-21 12:46:57 +02:00
|
|
|
message gText_PlayerFoundOneItem
|
2019-10-22 23:56:47 +02:00
|
|
|
goto EventScript_PutHiddenItemInPocket
|
2019-10-21 12:46:57 +02:00
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_PutHiddenItemInPocket::
|
2019-10-21 12:46:57 +02:00
|
|
|
waitmessage
|
|
|
|
waitfanfare
|
2021-11-18 04:00:44 +01:00
|
|
|
bufferitemnameplural STR_VAR_2, VAR_0x8004, 1
|
2019-10-21 12:46:57 +02:00
|
|
|
copyvar VAR_0x8004, VAR_0x8008
|
|
|
|
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
2019-10-22 23:56:47 +02:00
|
|
|
special TryPutTreasureInvestigatorsOnAir
|
|
|
|
special SetHiddenItemFlag
|
2019-10-21 12:46:57 +02:00
|
|
|
releaseall
|
|
|
|
end
|
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
EventScript_NoRoomForHiddenItem::
|
2019-10-21 12:46:57 +02:00
|
|
|
msgbox gText_PlayerFoundOneItem, MSGBOX_DEFAULT
|
|
|
|
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
|
|
|
|
setvar VAR_RESULT, 0
|
|
|
|
releaseall
|
|
|
|
end
|