Sync obtain item
This commit is contained in:
@@ -11,60 +11,60 @@ Std_ObtainItem:: @ 81A667B
|
||||
textcolor 3
|
||||
additem VAR_0x8000, VAR_0x8001
|
||||
copyvar VAR_0x8007, VAR_RESULT
|
||||
call EventScript_1A6697
|
||||
call EventScript_ObtainItemMessage
|
||||
copyvar VAR_MON_BOX_ID, VAR_MON_BOX_POS
|
||||
return
|
||||
|
||||
EventScript_1A6697:: @ 81A6697
|
||||
EventScript_ObtainItemMessage:: @ 81A6697
|
||||
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001
|
||||
checkitemtype VAR_0x8000
|
||||
call EventScript_1A66BC
|
||||
compare VAR_0x8007, 1
|
||||
call_if_eq EventScript_1A6749
|
||||
compare VAR_0x8007, 0
|
||||
call_if_eq EventScript_1A675E
|
||||
call EventScript_BufferPocketNameTryFanfare
|
||||
compare VAR_0x8007, TRUE
|
||||
call_if_eq EventScript_ObtainedItem
|
||||
compare VAR_0x8007, FALSE
|
||||
call_if_eq EventScript_NoRoomForItem
|
||||
return
|
||||
|
||||
EventScript_1A66BC:: @ 81A66BC
|
||||
EventScript_BufferPocketNameTryFanfare:: @ 81A66BC
|
||||
switch VAR_RESULT
|
||||
case POCKET_ITEMS, EventScript_1A66F9
|
||||
case POCKET_KEY_ITEMS, EventScript_1A6709
|
||||
case POCKET_POKE_BALLS, EventScript_1A6719
|
||||
case POCKET_TM_CASE, EventScript_1A6729
|
||||
case POCKET_BERRY_POUCH, EventScript_1A6739
|
||||
case POCKET_ITEMS, EventScript_BufferItemsPocket
|
||||
case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket
|
||||
case POCKET_POKE_BALLS, EventScript_BufferPokeBallsPocket
|
||||
case POCKET_TM_CASE, EventScript_BufferTMCase
|
||||
case POCKET_BERRY_POUCH, EventScript_BufferBerryPouch
|
||||
end
|
||||
|
||||
EventScript_1A66F9:: @ 81A66F9
|
||||
EventScript_BufferItemsPocket:: @ 81A66F9
|
||||
getstdstring 2, 24
|
||||
compare VAR_0x8007, 1
|
||||
call_if_eq EventScript_1A6764
|
||||
compare VAR_0x8007, TRUE
|
||||
call_if_eq EventScript_PlayFanfareObtainedItem
|
||||
return
|
||||
|
||||
EventScript_1A6709:: @ 81A6709
|
||||
EventScript_BufferKeyItemsPocket:: @ 81A6709
|
||||
getstdstring 2, 25
|
||||
compare VAR_0x8007, 1
|
||||
call_if_eq EventScript_1A6764
|
||||
compare VAR_0x8007, TRUE
|
||||
call_if_eq EventScript_PlayFanfareObtainedItem
|
||||
return
|
||||
|
||||
EventScript_1A6719:: @ 81A6719
|
||||
EventScript_BufferPokeBallsPocket:: @ 81A6719
|
||||
getstdstring 2, 26
|
||||
compare VAR_0x8007, 1
|
||||
call_if_eq EventScript_1A6764
|
||||
compare VAR_0x8007, TRUE
|
||||
call_if_eq EventScript_PlayFanfareObtainedItem
|
||||
return
|
||||
|
||||
EventScript_1A6729:: @ 81A6729
|
||||
EventScript_BufferTMCase:: @ 81A6729
|
||||
getstdstring 2, 27
|
||||
compare VAR_0x8007, 1
|
||||
call_if_eq EventScript_1A6768
|
||||
compare VAR_0x8007, TRUE
|
||||
call_if_eq EventScript_PlayFanfareObtainedTMHM
|
||||
return
|
||||
|
||||
EventScript_1A6739:: @ 81A6739
|
||||
EventScript_BufferBerryPouch:: @ 81A6739
|
||||
getstdstring 2, 28
|
||||
compare VAR_0x8007, 1
|
||||
call_if_eq EventScript_1A6764
|
||||
compare VAR_0x8007, TRUE
|
||||
call_if_eq EventScript_PlayFanfareObtainedItem
|
||||
return
|
||||
|
||||
EventScript_1A6749:: @ 81A6749
|
||||
EventScript_ObtainedItem:: @ 81A6749
|
||||
message Text_ObtainedTheX
|
||||
waitfanfare
|
||||
waitmessage
|
||||
@@ -72,43 +72,43 @@ EventScript_1A6749:: @ 81A6749
|
||||
setvar VAR_RESULT, 1
|
||||
return
|
||||
|
||||
EventScript_1A675E:: @ 81A675E
|
||||
setvar VAR_RESULT, 0
|
||||
EventScript_NoRoomForItem:: @ 81A675E
|
||||
setvar VAR_RESULT, FALSE
|
||||
return
|
||||
|
||||
EventScript_1A6764:: @ 81A6764
|
||||
EventScript_PlayFanfareObtainedItem:: @ 81A6764
|
||||
playfanfare MUS_FANFA1
|
||||
return
|
||||
|
||||
EventScript_1A6768:: @ 81A6768
|
||||
EventScript_PlayFanfareObtainedTMHM:: @ 81A6768
|
||||
playfanfare MUS_FANFA1
|
||||
return
|
||||
|
||||
Std_ObtainDecoration:: @ 81A676C
|
||||
adddecor VAR_0x8000
|
||||
copyvar VAR_0x8007, VAR_RESULT
|
||||
call EventScript_1A677A
|
||||
call EventScript_ObtainDecorMessage
|
||||
return
|
||||
|
||||
EventScript_1A677A:: @ 81A677A
|
||||
EventScript_ObtainDecorMessage:: @ 81A677A
|
||||
getdecorname 1, VAR_0x8000
|
||||
compare VAR_0x8007, 1
|
||||
call_if_eq EventScript_1A6795
|
||||
compare VAR_0x8007, 0
|
||||
call_if_eq EventScript_1A67AD
|
||||
compare VAR_0x8007, TRUE
|
||||
call_if_eq EventScript_ObtainedDecor
|
||||
compare VAR_0x8007, FALSE
|
||||
call_if_eq EventScript_NoRoomForDecor
|
||||
return
|
||||
|
||||
EventScript_1A6795:: @ 81A6795
|
||||
EventScript_ObtainedDecor:: @ 81A6795
|
||||
playfanfare MUS_FANFA4
|
||||
message Text_1A52F0
|
||||
message Text_ObtainedTheDecor
|
||||
waitfanfare
|
||||
waitmessage
|
||||
msgbox gUnknown_81A532F
|
||||
setvar VAR_RESULT, 1
|
||||
msgbox Text_DecorTransferredToPC
|
||||
setvar VAR_RESULT, TRUE
|
||||
return
|
||||
|
||||
EventScript_1A67AD:: @ 81A67AD
|
||||
setvar VAR_RESULT, 0
|
||||
EventScript_NoRoomForDecor:: @ 81A67AD
|
||||
setvar VAR_RESULT, FALSE
|
||||
return
|
||||
|
||||
Std_FindItem:: @ 81A67B3
|
||||
@@ -121,68 +121,68 @@ Std_FindItem:: @ 81A67B3
|
||||
copyvar VAR_0x8007, VAR_RESULT
|
||||
getitemname 1, VAR_0x8000
|
||||
checkitemtype VAR_0x8000
|
||||
call EventScript_1A66BC
|
||||
compare VAR_0x8007, 1
|
||||
call_if_eq EventScript_1A67EE
|
||||
compare VAR_0x8007, 0
|
||||
call_if_eq EventScript_1A682D
|
||||
call EventScript_BufferPocketNameTryFanfare
|
||||
compare VAR_0x8007, TRUE
|
||||
call_if_eq EventScript_PickUpItem
|
||||
compare VAR_0x8007, FALSE
|
||||
call_if_eq EventScript_NoRoomToPickUpItem
|
||||
release
|
||||
return
|
||||
|
||||
EventScript_1A67EE:: @ 81A67EE
|
||||
EventScript_PickUpItem:: @ 81A67EE
|
||||
removeobject VAR_LAST_TALKED
|
||||
additem VAR_0x8004, VAR_0x8005
|
||||
specialvar VAR_RESULT, Special_ItemIsTM_GetMoveName
|
||||
copyvar VAR_0x8008, VAR_RESULT
|
||||
compare VAR_0x8008, 1
|
||||
call_if_eq EventScript_1A6821
|
||||
compare VAR_0x8008, 0
|
||||
call_if_eq EventScript_1A6827
|
||||
compare VAR_0x8008, TRUE
|
||||
call_if_eq EventScript_FoundTMHM
|
||||
compare VAR_0x8008, FALSE
|
||||
call_if_eq EventScript_FoundItem
|
||||
waitfanfare
|
||||
waitmessage
|
||||
msgbox Text_PutItemAway
|
||||
return
|
||||
|
||||
EventScript_1A6821:: @ 81A6821
|
||||
message Text_1A63E8
|
||||
EventScript_FoundTMHM:: @ 81A6821
|
||||
message Text_FoundTMHMContainsMove
|
||||
return
|
||||
|
||||
EventScript_1A6827:: @ 81A6827
|
||||
EventScript_FoundItem:: @ 81A6827
|
||||
message Text_FoundOneItem
|
||||
return
|
||||
|
||||
EventScript_1A682D:: @ 81A682D
|
||||
EventScript_NoRoomToPickUpItem:: @ 81A682D
|
||||
msgbox Text_ObtainedTheX
|
||||
msgbox Text_TooBadBagFull
|
||||
setvar VAR_RESULT, 0
|
||||
setvar VAR_RESULT, FALSE
|
||||
return
|
||||
|
||||
EventScript_PickUpHiddenItem:: @ 81A6843
|
||||
EventScript_FoundHiddenItem:: @ 81A6843
|
||||
lockall
|
||||
textcolor 3
|
||||
waitse
|
||||
compare VAR_0x8005, 0
|
||||
goto_if_eq EventScript_PickUpHiddenCoins
|
||||
call EventScript_GiveItem
|
||||
compare VAR_0x8007, 1
|
||||
goto_if_eq EventScript_ItemInPocketMessage
|
||||
compare VAR_0x8007, 0
|
||||
goto_if_eq EventScript_BagIsFullMessage
|
||||
goto_if_eq EventScript_TryPickUpHiddenCoins
|
||||
call EventScript_TryPickUpHiddenItem
|
||||
compare VAR_0x8007, TRUE
|
||||
goto_if_eq EventScript_PickedUpHiddenItem
|
||||
compare VAR_0x8007, FALSE
|
||||
goto_if_eq EventScript_NoRoomForHiddenItem
|
||||
end
|
||||
|
||||
EventScript_GiveItem::
|
||||
EventScript_TryPickUpHiddenItem::
|
||||
additem VAR_0x8005, VAR_0x8006
|
||||
copyvar VAR_0x8007, VAR_RESULT
|
||||
getitemname 1, VAR_0x8005
|
||||
checkitemtype VAR_0x8005
|
||||
call EventScript_1A66BC
|
||||
call EventScript_BufferPocketNameTryFanfare
|
||||
return
|
||||
|
||||
EventScript_ItemInPocketMessage::
|
||||
EventScript_PickedUpHiddenItem::
|
||||
compare VAR_0x8006, 1
|
||||
call_if_eq EventScript_FoundSingleItemMessage
|
||||
call_if_eq EventScript_FoundSingleItem
|
||||
compare VAR_0x8006, 1
|
||||
call_if_ne EventScript_FoundMultipleItemsMessage
|
||||
call_if_ne EventScript_FoundMultipleItems
|
||||
waitfanfare
|
||||
waitmessage
|
||||
msgbox Text_PutItemAway
|
||||
@@ -190,37 +190,37 @@ EventScript_ItemInPocketMessage::
|
||||
releaseall
|
||||
end
|
||||
|
||||
EventScript_FoundSingleItemMessage::
|
||||
EventScript_FoundSingleItem::
|
||||
message Text_FoundOneItem
|
||||
return
|
||||
|
||||
EventScript_FoundCoinsMessage::
|
||||
EventScript_FoundCoins::
|
||||
getnumberstring 0, VAR_0x8006
|
||||
message Text_FoundXCoins
|
||||
return
|
||||
|
||||
EventScript_FoundMultipleItemsMessage::
|
||||
EventScript_FoundMultipleItems::
|
||||
getnumberstring 0, VAR_0x8006
|
||||
message Text_FoundXItems
|
||||
return
|
||||
|
||||
EventScript_BagIsFullMessage::
|
||||
EventScript_NoRoomForHiddenItem::
|
||||
msgbox Text_FoundOneItem
|
||||
msgbox Text_TooBadBagFull
|
||||
setvar VAR_RESULT, 0
|
||||
releaseall
|
||||
end
|
||||
|
||||
EventScript_PickUpHiddenCoins::
|
||||
goto_if_unset FLAG_GOT_COIN_CASE, EventScript_HiddenCoinsButNoCoinCase
|
||||
EventScript_TryPickUpHiddenCoins::
|
||||
goto_if_unset FLAG_GOT_COIN_CASE, EventScript_NoCaseForHiddenCoins
|
||||
checkcoins VAR_RESULT
|
||||
specialvar VAR_RESULT, Special_CheckAddCoins
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq EventScript_HiddenCoinsButTheCoinCaseIsFull
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq EventScript_HiddenCoinsButCaseIsFull
|
||||
givecoins VAR_0x8006
|
||||
getstdstring 1, 0x17
|
||||
call EventScript_1A6764
|
||||
call EventScript_FoundCoinsMessage
|
||||
call EventScript_PlayFanfareObtainedItem
|
||||
call EventScript_FoundCoins
|
||||
waitfanfare
|
||||
waitmessage
|
||||
msgbox Text_PutCoinsAwayInCoinCase
|
||||
@@ -228,7 +228,7 @@ EventScript_PickUpHiddenCoins::
|
||||
releaseall
|
||||
end
|
||||
|
||||
EventScript_HiddenCoinsButTheCoinCaseIsFull::
|
||||
EventScript_HiddenCoinsButCaseIsFull::
|
||||
getnumberstring 0, VAR_0x8006
|
||||
getstdstring 1, 0x17
|
||||
msgbox Text_FoundXCoins
|
||||
@@ -237,7 +237,7 @@ EventScript_HiddenCoinsButTheCoinCaseIsFull::
|
||||
releaseall
|
||||
end
|
||||
|
||||
EventScript_HiddenCoinsButNoCoinCase::
|
||||
EventScript_NoCaseForHiddenCoins::
|
||||
getnumberstring 0, VAR_0x8006
|
||||
getstdstring 1, 0x17
|
||||
msgbox Text_FoundXCoins
|
||||
|
||||
Reference in New Issue
Block a user