Document obtain_item.inc
This commit is contained in:
@@ -1075,7 +1075,7 @@ gText_ThankYouForAccessingMysteryGift:: @ 8273178
|
|||||||
.string "Thank you for accessing the\n"
|
.string "Thank you for accessing the\n"
|
||||||
.string "MYSTERY GIFT System.$"
|
.string "MYSTERY GIFT System.$"
|
||||||
|
|
||||||
gText_PlayerFoundOneItemTwoLines:: @ 82731A9
|
gText_PlayerFoundOneTMHM:: @ 82731A9
|
||||||
.string "{PLAYER} found one {STR_VAR_1}\n"
|
.string "{PLAYER} found one {STR_VAR_1}\n"
|
||||||
.string "{STR_VAR_2}!$"
|
.string "{STR_VAR_2}!$"
|
||||||
|
|
||||||
|
|||||||
@@ -1,66 +1,66 @@
|
|||||||
Std_ObtainItem:: @ 8271AD3
|
Std_ObtainItem:: @ 8271AD3
|
||||||
giveitem VAR_0x8000, VAR_0x8001
|
giveitem VAR_0x8000, VAR_0x8001
|
||||||
copyvar VAR_0x8007, VAR_RESULT
|
copyvar VAR_0x8007, VAR_RESULT
|
||||||
call EventScript_271AE3
|
call EventScript_ObtainItemMessage
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271AE3:: @ 8271AE3
|
EventScript_ObtainItemMessage:: @ 8271AE3
|
||||||
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001
|
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001
|
||||||
checkitemtype VAR_0x8000
|
checkitemtype VAR_0x8000
|
||||||
call EventScript_BufferStdString
|
call EventScript_BufferPocketNameAndTryFanfare
|
||||||
compare VAR_0x8007, 1
|
compare VAR_0x8007, 1
|
||||||
call_if_eq EventScript_271B95
|
call_if_eq EventScript_ObtainedItem
|
||||||
compare VAR_0x8007, 0
|
compare VAR_0x8007, 0
|
||||||
call_if_eq EventScript_271BA9
|
call_if_eq EventScript_NoRoomForItem
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_BufferStdString:: @ 8271B08
|
EventScript_BufferPocketNameAndTryFanfare:: @ 8271B08
|
||||||
switch VAR_RESULT
|
switch VAR_RESULT
|
||||||
case POCKET_ITEMS, EventScript_StdStringItem
|
case POCKET_ITEMS, EventScript_BufferItemsPocket
|
||||||
case POCKET_KEY_ITEMS, EventScript_StdStringKeyItems
|
case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket
|
||||||
case POCKET_POKE_BALLS, EventScript_StdStringPokeballs
|
case POCKET_POKE_BALLS, EventScript_BufferPokeballsPocket
|
||||||
case POCKET_TM_HM, EventScript_StdStringTMHMS
|
case POCKET_TM_HM, EventScript_BufferTMHMsPocket
|
||||||
case POCKET_BERRIES, EventScript_StdStringBerries
|
case POCKET_BERRIES, EventScript_BufferBerriesPocket
|
||||||
end
|
end
|
||||||
|
|
||||||
EventScript_StdStringItem:: @ 8271B45
|
EventScript_BufferItemsPocket:: @ 8271B45
|
||||||
bufferstdstring 2, STDSTRING_ITEMS
|
bufferstdstring 2, STDSTRING_ITEMS
|
||||||
compare VAR_0x8007, 1
|
compare VAR_0x8007, 1
|
||||||
call_if_eq EventScript_PlayFanfareObtainedItem
|
call_if_eq EventScript_PlayFanfareObtainedItem
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_StdStringKeyItems:: @ 8271B55
|
EventScript_BufferKeyItemsPocket:: @ 8271B55
|
||||||
bufferstdstring 2, STDSTRING_KEYITEMS
|
bufferstdstring 2, STDSTRING_KEYITEMS
|
||||||
compare VAR_0x8007, 1
|
compare VAR_0x8007, 1
|
||||||
call_if_eq EventScript_PlayFanfareObtainedItem
|
call_if_eq EventScript_PlayFanfareObtainedItem
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_StdStringPokeballs:: @ 8271B65
|
EventScript_BufferPokeballsPocket:: @ 8271B65
|
||||||
bufferstdstring 2, STDSTRING_POKEBALLS
|
bufferstdstring 2, STDSTRING_POKEBALLS
|
||||||
compare VAR_0x8007, 1
|
compare VAR_0x8007, 1
|
||||||
call_if_eq EventScript_PlayFanfareObtainedItem
|
call_if_eq EventScript_PlayFanfareObtainedItem
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_StdStringTMHMS:: @ 8271B75
|
EventScript_BufferTMHMsPocket:: @ 8271B75
|
||||||
bufferstdstring 2, STDSTRING_TMHMS
|
bufferstdstring 2, STDSTRING_TMHMS
|
||||||
compare VAR_0x8007, 1
|
compare VAR_0x8007, 1
|
||||||
call_if_eq EventScript_PlayFanfareObtainedTMHM
|
call_if_eq EventScript_PlayFanfareObtainedTMHM
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_StdStringBerries:: @ 8271B85
|
EventScript_BufferBerriesPocket:: @ 8271B85
|
||||||
bufferstdstring 2, STDSTRING_BERRIES
|
bufferstdstring 2, STDSTRING_BERRIES
|
||||||
compare VAR_0x8007, 1
|
compare VAR_0x8007, 1
|
||||||
call_if_eq EventScript_PlayFanfareObtainedItem
|
call_if_eq EventScript_PlayFanfareObtainedItem
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271B95:: @ 8271B95
|
EventScript_ObtainedItem:: @ 8271B95
|
||||||
message gText_ObtainedTheItem
|
message gText_ObtainedTheItem
|
||||||
waitfanfare
|
waitfanfare
|
||||||
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
||||||
setvar VAR_RESULT, 1
|
setvar VAR_RESULT, 1
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271BA9:: @ 8271BA9
|
EventScript_NoRoomForItem:: @ 8271BA9
|
||||||
setvar VAR_RESULT, 0
|
setvar VAR_RESULT, 0
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -75,18 +75,18 @@ EventScript_PlayFanfareObtainedTMHM:: @ 8271BB3
|
|||||||
Std_ObtainDecoration:: @ 8271BB7
|
Std_ObtainDecoration:: @ 8271BB7
|
||||||
givedecoration VAR_0x8000
|
givedecoration VAR_0x8000
|
||||||
copyvar VAR_0x8007, VAR_RESULT
|
copyvar VAR_0x8007, VAR_RESULT
|
||||||
call EventScript_271BC5
|
call EventScript_ObtainDecorationMessage
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271BC5:: @ 8271BC5
|
EventScript_ObtainDecorationMessage:: @ 8271BC5
|
||||||
bufferdecorationname 1, VAR_0x8000
|
bufferdecorationname 1, VAR_0x8000
|
||||||
compare VAR_0x8007, 1
|
compare VAR_0x8007, 1
|
||||||
call_if_eq EventScript_271BE0
|
call_if_eq EventScript_ObtainedDecor
|
||||||
compare VAR_0x8007, 0
|
compare VAR_0x8007, 0
|
||||||
call_if_eq EventScript_271BF7
|
call_if_eq EventScript_NoRoomForDecor
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271BE0:: @ 8271BE0
|
EventScript_ObtainedDecor:: @ 8271BE0
|
||||||
playfanfare MUS_FANFA4
|
playfanfare MUS_FANFA4
|
||||||
message gText_ObtainedTheDecor
|
message gText_ObtainedTheDecor
|
||||||
waitfanfare
|
waitfanfare
|
||||||
@@ -94,7 +94,7 @@ EventScript_271BE0:: @ 8271BE0
|
|||||||
setvar VAR_RESULT, 1
|
setvar VAR_RESULT, 1
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271BF7:: @ 8271BF7
|
EventScript_NoRoomForDecor:: @ 8271BF7
|
||||||
setvar VAR_RESULT, 0
|
setvar VAR_RESULT, 0
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -108,47 +108,47 @@ Std_FindItem:: @ 8271BFD
|
|||||||
copyvar VAR_0x8007, VAR_RESULT
|
copyvar VAR_0x8007, VAR_RESULT
|
||||||
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001
|
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001
|
||||||
checkitemtype VAR_0x8000
|
checkitemtype VAR_0x8000
|
||||||
call EventScript_BufferStdString
|
call EventScript_BufferPocketNameAndTryFanfare
|
||||||
compare VAR_0x8007, 1
|
compare VAR_0x8007, 1
|
||||||
call_if_eq EventScript_PickItemUp
|
call_if_eq EventScript_PickUpItem
|
||||||
compare VAR_0x8007, 0
|
compare VAR_0x8007, 0
|
||||||
call_if_eq EventScript_271CA1
|
call_if_eq EventScript_NoRoomToPickUpItem
|
||||||
release
|
release
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_PickItemUp:: @ 8271C3A
|
EventScript_PickUpItem:: @ 8271C3A
|
||||||
removeobject VAR_LAST_TALKED
|
removeobject VAR_LAST_TALKED
|
||||||
giveitem VAR_0x8004, VAR_0x8005
|
giveitem VAR_0x8004, VAR_0x8005
|
||||||
specialvar VAR_RESULT, BufferTMHMMoveName
|
specialvar VAR_RESULT, BufferTMHMMoveName
|
||||||
copyvar VAR_0x8008, VAR_RESULT
|
copyvar VAR_0x8008, VAR_RESULT
|
||||||
compare VAR_0x8008, 1
|
compare VAR_0x8008, 1
|
||||||
call_if_eq EventScript_271C8F
|
call_if_eq EventScript_FoundTMHM
|
||||||
compare VAR_0x8008, 0
|
compare VAR_0x8008, 0
|
||||||
call_if_eq EventScript_271C9B
|
call_if_eq EventScript_FoundItem
|
||||||
waitfanfare
|
waitfanfare
|
||||||
waitmessage
|
waitmessage
|
||||||
bufferitemnameplural 1, VAR_0x8004, VAR_0x8005
|
bufferitemnameplural 1, VAR_0x8004, VAR_0x8005
|
||||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN
|
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN
|
||||||
special CallBattlePyramidFunction
|
special CallBattlePyramidFunction
|
||||||
compare VAR_RESULT, 1
|
compare VAR_RESULT, 1
|
||||||
goto_if_eq EventScript_271C86
|
goto_if_eq EventScript_PutBattlePyramidItemInBag
|
||||||
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271C86:: @ 8271C86
|
EventScript_PutBattlePyramidItemInBag:: @ 8271C86
|
||||||
msgbox gText_PlayerPutItemInBag, MSGBOX_DEFAULT
|
msgbox gText_PlayerPutItemInBag, MSGBOX_DEFAULT
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271C8F:: @ 8271C8F
|
EventScript_FoundTMHM:: @ 8271C8F
|
||||||
bufferitemnameplural 0, VAR_0x8004, VAR_0x8005
|
bufferitemnameplural 0, VAR_0x8004, VAR_0x8005
|
||||||
message gText_PlayerFoundOneItemTwoLines
|
message gText_PlayerFoundOneTMHM
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271C9B:: @ 8271C9B
|
EventScript_FoundItem:: @ 8271C9B
|
||||||
message gText_PlayerFoundOneItem
|
message gText_PlayerFoundOneItem
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_271CA1:: @ 8271CA1
|
EventScript_NoRoomToPickUpItem:: @ 8271CA1
|
||||||
msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT
|
msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT
|
||||||
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
|
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
|
||||||
setvar VAR_RESULT, 0
|
setvar VAR_RESULT, 0
|
||||||
@@ -161,46 +161,46 @@ EventScript_HiddenItemScript:: @ 8271CB7
|
|||||||
copyvar VAR_0x8007, VAR_RESULT
|
copyvar VAR_0x8007, VAR_RESULT
|
||||||
bufferitemnameplural 1, VAR_0x8005, 1
|
bufferitemnameplural 1, VAR_0x8005, 1
|
||||||
checkitemtype VAR_0x8005
|
checkitemtype VAR_0x8005
|
||||||
call EventScript_BufferStdString
|
call EventScript_BufferPocketNameAndTryFanfare
|
||||||
compare VAR_0x8007, 1
|
compare VAR_0x8007, 1
|
||||||
goto_if_eq EventScript_271CE8
|
goto_if_eq EventScript_PickUpHiddenItem
|
||||||
compare VAR_0x8007, 0
|
compare VAR_0x8007, 0
|
||||||
goto_if_eq EventScript_271D47
|
goto_if_eq EventScript_NoRoomForHiddenItem
|
||||||
end
|
end
|
||||||
|
|
||||||
EventScript_271CE8:: @ 8271CE8
|
EventScript_PickUpHiddenItem:: @ 8271CE8
|
||||||
copyvar VAR_0x8008, VAR_0x8004
|
copyvar VAR_0x8008, VAR_0x8004
|
||||||
copyvar VAR_0x8004, VAR_0x8005
|
copyvar VAR_0x8004, VAR_0x8005
|
||||||
specialvar VAR_RESULT, BufferTMHMMoveName
|
specialvar VAR_RESULT, BufferTMHMMoveName
|
||||||
compare VAR_RESULT, 1
|
compare VAR_RESULT, 1
|
||||||
goto_if_eq EventScript_271D0E
|
goto_if_eq EventScript_FoundHiddenTMHM
|
||||||
compare VAR_RESULT, 0
|
compare VAR_RESULT, 0
|
||||||
goto_if_eq EventScript_271D1F
|
goto_if_eq EventScript_FoundHiddenItem
|
||||||
end
|
end
|
||||||
|
|
||||||
EventScript_271D0E:: @ 8271D0E
|
EventScript_FoundHiddenTMHM:: @ 8271D0E
|
||||||
bufferitemnameplural 0, VAR_0x8004, 1
|
bufferitemnameplural 0, VAR_0x8004, 1
|
||||||
message gText_PlayerFoundOneItemTwoLines
|
message gText_PlayerFoundOneTMHM
|
||||||
goto EventScript_271D2A
|
goto EventScript_PutHiddenItemInPocket
|
||||||
end
|
end
|
||||||
|
|
||||||
EventScript_271D1F:: @ 8271D1F
|
EventScript_FoundHiddenItem:: @ 8271D1F
|
||||||
message gText_PlayerFoundOneItem
|
message gText_PlayerFoundOneItem
|
||||||
goto EventScript_271D2A
|
goto EventScript_PutHiddenItemInPocket
|
||||||
end
|
end
|
||||||
|
|
||||||
EventScript_271D2A:: @ 8271D2A
|
EventScript_PutHiddenItemInPocket:: @ 8271D2A
|
||||||
waitmessage
|
waitmessage
|
||||||
waitfanfare
|
waitfanfare
|
||||||
bufferitemnameplural 1, VAR_0x8004, 1
|
bufferitemnameplural 1, VAR_0x8004, 1
|
||||||
copyvar VAR_0x8004, VAR_0x8008
|
copyvar VAR_0x8004, VAR_0x8008
|
||||||
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
||||||
special sub_80EDCE8
|
special TryPutTreasureInvestigatorsOnAir
|
||||||
special SetFlagInVar
|
special SetHiddenItemFlag
|
||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
EventScript_271D47:: @ 8271D47
|
EventScript_NoRoomForHiddenItem:: @ 8271D47
|
||||||
msgbox gText_PlayerFoundOneItem, MSGBOX_DEFAULT
|
msgbox gText_PlayerFoundOneItem, MSGBOX_DEFAULT
|
||||||
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
|
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
|
||||||
setvar VAR_RESULT, 0
|
setvar VAR_RESULT, 0
|
||||||
|
|||||||
+2
-2
@@ -161,7 +161,7 @@ gSpecials:: @ 81DBA64
|
|||||||
def_special GetPlayerTrainerIdOnesDigit
|
def_special GetPlayerTrainerIdOnesDigit
|
||||||
def_special GetPlayerBigGuyGirlString
|
def_special GetPlayerBigGuyGirlString
|
||||||
def_special GetRivalSonDaughterString
|
def_special GetRivalSonDaughterString
|
||||||
def_special SetFlagInVar
|
def_special SetHiddenItemFlag
|
||||||
def_special CableCarWarp
|
def_special CableCarWarp
|
||||||
def_special CableCar
|
def_special CableCar
|
||||||
def_special Overworld_PlaySpecialMapMusic
|
def_special Overworld_PlaySpecialMapMusic
|
||||||
@@ -352,7 +352,7 @@ gSpecials:: @ 81DBA64
|
|||||||
def_special DoesPartyHaveEnigmaBerry
|
def_special DoesPartyHaveEnigmaBerry
|
||||||
def_special ScriptRandom
|
def_special ScriptRandom
|
||||||
def_special sub_81AFDD0
|
def_special sub_81AFDD0
|
||||||
def_special sub_80EDCE8
|
def_special TryPutTreasureInvestigatorsOnAir
|
||||||
def_special sub_80EE2CC
|
def_special sub_80EE2CC
|
||||||
def_special sub_80EE72C
|
def_special sub_80EE72C
|
||||||
def_special sub_80EE7C0
|
def_special sub_80EE7C0
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ void sub_80EE35C(u16 foeSpecies, u16 species, u8 moveIdx, const u16 *movePtr, u1
|
|||||||
void sub_80EE8C8(u16 winStreak, u8 facility);
|
void sub_80EE8C8(u16 winStreak, u8 facility);
|
||||||
void DoTVShow(void);
|
void DoTVShow(void);
|
||||||
void DoTVShowInSearchOfTrainers(void);
|
void DoTVShowInSearchOfTrainers(void);
|
||||||
void sub_80EDCE8(void);
|
void TryPutTreasureInvestigatorsOnAir(void);
|
||||||
void sub_80EE2CC(void);
|
void sub_80EE2CC(void);
|
||||||
void sub_80EE72C(void);
|
void sub_80EE72C(void);
|
||||||
void IncrementDailyPlantedBerries(void);
|
void IncrementDailyPlantedBerries(void);
|
||||||
|
|||||||
@@ -973,7 +973,7 @@ void CableCarWarp(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetFlagInVar(void)
|
void SetHiddenItemFlag(void)
|
||||||
{
|
{
|
||||||
FlagSet(gSpecialVar_0x8004);
|
FlagSet(gSpecialVar_0x8004);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user