Use 'goto_if_eq VAR, value, Script' syntax

This commit is contained in:
GriffinR
2022-08-09 20:40:03 -04:00
parent 60fc8c5e22
commit f113da30ad
171 changed files with 1992 additions and 3453 deletions
@@ -9,8 +9,7 @@ OneIsland_PokemonCenter_1F_MapScripts::
.byte 0
OneIsland_PokemonCenter_1F_OnLoad::
compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5
call_if_ge OneIsland_PokemonCenter_1F_EventScript_SetRubyMetatile
call_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5, OneIsland_PokemonCenter_1F_EventScript_SetRubyMetatile
call_if_set FLAG_SYS_CAN_LINK_WITH_RS, OneIsland_PokemonCenter_1F_EventScript_SetNetworkMachineOn
end
@@ -30,12 +29,9 @@ OneIsland_PokemonCenter_1F_EventScript_SetNetworkMachineOn::
OneIsland_PokemonCenter_1F_OnTransition::
setrespawn SPAWN_ONE_ISLAND
compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 6
call_if_eq OneIsland_PokemonCenter_1F_EventScript_SetCelioQuestDone
compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 0
call_if_eq OneIsland_PokemonCenter_1F_EventScript_SetBillCelioFirstMeetingPos
compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 2
call_if_eq OneIsland_PokemonCenter_1F_EventScript_SetBillCelioReadyToLeavePos
call_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 6, OneIsland_PokemonCenter_1F_EventScript_SetCelioQuestDone
call_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 0, OneIsland_PokemonCenter_1F_EventScript_SetBillCelioFirstMeetingPos
call_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 2, OneIsland_PokemonCenter_1F_EventScript_SetBillCelioReadyToLeavePos
end
OneIsland_PokemonCenter_1F_EventScript_SetCelioQuestDone::
@@ -111,10 +107,8 @@ OneIsland_PokemonCenter_1F_EventScript_MeetCelioScene::
msgbox OneIsland_PokemonCenter_1F_Text_CelioPleaseTakeThis
giveitem_msg OneIsland_PokemonCenter_1F_Text_ObtainedTriPass, ITEM_TRI_PASS, 1, MUS_OBTAIN_KEY_ITEM
msgbox OneIsland_PokemonCenter_1F_Text_PassLetsYouTravelBetweenIslands
compare VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2
call_if_ge OneIsland_PokemonCenter_1F_EventScript_ReceiveTownMapPage
compare VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2
call_if_lt OneIsland_PokemonCenter_1F_EventScript_ReceiveTownMap
call_if_ge VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2, OneIsland_PokemonCenter_1F_EventScript_ReceiveTownMapPage
call_if_lt VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2, OneIsland_PokemonCenter_1F_EventScript_ReceiveTownMap
setflag FLAG_SYS_SEVII_MAP_123
msgbox OneIsland_PokemonCenter_1F_Text_BillCatchYouLater
closemessage
@@ -207,21 +201,15 @@ OneIsland_PokemonCenter_1F_EventScript_BillGoTakeStroll::
OneIsland_PokemonCenter_1F_EventScript_Celio::
lock
faceplayer
compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 7
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioGiveBillFact
compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 6
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioJustGivenSapphire
goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 7, OneIsland_PokemonCenter_1F_EventScript_CelioGiveBillFact
goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 6, OneIsland_PokemonCenter_1F_EventScript_CelioJustGivenSapphire
goto_if_set FLAG_RECOVERED_SAPPHIRE, OneIsland_PokemonCenter_1F_EventScript_GiveCelioSapphire
compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_ExplainRainbowPass
goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5, OneIsland_PokemonCenter_1F_EventScript_ExplainRainbowPass
goto_if_set FLAG_GOT_RUBY, OneIsland_PokemonCenter_1F_EventScript_GiveCelioRuby
compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioWaitingForRuby
goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4, OneIsland_PokemonCenter_1F_EventScript_CelioWaitingForRuby
specialvar VAR_RESULT, IsNationalPokedexEnabled
compare VAR_RESULT, TRUE
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioRequestRuby
compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 3
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioPlayerMissingNationalDex
goto_if_eq VAR_RESULT, TRUE, OneIsland_PokemonCenter_1F_EventScript_CelioRequestRuby
goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 3, OneIsland_PokemonCenter_1F_EventScript_CelioPlayerMissingNationalDex
msgbox OneIsland_PokemonCenter_1F_Text_SorryForBeingPoorHost
closemessage
applymovement LOCALID_CELIO, Movement_FaceOriginalDirection
@@ -232,10 +220,8 @@ OneIsland_PokemonCenter_1F_EventScript_Celio::
OneIsland_PokemonCenter_1F_EventScript_CelioGiveBillFact::
msgbox OneIsland_PokemonCenter_1F_Text_CelioHearingRumorsAboutYou
random 3
compare VAR_RESULT, 0
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_BillFact1
compare VAR_RESULT, 1
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_BillFact2
goto_if_eq VAR_RESULT, 0, OneIsland_PokemonCenter_1F_EventScript_BillFact1
goto_if_eq VAR_RESULT, 1, OneIsland_PokemonCenter_1F_EventScript_BillFact2
famechecker FAMECHECKER_BILL, 5
msgbox OneIsland_PokemonCenter_1F_Text_BillCantStomachMilk
release
@@ -321,15 +307,13 @@ OneIsland_PokemonCenter_1F_EventScript_GiveCelioRuby::
applymovement LOCALID_CELIO, Movement_FacePlayer
waitmovement 0
msgbox OneIsland_PokemonCenter_1F_Text_MayIAskOneMoreFavor, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio
goto_if_eq VAR_RESULT, NO, OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio
goto OneIsland_PokemonCenter_1F_EventScript_GiveRainbowPass
end
OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio::
msgbox OneIsland_PokemonCenter_1F_Text_PleaseINeedYourHelp, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio
goto_if_eq VAR_RESULT, NO, OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio
goto OneIsland_PokemonCenter_1F_EventScript_GiveRainbowPass
end
@@ -460,14 +444,10 @@ OneIsland_PokemonCenter_1F_EventScript_LeaveOneIslandScene::
waitmovement 0
msgbox OneIsland_PokemonCenter_1F_Text_BillOhHeyPlayer
closemessage
compare VAR_TEMP_1, 1
call_if_eq OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillTop
compare VAR_TEMP_1, 2
call_if_eq OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillMidTop
compare VAR_TEMP_1, 3
call_if_eq OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillMidBottom
compare VAR_TEMP_1, 4
call_if_eq OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillBottom
call_if_eq VAR_TEMP_1, 1, OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillTop
call_if_eq VAR_TEMP_1, 2, OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillMidTop
call_if_eq VAR_TEMP_1, 3, OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillMidBottom
call_if_eq VAR_TEMP_1, 4, OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillBottom
delay 10
msgbox OneIsland_PokemonCenter_1F_Text_BillWeGotItDone
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestDown