Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers

# Conflicts:
#	asm/macros/event.inc
#	data/field_effect_scripts.s
#	data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
#	data/script_cmd_table.inc
#	graphics/pokemon/castform/sunny/anim_front.png
#	graphics/pokemon/castform/sunny/normal.pal
#	include/battle_util.h
#	include/constants/event_object_movement.h
#	include/constants/field_effects.h
#	src/battle_controller_player.c
#	src/battle_util.c
#	src/data/object_events/movement_action_func_tables.h
#	src/data/object_events/object_event_pic_tables.h
#	src/data/trainer_graphics/back_pic_anims.h
#	src/daycare.c
#	src/event_object_movement.c
#	src/field_effect_helpers.c
#	src/load_save.c
#	src/scrcmd.c
#	src/trainer_see.c
This commit is contained in:
Eduardo Quezada
2024-01-17 18:11:35 -03:00
3863 changed files with 221376 additions and 162663 deletions

View File

@@ -6,6 +6,8 @@ BerryTreeScript::
case BERRY_STAGE_PLANTED, BerryTree_EventScript_CheckBerryStage1
case BERRY_STAGE_SPROUTED, BerryTree_EventScript_CheckBerryStage2
case BERRY_STAGE_TALLER, BerryTree_EventScript_CheckBerryStage3
case BERRY_STAGE_TRUNK, BerryTree_EventScript_CheckBerryStageTrunk
case BERRY_STAGE_BUDDING, BerryTree_EventScript_CheckBerryStageBudding
case BERRY_STAGE_FLOWERING, BerryTree_EventScript_CheckBerryStage4
case BERRY_STAGE_BERRIES, BerryTree_EventScript_CheckBerryFullyGrown
end
@@ -23,6 +25,8 @@ BerryTree_EventScript_CheckSoil::
faceplayer
specialvar VAR_RESULT, PlayerHasBerries
goto_if_eq VAR_RESULT, TRUE, BerryTree_EventScript_WantToPlant
specialvar VAR_RESULT, PlayerHasMulch
goto_if_eq VAR_RESULT, TRUE, BerryTree_EventScript_WantToMulch
message BerryTree_Text_ItsSoftLoamySoil
waitmessage
waitbuttonpress
@@ -30,11 +34,42 @@ BerryTree_EventScript_CheckSoil::
end
BerryTree_EventScript_WantToPlant::
specialvar VAR_RESULT, PlayerHasMulch
goto_if_eq VAR_RESULT, TRUE, BerryTree_EventScript_WantToPlantMulch
msgbox BerryTree_Text_WantToPlant, MSGBOX_YESNO
goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_ChooseBerryToPlant
goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_CancelPlanting
end
BerryTree_EventScript_WantToMulch::
.if OW_BERRY_MULCH_USAGE == TRUE
msgbox BerryTree_Text_WantToMulch, MSGBOX_YESNO
goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_ChooseMulchToUse
goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_CancelPlanting
.endif
end
BerryTree_EventScript_WantToPlantMulch::
.if OW_BERRY_MULCH_USAGE == TRUE
message BerryTree_Text_ItsSoftLoamySoil
waitmessage
multichoice 0, 0, MULTI_BERRY_PLOT, FALSE
switch VAR_RESULT
case 0, BerryTree_EventScript_ChooseMulchToUse
case 1, BerryTree_EventScript_ChooseBerryToPlant
case 2, BerryTree_EventScript_CancelPlanting
case MULTI_B_PRESSED, BerryTree_EventScript_CancelPlanting
BerryTree_EventScript_ChooseMulchToUse::
fadescreen FADE_TO_BLACK
closemessage
special Bag_ChooseMulch
waitstate
goto_if_eq VAR_ITEM_ID, 0, BerryTree_EventScript_CancelPlanting
removeitem VAR_ITEM_ID
call BerryTree_EventScript_UseMulch
.endif
BerryTree_EventScript_ChooseBerryToPlant::
fadescreen FADE_TO_BLACK
closemessage
@@ -72,6 +107,22 @@ BerryTree_EventScript_CheckBerryStage3::
waitbuttonpress
goto BerryTree_EventScript_WantToWater
BerryTree_EventScript_CheckBerryStageTrunk::
lockall
special ObjectEventInteractionGetBerryName
message BerryTree_Text_BerryGrowthStageTrunk
waitmessage
waitbuttonpress
goto BerryTree_EventScript_WantToWater
BerryTree_EventScript_CheckBerryStageBudding::
lockall
special ObjectEventInteractionGetBerryName
message BerryTree_Text_BerryGrowthStageBudding
waitmessage
waitbuttonpress
goto BerryTree_EventScript_WantToWater
BerryTree_EventScript_CheckBerryStage4::
call BerryTree_EventScript_GetCareAdverb
lockall
@@ -103,13 +154,25 @@ BerryTree_EventScript_CheckBerryFullyGrown::
lock
faceplayer
special ObjectEventInteractionGetBerryCountString
.if OW_BERRY_MUTATIONS == TRUE
goto_if_eq VAR_RESULT, TRUE, BerryTree_EventScript_CheckBerryFullyGrown_Mutation
.endif
msgbox BerryTree_Text_WantToPick, MSGBOX_YESNO
goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_PickBerry
goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_CancelPickingBerry
.set BERRY_NORMAL_BAG_FULL, 0
.set BERRY_NORMAL_SPACE_IN_BAG, 1
.set BERRY_MUTATION_BAG_FULL, 2
.set BERRY_MUTATION_SPACE_IN_BAG, 3
BerryTree_EventScript_PickBerry::
special ObjectEventInteractionPickBerryTree
goto_if_eq VAR_0x8004, 0, BerryTree_EventScript_BerryPocketFull
goto_if_eq VAR_0x8004, BERRY_NORMAL_BAG_FULL, BerryTree_EventScript_BerryPocketFull
.if OW_BERRY_MUTATIONS == TRUE
goto_if_eq VAR_0x8004, BERRY_MUTATION_BAG_FULL, BerryTree_EventScript_BerryPocketFull_Mutation
goto_if_eq VAR_0x8004, BERRY_MUTATION_SPACE_IN_BAG, BerryTree_EventScript_PickBerry_Mutation
.endif
special IncrementDailyPickedBerries
special ObjectEventInteractionRemoveBerryTree
message BerryTree_Text_PickedTheBerry
@@ -145,8 +208,16 @@ BerryTree_EventScript_ItemUsePlantBerry::
end
BerryTree_EventScript_WantToWater::
.if OW_BERRY_PESTS == TRUE
call BerryTree_EventScript_CheckForPests
.endif
.if OW_BERRY_WEEDS == TRUE
call BerryTree_EventScript_CheckForWeed
.endif
checkitem ITEM_WAILMER_PAIL
goto_if_eq VAR_RESULT, FALSE, BerryTree_EventScript_DontWater
specialvar VAR_RESULT, CanWaterBerryPlot
goto_if_eq VAR_RESULT, FALSE, BerryTree_EventScript_DontWater
special ObjectEventInteractionGetBerryName
msgbox BerryTree_Text_WantToWater, MSGBOX_YESNO
goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_WaterBerry
@@ -194,17 +265,39 @@ BerryTree_Text_PlantedOneBerry:
.string "the soft, loamy soil.$"
BerryTree_Text_BerryGrowthStage1:
.if OW_BERRY_SIX_STAGES == TRUE
.string "This is where you planted the\n{STR_VAR_1}!$"
.else
.string "One {STR_VAR_1} was planted here.$"
.endif
BerryTree_Text_BerryGrowthStage2:
.if OW_BERRY_SIX_STAGES == TRUE
.string "The {STR_VAR_1} is sprouting!$"
.else
.string "{STR_VAR_1} has sprouted.$"
.endif
BerryTree_Text_BerryGrowthStage3:
.if OW_BERRY_SIX_STAGES == TRUE
.string "The {STR_VAR_1}'s seedling is growing well!$"
.else
.string "This {STR_VAR_1} plant is growing taller.$"
.endif
BerryTree_Text_BerryGrowthStageTrunk:
.string "The {STR_VAR_1}'s trunk is getting bigger!$"
BerryTree_Text_BerryGrowthStageBudding:
.string "The {STR_VAR_1} tree has buds!$"
BerryTree_Text_BerryGrowthStage4:
.if OW_BERRY_SIX_STAGES == TRUE
.string "The {STR_VAR_1} tree is in bloom!$"
.else
.string "These {STR_VAR_1} flowers are blooming\n"
.string "{STR_VAR_2}.$"
.endif
BerryTree_Text_CareAdverbGreat:
.string "very beautifully$"
@@ -249,3 +342,123 @@ BerryTree_Text_PlantIsDelighted:
BerryTree_Text_ExclamationPoint:
.string "!$"
.if OW_BERRY_MUTATIONS == TRUE
BerryTree_EventScript_CheckBerryFullyGrown_Mutation:
msgbox BerryTree_Text_WantToPick_Mutation, MSGBOX_YESNO
goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_PickBerry
goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_CancelPickingBerry_Mutation
BerryTree_EventScript_CancelPickingBerry_Mutation::
message BerryTree_Text_BerryLeftUnpicked_Mutation
waitmessage
waitbuttonpress
release
end
BerryTree_EventScript_BerryPocketFull_Mutation::
message BerryTree_Text_BerryPocketFull_Mutation
waitmessage
waitbuttonpress
release
end
BerryTree_EventScript_PickBerry_Mutation::
special IncrementDailyPickedBerries
special ObjectEventInteractionRemoveBerryTree
message BerryTree_Text_PickedTheBerry_Mutation
playfanfare MUS_OBTAIN_BERRY
waitmessage
waitfanfare
waitbuttonpress
message BerryTree_Text_PutAwayBerry_Mutation
waitmessage
waitbuttonpress
release
end
BerryTree_Text_WantToPick_Mutation:
.string "You found {STR_VAR_2} {STR_VAR_1}\n"
.string "and 1 {STR_VAR_3}!\p"
.string "Do you want to pick them?$"
BerryTree_Text_BerryLeftUnpicked_Mutation:
.string "{PLAYER} left the {STR_VAR_1}\n"
.string "and the {STR_VAR_3} unpicked.$"
BerryTree_Text_BerryPocketFull_Mutation:
.string "The BAG's BERRIES POCKET is full.\p"
.string "The {STR_VAR_1} and the\n"
.string "{STR_VAR_3} couldn't be taken.$"
BerryTree_Text_PickedTheBerry_Mutation:
.string "{PLAYER} picked the {STR_VAR_2} {STR_VAR_1}\n"
.string "and the {STR_VAR_3}.$"
BerryTree_Text_PutAwayBerry_Mutation:
.string "{PLAYER} put away the {STR_VAR_1}\n"
.string "and the {STR_VAR_3} in the BAG's\l"
.string "BERRIES POCKET.\p"
.string "The soil returned to its soft and\n"
.string "loamy state.$"
.endif
.if OW_BERRY_MULCH_USAGE == TRUE
BerryTree_EventScript_UseMulch::
special ObjectEventInteractionApplyMulch
message BerryTree_Text_ScatteredMulch
waitmessage
waitbuttonpress
return
BerryTree_Text_WantToMulch:
.string "It's soft, loamy soil.\n"
.string "Put down some fertilizer?$"
BerryTree_Text_ScatteredMulch:
.string "{PLAYER} scattered the {STR_VAR_1}\n"
.string "on the soft, loamy soil.$"
.endif
.if OW_BERRY_WEEDS == TRUE
BerryTree_EventScript_CheckForWeed::
specialvar VAR_RESULT, ObjectEventInteractionBerryHasWeed
call_if_eq VAR_RESULT, TRUE, BerryTree_EventScript_WeedIsGrowing
return
BerryTree_EventScript_WeedIsGrowing::
msgbox BerryTree_Text_WeedIsGrowing, MSGBOX_YESNO
goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_PullOutWeed
return
BerryTree_EventScript_PullOutWeed::
special ObjectEventInteractionPullBerryWeed
message BerryTree_Text_PulledOutTheWeed
waitmessage
waitbuttonpress
return
BerryTree_Text_WeedIsGrowing:
.string "A weed is growing here.\n"
.string "Do you want to pull it out?$"
BerryTree_Text_PulledOutTheWeed:
.string "{PLAYER} pulled out the weed!$"
.endif
.if OW_BERRY_PESTS == TRUE
BerryTree_EventScript_CheckForPests::
specialvar VAR_RESULT, ObjectEventInteractionBerryHasPests
call_if_eq VAR_RESULT, TRUE, BerryTree_EventScript_EncounterPests
return
BerryTree_EventScript_EncounterPests::
message BerryTree_Text_APokemonAppeared
waitmessage
waitbuttonpress
dowildbattle
return
BerryTree_Text_APokemonAppeared:
.string "A Pokémon appeared!$"
.endif

View File

@@ -743,37 +743,36 @@ EventScript_TradeCenter_Chair3::
waitstate
end
@ VAR_TEMP_1 for below scripts set by ReceiveGiftItem
EventScript_RecordCenter_Spot0::
setvar VAR_0x8005, 0
special RecordMixingPlayerSpotTriggered
waitstate
goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
goto_if_ne VAR_TEMP_RECORD_MIX_GIFT_ITEM, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
end
EventScript_RecordCenter_Spot1::
setvar VAR_0x8005, 1
special RecordMixingPlayerSpotTriggered
waitstate
goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
goto_if_ne VAR_TEMP_RECORD_MIX_GIFT_ITEM, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
end
EventScript_RecordCenter_Spot2::
setvar VAR_0x8005, 2
special RecordMixingPlayerSpotTriggered
waitstate
goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
goto_if_ne VAR_TEMP_RECORD_MIX_GIFT_ITEM, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
end
EventScript_RecordCenter_Spot3::
setvar VAR_0x8005, 3
special RecordMixingPlayerSpotTriggered
waitstate
goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
goto_if_ne VAR_TEMP_RECORD_MIX_GIFT_ITEM, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
end
RecordCorner_EventScript_ReceivedGiftItem::
bufferitemname STR_VAR_2, VAR_TEMP_1
bufferitemname STR_VAR_2, VAR_TEMP_RECORD_MIX_GIFT_ITEM
message RecordCorner_Text_PlayerSentOverOneX
waitmessage
waitbuttonpress
@@ -814,7 +813,7 @@ TradeCenter_EventScript_Attendant::
end
RecordCorner_EventScript_Attendant::
goto_if_ne VAR_TEMP_0, 0, RecordCorner_EventScript_AlreadyMixed
goto_if_ne VAR_TEMP_MIXED_RECORDS, 0, RecordCorner_EventScript_AlreadyMixed
special Script_FacePlayer
message RecordCorner_Text_TakeSeatAndWait
waitmessage

View File

@@ -1,14 +1,15 @@
.if DEBUG_OVERWORLD_MENU == TRUE
Debug_ShowFieldMessageStringVar4::
special ShowFieldMessageStringVar4
Debug_MessageEnd:
waitmessage
waitbuttonpress
releaseall
end
Debug_ShowFieldMessageStringVar4::
special ShowFieldMessageStringVar4
goto Debug_MessageEnd
Debug_CheatStart::
lockall
setflag FLAG_SYS_POKEMON_GET
setflag FLAG_RESCUED_BIRCH
setflag FLAG_HIDE_ROUTE_101_BIRCH_ZIGZAGOON_BATTLE
@@ -38,18 +39,40 @@ Debug_CheatStart::
setvar VAR_BRINEY_HOUSE_STATE, 1
setvar VAR_ROUTE116_STATE, 2
setflag FLAG_HIDE_ROUTE_116_MR_BRINEY
setflag FLAG_BADGE01_GET
setflag FLAG_BADGE02_GET
setflag FLAG_BADGE03_GET
setflag FLAG_BADGE04_GET
setflag FLAG_BADGE05_GET
setflag FLAG_BADGE06_GET
setflag FLAG_BADGE07_GET
setflag FLAG_BADGE08_GET
setflag FLAG_VISITED_LITTLEROOT_TOWN
setflag FLAG_VISITED_OLDALE_TOWN
setflag FLAG_VISITED_DEWFORD_TOWN
setflag FLAG_VISITED_LAVARIDGE_TOWN
setflag FLAG_VISITED_FALLARBOR_TOWN
setflag FLAG_VISITED_VERDANTURF_TOWN
setflag FLAG_VISITED_PACIFIDLOG_TOWN
setflag FLAG_VISITED_PETALBURG_CITY
setflag FLAG_VISITED_SLATEPORT_CITY
setflag FLAG_VISITED_MAUVILLE_CITY
setflag FLAG_VISITED_RUSTBORO_CITY
setflag FLAG_VISITED_FORTREE_CITY
setflag FLAG_VISITED_LILYCOVE_CITY
setflag FLAG_VISITED_MOSSDEEP_CITY
setflag FLAG_VISITED_SOOTOPOLIS_CITY
setflag FLAG_VISITED_EVER_GRANDE_CITY
setflag FLAG_LANDMARK_POKEMON_LEAGUE
setflag FLAG_LANDMARK_BATTLE_FRONTIER
clearflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY
clearflag FLAG_HIDE_BRINEYS_HOUSE_PEEKO
release
end
Debug_FlagsNotSetOverworldConfigMessage::
lockall
message Debug_FlagsNotSetOverworldConfigMessage_Text
waitmessage
waitbuttonpress
releaseall
end
goto Debug_MessageEnd
Debug_FlagsNotSetOverworldConfigMessage_Text:
.string "Feature unavailable!\n"
@@ -57,40 +80,43 @@ Debug_FlagsNotSetOverworldConfigMessage_Text:
.string "'include/config/overworld.h'!$"
Debug_FlagsNotSetBattleConfigMessage::
lockall
message Debug_FlagsNotSetBattleConfigMessage_Text
waitmessage
waitbuttonpress
releaseall
end
goto Debug_MessageEnd
Debug_FlagsNotSetBattleConfigMessage_Text:
.string "Feature unavailable!\n"
.string "Please define a usable flag in:\l"
.string "'include/config/battle.h'!$"
Debug_Script_1::
Debug_BoxFilledMessage::
message Debug_BoxFilledMessage_Text
goto Debug_MessageEnd
Debug_BoxFilledMessage_Text:
.string "Storage boxes filled!$"
Debug_EventScript_Script_1::
end
Debug_Script_2::
Debug_EventScript_Script_2::
end
Debug_Script_3::
Debug_EventScript_Script_3::
end
Debug_Script_4::
Debug_EventScript_Script_4::
end
Debug_Script_5::
Debug_EventScript_Script_5::
end
Debug_Script_6::
Debug_EventScript_Script_6::
end
Debug_Script_7::
Debug_EventScript_Script_7::
end
Debug_Script_8::
Debug_EventScript_Script_8::
end
Debug_CheckSaveBlock::
@@ -104,12 +130,121 @@ Debug_CheckSaveBlock::
end
Debug_SaveBlock1Size::
.string "SaveBlock1 size: {STR_VAR_1}/{STR_VAR_2}.$"
.string "SaveBlock1 size: {STR_VAR_1}b/{STR_VAR_2}b.\n"
.string "Free space: {STR_VAR_3}b.$"
Debug_SaveBlock2Size::
.string "SaveBlock2 size: {STR_VAR_1}/{STR_VAR_2}.$"
.string "SaveBlock2 size: {STR_VAR_1}b/{STR_VAR_2}b.\n"
.string "Free space: {STR_VAR_3}b.$"
Debug_PokemonStorageSize::
.string "{PKMN}Storage size: {STR_VAR_1}/{STR_VAR_2}.$"
.string "{PKMN}Storage size: {STR_VAR_1}b/{STR_VAR_2}b.\n"
.string "Free space: {STR_VAR_3}b.$"
Debug_CheckROMSpace::
callnative CheckROMSize
msgbox Debug_ROMSize, MSGBOX_DEFAULT
release
end
Debug_ROMSize::
.string "ROM size: {STR_VAR_1}MB/32MB.\n"
.string "Free space: {STR_VAR_2}MB.$"
Debug_HatchAnEgg::
lockall
getpartysize
goto_if_eq VAR_RESULT, 0, Debug_HatchAnEgg_NoPokemon
special ChoosePartyMon
waitstate
goto_if_ge VAR_0x8004, PARTY_SIZE, Debug_HatchAnEgg_End
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
goto_if_ne VAR_RESULT, SPECIES_EGG, DebugScript_HatchAnEgg_CantForceHatch
special EggHatch
waitstate
Debug_HatchAnEgg_End::
releaseall
end
Debug_HatchAnEgg_NoPokemon::
msgbox DebugScript_HatchAnEgg_Text_EmptyParty, MSGBOX_DEFAULT
releaseall
end
DebugScript_HatchAnEgg_CantForceHatch::
msgbox DebugScript_HatchAnEgg_Text_NotAnEgg, MSGBOX_DEFAULT
releaseall
end
DebugScript_HatchAnEgg_Text_EmptyParty::
.string "You have no Pokémon nor Eggs.$"
DebugScript_HatchAnEgg_Text_NotAnEgg::
.string "That's not a Pokémon Egg.$"
DebugScript_ZeroDaycareMons::
msgbox DebugText_DaycareNoPokemon, MSGBOX_DEFAULT
releaseall
end
DebugScript_OneDaycareMons::
msgbox DebugText_DaycareOnePokemon, MSGBOX_DEFAULT
releaseall
end
DebugScript_DaycareMonsNotCompatible::
msgbox DebugText_DaycarePokemonNotCompatible, MSGBOX_DEFAULT
releaseall
end
DebugText_DaycareNoPokemon:
.string "You have no Pokémon at Daycare.$"
DebugText_DaycareOnePokemon:
.string "You have only one Pokémon at Daycare.$"
DebugText_DaycarePokemonNotCompatible:
.string "Your Pokémon at Daycare can't\nhave babies together!$"
Debug_ShowExpansionVersion::
callnative BufferExpansionVersion
msgbox Debug_ExpansionVersion, MSGBOX_DEFAULT
release
end
Debug_ExpansionVersion:
.string "pokeemerald-expansion {STR_VAR_1}$"
Debug_BerryPestsDisabled::
msgbox DebugText_BerryPestsDisabled, MSGBOX_DEFAULT
release
end
DebugText_BerryPestsDisabled:
.string "OW_BERRY_PESTS is disabled.\n"
.string "Unable to force pests onto berry trees.$"
Debug_BerryWeedsDisabled::
msgbox DebugText_BerryWeedsDisabled, MSGBOX_DEFAULT
release
end
DebugText_BerryWeedsDisabled:
.string "OW_BERRY_WEEDS is disabled.\n"
.string "Unable to force weeds onto berry trees.$"
.endif
Debug_FlagsAndVarNotSetBattleConfigMessage::
lockall
message Debug_FlagsAndVarNotSetBattleConfigMessage_Text
waitmessage
waitbuttonpress
releaseall
end
Debug_FlagsAndVarNotSetBattleConfigMessage_Text:
.string "Feature unavailable! Please define a\n"
.string "usable flag and a usable var in:\l"
.string "'include/config/battle.h'!$"

View File

@@ -202,7 +202,7 @@ GabbyAndTy_EventScript_FirstInterview::
call_if_eq VAR_FACING, DIR_NORTH, GabbyAndTy_EventScript_FacePlayerNorth
call_if_eq VAR_FACING, DIR_SOUTH, GabbyAndTy_EventScript_FacePlayerSouth
call_if_eq VAR_FACING, DIR_EAST, GabbyAndTy_EventScript_FacePlayerEast
goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
goto_if_set FLAG_TEMP_SKIP_GABBY_INTERVIEW, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
msgbox GabbyAndTy_Text_WhoAreYouInterview, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
@@ -230,7 +230,7 @@ GabbyAndTy_EventScript_RequestInterview::
call_if_eq VAR_FACING, DIR_NORTH, GabbyAndTy_EventScript_FacePlayerNorth
call_if_eq VAR_FACING, DIR_SOUTH, GabbyAndTy_EventScript_FacePlayerSouth
call_if_eq VAR_FACING, DIR_EAST, GabbyAndTy_EventScript_FacePlayerEast
goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
goto_if_set FLAG_TEMP_SKIP_GABBY_INTERVIEW, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
specialvar VAR_RESULT, GabbyAndTyGetLastQuote
goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DidntInterviewLastTime
msgbox GabbyAndTy_Text_QuoteFromLastInterview, MSGBOX_DEFAULT
@@ -295,13 +295,13 @@ GabbyAndTy_EventScript_Interview::
goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut
msgbox GabbyAndTy_Text_PerfectWellBeSeeingYou, MSGBOX_DEFAULT
special GabbyAndTyAfterInterview
setflag FLAG_TEMP_1
setflag FLAG_TEMP_SKIP_GABBY_INTERVIEW
release
end
GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut::
msgbox GabbyAndTy_Text_DontGiveUpKeepingEyeOut, MSGBOX_DEFAULT
setflag FLAG_TEMP_1
setflag FLAG_TEMP_SKIP_GABBY_INTERVIEW
release
end

View File

@@ -1,659 +1,4 @@
Route102_EventScript_ItemPotion::
finditem ITEM_POTION
end
Route103_EventScript_ItemGuardSpec::
finditem ITEM_GUARD_SPEC
end
Route103_EventScript_ItemPPUp::
finditem ITEM_PP_UP
end
Route104_EventScript_ItemPPUp::
finditem ITEM_PP_UP
end
Route104_EventScript_ItemPokeBall::
finditem ITEM_POKE_BALL
end
Route104_EventScript_ItemXAccuracy::
finditem ITEM_X_ACCURACY
end
Route104_EventScript_ItemPotion::
finditem ITEM_POTION
end
Route105_EventScript_ItemIron::
finditem ITEM_IRON
end
Route106_EventScript_ItemProtein::
finditem ITEM_PROTEIN
end
Route108_EventScript_ItemStarPiece::
finditem ITEM_STAR_PIECE
end
Route109_EventScript_ItemPPUp::
finditem ITEM_PP_UP
end
Route109_EventScript_ItemPotion::
finditem ITEM_POTION
end
Route110_EventScript_ItemRareCandy::
finditem ITEM_RARE_CANDY
end
Route110_EventScript_ItemDireHit::
finditem ITEM_DIRE_HIT
end
Route110_EventScript_ItemElixir::
finditem ITEM_ELIXIR
end
Route111_EventScript_ItemTM37::
finditem ITEM_TM37
end
Route111_EventScript_ItemStardust::
finditem ITEM_STARDUST
end
Route111_EventScript_ItemHPUp::
finditem ITEM_HP_UP
end
Route111_EventScript_ItemElixir::
finditem ITEM_ELIXIR
end
Route112_EventScript_ItemNugget::
finditem ITEM_NUGGET
end
Route113_EventScript_ItemMaxEther::
finditem ITEM_MAX_ETHER
end
Route113_EventScript_ItemSuperRepel::
finditem ITEM_SUPER_REPEL
end
Route113_EventScript_ItemHyperPotion::
finditem ITEM_HYPER_POTION
end
Route114_EventScript_ItemRareCandy::
finditem ITEM_RARE_CANDY
end
Route114_EventScript_ItemProtein::
finditem ITEM_PROTEIN
end
Route114_EventScript_ItemEnergyPowder::
finditem ITEM_ENERGY_POWDER
end
Route115_EventScript_ItemSuperPotion::
finditem ITEM_SUPER_POTION
end
Route115_EventScript_ItemTM01::
finditem ITEM_TM01
end
Route115_EventScript_ItemIron::
finditem ITEM_IRON
end
Route115_EventScript_ItemGreatBall::
finditem ITEM_GREAT_BALL
end
Route115_EventScript_ItemHealPowder::
finditem ITEM_HEAL_POWDER
end
Route115_EventScript_ItemPPUp::
finditem ITEM_PP_UP
end
Route116_EventScript_ItemXSpecial::
finditem ITEM_X_SP_ATK
end
Route116_EventScript_ItemEther::
finditem ITEM_ETHER
end
Route116_EventScript_ItemRepel::
finditem ITEM_REPEL
end
Route116_EventScript_ItemHPUp::
finditem ITEM_HP_UP
end
Route116_EventScript_ItemPotion::
finditem ITEM_POTION
end
Route117_EventScript_ItemGreatBall::
finditem ITEM_GREAT_BALL
end
Route117_EventScript_ItemRevive::
finditem ITEM_REVIVE
end
Route118_EventScript_ItemHyperPotion::
finditem ITEM_HYPER_POTION
end
Route119_EventScript_ItemSuperRepel::
finditem ITEM_SUPER_REPEL
end
Route119_EventScript_ItemZinc::
finditem ITEM_ZINC
end
Route119_EventScript_ItemElixir::
finditem ITEM_ELIXIR
end
Route119_EventScript_ItemLeafStone::
finditem ITEM_LEAF_STONE
end
Route119_EventScript_ItemRareCandy::
finditem ITEM_RARE_CANDY
end
Route119_EventScript_ItemHyperPotion::
finditem ITEM_HYPER_POTION
end
Route119_EventScript_ItemHyperPotion2::
finditem ITEM_HYPER_POTION
end
Route119_EventScript_ItemElixir2::
finditem ITEM_ELIXIR
end
Route120_EventScript_ItemNugget::
finditem ITEM_NUGGET
end
Route120_EventScript_ItemFullHeal::
finditem ITEM_FULL_HEAL
end
Route120_EventScript_ItemHyperPotion::
finditem ITEM_HYPER_POTION
end
Route120_EventScript_ItemNestBall::
finditem ITEM_NEST_BALL
end
Route120_EventScript_ItemRevive::
finditem ITEM_REVIVE
end
Route121_EventScript_ItemCarbos::
finditem ITEM_CARBOS
end
Route121_EventScript_ItemRevive::
finditem ITEM_REVIVE
end
Route121_EventScript_ItemZinc::
finditem ITEM_ZINC
end
Route123_EventScript_ItemCalcium::
finditem ITEM_CALCIUM
end
Route123_EventScript_ItemUltraBall::
finditem ITEM_ULTRA_BALL
end
Route123_EventScript_ItemElixir::
finditem ITEM_ELIXIR
end
Route123_EventScript_ItemPPUp::
finditem ITEM_PP_UP
end
Route123_EventScript_ItemRevivalHerb::
finditem ITEM_REVIVAL_HERB
end
Route124_EventScript_ItemRedShard::
finditem ITEM_RED_SHARD
end
Route124_EventScript_ItemBlueShard::
finditem ITEM_BLUE_SHARD
end
Route124_EventScript_ItemYellowShard::
finditem ITEM_YELLOW_SHARD
end
Route125_EventScript_ItemBigPearl::
finditem ITEM_BIG_PEARL
end
Route126_EventScript_ItemGreenShard::
finditem ITEM_GREEN_SHARD
end
Route127_EventScript_ItemZinc::
finditem ITEM_ZINC
end
Route127_EventScript_ItemCarbos::
finditem ITEM_CARBOS
end
Route127_EventScript_ItemRareCandy::
finditem ITEM_RARE_CANDY
end
Route132_EventScript_ItemRareCandy::
finditem ITEM_RARE_CANDY
end
Route132_EventScript_ItemProtein::
finditem ITEM_PROTEIN
end
Route133_EventScript_ItemBigPearl::
finditem ITEM_BIG_PEARL
end
Route133_EventScript_ItemStarPiece::
finditem ITEM_STAR_PIECE
end
Route133_EventScript_ItemMaxRevive::
finditem ITEM_MAX_REVIVE
end
Route134_EventScript_ItemCarbos::
finditem ITEM_CARBOS
end
Route134_EventScript_ItemStarPiece::
finditem ITEM_STAR_PIECE
end
PetalburgCity_EventScript_ItemMaxRevive::
finditem ITEM_MAX_REVIVE
end
PetalburgCity_EventScript_ItemEther::
finditem ITEM_ETHER
end
MauvilleCity_EventScript_ItemXSpeed::
finditem ITEM_X_SPEED
end
RustboroCity_EventScript_ItemXDefend::
finditem ITEM_X_DEFENSE
end
LilycoveCity_EventScript_ItemMaxRepel::
finditem ITEM_MAX_REPEL
end
MossdeepCity_EventScript_ItemNetBall::
finditem ITEM_NET_BALL
end
PetalburgWoods_EventScript_ItemXAttack::
finditem ITEM_X_ATTACK
end
PetalburgWoods_EventScript_ItemGreatBall::
finditem ITEM_GREAT_BALL
end
PetalburgWoods_EventScript_ItemEther::
finditem ITEM_ETHER
end
PetalburgWoods_EventScript_ItemParalyzeHeal::
finditem ITEM_PARALYZE_HEAL
end
RusturfTunnel_EventScript_ItemPokeBall::
finditem ITEM_POKE_BALL
end
RusturfTunnel_EventScript_ItemMaxEther::
finditem ITEM_MAX_ETHER
end
GraniteCave_1F_EventScript_ItemEscapeRope::
finditem ITEM_ESCAPE_ROPE
end
GraniteCave_B1F_EventScript_ItemPokeBall::
finditem ITEM_POKE_BALL
end
GraniteCave_B2F_EventScript_ItemRepel::
finditem ITEM_REPEL
end
GraniteCave_B2F_EventScript_ItemRareCandy::
finditem ITEM_RARE_CANDY
end
JaggedPass_EventScript_ItemBurnHeal::
finditem ITEM_BURN_HEAL
end
FieryPath_EventScript_ItemFireStone::
finditem ITEM_FIRE_STONE
end
FieryPath_EventScript_ItemTM06::
finditem ITEM_TM06
end
MeteorFalls_1F_1R_EventScript_ItemTM23::
finditem ITEM_TM23
end
MeteorFalls_1F_1R_EventScript_ItemFullHeal::
finditem ITEM_FULL_HEAL
end
MeteorFalls_1F_1R_EventScript_ItemMoonStone::
finditem ITEM_MOON_STONE
end
MeteorFalls_1F_1R_EventScript_ItemPPUP::
finditem ITEM_PP_UP
end
MeteorFalls_B1F_2R_EventScript_ItemTM02::
finditem ITEM_TM02
end
NewMauville_Inside_EventScript_ItemUltraBall::
finditem ITEM_ULTRA_BALL
end
NewMauville_Inside_EventScript_ItemEscapeRope::
finditem ITEM_ESCAPE_ROPE
end
NewMauville_Inside_EventScript_ItemThunderStone::
finditem ITEM_THUNDER_STONE
end
NewMauville_Inside_EventScript_ItemFullHeal::
finditem ITEM_FULL_HEAL
end
NewMauville_Inside_EventScript_ItemParalyzeHeal::
finditem ITEM_PARALYZE_HEAL
end
AbandonedShip_Rooms_1F_EventScript_ItemHarborMail::
finditem ITEM_HARBOR_MAIL
end
AbandonedShip_Rooms_B1F_EventScript_ItemEscapeRope::
finditem ITEM_ESCAPE_ROPE
end
AbandonedShip_Rooms2_B1F_EventScript_ItemDiveBall::
finditem ITEM_DIVE_BALL
end
AbandonedShip_Room_B1F_EventScript_ItemTM13::
finditem ITEM_TM13
end
AbandonedShip_Rooms2_1F_EventScript_ItemRevive::
finditem ITEM_REVIVE
end
AbandonedShip_CaptainsOffice_EventScript_ItemStorageKey::
finditem ITEM_STORAGE_KEY
end
AbandonedShip_HiddenFloorRooms_EventScript_ItemLuxuryBall::
finditem ITEM_LUXURY_BALL
end
AbandonedShip_HiddenFloorRooms_EventScript_ItemScanner::
finditem ITEM_SCANNER
end
AbandonedShip_HiddenFloorRooms_EventScript_ItemWaterStone::
finditem ITEM_WATER_STONE
end
AbandonedShip_HiddenFloorRooms_EventScript_ItemTM18::
finditem ITEM_TM18
end
ScorchedSlab_EventScript_ItemTM11::
finditem ITEM_TM11
end
SafariZone_Northwest_EventScript_ItemTM22::
finditem ITEM_TM22
end
SafariZone_North_EventScript_ItemCalcium::
finditem ITEM_CALCIUM
end
SafariZone_Southwest_EventScript_ItemMaxRevive::
finditem ITEM_MAX_REVIVE
end
SafariZone_Northeast_EventScript_ItemNugget::
finditem ITEM_NUGGET
end
SafariZone_Southeast_EventScript_ItemBigPearl::
finditem ITEM_BIG_PEARL
end
MtPyre_2F_EventScript_ItemUltraBall::
finditem ITEM_ULTRA_BALL
end
MtPyre_3F_EventScript_ItemSuperRepel::
finditem ITEM_SUPER_REPEL
end
MtPyre_4F_EventScript_ItemSeaIncense::
finditem ITEM_SEA_INCENSE
end
MtPyre_5F_EventScript_ItemLaxIncense::
finditem ITEM_LAX_INCENSE
end
MtPyre_6F_EventScript_ItemTM30::
finditem ITEM_TM30
end
MtPyre_Exterior_EventScript_ItemMaxPotion::
finditem ITEM_MAX_POTION
end
MtPyre_Exterior_EventScript_ItemTM48::
finditem ITEM_TM48
end
AquaHideout_B1F_EventScript_ItemMasterBall::
finditem ITEM_MASTER_BALL
end
AquaHideout_B1F_EventScript_ItemNugget::
finditem ITEM_NUGGET
end
AquaHideout_B1F_EventScript_ItemMaxElixir::
finditem ITEM_MAX_ELIXIR
end
AquaHideout_B2F_EventScript_ItemNestBall::
finditem ITEM_NEST_BALL
end
AquaHideout_B2F_EventScript_ItemMasterBall::
finditem ITEM_MASTER_BALL // Unused
end
Route119_EventScript_ItemNugget::
finditem ITEM_NUGGET
end
Route119_EventScript_ItemMaxElixir::
finditem ITEM_MAX_ELIXIR
end
Route119_EventScript_ItemNestBall::
finditem ITEM_NEST_BALL
end
ShoalCave_LowTideEntranceRoom_EventScript_ItemBigPearl::
finditem ITEM_BIG_PEARL
end
ShoalCave_LowTideInnerRoom_EventScript_ItemRareCandy::
finditem ITEM_RARE_CANDY
end
ShoalCave_LowTideStairsRoom_EventScript_ItemIceHeal::
finditem ITEM_ICE_HEAL
end
ShoalCave_LowTideIceRoom_EventScript_ItemTM07::
finditem ITEM_TM07
end
ShoalCave_LowTideIceRoom_EventScript_ItemNeverMeltIce::
finditem ITEM_NEVER_MELT_ICE
end
SeafloorCavern_Room9_EventScript_ItemTM26::
finditem ITEM_TM26
end
Route110_TrickHousePuzzle1_EventScript_ItemOrangeMail::
finditem ITEM_ORANGE_MAIL
end
Route110_TrickHousePuzzle2_EventScript_ItemHarborMail::
finditem ITEM_HARBOR_MAIL
end
Route110_TrickHousePuzzle2_EventScript_ItemWaveMail::
finditem ITEM_WAVE_MAIL
end
Route110_TrickHousePuzzle3_EventScript_ItemShadowMail::
finditem ITEM_SHADOW_MAIL
end
Route110_TrickHousePuzzle3_EventScript_ItemWoodMail::
finditem ITEM_WOOD_MAIL
end
Route110_TrickHousePuzzle4_EventScript_ItemMechMail::
finditem ITEM_MECH_MAIL
end
Route110_TrickHousePuzzle6_EventScript_ItemGlitterMail::
finditem ITEM_GLITTER_MAIL
end
Route110_TrickHousePuzzle7_EventScript_ItemTropicMail::
finditem ITEM_TROPIC_MAIL
end
Route110_TrickHousePuzzle8_EventScript_ItemBeadMail::
finditem ITEM_BEAD_MAIL
end
VictoryRoad_1F_EventScript_ItemMaxElixir::
finditem ITEM_MAX_ELIXIR
end
VictoryRoad_1F_EventScript_ItemPPUp::
finditem ITEM_PP_UP
end
VictoryRoad_B1F_EventScript_ItemTM29::
finditem ITEM_TM29
end
VictoryRoad_B1F_EventScript_ItemFullRestore::
finditem ITEM_FULL_RESTORE
end
VictoryRoad_B2F_EventScript_ItemFullHeal::
finditem ITEM_FULL_HEAL
end
ArtisanCave_B1F_EventScript_ItemHPUp::
finditem ITEM_HP_UP
end
ArtisanCave_1F_EventScript_ItemCarbos::
finditem ITEM_CARBOS
end
MagmaHideout_1F_EventScript_ItemRareCandy::
finditem ITEM_RARE_CANDY
end
MagmaHideout_2F_2R_EventScript_ItemMaxElixir::
finditem ITEM_MAX_ELIXIR
end
MagmaHideout_2F_2R_EventScript_ItemFullRestore::
finditem ITEM_FULL_RESTORE
end
MagmaHideout_3F_1R_EventScript_ItemNugget::
finditem ITEM_NUGGET
end
MagmaHideout_3F_2R_EventScript_ItemPPMax::
finditem ITEM_PP_MAX
end
MagmaHideout_4F_EventScript_ItemMaxRevive::
finditem ITEM_MAX_REVIVE
end
MagmaHideout_3F_3R_EventScript_ItemEscapeRope::
finditem ITEM_ESCAPE_ROPE
Common_EventScript_FindItem::
callnative GetItemBallIdAndAmountFromTemplate
finditem VAR_RESULT VAR_0x8009
end

View File

@@ -50,7 +50,14 @@ EventScript_BufferBerriesPocket::
return
EventScript_ObtainedItem::
compare VAR_0x8001, TRUE
goto_if_eq EventScript_ObtainedItemMessage
buffernumberstring 0, VAR_0x8001
message gText_ObtainedTheItems
goto EventScript_ContinueObtainedItem
EventScript_ObtainedItemMessage:
message gText_ObtainedTheItem
EventScript_ContinueObtainedItem:
waitfanfare
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
setvar VAR_RESULT, TRUE
@@ -129,10 +136,23 @@ EventScript_PutBattlePyramidItemInBag::
EventScript_FoundTMHM::
bufferitemnameplural STR_VAR_1, VAR_0x8004, VAR_0x8005
compare VAR_0x8005, 2
goto_if_lt EventScript_FoundTMHMMessage
buffernumberstring STR_VAR_3, VAR_0x8005
message gText_PlayerFoundTMHMs
goto EventScript_BufferTMHMsPocket
return
EventScript_FoundTMHMMessage::
message gText_PlayerFoundOneTMHM
return
EventScript_FoundItem::
compare VAR_0x8001, TRUE
goto_if_eq EventScript_FoundItemMessage
buffernumberstring 0, VAR_0x8001
message gText_PlayerFoundItems
return
EventScript_FoundItemMessage::
message gText_PlayerFoundOneItem
return

View File

@@ -64,3 +64,11 @@ EventScript_AccessHallOfFame::
waitstate
goto EventScript_AccessPC
end
EventScript_AccessPokemonBoxLink::
playse SE_PC_LOGIN
msgbox gText_StorageSystemOpened, MSGBOX_DEFAULT
special ShowPokemonStorageSystemPC
waitstate
goto EventScript_TurnOffPC
end

View File

@@ -15,7 +15,7 @@ Common_EventScript_NameReceivedBoxMon::
Common_EventScript_TransferredToPC::
bufferboxname STR_VAR_1, VAR_PC_BOX_TO_SEND_MON
bufferspeciesname STR_VAR_2, VAR_TEMP_1
bufferspeciesname STR_VAR_2, VAR_TEMP_TRANSFERRED_SPECIES
call_if_unset FLAG_SYS_PC_LANETTE, EventScript_TransferredSomeonesPC
call_if_set FLAG_SYS_PC_LANETTE, EventScript_TransferredLanettesPC
return

View File

@@ -1,117 +1,152 @@
EventScript_RepelWoreOff::
.set LOCAL_VAR_SPRAY, VAR_0x8004
.set LOCAL_VAR_NUM_SPRAY_STRENGTH, VAR_0x8005
.set LOCAL_VAR_SPRAY_TYPE, VAR_0x8009
.set LOCAL_VAR_NEW_SPRAY, VAR_0x8007
EventScript_BufferSprayName::
.if VAR_LAST_REPEL_LURE_USED != 0
bufferitemname STR_VAR_1, VAR_LAST_REPEL_LURE_USED
return
.endif
specialvar LOCAL_VAR_SPRAY_TYPE, GetLastUsedSprayType
compare LOCAL_VAR_SPRAY_TYPE, ITEM_REPEL
goto_if_eq EventScript_BufferSprayName_2
bufferitemname STR_VAR_1, ITEM_LURE
EventScript_BufferSprayName_1:
return
EventScript_BufferSprayName_2:
bufferitemname STR_VAR_1, ITEM_REPEL
goto EventScript_BufferSprayName_1
EventScript_SprayWoreOff::
lock
call EventScript_BufferSprayName
specialvar LOCAL_VAR_NUM_SPRAY_STRENGTH, GetNumberSprayStrength
switch LOCAL_VAR_NUM_SPRAY_STRENGTH
case 0, EventScript_SprayWoreOffMessage
case 1, EventScript_UseSingleSpray
goto EventScript_HandleMultipleSprays
return
EventScript_HandleMultipleSprays::
.if I_REPEL_LURE_MENU == TRUE
checkitem ITEM_REPEL, 1
goto_if_eq VAR_RESULT, TRUE, EventScript_RepelUseAnother
checkitem ITEM_SUPER_REPEL, 1
goto_if_eq VAR_RESULT, TRUE, EventScript_RepelUseAnother
checkitem ITEM_MAX_REPEL, 1
goto_if_eq VAR_RESULT, TRUE, EventScript_RepelUseAnother
goto EventScript_ChooseWhichSpray
.else
goto EventScript_UseSingleSpray
.endif
return
EventScript_SprayWoreOffMessage::
msgbox Text_SprayWoreOff, MSGBOX_SIGN
releaseall
end
EventScript_UseSingleSpray::
.if VAR_LAST_REPEL_LURE_USED == 0
call EventScript_UseDifferentSpray
.else
checkitem VAR_LAST_REPEL_LURE_USED, 1
goto_if_eq VAR_RESULT, TRUE, EventScript_RepelUseAnother
compare VAR_RESULT, TRUE
goto_if_eq EventScript_UseSingleSpray_2
call EventScript_UseDifferentSpray
.endif
lock
msgbox Text_RepelWoreOff, MSGBOX_SIGN
release
EventScript_UseSingleSpray_1:
closemessage
releaseall
end
EventScript_RepelUseAnother:
lock
msgbox Text_UseAnotherRepel, MSGBOX_YESNO
.if VAR_LAST_REPEL_LURE_USED != 0
EventScript_UseSingleSpray_2:
call EventScript_UseLastUsedSpray
goto EventScript_UseSingleSpray_1
.endif
EventScript_SetSingleSprayAndUse::
setvar VAR_RESULT, 0
call EventScript_UseSpray
return
EventScript_UseDifferentSpray::
specialvar LOCAL_VAR_NEW_SPRAY, GetSprayId
bufferitemname STR_VAR_2, LOCAL_VAR_NEW_SPRAY
msgbox Text_SprayWoreOffAskUseX, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq EventScript_UseDifferentSpray_2
EventScript_UseDifferentSpray_1:
return
EventScript_UseDifferentSpray_2:
copyvar LOCAL_VAR_SPRAY, LOCAL_VAR_NEW_SPRAY
call EventScript_SetSingleSprayAndUse
goto EventScript_UseDifferentSpray_1
.if VAR_LAST_REPEL_LURE_USED != 0
EventScript_UseLastUsedSpray::
msgbox Text_SprayWoreOffAskUseAnother, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq EventScript_UseLastUsedSpray_2
EventScript_UseLastUsedSpray_1:
return
EventScript_UseLastUsedSpray_2:
copyvar LOCAL_VAR_SPRAY, VAR_LAST_REPEL_LURE_USED
call EventScript_SetSingleSprayAndUse
goto EventScript_UseLastUsedSpray_1
.endif
.if I_REPEL_LURE_MENU == TRUE
goto_if_eq VAR_RESULT, NO, EventScript_RepelWoreOff_End
callnative TryDrawRepelMenu
goto_if_eq VAR_RESULT, FALSE, EventScript_RepelWoreOff_Chose
EventScript_ChooseWhichSpray::
message Text_SprayWoreOffAskUseAnother
waitmessage
callnative DrawSprayMenu
waitstate
goto_if_eq VAR_RESULT, 127, EventScript_RepelWoreOff_End
EventScript_RepelWoreOff_Chose:
callnative HandleRepelMenuChoice
bufferitemname 1, VAR_0x8004
removeitem VAR_0x8004, 1
playse SE_REPEL
msgbox Text_UsedNewRepelLure, MSGBOX_SIGN
.else
goto_if_eq VAR_RESULT, YES, EventScript_UsedRepel
.endif
EventScript_RepelWoreOff_End:
release
compare VAR_RESULT, MULTI_B_PRESSED
goto_if_ne EventScript_ChooseWhichSpray_3
EventScript_ChooseWhichSpray_1:
closemessage
releaseall
end
EventScript_UsedRepel:
bufferitemname 1, VAR_LAST_REPEL_LURE_USED
EventScript_ChooseWhichSpray_2:
call EventScript_UseSpray
goto EventScript_ChooseWhichSpray_1
EventScript_ChooseWhichSpray_3:
compare VAR_RESULT, VAR_0x8003
goto_if_ne EventScript_ChooseWhichSpray_2
goto EventScript_ChooseWhichSpray_1
.endif
EventScript_UseSpray::
playse SE_REPEL
lock
msgbox Text_UsedNewRepelLure, MSGBOX_SIGN
removeitem VAR_LAST_REPEL_LURE_USED, 1
waitse
callnative HandleUseExpiredRepel
release
end
callnative HandleSprayMenuChoice
removeitem LOCAL_VAR_SPRAY, 1
bufferitemname STR_VAR_2, LOCAL_VAR_SPRAY
msgbox Text_SprayWoreOffUseX, MSGBOX_SIGN
return
EventScript_LureWoreOff::
.if I_REPEL_LURE_MENU == TRUE
checkitem ITEM_LURE, 1
goto_if_eq VAR_RESULT, TRUE, EventScript_LureUseAnother
checkitem ITEM_SUPER_LURE, 1
goto_if_eq VAR_RESULT, TRUE, EventScript_LureUseAnother
checkitem ITEM_MAX_LURE, 1
goto_if_eq VAR_RESULT, TRUE, EventScript_LureUseAnother
.else
checkitem VAR_LAST_REPEL_LURE_USED, 1
goto_if_eq VAR_RESULT, TRUE, EventScript_LureUseAnother
.endif
lock
msgbox Text_LureWoreOff, MSGBOX_SIGN
release
end
EventScript_LureUseAnother:
lock
msgbox Text_UseAnotherLure, MSGBOX_YESNO
.if I_REPEL_LURE_MENU == TRUE
goto_if_eq VAR_RESULT, NO, EventScript_LureWoreOff_End
callnative TryDrawLureMenu
goto_if_eq VAR_RESULT, FALSE, EventScript_LureWoreOff_Chose
waitstate
goto_if_eq VAR_RESULT, 127, EventScript_LureWoreOff_End
EventScript_LureWoreOff_Chose:
callnative HandleLureMenuChoice
bufferitemname 1, VAR_0x8004
removeitem VAR_0x8004, 1
playse SE_REPEL
msgbox Text_UsedNewRepelLure, MSGBOX_SIGN
.else
goto_if_eq VAR_RESULT, YES, EventScript_UsedLure
.endif
EventScript_LureWoreOff_End:
release
end
Text_SprayWoreOff::
.string "{STR_VAR_1}'s effect wore off…$"
EventScript_UsedLure:
bufferitemname 1, VAR_LAST_REPEL_LURE_USED
playse SE_REPEL
lock
msgbox Text_UsedNewRepelLure, MSGBOX_SIGN
removeitem VAR_LAST_REPEL_LURE_USED, 1
waitse
callnative HandleUseExpiredLure
release
end
Text_RepelWoreOff:
.string "REPEL's effect wore off…$"
Text_UseAnotherRepel::
.string "REPEL's effect wore off!\n"
Text_SprayWoreOffAskUseAnother::
.string "{STR_VAR_1}'s effect wore off!\n"
.string "Use another?$"
Text_LureWoreOff:
.string "Lure's effect wore off…$"
Text_SprayWoreOffAskUseX::
.string "{STR_VAR_1}'s effect wore off…\n"
.string "Use a {STR_VAR_2}?$"
Text_UseAnotherLure::
.string "Lure's effect wore off!\n"
.string "Use another?$"
Text_UsedNewRepelLure::
Text_SprayWoreOffUseX::
.string "{PLAYER} used the\n"
.string "{STR_VAR_2}.$"

View File

@@ -43,7 +43,7 @@ Route111_EventScript_SecretPowerMan::
end
Route111_EventScript_GiveSecretPower::
giveitem ITEM_TM43
giveitem ITEM_TM_SECRET_POWER
goto_if_eq VAR_RESULT, FALSE, Route111_EventScript_NoRoomForSecretPower
msgbox Route111_Text_ExplainSecretPower, MSGBOX_DEFAULT
closemessage

View File

@@ -13,9 +13,9 @@ TrainerHill_OnWarp:
TrainerHill_1F_EventScript_DummyOnWarp::
setvar VAR_TEMP_3, 1
.ifdef BUGFIX
#ifdef BUGFIX
end @ Missing end. By chance, the next byte (0x02 of VAR_TEMP_2) is also the id for the end cmd
.endif
#endif
TrainerHill_OnFrame:
map_script_2 VAR_TEMP_2, 0, TrainerHill_1F_EventScript_DummyWarpToEntranceCounter