Sync obtain item

This commit is contained in:
GriffinR
2020-01-10 16:21:36 -05:00
parent 388c40575d
commit a537577671
16 changed files with 152 additions and 148 deletions
+4 -4
View File
@@ -1180,14 +1180,14 @@ _0806D17A:
beq _0806D164
ldr r0, _0806D1D0 @ =gSpecialVar_Facing
strh r6, [r0]
ldr r0, _0806D1D4 @ =EventScript_PickUpHiddenItem
ldr r0, _0806D1D4 @ =EventScript_FoundHiddenItem
b _0806D1E6
.align 2, 0
_0806D1C4: .4byte gSpecialVar_0x8005
_0806D1C8: .4byte gSpecialVar_0x8004
_0806D1CC: .4byte gSpecialVar_0x8006
_0806D1D0: .4byte gSpecialVar_Facing
_0806D1D4: .4byte EventScript_PickUpHiddenItem
_0806D1D4: .4byte EventScript_FoundHiddenItem
_0806D1D8:
cmp r2, 0xFF
beq _0806D1E0
@@ -1231,10 +1231,10 @@ _0806D218:
lsrs r0, 24
cmp r0, 0x1
bne _0806D230
ldr r0, _0806D22C @ =gUnknown_81A6C32
ldr r0, _0806D22C @ =EventScript_WallTownMap
b _0806D53E
.align 2, 0
_0806D22C: .4byte gUnknown_81A6C32
_0806D22C: .4byte EventScript_WallTownMap
_0806D230:
adds r0, r4, 0
bl MetatileBehavior_IsBookshelf
+16 -33
View File
@@ -1100,7 +1100,7 @@ Text_1A63D6:: @ 81A63D6
.string " \n"
.string "$"
Text_1A63E8:: @ 81A63E8
Text_FoundTMHMContainsMove:: @ 81A63E8
.string "{PLAYER} found a {STR_VAR_2}!\n"
.string "It contains {STR_VAR_1}.$"
@@ -1224,32 +1224,15 @@ EventScript_1A6AC0:: @ 81A6AC0
.include "data/scripts/surf.inc"
.include "data/scripts/set_gym_trainers.inc"
.include "data/scripts/bag_full.inc"
EventScript_1A6BF9:: @ 81A6BF9
textcolor 3
msgbox Text_TooBadBagFull
release
end
EventScript_1A6C05:: @ 81A6C05
msgbox Text_TooBadBagFull
return
EventScript_1A6C0E:: @ 81A6C0E
msgbox Text_1A5301
release
end
EventScript_1A6C18:: @ 81A6C18
msgbox Text_1A5301
return
EventScript_1A6C21:: @ 81A6C21
@ Unused
EventScript_GymBadgeFanfare:: @ 81A6C21
playfanfare MUS_ME_BACHI
waitfanfare
return
EventScript_FadeOut_Heal_FadeIn:: @ 81A6C26
EventScript_OutOfCenterPartyHeal:: @ 81A6C26
fadescreen FADE_TO_BLACK
playfanfare MUS_ME_ASA
waitfanfare
@@ -1257,7 +1240,7 @@ EventScript_FadeOut_Heal_FadeIn:: @ 81A6C26
fadescreen FADE_FROM_BLACK
return
gUnknown_81A6C32:: @ 81A6C32
EventScript_WallTownMap:: @ 81A6C32
lockall
msgbox Text_ATownMap
special sub_8110AB4
@@ -1558,12 +1541,12 @@ gUnknown_81A77A0:: @ 81A77A0
EventScript_Return:: @ 81A77A9
return
EventScript_1A77AA:: @ 81A77AA
setvar VAR_RESULT, 1
EventScript_SetResultTrue:: @ 81A77AA
setvar VAR_RESULT, TRUE
return
EventScript_1A77B0:: @ 81A77B0
setvar VAR_RESULT, 0
EventScript_SetResultFalse:: @ 81A77B0
setvar VAR_RESULT, FALSE
return
Route16_NorthEntrance_1F_EventScript_1A77B6:: @ 81A77B6
@@ -1792,8 +1775,8 @@ VermilionCity_PokemonCenter_1F_EventScript_1A8D08:: @ 81A8D08
msgbox Text_194234
setflag FLAG_GOT_VS_SEEKER
giveitem ITEM_VS_SEEKER
compare VAR_RESULT, 0
goto_if_eq EventScript_1A6BF9
compare VAR_RESULT, FALSE
goto_if_eq EventScript_BagIsFull
msgbox Text_19430F
release
end
@@ -1807,10 +1790,10 @@ EventScript_ItemfinderDigUpUnderfootItem:: @ 81A8D49
lockall
textcolor 3
waitse
call EventScript_GiveItem
compare VAR_0x8007, 1
call EventScript_TryPickUpHiddenItem
compare VAR_0x8007, TRUE
goto_if_eq EventScript_DigUpItemPutInPocket
compare VAR_0x8007, 0
compare VAR_0x8007, FALSE
goto_if_eq EventScript_DigUpItemBagIsFull
end
@@ -1858,7 +1841,7 @@ EventScript_MomHeal:: @ 81A8DD8
applymovement 1, Movement_WalkInPlaceFastestDown
waitmovement 0
msgbox Text_1A5FDF
call EventScript_FadeOut_Heal_FadeIn
call EventScript_OutOfCenterPartyHeal
msgbox Text_1A6046
fadedefaultbgm
releaseall
@@ -10,8 +10,8 @@ CeladonCity_Condominiums_1F_EventScript_16C321:: @ 816C321
msgbox gUnknown_81960C9
setflag FLAG_GOT_TEA
giveitem ITEM_TEA
compare VAR_RESULT, 0
goto_if_eq EventScript_1A6BF9
compare VAR_RESULT, FALSE
goto_if_eq EventScript_BagIsFull
msgbox gUnknown_8196109
release
end
+2 -2
View File
@@ -12,8 +12,8 @@ CeruleanCity_House5_EventScript_16AE50:: @ 816AE50
msgbox gUnknown_8193003
setflag FLAG_GOT_POWDER_JAR
giveitem ITEM_POWDER_JAR
compare VAR_RESULT, 0
goto_if_eq EventScript_1A6BF9
compare VAR_RESULT, FALSE
goto_if_eq EventScript_BagIsFull
msgbox gUnknown_8193033
release
end
@@ -27,7 +27,7 @@ EventScript_168C41:: @ 8168C41
EventScript_168C4A:: @ 8168C4A
msgbox gUnknown_818D3D1
closemessage
call EventScript_FadeOut_Heal_FadeIn
call EventScript_OutOfCenterPartyHeal
msgbox gUnknown_818D3F8
release
end
+4 -4
View File
@@ -40,8 +40,8 @@ RocketHideout_B4F_EventScript_161363:: @ 8161363
faceplayer
removeobject 2
giveitem ITEM_SILPH_SCOPE
compare VAR_RESULT, 0
goto_if_eq EventScript_1A6BF9
compare VAR_RESULT, FALSE
goto_if_eq EventScript_BagIsFull
release
end
@@ -64,8 +64,8 @@ RocketHideout_B4F_EventScript_1613AD:: @ 81613AD
setflag FLAG_CAN_USE_ROCKET_HIDEOUT_LIFT
removeobject 4
giveitem ITEM_LIFT_KEY
compare VAR_RESULT, 0
goto_if_eq EventScript_1A6BF9
compare VAR_RESULT, FALSE
goto_if_eq EventScript_BagIsFull
release
end
+1 -1
View File
@@ -9,7 +9,7 @@ Route1_EventScript_167EFE:: @ 8167EFE
textcolor 3
checkitemspace ITEM_POTION, 1
compare VAR_RESULT, FALSE
goto_if_eq EventScript_1A6BF9
goto_if_eq EventScript_BagIsFull
getitemname 1, ITEM_POTION
playfanfare MUS_FANFA1
message Text_ObtainedTheX
+1 -1
View File
@@ -8,7 +8,7 @@ SSAnne_1F_Room6_EventScript_160DF3:: @ 8160DF3
compare VAR_RESULT, NO
goto_if_eq EventScript_160E18
closemessage
call EventScript_FadeOut_Heal_FadeIn
call EventScript_OutOfCenterPartyHeal
msgbox gUnknown_8174490
release
end
@@ -27,7 +27,7 @@ SevenIsland_SevaultCanyon_House_EventScript_172183:: @ 8172183
waitmovement 0
fadedefaultbgm
delay 30
call EventScript_FadeOut_Heal_FadeIn
call EventScript_OutOfCenterPartyHeal
msgbox gUnknown_81A4DF5
setflag FLAG_TEMP_2
release
+1 -1
View File
@@ -16,7 +16,7 @@ SilphCo_9F_EventScript_161D09:: @ 8161D09
goto_if_ge EventScript_161D2E
msgbox gUnknown_8176B54
closemessage
call EventScript_FadeOut_Heal_FadeIn
call EventScript_OutOfCenterPartyHeal
msgbox gUnknown_8176B81
release
end
+6 -6
View File
@@ -57,19 +57,19 @@ VermilionCity_EventScript_166941:: @ 8166941
end
EventScript_166958:: @ 8166958
goto_if_unset FLAG_SYS_GOT_MYSTIC_TICKET, EventScript_1A77B0
goto_if_unset FLAG_SYS_GOT_MYSTIC_TICKET, EventScript_SetResultFalse
checkitem ITEM_MYSTIC_TICKET, 1
compare VAR_RESULT, FALSE
goto_if_eq EventScript_1A77B0
goto EventScript_1A77AA
goto_if_eq EventScript_SetResultFalse
goto EventScript_SetResultTrue
end
EventScript_166977:: @ 8166977
goto_if_unset FLAG_SYS_GOT_AURORA_TICKET, EventScript_1A77B0
goto_if_unset FLAG_SYS_GOT_AURORA_TICKET, EventScript_SetResultFalse
checkitem ITEM_AURORA_TICKET, 1
compare VAR_RESULT, FALSE
goto_if_eq EventScript_1A77B0
goto EventScript_1A77AA
goto_if_eq EventScript_SetResultFalse
goto EventScript_SetResultTrue
end
EventScript_166996:: @ 8166996
+21
View File
@@ -0,0 +1,21 @@
EventScript_BagIsFull:: @ 81A6BF9
textcolor 3
msgbox Text_TooBadBagFull
release
end
@ Unused
EventScript_BagIsFullRet:: @ 81A6C05
msgbox Text_TooBadBagFull
return
@ Unused
EventScript_NoRoomForAnotherDecor:: @ 81A6C0E
msgbox Text_NoRoomForAnotherDecor
release
end
@ Unused
EventScript_NoRoomForAnotherDecorRet:: @ 81A6C18
msgbox Text_NoRoomForAnotherDecor
return
+2 -2
View File
@@ -870,14 +870,14 @@ EventScript_1BBB1E:: @ 81BBB1E
EventScript_1BBB44:: @ 81BBB44
msgbox gUnknown_81BCBC3
goto EventScript_1A77B0
goto EventScript_SetResultFalse
EventScript_1BBB51:: @ 81BBB51
end
EventScript_1BBB52:: @ 81BBB52
msgbox gUnknown_81BCC00
goto EventScript_1A77B0
goto EventScript_SetResultFalse
EventScript_1BBB5F:: @ 81BBB5F
end
+84 -84
View File
@@ -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
+3 -3
View File
@@ -149,7 +149,7 @@ EventScript_1A911E:: @ 81A911E
case SEAGALLOP_THREE_ISLAND, EventScript_1A91F6
case SEAGALLOP_FOUR_ISLAND, EventScript_1A9201
case SEAGALLOP_MORE, EventScript_1A917F
case SCR_MENU_CANCEL, EventScript_CancelSail
case SCR_MENU_CANCEL, EventScript_CancelSail
end
EventScript_1A917F:: @ 81A917F
@@ -162,8 +162,8 @@ EventScript_1A917F:: @ 81A917F
case SEAGALLOP_FIVE_ISLAND, EventScript_1A920C
case SEAGALLOP_SIX_ISLAND, EventScript_1A9217
case SEAGALLOP_SEVEN_ISLAND, EventScript_1A9222
case SEAGALLOP_MORE, EventScript_1A911E
case SCR_MENU_CANCEL, EventScript_CancelSail
case SEAGALLOP_MORE, EventScript_1A911E
case SCR_MENU_CANCEL, EventScript_CancelSail
end
EventScript_SailToVermilionCity:: @ 81A91D5
+3 -3
View File
@@ -35,13 +35,13 @@ Text_FoundXItems:: @ 81A52DD
.string "{PLAYER} found\n"
.string "{STR_VAR_1} {STR_VAR_2}(s)!$"
Text_1A52F0:: @ 81A52F0
Text_ObtainedTheDecor:: @ 81A52F0
.string "Obtained the {STR_VAR_2}!$"
Text_1A5301:: @ 81A5301
Text_NoRoomForAnotherDecor:: @ 81A5301
.string "Too bad! There's no room left for\n"
.string "another {STR_VAR_2}…$"
gUnknown_81A532F:: @ 81A532F
Text_DecorTransferredToPC:: @ 81A532F
.string "The {STR_VAR_2} was transferred\n"
.string "to the PC.$"