diff options
293 files changed, 2990 insertions, 5978 deletions
diff --git a/data/event_scripts.s b/data/event_scripts.s index c6d6a5fa2..edab4987f 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -583,12 +583,9 @@ EventScript_WhiteOut:: end EventScript_ResetMrBriney:: - compare VAR_BRINEY_LOCATION, 1 - goto_if_eq EventScript_MoveMrBrineyToHouse - compare VAR_BRINEY_LOCATION, 2 - goto_if_eq EventScript_MoveMrBrineyToDewford - compare VAR_BRINEY_LOCATION, 3 - goto_if_eq EventScript_MoveMrBrineyToRoute109 + goto_if_eq VAR_BRINEY_LOCATION, 1, EventScript_MoveMrBrineyToHouse + goto_if_eq VAR_BRINEY_LOCATION, 2, EventScript_MoveMrBrineyToDewford + goto_if_eq VAR_BRINEY_LOCATION, 3, EventScript_MoveMrBrineyToRoute109 end EventScript_MoveMrBrineyToHouse:: @@ -801,10 +798,8 @@ Movement_UnusedBoardFerry: step_end Common_EventScript_FerryDepartIsland:: - compare VAR_FACING, DIR_SOUTH - call_if_eq Ferry_EventScript_DepartIslandSouth - compare VAR_FACING, DIR_WEST - call_if_eq Ferry_EventScript_DepartIslandWest + call_if_eq VAR_FACING, DIR_SOUTH, Ferry_EventScript_DepartIslandSouth + call_if_eq VAR_FACING, DIR_WEST, Ferry_EventScript_DepartIslandWest delay 30 hideobjectat OBJ_EVENT_ID_PLAYER, 0 call Common_EventScript_FerryDepart diff --git a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc index 6bb3352ab..7c59fec96 100644 --- a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc +++ b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc @@ -6,8 +6,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide:: faceplayer goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus checkitem ITEM_SCANNER - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus msgbox AbandonedShip_CaptainsOffice_Text_NoSuccessFindingScanner, MSGBOX_DEFAULT release diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc index 09d758495..19f103362 100644 --- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc @@ -28,8 +28,7 @@ AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor:: lockall goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_DoorIsUnlocked checkitem ITEM_STORAGE_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked msgbox AbandonedShip_Corridors_B1F_Text_InsertedStorageKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_STORAGE_KEY diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc index 3a7bc7731..dade6a516 100644 --- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc @@ -54,8 +54,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door:: lockall goto_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen checkitem ITEM_ROOM_1_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_ROOM_1_KEY @@ -69,8 +68,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door:: lockall goto_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen checkitem ITEM_ROOM_2_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_ROOM_2_KEY @@ -84,8 +82,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door:: lockall goto_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen checkitem ITEM_ROOM_4_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_ROOM_4_KEY @@ -99,8 +96,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room6Door:: lockall goto_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen checkitem ITEM_ROOM_6_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_ROOM_6_KEY diff --git a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc index cdeb225de..e9b14b7b0 100644 --- a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc @@ -17,12 +17,9 @@ AbandonedShip_HiddenFloorRooms_EventScript_DoHiddenItemSparkle:: setvar VAR_TEMP_1, 1 getplayerxy VAR_TEMP_2, VAR_TEMP_3 setvar VAR_TEMP_4, 1 - compare VAR_TEMP_2, 21 - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InMiddleRoomColumn - compare VAR_TEMP_2, 36 - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InRightRoomColumn - compare VAR_TEMP_3, 2 - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InUpperRoomRow + call_if_eq VAR_TEMP_2, 21, AbandonedShip_HiddenFloorRooms_EventScript_InMiddleRoomColumn + call_if_eq VAR_TEMP_2, 36, AbandonedShip_HiddenFloorRooms_EventScript_InRightRoomColumn + call_if_eq VAR_TEMP_3, 2, AbandonedShip_HiddenFloorRooms_EventScript_InUpperRoomRow switch VAR_TEMP_4 case 1, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm1 case 2, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm2 @@ -48,8 +45,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_EnterRm1:: delay 20 dofieldeffectsparkle 10, 10, 0 specialvar VAR_RESULT, FoundAbandonedShipRoom4Key - compare VAR_RESULT, FALSE - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm4KeySparkle + call_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorRooms_EventScript_Rm4KeySparkle waitfieldeffect FLDEFF_SPARKLE delay 10 end @@ -59,11 +55,9 @@ AbandonedShip_HiddenFloorRooms_EventScript_EnterRm2:: AbandonedShip_HiddenFloorRooms_EventScript_EnterRm3:: specialvar VAR_RESULT, FoundAbandonedShipRoom1Key - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm3NoSparkle + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_HiddenFloorRooms_EventScript_Rm3NoSparkle delay 20 - compare VAR_RESULT, FALSE - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm1KeySparkle + call_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorRooms_EventScript_Rm1KeySparkle waitfieldeffect FLDEFF_SPARKLE delay 10 end @@ -76,8 +70,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_EnterRm4:: dofieldeffectsparkle 8, 5, 0 dofieldeffectsparkle 11, 3, 0 specialvar VAR_RESULT, FoundAbandonedShipRoom6Key - compare VAR_RESULT, FALSE - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm6KeySparkle + call_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorRooms_EventScript_Rm6KeySparkle waitfieldeffect FLDEFF_SPARKLE delay 10 end @@ -88,8 +81,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_EnterRm5:: dofieldeffectsparkle 25, 2, 0 dofieldeffectsparkle 24, 6, 0 specialvar VAR_RESULT, FoundAbandonedShipRoom2Key - compare VAR_RESULT, FALSE - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm2KeySparkle + call_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorRooms_EventScript_Rm2KeySparkle waitfieldeffect FLDEFF_SPARKLE delay 10 end diff --git a/data/maps/AbandonedShip_Rooms2_1F/scripts.inc b/data/maps/AbandonedShip_Rooms2_1F/scripts.inc index e02d109b7..b0f317ef2 100644 --- a/data/maps/AbandonedShip_Rooms2_1F/scripts.inc +++ b/data/maps/AbandonedShip_Rooms2_1F/scripts.inc @@ -4,8 +4,7 @@ AbandonedShip_Rooms2_1F_MapScripts:: AbandonedShip_Rooms2_1F_EventScript_Dan:: trainerbattle_double TRAINER_KIRA_AND_DAN_1, AbandonedShip_Rooms2_1F_Text_DanIntro, AbandonedShip_Rooms2_1F_Text_DanDefeat, AbandonedShip_Rooms2_1F_Text_DanNotEnoughMons, AbandonedShip_Rooms2_1F_EventScript_RegisterDan specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_Rooms2_1F_EventScript_DanRematch + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_Rooms2_1F_EventScript_DanRematch msgbox AbandonedShip_Rooms2_1F_Text_DanPostBattle, MSGBOX_DEFAULT release end @@ -24,8 +23,7 @@ AbandonedShip_Rooms2_1F_EventScript_DanRematch:: AbandonedShip_Rooms2_1F_EventScript_Kira:: trainerbattle_double TRAINER_KIRA_AND_DAN_1, AbandonedShip_Rooms2_1F_Text_KiraIntro, AbandonedShip_Rooms2_1F_Text_KiraDefeat, AbandonedShip_Rooms2_1F_Text_KiraNotEnoughMons, AbandonedShip_Rooms2_1F_EventScript_RegisterKira specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_Rooms2_1F_EventScript_KiraRematch + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_Rooms2_1F_EventScript_KiraRematch msgbox AbandonedShip_Rooms2_1F_Text_KiraPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/AbandonedShip_Rooms_1F/scripts.inc b/data/maps/AbandonedShip_Rooms_1F/scripts.inc index 41b4eb3b6..c8ea84964 100644 --- a/data/maps/AbandonedShip_Rooms_1F/scripts.inc +++ b/data/maps/AbandonedShip_Rooms_1F/scripts.inc @@ -13,8 +13,7 @@ AbandonedShip_Rooms_1F_EventScript_Demetrius:: AbandonedShip_Rooms_1F_EventScript_Thalia:: trainerbattle_single TRAINER_THALIA_1, AbandonedShip_Rooms_1F_Text_ThaliaIntro, AbandonedShip_Rooms_1F_Text_ThaliaDefeat, AbandonedShip_Rooms_1F_EventScript_RegisterThalia specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_Rooms_1F_EventScript_ThaliaRematch + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_Rooms_1F_EventScript_ThaliaRematch msgbox AbandonedShip_Rooms_1F_Text_ThaliaPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index 03070a731..d28ac7bc3 100644 --- a/data/maps/AncientTomb/scripts.inc +++ b/data/maps/AncientTomb/scripts.inc @@ -10,8 +10,7 @@ AncientTomb_OnResume: AncientTomb_EventScript_TryRemoveRegisteel:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -68,12 +67,9 @@ AncientTomb_EventScript_Registeel:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq AncientTomb_EventScript_DefeatedRegisteel - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq AncientTomb_EventScript_RanFromRegisteel - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq AncientTomb_EventScript_RanFromRegisteel + goto_if_eq VAR_RESULT, B_OUTCOME_WON, AncientTomb_EventScript_DefeatedRegisteel + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, AncientTomb_EventScript_RanFromRegisteel + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, AncientTomb_EventScript_RanFromRegisteel setflag FLAG_DEFEATED_REGISTEEL release end diff --git a/data/maps/AquaHideout_B1F/scripts.inc b/data/maps/AquaHideout_B1F/scripts.inc index 2a6f156e5..4f2eb836f 100644 --- a/data/maps/AquaHideout_B1F/scripts.inc +++ b/data/maps/AquaHideout_B1F/scripts.inc @@ -9,8 +9,7 @@ AquaHideout_B1F_OnResume: AquaHideout_B1F_EventScript_TryRemoveElectrode:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -39,12 +38,9 @@ AquaHideout_B1F_EventScript_Electrode1:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode1 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode1 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode1 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, AquaHideout_B1F_EventScript_DefeatedElectrode1 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, AquaHideout_B1F_EventScript_DefeatedElectrode1 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, AquaHideout_B1F_EventScript_DefeatedElectrode1 setflag FLAG_DEFEATED_ELECTRODE_1_AQUA_HIDEOUT release end @@ -66,12 +62,9 @@ AquaHideout_B1F_EventScript_Electrode2:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode2 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode2 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode2 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, AquaHideout_B1F_EventScript_DefeatedElectrode2 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, AquaHideout_B1F_EventScript_DefeatedElectrode2 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, AquaHideout_B1F_EventScript_DefeatedElectrode2 setflag FLAG_DEFEATED_ELECTRODE_2_AQUA_HIDEOUT release end diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index 36e7a8d11..844ec070a 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -28,10 +28,8 @@ BattleFrontier_BattleArenaBattleRoom_OnTransition: BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxFemale return BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxMale:: @@ -52,8 +50,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceDown applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceLeft setvar VAR_TEMP_2, 1 @@ -137,24 +134,16 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedOpponent:: BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponent:: frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleArenaBattleRoom_EventScript_TycoonUpNext + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleArenaBattleRoom_EventScript_TycoonUpNext frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor3rdOpponent - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor4thOpponent - compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor5thOpponent - compare VAR_RESULT, 5 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor6thOpponent - compare VAR_RESULT, 6 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor7thOpponent + call_if_eq VAR_RESULT, 1, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 3, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor4thOpponent + call_if_eq VAR_RESULT, 4, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor5thOpponent + call_if_eq VAR_RESULT, 5, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor6thOpponent + call_if_eq VAR_RESULT, 6, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor7thOpponent call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponentNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_ContinueChallenge @@ -254,16 +243,14 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_PauseChallenge:: end BattleFrontier_BattleArenaBattleRoom_EventScript_TycoonUpNext:: - compare VAR_TEMP_2, 1 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoon + goto_if_eq VAR_TEMP_2, 1, BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoon msgbox BattleFrontier_BattleArenaBattleRoom_Text_NowFaceTycoon, MSGBOX_DEFAULT setvar VAR_TEMP_2, 1 BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoon:: message BattleFrontier_BattleArenaBattleRoom_Text_PreparedForTycoon waitmessage call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoonNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoonNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta @@ -309,8 +296,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaSilver msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaYoureChallenger, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH @@ -324,15 +310,13 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta:: BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaSilver:: msgbox BattleFrontier_BattleArenaBattleRoom_Text_IgniteMyPassionForBattle, MSGBOX_DEFAULT call BattleFrontier_BattleArenaBattleRoom_EventScript_StartArenaBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaSilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaSilver goto BattleFrontier_BattleArenaBattleRoom_EventScript_DeclareOpponentWinner BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaSilver:: call BattleFrontier_BattleArenaBattleRoom_EventScript_DeclarePlayerWinner frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForwardLong waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaYoureToughAfterAll, MSGBOX_DEFAULT @@ -346,8 +330,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaSilver:: BattleFrontier_BattleArenaBattleRoom_EventScript_IntroGretaGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaGold msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaLookingForwardToSeeingAgain, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH @@ -361,15 +344,13 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_IntroGretaGold:: BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaGold:: msgbox BattleFrontier_BattleArenaBattleRoom_Text_LetsGetThisStarted, MSGBOX_DEFAULT call BattleFrontier_BattleArenaBattleRoom_EventScript_StartArenaBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaGold goto BattleFrontier_BattleArenaBattleRoom_EventScript_DeclareOpponentWinner BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaGold:: call BattleFrontier_BattleArenaBattleRoom_EventScript_DeclarePlayerWinner frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForwardLong waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaBlownAway, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index e6394d2a8..9467f3419 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc @@ -40,8 +40,7 @@ BattleFrontier_BattleArenaLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattleArenaLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_DefeatedTycoon + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleArenaLobby_EventScript_DefeatedTycoon msgbox BattleFrontier_BattleArenaLobby_Text_CongratsOnSevenWins, MSGBOX_DEFAULT goto BattleFrontier_BattleArenaLobby_EventScript_GiveBattlePoints @@ -80,8 +79,7 @@ BattleFrontier_BattleArenaLobby_EventScript_SaveAfterChallenge:: playse SE_SAVE waitse call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_EndSaveAfterChallenge + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleArenaLobby_EventScript_EndSaveAfterChallenge message BattleFrontier_BattleArenaLobby_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -131,8 +129,7 @@ BattleFrontier_BattleArenaLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleArenaLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleArenaLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleArenaLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleArenaLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -141,8 +138,7 @@ BattleFrontier_BattleArenaLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge msgbox BattleFrontier_BattleArenaLobby_Text_OkayToSave, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge @@ -161,18 +157,15 @@ BattleFrontier_BattleArenaLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleArenaLobby_EventScript_CancelChallengeSaveFailed BattleFrontier_BattleArenaLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE msgbox BattleFrontier_BattleArenaLobby_Text_GuideYouToArena, MSGBOX_DEFAULT closemessage frontier_get FRONTIER_DATA_LVL_MODE - compare VAR_RESULT, FRONTIER_LVL_50 - call_if_eq BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLv50 - compare VAR_RESULT, FRONTIER_LVL_OPEN - call_if_eq BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLvOpen + call_if_eq VAR_RESULT, FRONTIER_LVL_50, BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLv50 + call_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLvOpen warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR, 9, 13 setvar VAR_TEMP_0, 0 waitstate diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index 8fc07f59a..888f116ee 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -20,17 +20,14 @@ BattleFrontier_BattleDomeBattleRoom_OnTransition: dome_setopponentgfx frontier_get FRONTIER_DATA_BATTLE_NUM copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, DOME_ROUND1 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_SetWalkingAudienceMemberPos + call_if_eq VAR_RESULT, DOME_ROUND1, BattleFrontier_BattleDomeBattleRoom_EventScript_SetWalkingAudienceMemberPos call BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfx end BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxFemale return BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxMale:: @@ -48,18 +45,15 @@ BattleFrontier_BattleDomeBattleRoom_OnFrame: BattleFrontier_BattleDomeBattleRoom_EventScript_EnterRoom:: lockall call BattleFrontier_BattleDomeBattleRoom_EventScript_GetRoundNum - compare VAR_RESULT, DOME_ROUND1 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_TryDoAudienceMemberWalkToSeat + call_if_eq VAR_RESULT, DOME_ROUND1, BattleFrontier_BattleDomeBattleRoom_EventScript_TryDoAudienceMemberWalkToSeat applymovement LOCALID_ANNOUNCER, Common_Movement_WalkInPlaceDown waitmovement 0 call BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayer msgbox BattleFrontier_BattleDomeBattleRoom_Text_PlayerHasEnteredDome, MSGBOX_DEFAULT closemessage showobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM - compare VAR_TEMP_F, DOME_FINAL - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnter - compare VAR_TEMP_E, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnterForTucker + goto_if_ne VAR_TEMP_F, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnter + goto_if_ne VAR_TEMP_E, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnterForTucker BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnter:: applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerEnter goto BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceReactToPlayer @@ -70,10 +64,8 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceReactToPlayer:: playse SE_M_ENCORE2 call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround waitmovement 0 - compare VAR_TEMP_F, DOME_FINAL - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_BattleOpponent - compare VAR_TEMP_E, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_AnnounceTucker + goto_if_ne VAR_TEMP_F, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleOpponent + goto_if_ne VAR_TEMP_E, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnounceTucker BattleFrontier_BattleDomeBattleRoom_EventScript_BattleOpponent:: dome_getopponentname msgbox BattleFrontier_BattleDomeBattleRoom_Text_PlayerVersusTrainer, MSGBOX_DEFAULT @@ -105,8 +97,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_Draw:: delay 180 applymovement LOCALID_REFEREE, BattleFrontier_BattleDomeBattleRoom_Movement_RefereeExit waitmovement 0 - compare VAR_TEMP_2, DRAW_TUCKER @ Tucker always wins on a draw - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_LostToOpponent + goto_if_eq VAR_TEMP_2, DRAW_TUCKER, BattleFrontier_BattleDomeBattleRoom_EventScript_LostToOpponent @ Tucker always wins on a draw dome_compareseeds switch VAR_RESULT case 1, BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent @@ -114,12 +105,9 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_LostToOpponent:: applymovement LOCALID_ANNOUNCER, Common_Movement_WalkInPlaceDown waitmovement 0 dome_getopponentname - compare VAR_TEMP_2, NO_DRAW - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWon - compare VAR_TEMP_2, DRAW_TRAINER - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWonDraw - compare VAR_TEMP_2, DRAW_TUCKER - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerWonDraw + call_if_eq VAR_TEMP_2, NO_DRAW, BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWon + call_if_eq VAR_TEMP_2, DRAW_TRAINER, BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWonDraw + call_if_eq VAR_TEMP_2, DRAW_TUCKER, BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerWonDraw playse SE_M_ENCORE2 call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround delay 60 @@ -149,10 +137,8 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerWonDraw:: BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent:: applymovement LOCALID_ANNOUNCER, Common_Movement_WalkInPlaceDown waitmovement 0 - compare VAR_TEMP_2, NO_DRAW - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWon - compare VAR_TEMP_2, DRAW_TRAINER - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWonDraw + call_if_eq VAR_TEMP_2, NO_DRAW, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWon + call_if_eq VAR_TEMP_2, DRAW_TRAINER, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWonDraw playse SE_M_ENCORE2 call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround delay 60 @@ -196,14 +182,11 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWonDraw:: BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayer:: dome_get DOME_DATA_ATTEMPTED_CHALLENGE - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerFirstAttempt + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerFirstAttempt dome_get DOME_DATA_HAS_WON_CHALLENGE - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerNeverWon + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerNeverWon dome_get DOME_DATA_WIN_STREAK_ACTIVE - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerBrokenStreak + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerBrokenStreak goto BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerChampion return @@ -266,8 +249,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerNeverWonFinal:: return BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerChampion:: - compare VAR_TEMP_F, DOME_FINAL - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerChampionNoTucker + goto_if_ne VAR_TEMP_F, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerChampionNoTucker switch VAR_TEMP_E case FRONTIER_BRAIN_SILVER, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerPreTuckerSilver case FRONTIER_BRAIN_GOLD, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerPreTuckerGold @@ -387,8 +369,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerEnter:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver msgbox BattleFrontier_BattleDomeBattleRoom_Text_TuckerSilverIntro, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver:: @@ -401,8 +382,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver:: msgbox BattleFrontier_BattleDomeBattleRoom_Text_IncredibleVictorIsPlayer, MSGBOX_DEFAULT dome_resolvewinners DOME_PLAYER_WON_MATCH frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney closemessage applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerApproachPlayer waitmovement 0 @@ -417,8 +397,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver:: BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerGoldIntro:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold msgbox BattleFrontier_BattleDomeBattleRoom_Text_TuckerGoldIntro, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold:: @@ -431,8 +410,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold:: msgbox BattleFrontier_BattleDomeBattleRoom_Text_IncredibleVictorIsPlayer, MSGBOX_DEFAULT dome_resolvewinners DOME_PLAYER_WON_MATCH frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney closemessage applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerApproachPlayer waitmovement 0 @@ -490,12 +468,10 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisible frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, DOME_FINAL - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects + goto_if_ne VAR_RESULT, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects frontier_getbrainstatus copyvar VAR_TEMP_E, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects + goto_if_eq VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects call BattleFrontier_EventScript_SetBrainObjectGfx setobjectxyperm LOCALID_OPPONENT, 13, 9 removeobject LOCALID_OPPONENT @@ -505,8 +481,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects:: end BattleFrontier_BattleDomeBattleRoom_OnResume: - compare VAR_TEMP_9, 1 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_CallAddAudience + call_if_eq VAR_TEMP_9, 1, BattleFrontier_BattleDomeBattleRoom_EventScript_CallAddAudience end BattleFrontier_BattleDomeBattleRoom_EventScript_CallAddAudience:: @@ -515,14 +490,10 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_CallAddAudience:: @ Add audience members to supplement the permanent object event audience BattleFrontier_BattleDomeBattleRoom_EventScript_AddAudience:: - compare VAR_TEMP_F, DOME_ROUND1 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound1Audience - compare VAR_TEMP_F, DOME_ROUND2 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound2Audience - compare VAR_TEMP_F, DOME_SEMIFINAL - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AddSemifinalAudience - compare VAR_TEMP_F, DOME_FINAL - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AddFinalAudience + call_if_eq VAR_TEMP_F, DOME_ROUND1, BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound1Audience + call_if_eq VAR_TEMP_F, DOME_ROUND2, BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound2Audience + call_if_eq VAR_TEMP_F, DOME_SEMIFINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_AddSemifinalAudience + call_if_eq VAR_TEMP_F, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_AddFinalAudience return BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound1Audience:: @@ -883,8 +854,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround:: BattleFrontier_BattleDomeBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE - compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 5, 11 waitstate end @@ -898,15 +868,13 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles:: BattleFrontier_BattleDomeBattleRoom_EventScript_SetWalkingAudienceMemberPos:: random 2 copyvar VAR_TEMP_D, VAR_RESULT - compare VAR_TEMP_D, 0 - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_TEMP_D, 0, Common_EventScript_NopReturn setobjectxyperm LOCALID_AUDIENCE_WALKING, 2, 0 setobjectmovementtype LOCALID_AUDIENCE_WALKING, MOVEMENT_TYPE_FACE_RIGHT return BattleFrontier_BattleDomeBattleRoom_EventScript_TryDoAudienceMemberWalkToSeat:: - compare VAR_TEMP_D, 0 - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_TEMP_D, 0, Common_EventScript_NopReturn applymovement LOCALID_AUDIENCE_WALKING, BattleFrontier_BattleDomeBattleRoom_Movement_AudienceMemberWalkToSeat return diff --git a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc index 246694439..d286dc868 100644 --- a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc @@ -12,8 +12,7 @@ BattleFrontier_BattleDomeCorridor_EventScript_EnterCorridor:: delay 16 setvar VAR_TEMP_0, 1 frontier_get FRONTIER_DATA_LVL_MODE - compare VAR_RESULT, FRONTIER_LVL_OPEN - goto_if_eq BattleFrontier_BattleDomeCorridor_EventScript_WalkToBattleRoomLvOpen + goto_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattleDomeCorridor_EventScript_WalkToBattleRoomLvOpen applymovement LOCALID_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantWalkToDoorLv50 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerWalkToDoorLv50 waitmovement 0 diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index ae82a5558..b972a0814 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -48,8 +48,7 @@ BattleFrontier_BattleDomeLobby_EventScript_WonChallenge:: call BattleFrontier_EventScript_IncrementWinStreak lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_DefeatedAce + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleDomeLobby_EventScript_DefeatedAce msgbox BattleFrontier_BattleDomeLobby_Text_CongratsForWinningTourney, MSGBOX_DEFAULT goto BattleFrontier_BattleDomeLobby_EventScript_GiveBattlePoints @@ -88,8 +87,7 @@ BattleFrontier_BattleDomeLobby_EventScript_AskRecordBattle:: playse SE_SAVE waitse call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_EndChallenge + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleDomeLobby_EventScript_EndChallenge message BattleFrontier_BattleDomeLobby_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -137,15 +135,11 @@ BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendant:: BattleFrontier_BattleDomeLobby_EventScript_AttendantWelcome:: special SavePlayerParty - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_WelcomeSingles - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_WelcomeDoubles + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_WelcomeSingles + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_WelcomeDoubles BattleFrontier_BattleDomeLobby_EventScript_AskTakeChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_TakeSinglesChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_TakeDoublesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_TakeSinglesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_TakeDoublesChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, FALSE switch VAR_RESULT @@ -162,8 +156,7 @@ BattleFrontier_BattleDomeLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleDomeLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleDomeLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleDomeLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleDomeLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -172,8 +165,7 @@ BattleFrontier_BattleDomeLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleDomeLobby_Text_OkayToSaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge @@ -191,8 +183,7 @@ BattleFrontier_BattleDomeLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleDomeLobby_EventScript_CancelChallengeSaveFailed dome_inittrainers BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge:: special SavePlayerParty @@ -208,10 +199,8 @@ BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge:: end BattleFrontier_BattleDomeLobby_EventScript_ExplainChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_ExplainSinglesChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_ExplainDoublesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_ExplainSinglesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_ExplainDoublesChallenge goto BattleFrontier_BattleDomeLobby_EventScript_AskTakeChallenge BattleFrontier_BattleDomeLobby_EventScript_NotEnoughValidMons:: @@ -240,27 +229,19 @@ BattleFrontier_BattleDomeLobby_EventScript_EndCancelChallenge:: end BattleFrontier_BattleDomeLobby_EventScript_WalkToDoor:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantWalkToDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantWalkToDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantWalkToDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantWalkToDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeLobby_Movement_WalkToDoor waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_OpenSinglesDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_OpenDoublesDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_OpenSinglesDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_OpenDoublesDoor waitdooranim - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantEnterDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantEnterDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantEnterDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantEnterDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeLobby_Movement_PlayerEnterDoor waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_CloseSinglesDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_CloseDoublesDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_CloseSinglesDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_CloseDoublesDoor waitdooranim return @@ -357,14 +338,10 @@ BattleFrontier_BattleDomeLobby_EventScript_ShowDoublesResults:: BattleFrontier_BattleDomeLobby_EventScript_ShowPrevTourneyTree:: dome_get DOME_DATA_PREV_TOURNEY_TYPE - compare VAR_RESULT, 0 - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsSinglesLv50 - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsDoublesLv50 - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsSinglesLvOpen - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsDoublesLvOpen + call_if_eq VAR_RESULT, 0, BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsSinglesLv50 + call_if_eq VAR_RESULT, 1, BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsDoublesLv50 + call_if_eq VAR_RESULT, 2, BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsSinglesLvOpen + call_if_eq VAR_RESULT, 3, BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsDoublesLvOpen fadescreen FADE_TO_BLACK dome_showprevtourneytree waitstate diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc index da5b4371a..6ca4296cc 100644 --- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc @@ -19,8 +19,7 @@ BattleFrontier_BattleDomePreBattleRoom_OnFrame: .2byte 0 BattleFrontier_BattleDomePreBattleRoom_EventScript_EnterRoom:: - compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_ReturnFromBattle + goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleDomePreBattleRoom_EventScript_ReturnFromBattle frontier_set FRONTIER_DATA_RECORD_DISABLED, TRUE setvar VAR_TEMP_0, 1 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomePreBattleRoom_Movement_PlayerEnter @@ -31,8 +30,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRound:: waitmessage switch VAR_RESULT @ No case? call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRoundNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRoundNoRecord multichoice 16, 0, MULTI_TOURNEY_WITH_RECORD, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleDomePreBattleRoom_EventScript_ShowOpponentInfo @@ -146,8 +144,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_ContinueChallenge:: special ChoosePartyForBattleFrontier waitstate frontier_resetsketch - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRound + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRound dome_set DOME_DATA_SELECTED_MONS dome_reduceparty dome_setopponent diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc index b0529153e..cf44e3118 100644 --- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc @@ -19,14 +19,11 @@ BattleFrontier_BattleFactoryBattleRoom_MapScripts:: BattleFrontier_BattleFactoryBattleRoom_OnTransition: frontier_settrainers checkplayergender - compare VAR_RESULT, MALE - call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale + call_if_eq VAR_RESULT, MALE, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale + call_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj end BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj:: @@ -41,8 +38,7 @@ BattleFrontier_BattleFactoryBattleRoom_OnWarp: BattleFrontier_BattleFactoryBattleRoom_EventScript_HideObjects:: setvar VAR_TEMP_1, 1 hideobjectat OBJ_EVENT_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM - compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects + goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects hideobjectat LOCALID_OPPONENT, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects:: end @@ -71,8 +67,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle:: end BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom:: - compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle + goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom waitmovement 0 @@ -84,8 +79,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_OPPONENT, BattleFrontier_BattleFactoryBattleRoom_Movement_OpponentEnter waitmovement 0 BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleOpponent:: - compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland + goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland palace_getopponentintro lockall msgbox gStringVar4, MSGBOX_DEFAULT @@ -105,8 +99,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost:: BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedOpponent:: factory_get FACTORY_DATA_WIN_STREAK_SWAPS - compare VAR_RESULT, MAX_STREAK - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak + goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak addvar VAR_RESULT, 1 setorcopyvar VAR_0x8006, VAR_RESULT factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above @@ -131,21 +124,18 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandImFactoryHead, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver:: msgbox BattleFrontier_BattleFactoryBattleRoom_Text_ShakeOutKnowledgeBringItOn, MSGBOX_DEFAULT call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver:: frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandLetsSeeFrontierPass, MSGBOX_DEFAULT closemessage applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland @@ -160,21 +150,18 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver:: BattleFrontier_BattleFactoryBattleRoom_EventScript_IntroNolandGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold msgbox BattleFrontier_BattleFactoryBattleRoom_Text_HarderLookThanLastTime, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold:: msgbox BattleFrontier_BattleFactoryBattleRoom_Text_AllRightBringItOn, MSGBOX_DEFAULT call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold:: frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland msgbox BattleFrontier_BattleFactoryBattleRoom_Text_OutOfMyLeagueLetsSeePass, MSGBOX_DEFAULT waitmessage applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland @@ -199,14 +186,12 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle:: BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland:: factory_get FACTORY_DATA_WIN_STREAK_SWAPS - compare VAR_RESULT, MAX_STREAK - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak + goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak addvar VAR_RESULT, 1 setorcopyvar VAR_0x8006, VAR_RESULT factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above factory_get FACTORY_DATA_WIN_STREAK - compare VAR_RESULT, MAX_STREAK - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum + goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum addvar VAR_RESULT, 1 factory_set FACTORY_DATA_WIN_STREAK, VAR_RESULT frontier_get FRONTIER_DATA_BATTLE_NUM @@ -245,8 +230,7 @@ BattleFrontier_BattleFactoryBattleRoom_Movement_NolandMoveToBattle: BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE - compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 4, 8 waitstate end diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc index da36d96e2..682b2c91d 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc @@ -43,8 +43,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattleFactoryLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_DefeatedFactoryHead + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryLobby_EventScript_DefeatedFactoryHead msgbox BattleFrontier_BattleFactoryLobby_Text_CongratsSevenWins, MSGBOX_DEFAULT waitmessage goto BattleFrontier_BattleFactoryLobby_EventScript_GiveBattlePoints @@ -79,8 +78,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_LostChallenge:: BattleFrontier_BattleFactoryLobby_EventScript_AskRecordBattle:: call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_EndRecordBattle + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryLobby_EventScript_EndRecordBattle message BattleFrontier_BattleFactoryLobby_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -126,15 +124,11 @@ BattleFrontier_BattleFactoryLobby_EventScript_DoublesAttendant:: BattleFrontier_BattleFactoryLobby_EventScript_Attendant:: special SavePlayerParty - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForSingleBattle - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForDoubleBattle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForSingleBattle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForDoubleBattle BattleFrontier_BattleFactoryLobby_EventScript_AskTakeChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TakeSinglesChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TakeDoublesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleFactoryLobby_EventScript_TakeSinglesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryLobby_EventScript_TakeDoublesChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, FALSE switch VAR_RESULT @@ -167,17 +161,14 @@ BattleFrontier_BattleFactoryLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed setvar VAR_0x8006, 0 BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge:: special SavePlayerParty msgbox BattleFrontier_BattleFactoryLobby_Text_StepThisWay, MSGBOX_DEFAULT closemessage - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TalkedToSinglesAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleFactoryLobby_EventScript_TalkedToSinglesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant applymovement VAR_LAST_TALKED, BattleFrontier_BattleFactoryLobby_Movement_AttendantEnterDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryLobby_Movement_PlayerEnterDoor waitmovement 0 @@ -195,10 +186,8 @@ BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant:: return BattleFrontier_BattleFactoryLobby_EventScript_ExplainChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_ExplainSinglesChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_ExplainDoublesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleFactoryLobby_EventScript_ExplainSinglesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryLobby_EventScript_ExplainDoublesChallenge goto BattleFrontier_BattleFactoryLobby_EventScript_AskTakeChallenge BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed:: diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc index f83b77fbb..d54cf8357 100644 --- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc @@ -11,8 +11,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_OnWarp: BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 - compare VAR_0x8006, 1 - goto_if_ne BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth + goto_if_ne VAR_0x8006, 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth setobjectxy LOCALID_ATTENDANT, 8, 7 turnobject LOCALID_ATTENDANT, DIR_SOUTH BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth:: @@ -24,14 +23,12 @@ BattleFrontier_BattleFactoryPreBattleRoom_OnFrame: .2byte 0 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterRoom:: - compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle + goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle setvar VAR_TEMP_0, 1 applymovement LOCALID_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantEnterRoom applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerEnterRoom waitmovement 0 - compare VAR_0x8006, 2 - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ResumeChallenge + goto_if_eq VAR_0x8006, 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ResumeChallenge factory_generaterentalmons factory_generateopponentmons factory_getopponentmontype @@ -49,10 +46,8 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom:: msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_RightThisWay, MSGBOX_DEFAULT closemessage call BattleFrontier_EventScript_GetLvlMode - compare VAR_RESULT, FRONTIER_LVL_50 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLv50 - compare VAR_RESULT, FRONTIER_LVL_OPEN - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLvOpen + call_if_eq VAR_RESULT, FRONTIER_LVL_50, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLv50 + call_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLvOpen waitmovement 0 warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 6, 11 waitstate @@ -66,8 +61,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle:: waitfanfare special HealPlayerParty frontier_getbrainstatus - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForRegularOpponent + goto_if_eq VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForRegularOpponent playse SE_POKENAV_CALL waitse msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_WaitFewMoments, MSGBOX_DEFAULT @@ -86,25 +80,17 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle:: BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent:: frontier_getbrainstatus - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForRegularOpponent:: frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor3rdOpponent - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor4thOpponent - compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor5thOpponent - compare VAR_RESULT, 5 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor6thOpponent - compare VAR_RESULT, 6 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor7thOpponent + call_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 3, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor4thOpponent + call_if_eq VAR_RESULT, 4, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor5thOpponent + call_if_eq VAR_RESULT, 5, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor6thOpponent + call_if_eq VAR_RESULT, 6, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor7thOpponent call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponentNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapMon @@ -168,8 +154,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SwapMons:: fadescreen FADE_TO_BLACK factory_swapmons waitstate - compare VAR_RESULT, TRUE @ Did player keep current pokemon - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom @ Did player keep current pokemon factory_setswapped msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom @@ -223,42 +208,24 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ResumeChallenge:: BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentType:: msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_InvestigatedUpcomingOpponent, MSGBOX_DEFAULT - compare VAR_0x8005, TYPE_NORMAL - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesNormal - compare VAR_0x8005, TYPE_FIGHTING - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFighting - compare VAR_0x8005, TYPE_FLYING - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFlying - compare VAR_0x8005, TYPE_POISON - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPoison - compare VAR_0x8005, TYPE_GROUND - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGround - compare VAR_0x8005, TYPE_ROCK - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesRock - compare VAR_0x8005, TYPE_BUG - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesBug - compare VAR_0x8005, TYPE_GHOST - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGhost - compare VAR_0x8005, TYPE_STEEL - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesSteel - compare VAR_0x8005, TYPE_FIRE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFire - compare VAR_0x8005, TYPE_WATER - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesWater - compare VAR_0x8005, TYPE_GRASS - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGrass - compare VAR_0x8005, TYPE_ELECTRIC - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesElectric - compare VAR_0x8005, TYPE_PSYCHIC - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPsychic - compare VAR_0x8005, TYPE_ICE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesIce - compare VAR_0x8005, TYPE_DRAGON - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDragon - compare VAR_0x8005, TYPE_DARK - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDark - compare VAR_0x8005, NUMBER_OF_MON_TYPES - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonType + call_if_eq VAR_0x8005, TYPE_NORMAL, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesNormal + call_if_eq VAR_0x8005, TYPE_FIGHTING, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFighting + call_if_eq VAR_0x8005, TYPE_FLYING, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFlying + call_if_eq VAR_0x8005, TYPE_POISON, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPoison + call_if_eq VAR_0x8005, TYPE_GROUND, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGround + call_if_eq VAR_0x8005, TYPE_ROCK, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesRock + call_if_eq VAR_0x8005, TYPE_BUG, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesBug + call_if_eq VAR_0x8005, TYPE_GHOST, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGhost + call_if_eq VAR_0x8005, TYPE_STEEL, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesSteel + call_if_eq VAR_0x8005, TYPE_FIRE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFire + call_if_eq VAR_0x8005, TYPE_WATER, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesWater + call_if_eq VAR_0x8005, TYPE_GRASS, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGrass + call_if_eq VAR_0x8005, TYPE_ELECTRIC, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesElectric + call_if_eq VAR_0x8005, TYPE_PSYCHIC, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPsychic + call_if_eq VAR_0x8005, TYPE_ICE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesIce + call_if_eq VAR_0x8005, TYPE_DRAGON, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDragon + call_if_eq VAR_0x8005, TYPE_DARK, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDark + call_if_eq VAR_0x8005, NUMBER_OF_MON_TYPES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonType return BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesNormal:: @@ -334,24 +301,15 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonTyp return BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentStyle:: - compare VAR_0x8006, FACTORY_STYLE_NONE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleUnrestrained - compare VAR_0x8006, FACTORY_STYLE_PREPARATION - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleTotalPreparation - compare VAR_0x8006, FACTORY_STYLE_SLOW_STEADY - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleSlowAndSteady - compare VAR_0x8006, FACTORY_STYLE_ENDURANCE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleEndurance - compare VAR_0x8006, FACTORY_STYLE_HIGH_RISK - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleHighRisk - compare VAR_0x8006, FACTORY_STYLE_WEAKENING - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleWeakenFoe - compare VAR_0x8006, FACTORY_STYLE_UNPREDICTABLE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleImpossibleToPredict - compare VAR_0x8006, FACTORY_STYLE_WEATHER - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleDependsOnFlow - compare VAR_0x8006, FACTORY_NUM_STYLES - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleFlexible + call_if_eq VAR_0x8006, FACTORY_STYLE_NONE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleUnrestrained + call_if_eq VAR_0x8006, FACTORY_STYLE_PREPARATION, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleTotalPreparation + call_if_eq VAR_0x8006, FACTORY_STYLE_SLOW_STEADY, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleSlowAndSteady + call_if_eq VAR_0x8006, FACTORY_STYLE_ENDURANCE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleEndurance + call_if_eq VAR_0x8006, FACTORY_STYLE_HIGH_RISK, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleHighRisk + call_if_eq VAR_0x8006, FACTORY_STYLE_WEAKENING, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleWeakenFoe + call_if_eq VAR_0x8006, FACTORY_STYLE_UNPREDICTABLE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleImpossibleToPredict + call_if_eq VAR_0x8006, FACTORY_STYLE_WEATHER, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleDependsOnFlow + call_if_eq VAR_0x8006, FACTORY_NUM_STYLES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleFlexible return BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleUnrestrained:: @@ -394,8 +352,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead:: message BattleFrontier_BattleFactoryPreBattleRoom_Text_PreparedToFaceHead waitmessage call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHeadNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHeadNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapBeforeHead diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index 1d46ea044..2e9366d44 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -21,10 +21,8 @@ BattleFrontier_BattlePalaceBattleRoom_OnTransition: BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxFemale return @ The opponent's gfx are set to the players by default @@ -45,8 +43,7 @@ BattleFrontier_BattlePalaceBattleRoom_OnFrame: BattleFrontier_BattlePalaceBattleRoom_EventScript_EnterRoom:: showobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_BeginChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_BeginChallenge applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerReturnToChallenge waitmovement 0 applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown @@ -95,24 +92,16 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedOpponent:: BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent:: frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_MavenUpNext + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattlePalaceBattleRoom_EventScript_MavenUpNext frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor3rdOpponent - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor4thOpponent - compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor5thOpponent - compare VAR_RESULT, 5 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor6thOpponent - compare VAR_RESULT, 6 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor7thOpponent + call_if_eq VAR_RESULT, 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 3, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor4thOpponent + call_if_eq VAR_RESULT, 4, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor5thOpponent + call_if_eq VAR_RESULT, 5, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor6thOpponent + call_if_eq VAR_RESULT, 6, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor7thOpponent call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponentNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_ContinueChallenge @@ -179,16 +168,14 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_PauseChallenge:: end BattleFrontier_BattlePalaceBattleRoom_EventScript_MavenUpNext:: - compare VAR_TEMP_2, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven + goto_if_eq VAR_TEMP_2, 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven msgbox BattleFrontier_BattlePalaceBattleRoom_Text_ChallengingPalaceMaven, MSGBOX_DEFAULT setvar VAR_TEMP_2, 1 BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven:: message BattleFrontier_BattlePalaceBattleRoom_Text_ReadyForPalaceMaven waitmessage call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMavenNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMavenNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenser @@ -225,22 +212,19 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenser:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserFirstIntro, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver:: msgbox BattleFrontier_BattlePalaceBattleRoom_Text_ProveYourBondWithMons, MSGBOX_DEFAULT call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver:: palace_incrementstreak frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserPostSilverBattle, MSGBOX_DEFAULT applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown @@ -260,22 +244,19 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver:: BattleFrontier_BattlePalaceBattleRoom_EventScript_IntroSpenserGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserThisTimeWontHoldBack, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold:: msgbox BattleFrontier_BattlePalaceBattleRoom_Text_Kaaah, MSGBOX_DEFAULT call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold:: palace_incrementstreak frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserYourTeamIsAdmirable, MSGBOX_DEFAULT applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown @@ -417,8 +398,7 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_UnusedOpponentEnter3: BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE - compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 5, 7 waitstate end diff --git a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc index 68de944c0..ad2a2ee9f 100644 --- a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc @@ -15,20 +15,14 @@ BattleFrontier_BattlePalaceCorridor_EventScript_WalkThroughCorridor:: waitmovement 0 lockall palace_getcomment - compare VAR_RESULT, 0 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment1 - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment2 - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment3 - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_StreakComment - compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_LongStreakComment + call_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment1 + call_if_eq VAR_RESULT, 1, BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment2 + call_if_eq VAR_RESULT, 2, BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment3 + call_if_eq VAR_RESULT, 3, BattleFrontier_BattlePalaceCorridor_EventScript_StreakComment + call_if_eq VAR_RESULT, 4, BattleFrontier_BattlePalaceCorridor_EventScript_LongStreakComment closemessage frontier_get FRONTIER_DATA_LVL_MODE - compare VAR_RESULT, FRONTIER_LVL_OPEN - goto_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom + goto_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkTo50BattleRoom applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkTo50BattleRoom waitmovement 0 diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index 0bd08ae44..481f7000d 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc @@ -41,8 +41,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_DefeatedMaven + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePalaceLobby_EventScript_DefeatedMaven msgbox BattleFrontier_BattlePalaceLobby_Text_FirmTrueBondsFor7WinStreak, MSGBOX_DEFAULT goto BattleFrontier_BattlePalaceLobby_EventScript_GiveBattlePoints @@ -81,8 +80,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_SaveAfterChallenge:: playse SE_SAVE waitse call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_EndSaveAfterChallenge + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePalaceLobby_EventScript_EndSaveAfterChallenge message BattleFrontier_BattlePalaceLobby_Text_LikeToRecordMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -126,18 +124,13 @@ BattleFrontier_BattlePalaceLobby_EventScript_DoublesAttendant:: BattleFrontier_BattlePalaceLobby_EventScript_Attendant:: palace_get PALACE_DATA_PRIZE - compare VAR_RESULT, ITEM_NONE - goto_if_ne BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge + goto_if_ne VAR_RESULT, ITEM_NONE, BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge special SavePlayerParty - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForSingleBattle - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForDoubleBattle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForSingleBattle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForDoubleBattle BattleFrontier_BattlePalaceLobby_EventScript_AskTakeChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_AskTakeSingleBattleChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_AskTakeDoubleBattleChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_AskTakeSingleBattleChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_AskTakeDoubleBattleChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, FALSE switch VAR_RESULT @@ -154,8 +147,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattlePalaceLobby_Text_NowSelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -164,8 +156,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge msgbox BattleFrontier_BattlePalaceLobby_Text_MustSaveBeforeChallenge2, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge @@ -184,8 +175,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE @@ -198,8 +188,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge:: end BattleFrontier_BattlePalaceLobby_EventScript_ExplainChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_ExplainDoublesChallenge + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_ExplainDoublesChallenge msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainSingleBattleChallenge, MSGBOX_DEFAULT goto BattleFrontier_BattlePalaceLobby_EventScript_AskTakeChallenge @@ -249,25 +238,19 @@ BattleFrontier_BattlePalaceLobby_EventScript_AskTakeDoubleBattleChallenge:: return BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_TalkedToSinglesAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_TalkedToDoublesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_TalkedToSinglesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_TalkedToDoublesAttendant applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_OpenSinglesHallDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_OpenDoublesHallDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_OpenSinglesHallDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_OpenDoublesHallDoor waitdooranim applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_AttendantEnterDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_PlayerEnterDoor waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_CloseSinglesHallDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_CloseDoublesHallDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_CloseSinglesHallDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_CloseDoublesHallDoor waitdooranim return diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index 4bb6e2327..fb91ee752 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -41,8 +41,7 @@ BattleFrontier_BattlePikeLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattlePikeLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_DefeatedQueen + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeLobby_EventScript_DefeatedQueen msgbox BattleFrontier_BattlePikeLobby_Text_PossessLuckInAbundance, MSGBOX_DEFAULT waitmessage goto BattleFrontier_BattlePikeLobby_EventScript_GiveBattlePoints @@ -116,8 +115,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -126,8 +124,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge msgbox BattleFrontier_BattlePikeLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge @@ -149,8 +146,7 @@ BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge:: call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 pike_savehelditems - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE msgbox BattleFrontier_BattlePikeLobby_Text_StepThisWay, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc index 5888c140d..9d060214d 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc @@ -137,21 +137,18 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_LucyEnter:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver msgbox BattleFrontier_BattlePikeRoomNormal_Text_ImThePikeQueen, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_HopeYouDidntUseUpLuck, MSGBOX_DEFAULT call BattleFrontier_BattlePikeRoomNormal_EventScript_DoPikeQueenBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver goto BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver:: frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy msgbox BattleFrontier_BattlePikeRoomNormal_Text_LucyShowMeFrontierPass, MSGBOX_DEFAULT waitmessage playfanfare MUS_OBTAIN_SYMBOL @@ -165,21 +162,18 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver:: BattleFrontier_BattlePikeRoomNormal_EventScript_IntroLucyGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold msgbox BattleFrontier_BattlePikeRoomNormal_Text_LucyYouAgain, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_NowComeOn, MSGBOX_DEFAULT call BattleFrontier_BattlePikeRoomNormal_EventScript_DoPikeQueenBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucyGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucyGold goto BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucyGold:: frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy msgbox BattleFrontier_BattlePikeRoomNormal_Text_LucyFrontierPass, MSGBOX_DEFAULT waitmessage playfanfare MUS_OBTAIN_SYMBOL @@ -290,10 +284,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterStatusRoom:: waitmovement 0 pike_getstatusmon copyvar VAR_0x8004, VAR_RESULT - compare VAR_0x8004, PIKE_STATUSMON_KIRLIA - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack - compare VAR_0x8004, PIKE_STATUSMON_DUSCLOPS - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack + call_if_eq VAR_0x8004, PIKE_STATUSMON_KIRLIA, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack + call_if_eq VAR_0x8004, PIKE_STATUSMON_DUSCLOPS, BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack msgbox BattleFrontier_BattlePikeRoomNormal_Text_AttacksWhenStartled, MSGBOX_DEFAULT closemessage releaseall @@ -306,14 +298,10 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack:: playmoncry SPECIES_KIRLIA, CRY_MODE_NORMAL waitmoncry pike_getstatus - compare VAR_RESULT, PIKE_STATUS_TOXIC - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedToxic - compare VAR_RESULT, PIKE_STATUS_BURN - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedWillOWisp - compare VAR_RESULT, PIKE_STATUS_PARALYSIS - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedThunderWave - compare VAR_RESULT, PIKE_STATUS_SLEEP - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedHypnosis + call_if_eq VAR_RESULT, PIKE_STATUS_TOXIC, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedToxic + call_if_eq VAR_RESULT, PIKE_STATUS_BURN, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedWillOWisp + call_if_eq VAR_RESULT, PIKE_STATUS_PARALYSIS, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedThunderWave + call_if_eq VAR_RESULT, PIKE_STATUS_SLEEP, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedHypnosis pike_flashscreen waitstate applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon @@ -341,10 +329,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack:: playmoncry SPECIES_DUSCLOPS, CRY_MODE_NORMAL waitmoncry pike_getstatus - compare VAR_RESULT, PIKE_STATUS_FREEZE - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedIceBeam - compare VAR_RESULT, PIKE_STATUS_BURN - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedWillOWisp + call_if_eq VAR_RESULT, PIKE_STATUS_FREEZE, BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedIceBeam + call_if_eq VAR_RESULT, PIKE_STATUS_BURN, BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedWillOWisp pike_flashscreen waitstate applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon @@ -569,10 +555,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_StatusNPC:: BattleFrontier_BattlePikeRoomNormal_EventScript_HealNPC:: pike_healonetwomons - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreTwoMons - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreOneMon + call_if_eq VAR_RESULT, 2, BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreTwoMons + call_if_eq VAR_RESULT, 1, BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreOneMon playfanfare MUS_HEAL waitfanfare msgbox BattleFrontier_BattlePikeRoomNormal_Text_BestOfLuckFarewell, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc index 0c055f631..19926b967 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc @@ -32,10 +32,8 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_TurnPlayerNorth:: BattleFrontier_BattlePikeRoomWildMons_OnResume: call BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves frontier_get FRONTIER_DATA_BATTLE_OUTCOME - compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost - compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost + goto_if_eq VAR_RESULT, B_OUTCOME_LOST, BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost + goto_if_eq VAR_RESULT, B_OUTCOME_DREW, BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost end BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost:: diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc index 301a8f476..e95ca9dce 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc @@ -151,8 +151,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_AskRetireChallenge:: BattleFrontier_BattlePikeThreePathRoom_EventScript_SetHintRoom:: pike_sethintroom - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_SetPikeQueenHint + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeThreePathRoom_EventScript_SetPikeQueenHint setvar VAR_TEMP_5, 255 end @@ -173,8 +172,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_GivePikeQueenHint:: BattleFrontier_BattlePikeThreePathRoom_EventScript_HintGiver:: pike_gethint - compare VAR_RESULT, PIKE_HINT_BRAIN - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveBrainHint + goto_if_eq VAR_RESULT, PIKE_HINT_BRAIN, BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveBrainHint lock faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_FindingItDifficultToChoose, MSGBOX_YESNO diff --git a/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc index ebc3a8d3e..a6b3f63c8 100644 --- a/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc @@ -21,8 +21,7 @@ BattleFrontier_BattlePyramidFloor_EventScript_UpdateLight:: BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop:: special CallBattlePyramidFunction delay 2 - compare VAR_RESULT, 2 - goto_if_ne BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop + goto_if_ne VAR_RESULT, 2, BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop setvar VAR_TEMP_D, 0 releaseall end @@ -45,18 +44,12 @@ BattleFrontier_BattlePyramidFloor_OnResume: case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge frontier_get FRONTIER_DATA_BATTLE_OUTCOME - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty - compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, B_OUTCOME_FORFEITED - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty + goto_if_eq VAR_RESULT, B_OUTCOME_LOST, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_DREW, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_FORFEITED, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost frontier_isbattletype BATTLE_TYPE_TRAINER @ VAR_RESULT seems to be ignored here setvar VAR_TEMP_D, 1 BattleFrontier_BattlePyramidFloor_EventScript_ResetParty:: @@ -97,8 +90,7 @@ BattlePyramid_WarpToNextFloor:: frontier_get FRONTIER_DATA_BATTLE_NUM @ Floor number addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT - compare VAR_RESULT, 7 - goto_if_eq BattlePyramid_WarpToTop + goto_if_eq VAR_RESULT, 7, BattlePyramid_WarpToTop pyramid_seedfloor frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_RESULT, 0 @@ -124,8 +116,7 @@ BattlePyramid_TrainerBattle:: BattlePyramid_FindItemBall:: pyramid_setitem callstd STD_FIND_ITEM - compare VAR_0x8007, 0 - goto_if_eq BattlePyramid_FindItemBallEnd + goto_if_eq VAR_0x8007, 0, BattlePyramid_FindItemBallEnd pyramid_hideitem BattlePyramid_FindItemBallEnd:: end diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index 761f5f663..550644511 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -45,8 +45,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattlePyramidLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_DefeatedKing + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePyramidLobby_EventScript_DefeatedKing msgbox BattleFrontier_BattlePyramidLobby_Text_YouveConqueredPyramid, MSGBOX_DEFAULT goto BattleFrontier_BattlePyramidLobby_EventScript_GiveBattlePoints @@ -54,8 +53,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_DefeatedKing:: msgbox BattleFrontier_BattlePyramidLobby_Text_YouveDefeatedPyramidKing, MSGBOX_DEFAULT BattleFrontier_BattlePyramidLobby_EventScript_GiveBattlePoints:: special DoBattlePyramidMonsHaveHeldItem - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePyramidLobby_EventScript_StoreHeldItemsInPyramidBag + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePyramidLobby_EventScript_StoreHeldItemsInPyramidBag clearflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG frontier_checkairshow special LoadPlayerParty @@ -130,8 +128,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattlePyramidLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -140,8 +137,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge msgbox BattleFrontier_BattlePyramidLobby_Text_OkayToSaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge @@ -162,8 +158,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed BattleFrontier_BattlePyramidLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE @@ -233,8 +228,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_NoHint:: BattleFrontier_BattlePyramidLobby_EventScript_GiveHintLv50:: msgbox BattleFrontier_BattlePyramidLobby_Text_Aah, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_50 - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLv50Streak + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLv50Streak setvar VAR_RESULT, 0 goto BattleFrontier_BattlePyramidLobby_EventScript_DoHintComment return @@ -247,8 +241,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLv50Streak:: BattleFrontier_BattlePyramidLobby_EventScript_GiveHintLvOpen:: msgbox BattleFrontier_BattlePyramidLobby_Text_Aah, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_OPEN - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLvOpenStreak + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLvOpenStreak setvar VAR_RESULT, 0 goto BattleFrontier_BattlePyramidLobby_EventScript_DoHintComment return @@ -378,8 +371,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_WalkToPanelAndReceiveBag:: waitmovement 0 msgbox BattleFrontier_BattlePyramidLobby_Text_WeWillHoldBagForSafekeeping, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_ReceiveNewBattleBag + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidLobby_EventScript_ReceiveNewBattleBag msgbox BattleFrontier_BattlePyramidLobby_Text_PleaseTakePreviousBattleBag, MSGBOX_DEFAULT goto BattleFrontier_BattlePyramidLobby_EventScript_ReceiveBattleBag @@ -433,8 +425,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_StoreHeldItemsInPyramidBag:: msgbox BattleFrontier_BattlePyramidLobby_Text_MonHoldingItemCannotTake, MSGBOX_DEFAULT setflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG special TryStoreHeldItemsInPyramidBag - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_HeldItemsStoredInPyramidBag + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidLobby_EventScript_HeldItemsStoredInPyramidBag message BattleFrontier_BattlePyramidLobby_Text_BagCannotHoldPickItemsToKeep waitmessage goto BattleFrontier_BattlePyramidLobby_EventScript_PickItemsToKeep @@ -472,8 +463,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_PickItemsFromParty:: BattleFrontier_BattlePyramidLobby_EventScript_ExitPickItems:: special DoBattlePyramidMonsHaveHeldItem - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_PartyStillHasHeldItems + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePyramidLobby_EventScript_PartyStillHasHeldItems return BattleFrontier_BattlePyramidLobby_EventScript_PartyStillHasHeldItems:: diff --git a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc index f7054d202..385356c4b 100644 --- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc @@ -20,16 +20,14 @@ BattleFrontier_BattlePyramidTop_OnWarp: BattleFrontier_BattlePyramidTop_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH - compare VAR_TEMP_C, 0 - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects + goto_if_ne VAR_TEMP_C, 0, BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects setobjectxyperm LOCALID_BRANDON, 0, 0 BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects:: end BattleFrontier_BattlePyramidTop_OnResume: frontier_getbrainstatus - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus + goto_if_eq VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus call BattleFrontier_EventScript_SetBrainObjectGfx BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus:: copyvar VAR_TEMP_C, VAR_RESULT @@ -39,12 +37,9 @@ BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus:: case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidTop_EventScript_ReadyChallenge frontier_get FRONTIER_DATA_BATTLE_OUTCOME - compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, B_OUTCOME_FORFEITED - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_LOST, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_DREW, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_FORFEITED, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost end BattleFrontier_BattlePyramidTop_OnFrame: @@ -74,10 +69,8 @@ BattleFrontier_BattlePyramidTop_EventScript_ReadyChallenge:: BattleFrontier_BattlePyramidTop_EventScript_Attendant:: lock faceplayer - compare VAR_TEMP_D, 0 - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_StepForwardWhenReady - compare VAR_TEMP_C, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_BrandonHereMoveAside + goto_if_ne VAR_TEMP_D, 0, BattleFrontier_BattlePyramidTop_EventScript_StepForwardWhenReady + goto_if_ne VAR_TEMP_C, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattlePyramidTop_EventScript_BrandonHereMoveAside msgbox BattleFrontier_BattlePyramidTop_Text_ReachedSummitUpYouGo, MSGBOX_DEFAULT closemessage applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside @@ -116,8 +109,7 @@ BattleFrontier_BattlePyramidTop_EventScript_BattleBrandon:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech special SpawnCameraObject applymovement OBJ_EVENT_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp waitmovement 0 @@ -137,14 +129,12 @@ BattleFrontier_BattlePyramidTop_EventScript_BattleBrandonSilver:: msgbox BattleFrontier_BattlePyramidTop_Text_BringCourageToOurBattle, MSGBOX_DEFAULT call BattleFrontier_BattlePyramidTop_EventScript_DoBrandonBattle playbgm MUS_B_PYRAMID_TOP, FALSE - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver goto BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver:: frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePyramidTop_Text_BrandonFrontierPassPlease, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattlePyramidTop_Text_ReceivedBraveSymbol @@ -156,8 +146,7 @@ BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver:: BattleFrontier_BattlePyramidTop_EventScript_BrandonIntroGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech special SpawnCameraObject applymovement OBJ_EVENT_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp waitmovement 0 @@ -177,14 +166,12 @@ BattleFrontier_BattlePyramidTop_EventScript_BattleBrandonGold:: msgbox BattleFrontier_BattlePyramidTop_Text_EverythingYouHave, MSGBOX_DEFAULT call BattleFrontier_BattlePyramidTop_EventScript_DoBrandonBattle playbgm MUS_B_PYRAMID_TOP, FALSE - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonGold goto BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonGold:: frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePyramidTop_Text_BrandonRemarkableHaveThis, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattlePyramidTop_Text_BraveSymbolTookGoldenShine diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc index ab25442a2..9b466af3b 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc @@ -25,8 +25,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_EnterRoom:: applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_OpponentEnter + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerBattleRoom_EventScript_OpponentEnter applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceAttendant @@ -62,8 +61,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedOpponent:: waitmovement 0 removeobject LOCALID_OPPONENT frontier_getbrainstatus - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - call_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_SecondAttendantEnter + call_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleTowerBattleRoom_EventScript_SecondAttendantEnter applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceAttendant @@ -75,13 +73,11 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedOpponent:: BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForOpponent:: frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_MaidenUpNext + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleTowerBattleRoom_EventScript_MaidenUpNext frontier_get FRONTIER_DATA_BATTLE_NUM call BattleFrontier_BattleTowerBattleRoom_EventScript_ReadyForOpponent call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForOpponentNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_ContinueChallenge @@ -214,16 +210,14 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_SecondAttendantEnter:: return BattleFrontier_BattleTowerBattleRoom_EventScript_MaidenUpNext:: - compare VAR_TEMP_2, 1 - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaiden + goto_if_eq VAR_TEMP_2, 1, BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaiden msgbox BattleFrontier_BattleTowerBattleRoom_Text_SalonMaidenOnHerWay, MSGBOX_DEFAULT setvar VAR_TEMP_2, 1 BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaiden:: message BattleFrontier_BattleTowerBattleRoom_Text_ReadyForSalonMaiden waitmessage call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaidenNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaidenNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabel @@ -255,22 +249,19 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabel:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelSilver msgbox BattleFrontier_BattleTowerBattleRoom_Text_GreetingsImAnabel, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelSilver:: msgbox BattleFrontier_BattleTowerBattleRoom_Text_LetMeSeeYourTalent, MSGBOX_DEFAULT call BattleFrontier_BattleTowerBattleRoom_EventScript_DoTowerBattle - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelSilver + goto_if_eq VAR_RESULT, B_OUTCOME_WON, BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelSilver goto BattleFrontier_BattleTower_EventScript_WarpToLobbyLost BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelSilver:: call BattleFrontier_EventScript_IncrementWinStreak frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattleTowerBattleRoom_Text_AnabelTalentShallBeRecognized, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattleTowerBattleRoom_Text_ReceivedAbilitySymbol @@ -282,22 +273,19 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelSilver:: BattleFrontier_BattleTowerBattleRoom_EventScript_AnabelGoldIntro:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelGold msgbox BattleFrontier_BattleTowerBattleRoom_Text_AnabelYouCameBack, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelGold:: msgbox BattleFrontier_BattleTowerBattleRoom_Text_LetsBeginShallWe, MSGBOX_DEFAULT call BattleFrontier_BattleTowerBattleRoom_EventScript_DoTowerBattle - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelGold + goto_if_eq VAR_RESULT, B_OUTCOME_WON, BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelGold goto BattleFrontier_BattleTower_EventScript_WarpToLobbyLost BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelGold:: call BattleFrontier_EventScript_IncrementWinStreak frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattleTowerBattleRoom_Text_AnabelCongratsYourPassPlease, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattleTowerBattleRoom_Text_AbilitySymbolTookGoldenShine @@ -317,8 +305,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_DoTowerBattle:: special DoSpecialTrainerBattle waitstate copyvar VAR_0x8004, VAR_FRONTIER_BATTLE_MODE - compare VAR_0x8004, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_EndTowerBattle + goto_if_eq VAR_0x8004, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerBattleRoom_EventScript_EndTowerBattle frontier_restorehelditems special HealPlayerParty frontier_resetsketch @@ -422,12 +409,9 @@ BattleFrontier_BattleTowerBattleRoom_Movement_AnabelEnter: BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE - compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyDoubles - compare VAR_RESULT, FRONTIER_MODE_MULTIS - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis - compare VAR_RESULT, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyDoubles + goto_if_eq VAR_RESULT, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis + goto_if_eq VAR_RESULT, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 6, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc index b4ddb0788..d0f3d487a 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc @@ -6,8 +6,7 @@ BattleFrontier_BattleTowerCorridor_MapScripts:: .byte 0 BattleFrontier_BattleTowerCorridor_OnLoad: - compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor + goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor setmetatile 12, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, FALSE setmetatile 12, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, FALSE end @@ -23,8 +22,7 @@ BattleFrontier_BattleTowerCorridor_OnFrame: BattleFrontier_BattleTowerCorridor_EventScript_EnterCorridor:: setvar VAR_TEMP_0, 1 - compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor + goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToDoor waitmovement 0 diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc index 1f7e05ca5..06f4ff0a7 100644 --- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc @@ -26,14 +26,10 @@ BattleFrontier_BattleTowerElevator_EventScript_EnterElevator:: end BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoom:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoomMulti - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridorMulti + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoomMulti + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridorMulti return BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor:: diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index 3d10a08a0..40936936a 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -19,8 +19,7 @@ BattleFrontier_BattleTowerLobby_OnResume: BattleFrontier_BattleTowerLobby_OnTransition: call BattleFrontier_BattleTowerLobby_EventScript_ShowOrHideReporter apprentice_shouldcheckgone - compare VAR_0x8004, FALSE @ Always TRUE here - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ShowApprentice + goto_if_eq VAR_0x8004, FALSE, BattleFrontier_BattleTowerLobby_EventScript_ShowApprentice @ VAR_0x8004 always TRUE here goto_if_set FLAG_DAILY_APPRENTICE_LEAVES, BattleFrontier_BattleTowerLobby_EventScript_HideApprentice BattleFrontier_BattleTowerLobby_EventScript_ShowApprentice:: clearflag FLAG_HIDE_APPRENTICE @@ -69,8 +68,7 @@ BattleFrontier_BattleTowerLobby_EventScript_WonChallenge:: lock faceplayer frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_DefeatedMaiden + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_DefeatedMaiden message BattleFrontier_BattleTowerLobby_Text_CongratsBeatenSeven waitmessage goto BattleFrontier_BattleTowerLobby_EventScript_GiveRibbons @@ -79,8 +77,7 @@ BattleFrontier_BattleTowerLobby_EventScript_DefeatedMaiden:: msgbox BattleFrontier_BattleTowerLobby_Text_CongratsDefeatedMaiden, MSGBOX_DEFAULT BattleFrontier_BattleTowerLobby_EventScript_GiveRibbons:: tower_giveribbons - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_GiveBattlePoints + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_BattleTowerLobby_EventScript_GiveBattlePoints message BattleFrontier_BattleTowerLobby_Text_HereAreSomeRibbons waitmessage playfanfare MUS_OBTAIN_ITEM @@ -92,8 +89,7 @@ BattleFrontier_BattleTowerLobby_EventScript_GiveBattlePoints:: msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS call BattleFrontier_BattleTowerLobby_EventScript_AskSaveBattle tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 49 - goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge + goto_if_ne VAR_RESULT, 49, BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge msgbox BattleFrontier_BattleTowerLobby_Text_AboutToFace50thTrainer, MSGBOX_DEFAULT BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge:: msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT @@ -103,12 +99,10 @@ BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge:: end BattleFrontier_BattleTowerLobby_EventScript_LostChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_CancelWinStreak + goto_if_ne VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_CancelWinStreak goto_if_set FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER, BattleFrontier_BattleTowerLobby_EventScript_CancelWinStreak tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_LostThanksForPlaying + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LostThanksForPlaying BattleFrontier_BattleTowerLobby_EventScript_CancelWinStreak:: tower_set TOWER_DATA_WIN_STREAK_ACTIVE, FALSE BattleFrontier_BattleTowerLobby_EventScript_LostThanksForPlaying:: @@ -133,8 +127,7 @@ BattleFrontier_BattleTowerLobby_EventScript_AskSaveBattle:: playse SE_SAVE waitse call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_EndSaveBattle + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_EndSaveBattle message BattleFrontier_BattleTowerLobby_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -145,8 +138,7 @@ BattleFrontier_BattleTowerLobby_EventScript_AskSaveBattle:: BattleFrontier_EventScript_SaveBattle:: frontier_savebattle - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_EventScript_BattleSaveFailed + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_EventScript_BattleSaveFailed playse SE_SAVE msgbox BattleFrontier_BattleTowerLobby_Text_BattleRecordedOnPass, MSGBOX_DEFAULT goto BattleFrontier_BattleTowerLobby_EventScript_EndSaveBattle @@ -163,8 +155,7 @@ BattleFrontier_EventScript_GetCantRecordBattle:: BattleFrontier_BattleTowerLobby_EventScript_ResumeChallenge:: lock faceplayer - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_SetBravoTrainerOn + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_SetBravoTrainerOn message BattleFrontier_BattleTowerLobby_Text_WeveBeenWaitingForYou waitmessage message BattleFrontier_BattleTowerLobby_Text_ProgressWillBeSaved @@ -205,8 +196,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterSinglesChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -215,8 +205,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterSinglesChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleTowerLobby_Text_OkayToSaveBeforeEntering, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge @@ -234,8 +223,7 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeSinglesChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, TRUE goto BattleFrontier_BattleTowerLobby_EventScript_EnterElevator @@ -271,8 +259,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterDoublesChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectFourMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -281,8 +268,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterDoublesChallenge:: setvar VAR_0x8005, FRONTIER_DOUBLES_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleTowerLobby_Text_OkayToSaveBeforeEntering, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge @@ -300,8 +286,7 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeDoublesChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, FALSE goto BattleFrontier_BattleTowerLobby_EventScript_EnterElevator @@ -338,8 +323,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterMultisChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -348,8 +332,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterMultisChallenge:: setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleTowerLobby_Text_OkayToSaveBeforeEntering, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge @@ -367,8 +350,7 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeMultisChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, FALSE goto BattleFrontier_BattleTowerLobby_EventScript_EnterElevator @@ -404,8 +386,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterLinkMultisChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons2, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -414,8 +395,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterLinkMultisChallenge:: setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleTowerLobby_Text_OkayToSaveBeforeEntering, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge @@ -434,12 +414,10 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeLinkMultisChallenge:: tower_save 0 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryWirelessLink + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_TryWirelessLink goto BattleFrontier_BattleTowerLobby_EventScript_TryCableLink end @@ -491,10 +469,8 @@ BattleFrontier_BattleTowerLobby_EventScript_FeelingsWontTell:: end BattleFrontier_BattleTowerLobby_EventScript_CheckFeelings:: - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CanceledEasyChat - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_SubmittedFeelings + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CanceledEasyChat + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleTowerLobby_EventScript_SubmittedFeelings end BattleFrontier_BattleTowerLobby_EventScript_CanceledEasyChat:: @@ -611,8 +587,7 @@ BattleFrontier_BattleTowerLobby_EventScript_EnterElevator:: BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad:: tower_loadlinkopponents delay 1 - compare VAR_RESULT, 6 - goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad + goto_if_ne VAR_RESULT, 6, BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad call BattleFrontier_BattleTowerLobby_EventScript_ShowYouToBattleRoom clearflag FLAG_CANCEL_BATTLE_ROOM_CHALLENGE warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 1, 6 @@ -622,8 +597,7 @@ BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad:: BattleFrontier_BattleTowerLobby_EventScript_ShowYouToBattleRoom:: call BattleFrontier_BattleTowerLobby_EventScript_BufferModeText - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ShowYouToLinkMultiBattleRoom + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_ShowYouToLinkMultiBattleRoom msgbox BattleFrontier_BattleTowerLobby_Text_ShowYouToBattleRoom, MSGBOX_DEFAULT goto BattleFrontier_BattleTowerLobby_EventScript_WalkToElevator @@ -675,14 +649,10 @@ BattleFrontier_BattleTowerLobby_Movement_UnusedEnterElevator: step_end BattleFrontier_BattleTowerLobby_EventScript_BufferModeText:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_BufferTextSingle - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_BufferTextDouble - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_BufferTextMulti - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_BufferTextLinkMulti + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_BufferTextSingle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_BufferTextDouble + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_BufferTextMulti + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_BufferTextLinkMulti return BattleFrontier_BattleTowerLobby_EventScript_BufferTextSingle:: @@ -702,14 +672,10 @@ BattleFrontier_BattleTowerLobby_EventScript_BufferTextLinkMulti:: return BattleFrontier_BattleTowerLobby_EventScript_SetAttendantTalkedTo:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_TalkedToSinglesAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_TalkedToDoublesAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_TalkedToMultisAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_TalkedToLinkMultisAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_TalkedToSinglesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_TalkedToDoublesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_TalkedToMultisAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_TalkedToLinkMultisAttendant return BattleFrontier_BattleTowerLobby_EventScript_TalkedToSinglesAttendant:: @@ -729,14 +695,10 @@ BattleFrontier_BattleTowerLobby_EventScript_TalkedToLinkMultisAttendant:: return BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoord:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordSingles - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordDoubles - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordMultis - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordLinkMultis + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordSingles + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordDoubles + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordMultis + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordLinkMultis return BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordSingles:: @@ -756,14 +718,10 @@ BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordLinkMultis:: return BattleFrontier_BattleTowerLobby_EventScript_GetPartySize:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetSinglesPartySize - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoublesPartySize - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetMultisPartySize - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetLinkMultisPartySize + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_GetSinglesPartySize + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_GetDoublesPartySize + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_GetMultisPartySize + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_GetLinkMultisPartySize return BattleFrontier_BattleTowerLobby_EventScript_GetSinglesPartySize:: @@ -793,26 +751,18 @@ BattleFrontier_BattleTowerLobby_EventScript_TryCableLink:: setvar VAR_0x8005, 0 special TryBattleLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CableLinkSuccessful - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLinkIncorrectNumberOfPlayers - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError - compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BattleFrontier_BattleTowerLobby_EventScript_CableLinkSuccessful + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, BattleFrontier_BattleTowerLobby_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, BattleFrontier_BattleTowerLobby_EventScript_AbortLinkIncorrectNumberOfPlayers + goto_if_eq VAR_RESULT, LINKUP_FAILED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER, BattleFrontier_BattleTowerLobby_EventScript_AbortLink end BattleFrontier_BattleTowerLobby_EventScript_AbortLinkDifferentSelections:: special CloseLink - compare VAR_0x8005, 3 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_FriendDifferentSelection + goto_if_eq VAR_0x8005, 3, BattleFrontier_BattleTowerLobby_EventScript_FriendDifferentSelection msgbox Text_PlayersMadeDifferentSelections, MSGBOX_DEFAULT release end @@ -832,12 +782,9 @@ BattleFrontier_BattleTowerLobby_EventScript_AbortLinkIncorrectNumberOfPlayers:: BattleFrontier_BattleTowerLobby_EventScript_AbortLink:: special CloseLink - compare VAR_0x8005, 0 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_FriendChoseDifferentLvlMode - compare VAR_0x8005, 1 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_FriendAlsoSelectedMon - compare VAR_0x8005, 2 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_FriendAlsoSelectedMons + call_if_eq VAR_0x8005, 0, BattleFrontier_BattleTowerLobby_EventScript_FriendChoseDifferentLvlMode + call_if_eq VAR_0x8005, 1, BattleFrontier_BattleTowerLobby_EventScript_FriendAlsoSelectedMon + call_if_eq VAR_0x8005, 2, BattleFrontier_BattleTowerLobby_EventScript_FriendAlsoSelectedMons msgbox BattleFrontier_BattleTowerLobby_Text_ChooseDifferentMonsMatchLvlMode, MSGBOX_DEFAULT release end @@ -891,27 +838,19 @@ BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader:: BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader - compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful + goto_if_eq VAR_RESULT, LINKUP_FAILED, BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader + goto_if_eq VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER, BattleFrontier_BattleTowerLobby_EventScript_AbortLink release return BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup - compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful + goto_if_eq VAR_RESULT, LINKUP_FAILED, BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup + goto_if_eq VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER, BattleFrontier_BattleTowerLobby_EventScript_AbortLink release return diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc index 9bfcfddc2..e1cb64dda 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc @@ -16,17 +16,14 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScripts:: @ The multi partner is represented by LOCALID_PARTNER, which has the gfx id VAR_OBJ_GFX_ID_E BattleFrontier_BattleTowerMultiBattleRoom_OnTransition: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetLinkPlayerGfx + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetLinkPlayerGfx end BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx:: tower_setpartnergfx checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetPlayerGfxFemale setvar VAR_OBJ_GFX_ID_F, OBJ_EVENT_GFX_BRENDAN_NORMAL return @@ -56,8 +53,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_PartnerEnterRoom waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 @@ -74,8 +70,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter:: applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent1Enter applymovement LOCALID_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent2Enter waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink tower_getopponentintro 0 delay 15 applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft @@ -130,8 +125,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DefeatedOpponents:: applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink msgbox BattleFrontier_BattleTowerBattleRoom_Text_RestoreMonsToFullHealth, MSGBOX_DEFAULT goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RestoreParty @@ -142,19 +136,16 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink:: BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RestoreParty:: special LoadPlayerParty frontier_setpartyorder FRONTIER_MULTI_PARTY_SIZE - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReconnectLink + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReconnectLink playfanfare MUS_HEAL waitfanfare special HealPlayerParty BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponents:: frontier_get FRONTIER_DATA_BATTLE_NUM call BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSet - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponentsNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponentsNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge @@ -230,8 +221,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_PauseChallenge:: end BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSet:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSetLink + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSetLink copyvar VAR_TEMP_F, VAR_RESULT switch VAR_TEMP_F case 1, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyFor2ndOpponentSet @@ -347,8 +337,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallengeLink:: waitmessage special LinkRetireStatusWithBattleTowerPartner waitstate - compare VAR_RESULT, BATTLE_TOWER_LINKSTAT_CONTINUE - goto_if_ne BattleFrontier_BattleTowerMultiBattleRoom_EventScript_WarpToLobbyLost + goto_if_ne VAR_RESULT, BATTLE_TOWER_LINKSTAT_CONTINUE, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_WarpToLobbyLost goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_LinkDelayForMsg end @@ -368,8 +357,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskRetireChallengeLink:: message BattleFrontier_BattleTowerBattleRoom_Text_CancelYourChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetireChallengeLink + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetireChallengeLink goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponents end diff --git a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc index c977ecb5f..b36d2e6fd 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc @@ -14,17 +14,14 @@ BattleFrontier_BattleTowerMultiCorridor_MapScripts:: @ The multi partner is represented by LOCALID_PARTNER, and has the gfx id VAR_OBJ_GFX_ID_E BattleFrontier_BattleTowerMultiCorridor_OnTransition: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_SetObjGfx - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_SetLinkPlayerGfx + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_SetObjGfx + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_SetLinkPlayerGfx end BattleFrontier_BattleTowerMultiCorridor_EventScript_SetObjGfx:: tower_setpartnergfx checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleTowerMultiCorridor_EventScript_SetPlayerGfxFemale setvar VAR_OBJ_GFX_ID_F, OBJ_EVENT_GFX_BRENDAN_NORMAL return @@ -95,14 +92,10 @@ BattleFrontier_BattleTowerMultiCorridor_EventScript_EnterCorridor:: end BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToBattleRoom:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToMultiBattleRoom - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToLinkMultiBattleRoom + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToMultiBattleRoom + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToLinkMultiBattleRoom return BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom:: diff --git a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc index 3beaa38c7..b9fc7d554 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc @@ -87,8 +87,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_Attendant:: message BattleFrontier_BattleTowerMultiPartnerRoom_Text_QuitLookingForPartner waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_QuitChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_QuitChallenge msgbox BattleFrontier_BattleTowerMultiPartnerRoom_Text_PleaseFindPartner2, MSGBOX_DEFAULT release end @@ -183,10 +182,8 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_TalkToPotentialPartner:: waitmessage waitbuttonpress closemessage - compare VAR_FACING, DIR_SOUTH - call_if_ne BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExit - compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExitSouth + call_if_ne VAR_FACING, DIR_SOUTH, BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExit + call_if_eq VAR_FACING, DIR_SOUTH, BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExitSouth removeobject VAR_LAST_TALKED setflag FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER warpsilent MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 10, 3 diff --git a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc index bba92ebe4..703b1ec90 100644 --- a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc +++ b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc @@ -14,38 +14,30 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye:: BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize:: specialvar VAR_TEMP_1, GetFrontierBattlePoints - compare VAR_TEMP_1, VAR_0x8008 - goto_if_ge BattleFrontier_ExchangeServiceCorner_EventScript_TryGivePrize + goto_if_ge VAR_TEMP_1, VAR_0x8008, BattleFrontier_ExchangeServiceCorner_EventScript_TryGivePrize msgbox BattleFrontier_ExchangeServiceCorner_Text_DontHaveEnoughPoints, MSGBOX_DEFAULT - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR2_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 - compare VAR_TEMP_2, EXCHANGE_CORNER_VITAMIN_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR2_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_VITAMIN_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin goto BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem end BattleFrontier_ExchangeServiceCorner_EventScript_TryGivePrize:: - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR2_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR2_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor goto BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveItem end BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor:: checkdecorspace VAR_0x8009 - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor copyvar VAR_0x8004, VAR_0x8008 special TakeFrontierBattlePoints adddecoration VAR_0x8009 special UpdateBattlePointsWindow playse SE_SHOP msgbox BattleFrontier_ExchangeServiceCorner_Text_WellSendItToPC, MSGBOX_DEFAULT - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 goto BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 end @@ -57,16 +49,14 @@ BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor:: BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveItem:: checkitemspace VAR_0x8009 - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_BagFull + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ExchangeServiceCorner_EventScript_BagFull copyvar VAR_0x8004, VAR_0x8008 special TakeFrontierBattlePoints additem VAR_0x8009 special UpdateBattlePointsWindow playse SE_SHOP msgbox BattleFrontier_ExchangeServiceCorner_Text_HereIsYourPrize, MSGBOX_DEFAULT - compare VAR_TEMP_2, EXCHANGE_CORNER_VITAMIN_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_VITAMIN_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin goto BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem end @@ -107,8 +97,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1:: BattleFrontier_ExchangeServiceCorner_EventScript_KissPoster:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmKissPoster, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 16 setvar VAR_0x8009, DECOR_KISS_POSTER goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -116,8 +105,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_KissPoster:: BattleFrontier_ExchangeServiceCorner_EventScript_KissCushion:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmKissCushion, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 32 setvar VAR_0x8009, DECOR_KISS_CUSHION goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -125,8 +113,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_KissCushion:: BattleFrontier_ExchangeServiceCorner_EventScript_SmoochumDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmSmoochumDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 32 setvar VAR_0x8009, DECOR_SMOOCHUM_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -134,8 +121,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_SmoochumDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_TogepiDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmTogepiDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_TOGEPI_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -143,8 +129,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_TogepiDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_MeowthDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmMeowthDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_MEOWTH_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -152,8 +137,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_MeowthDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_ClefairyDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmClefairyDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_CLEFAIRY_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -161,8 +145,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ClefairyDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_DittoDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmDittoDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_DITTO_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -170,8 +153,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_DittoDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_CyndaquilDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmCyndaquilDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 80 setvar VAR_0x8009, DECOR_CYNDAQUIL_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -179,8 +161,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_CyndaquilDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_ChikoritaDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmChikoritaDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 80 setvar VAR_0x8009, DECOR_CHIKORITA_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -188,8 +169,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChikoritaDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_TotodileDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmTotodileDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 80 setvar VAR_0x8009, DECOR_TOTODILE_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -221,8 +201,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2:: BattleFrontier_ExchangeServiceCorner_EventScript_LaprasDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmLaprasDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 128 setvar VAR_0x8009, DECOR_LAPRAS_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -230,8 +209,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_LaprasDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_SnorlaxDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmSnorlaxDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 128 setvar VAR_0x8009, DECOR_SNORLAX_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -239,8 +217,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_SnorlaxDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_VenusaurDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmVenusaurDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 256 setvar VAR_0x8009, DECOR_VENUSAUR_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -248,8 +225,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_VenusaurDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_CharizardDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmCharizardDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 256 setvar VAR_0x8009, DECOR_CHARIZARD_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -257,8 +233,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_CharizardDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_BlastoiseDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmBlastoiseDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 256 setvar VAR_0x8009, DECOR_BLASTOISE_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -291,8 +266,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin:: BattleFrontier_ExchangeServiceCorner_EventScript_Protein:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmProtein, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_PROTEIN goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -300,8 +274,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Protein:: BattleFrontier_ExchangeServiceCorner_EventScript_Calcium:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmCalcium, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_CALCIUM goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -309,8 +282,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Calcium:: BattleFrontier_ExchangeServiceCorner_EventScript_Iron:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmIron, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_IRON goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -318,8 +290,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Iron:: BattleFrontier_ExchangeServiceCorner_EventScript_Zinc:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmZinc, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_ZINC goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -327,8 +298,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Zinc:: BattleFrontier_ExchangeServiceCorner_EventScript_Carbos:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmCarbos, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_CARBOS goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -336,8 +306,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Carbos:: BattleFrontier_ExchangeServiceCorner_EventScript_HPUp:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmHPUp, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_HP_UP goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -373,8 +342,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem:: BattleFrontier_ExchangeServiceCorner_EventScript_Leftovers:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmLeftovers, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_LEFTOVERS goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -382,8 +350,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Leftovers:: BattleFrontier_ExchangeServiceCorner_EventScript_WhiteHerb:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmWhiteHerb, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_WHITE_HERB goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -391,8 +358,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_WhiteHerb:: BattleFrontier_ExchangeServiceCorner_EventScript_QuickClaw:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmQuickClaw, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_QUICK_CLAW goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -400,8 +366,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_QuickClaw:: BattleFrontier_ExchangeServiceCorner_EventScript_MentalHerb:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmMentalHerb, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_MENTAL_HERB goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -409,8 +374,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_MentalHerb:: BattleFrontier_ExchangeServiceCorner_EventScript_Brightpowder:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmBrightpowder, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_BRIGHT_POWDER goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -418,8 +382,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Brightpowder:: BattleFrontier_ExchangeServiceCorner_EventScript_ChoiceBand:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmChoiceBand, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_CHOICE_BAND goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -427,8 +390,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChoiceBand:: BattleFrontier_ExchangeServiceCorner_EventScript_KingsRock:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmKingsRock, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_KINGS_ROCK goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -436,8 +398,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_KingsRock:: BattleFrontier_ExchangeServiceCorner_EventScript_FocusBand:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmFocusBand, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_FOCUS_BAND goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -445,8 +406,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_FocusBand:: BattleFrontier_ExchangeServiceCorner_EventScript_ScopeLens:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmScopeLens, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_SCOPE_LENS goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize diff --git a/data/maps/BattleFrontier_Lounge1/scripts.inc b/data/maps/BattleFrontier_Lounge1/scripts.inc index 4447e1032..6aca2b4ce 100644 --- a/data/maps/BattleFrontier_Lounge1/scripts.inc +++ b/data/maps/BattleFrontier_Lounge1/scripts.inc @@ -14,10 +14,8 @@ BattleFrontier_Lounge1_EventScript_Breeder:: BattleFrontier_Lounge1_EventScript_ChooseMonToShowBreeder:: special ChoosePartyMon waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_ne BattleFrontier_Lounge1_EventScript_ShowMonToBreeder - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq BattleFrontier_Lounge1_EventScript_CancelMonSelect + goto_if_ne VAR_0x8004, PARTY_NOTHING_CHOSEN, BattleFrontier_Lounge1_EventScript_ShowMonToBreeder + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, BattleFrontier_Lounge1_EventScript_CancelMonSelect end BattleFrontier_Lounge1_EventScript_BreederIntro:: @@ -34,17 +32,12 @@ BattleFrontier_Lounge1_EventScript_AlreadyMetBreeder:: @ VAR_0x8007: IV of the highest IV stat BattleFrontier_Lounge1_EventScript_ShowMonToBreeder:: specialvar VAR_RESULT, ScriptGetPartyMonSpecies - compare VAR_RESULT, SPECIES_EGG - goto_if_eq BattleFrontier_Lounge1_EventScript_ShowEggToBreeder + goto_if_eq VAR_RESULT, SPECIES_EGG, BattleFrontier_Lounge1_EventScript_ShowEggToBreeder special BufferVarsForIVRater - compare VAR_0x8005, 90 @ Average of 15 - goto_if_le BattleFrontier_Lounge1_EventScript_AverageTotalIVs - compare VAR_0x8005, 120 @ Average of 20 - goto_if_le BattleFrontier_Lounge1_EventScript_AboveAverageTotalIVs - compare VAR_0x8005, 150 @ Average of 25 - goto_if_le BattleFrontier_Lounge1_EventScript_HighTotalIVs - compare VAR_0x8005, 151 @ Average of > 25 - goto_if_ge BattleFrontier_Lounge1_EventScript_VeryHighTotalIVs + goto_if_le VAR_0x8005, 90, BattleFrontier_Lounge1_EventScript_AverageTotalIVs @ Average of 15 + goto_if_le VAR_0x8005, 120, BattleFrontier_Lounge1_EventScript_AboveAverageTotalIVs @ Average of 20 + goto_if_le VAR_0x8005, 150, BattleFrontier_Lounge1_EventScript_HighTotalIVs @ Average of 25 + goto_if_ge VAR_0x8005, 151, BattleFrontier_Lounge1_EventScript_VeryHighTotalIVs @ Average of > 25 end BattleFrontier_Lounge1_EventScript_ShowEggToBreeder:: @@ -54,30 +47,20 @@ BattleFrontier_Lounge1_EventScript_ShowEggToBreeder:: @ Comment on the highest IV stat BattleFrontier_Lounge1_EventScript_HighestIVStat:: - compare VAR_0x8006, STAT_HP - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVHP - compare VAR_0x8006, STAT_ATK - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVAtk - compare VAR_0x8006, STAT_DEF - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVDef - compare VAR_0x8006, STAT_SPEED - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVSpeed - compare VAR_0x8006, STAT_SPATK - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVSpAtk - compare VAR_0x8006, STAT_SPDEF - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVSpDef + goto_if_eq VAR_0x8006, STAT_HP, BattleFrontier_Lounge1_EventScript_HighestIVHP + goto_if_eq VAR_0x8006, STAT_ATK, BattleFrontier_Lounge1_EventScript_HighestIVAtk + goto_if_eq VAR_0x8006, STAT_DEF, BattleFrontier_Lounge1_EventScript_HighestIVDef + goto_if_eq VAR_0x8006, STAT_SPEED, BattleFrontier_Lounge1_EventScript_HighestIVSpeed + goto_if_eq VAR_0x8006, STAT_SPATK, BattleFrontier_Lounge1_EventScript_HighestIVSpAtk + goto_if_eq VAR_0x8006, STAT_SPDEF, BattleFrontier_Lounge1_EventScript_HighestIVSpDef end @ Comment on the highest IV value BattleFrontier_Lounge1_EventScript_HighestIVValue:: - compare VAR_0x8007, 15 - goto_if_le BattleFrontier_Lounge1_EventScript_HighestIVLow - compare VAR_0x8007, 25 - goto_if_le BattleFrontier_Lounge1_EventScript_HighestIVMid - compare VAR_0x8007, 30 - goto_if_le BattleFrontier_Lounge1_EventScript_HighestIVHigh - compare VAR_0x8007, 31 - goto_if_ge BattleFrontier_Lounge1_EventScript_HighestIVMax + goto_if_le VAR_0x8007, 15, BattleFrontier_Lounge1_EventScript_HighestIVLow + goto_if_le VAR_0x8007, 25, BattleFrontier_Lounge1_EventScript_HighestIVMid + goto_if_le VAR_0x8007, 30, BattleFrontier_Lounge1_EventScript_HighestIVHigh + goto_if_ge VAR_0x8007, 31, BattleFrontier_Lounge1_EventScript_HighestIVMax end BattleFrontier_Lounge1_EventScript_EndBreederComments:: diff --git a/data/maps/BattleFrontier_Lounge2/scripts.inc b/data/maps/BattleFrontier_Lounge2/scripts.inc index e3a7fc172..8efc17293 100644 --- a/data/maps/BattleFrontier_Lounge2/scripts.inc +++ b/data/maps/BattleFrontier_Lounge2/scripts.inc @@ -22,30 +22,18 @@ BattleFrontier_Lounge2_EventScript_AlreadyMetManiac:: end BattleFrontier_Lounge2_EventScript_GiveAdvice:: - compare VAR_FRONTIER_MANIAC_FACILITY, 0 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferSingle - compare VAR_FRONTIER_MANIAC_FACILITY, 1 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferDouble - compare VAR_FRONTIER_MANIAC_FACILITY, 2 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferMulti - compare VAR_FRONTIER_MANIAC_FACILITY, 3 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferMultiLink - compare VAR_FRONTIER_MANIAC_FACILITY, 4 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattleDome - compare VAR_FRONTIER_MANIAC_FACILITY, 5 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattleFactory - compare VAR_FRONTIER_MANIAC_FACILITY, 6 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattlePalace - compare VAR_FRONTIER_MANIAC_FACILITY, 7 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattleArena - compare VAR_FRONTIER_MANIAC_FACILITY, 8 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattlePike - compare VAR_FRONTIER_MANIAC_FACILITY, 9 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattlePyramid - compare VAR_FRONTIER_MANIAC_FACILITY, 3 - call_if_le BattleFrontier_Lounge2_EventScript_BattleTowerNews - compare VAR_FRONTIER_MANIAC_FACILITY, 4 - call_if_ge BattleFrontier_Lounge2_EventScript_FacilityNews + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 0, BattleFrontier_Lounge2_EventScript_BufferSingle + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 1, BattleFrontier_Lounge2_EventScript_BufferDouble + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 2, BattleFrontier_Lounge2_EventScript_BufferMulti + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 3, BattleFrontier_Lounge2_EventScript_BufferMultiLink + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 4, BattleFrontier_Lounge2_EventScript_BufferBattleDome + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 5, BattleFrontier_Lounge2_EventScript_BufferBattleFactory + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 6, BattleFrontier_Lounge2_EventScript_BufferBattlePalace + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 7, BattleFrontier_Lounge2_EventScript_BufferBattleArena + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 8, BattleFrontier_Lounge2_EventScript_BufferBattlePike + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 9, BattleFrontier_Lounge2_EventScript_BufferBattlePyramid + call_if_le VAR_FRONTIER_MANIAC_FACILITY, 3, BattleFrontier_Lounge2_EventScript_BattleTowerNews + call_if_ge VAR_FRONTIER_MANIAC_FACILITY, 4, BattleFrontier_Lounge2_EventScript_FacilityNews special ShowFrontierManiacMessage waitmessage waitbuttonpress diff --git a/data/maps/BattleFrontier_Lounge3/scripts.inc b/data/maps/BattleFrontier_Lounge3/scripts.inc index 1c9c5bc3b..7d9befafb 100644 --- a/data/maps/BattleFrontier_Lounge3/scripts.inc +++ b/data/maps/BattleFrontier_Lounge3/scripts.inc @@ -10,8 +10,7 @@ BattleFrontier_Lounge3_EventScript_Gambler:: faceplayer goto_if_set FLAG_MET_BATTLE_FRONTIER_GAMBLER, BattleFrontier_Lounge3_EventScript_AlreadyMetGambler call BattleFrontier_Lounge3_EventScript_CountSilverSymbols - compare VAR_0x8004, 2 - goto_if_le BattleFrontier_Lounge3_EventScript_NotEnoughSilverSymbols + goto_if_le VAR_0x8004, 2, BattleFrontier_Lounge3_EventScript_NotEnoughSilverSymbols setflag FLAG_MET_BATTLE_FRONTIER_GAMBLER msgbox BattleFrontier_Lounge3_Text_YouLookToughExplainGambling, MSGBOX_DEFAULT goto BattleFrontier_Lounge3_EventScript_AskToEnterChallenge @@ -22,11 +21,9 @@ BattleFrontier_Lounge3_EventScript_AskToEnterChallenge:: waitmessage waitbuttonpress msgbox BattleFrontier_Lounge3_Text_HowAboutEnteringEventForMe, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge3_EventScript_DeclineChallenge + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge3_EventScript_DeclineChallenge msgbox BattleFrontier_Lounge3_Text_SpotMeSomeBattlePoints, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge3_EventScript_DeclineChallenge + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge3_EventScript_DeclineChallenge message BattleFrontier_Lounge3_Text_HowMuchCanYouSpot waitmessage special ShowBattlePointsWindow @@ -61,8 +58,7 @@ BattleFrontier_Lounge3_EventScript_Bet15:: BattleFrontier_Lounge3_EventScript_TryPlaceBet:: specialvar VAR_TEMP_1, GetFrontierBattlePoints - compare VAR_TEMP_1, VAR_0x8008 - goto_if_ge BattleFrontier_Lounge3_EventScript_PlaceBet + goto_if_ge VAR_TEMP_1, VAR_0x8008, BattleFrontier_Lounge3_EventScript_PlaceBet msgbox BattleFrontier_Lounge3_Text_YouDontHaveEnoughPoints, MSGBOX_DEFAULT message BattleFrontier_Lounge3_Text_HowMuchCanYouSpot waitmessage @@ -109,27 +105,21 @@ BattleFrontier_Lounge3_EventScript_NotEnoughSilverSymbols:: BattleFrontier_Lounge3_EventScript_AlreadyMetGambler:: msgbox BattleFrontier_Lounge3_Text_Oh, MSGBOX_DEFAULT - compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET - goto_if_ge BattleFrontier_Lounge3_EventScript_CheckBetResults + goto_if_ge VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET, BattleFrontier_Lounge3_EventScript_CheckBetResults goto BattleFrontier_Lounge3_EventScript_AskToEnterChallenge end BattleFrontier_Lounge3_EventScript_CheckBetResults:: - compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET - goto_if_eq BattleFrontier_Lounge3_EventScript_ChallengeNotAttempted - compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON - goto_if_eq BattleFrontier_Lounge3_EventScript_WonChallenge + goto_if_eq VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET, BattleFrontier_Lounge3_EventScript_ChallengeNotAttempted + goto_if_eq VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON, BattleFrontier_Lounge3_EventScript_WonChallenge goto BattleFrontier_Lounge3_EventScript_LostChallenge end BattleFrontier_Lounge3_EventScript_WonChallenge:: msgbox BattleFrontier_Lounge3_Text_HelloChampHeresYourPoints, MSGBOX_DEFAULT - compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_5 - call_if_eq BattleFrontier_Lounge3_EventScript_RewardBet5 - compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_10 - call_if_eq BattleFrontier_Lounge3_EventScript_RewardBet10 - compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_15 - call_if_eq BattleFrontier_Lounge3_EventScript_RewardBet15 + call_if_eq VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_5, BattleFrontier_Lounge3_EventScript_RewardBet5 + call_if_eq VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_10, BattleFrontier_Lounge3_EventScript_RewardBet10 + call_if_eq VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_15, BattleFrontier_Lounge3_EventScript_RewardBet15 msgbox BattleFrontier_Lounge3_Text_ObtainedBattlePoints, MSGBOX_GETPOINTS special GiveFrontierBattlePoints msgbox BattleFrontier_Lounge3_Text_ThinkOfMeForAnotherChallenge, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_Lounge5/scripts.inc b/data/maps/BattleFrontier_Lounge5/scripts.inc index d680156f3..b81c748e5 100644 --- a/data/maps/BattleFrontier_Lounge5/scripts.inc +++ b/data/maps/BattleFrontier_Lounge5/scripts.inc @@ -5,17 +5,14 @@ BattleFrontier_Lounge5_EventScript_NatureGirl:: lock faceplayer msgbox BattleFrontier_Lounge5_Text_NatureGirlGreeting, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown special ChoosePartyMon waitstate lock faceplayer - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown specialvar VAR_RESULT, ScriptGetPartyMonSpecies - compare VAR_RESULT, SPECIES_EGG - goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlEgg + goto_if_eq VAR_RESULT, SPECIES_EGG, BattleFrontier_Lounge5_EventScript_NatureGirlEgg special ShowNatureGirlMessage waitmessage waitbuttonpress diff --git a/data/maps/BattleFrontier_Lounge6/scripts.inc b/data/maps/BattleFrontier_Lounge6/scripts.inc index 65fd940c1..0b01b32e3 100644 --- a/data/maps/BattleFrontier_Lounge6/scripts.inc +++ b/data/maps/BattleFrontier_Lounge6/scripts.inc @@ -10,18 +10,15 @@ BattleFrontier_Lounge6_EventScript_Trader:: specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox BattleFrontier_Lounge6_Text_WouldYouLikeToTrade, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge6_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge6_EventScript_DeclineTrade special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq BattleFrontier_Lounge6_EventScript_DeclineTrade + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, BattleFrontier_Lounge6_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies copyvar VAR_0x800B, VAR_RESULT - compare VAR_RESULT, VAR_0x8009 - goto_if_ne BattleFrontier_Lounge6_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, BattleFrontier_Lounge6_EventScript_NotRequestedMon copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8005, VAR_0x800A special CreateInGameTradePokemon diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc index 7953ec820..c52df3caf 100644 --- a/data/maps/BattleFrontier_Lounge7/scripts.inc +++ b/data/maps/BattleFrontier_Lounge7/scripts.inc @@ -252,11 +252,9 @@ BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection:: buffernumberstring STR_VAR_2, VAR_0x8008 copyvar VAR_0x8004, VAR_TEMP_C msgbox BattleFrontier_Lounge7_Text_MoveWillBeXBattlePoints, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge7_EventScript_ChooseNewMove + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge7_EventScript_ChooseNewMove specialvar VAR_TEMP_1, GetFrontierBattlePoints - compare VAR_TEMP_1, VAR_0x8008 - goto_if_ge BattleFrontier_Lounge7_EventScript_TeachTutorMove + goto_if_ge VAR_TEMP_1, VAR_0x8008, BattleFrontier_Lounge7_EventScript_TeachTutorMove msgbox BattleFrontier_Lounge7_Text_HaventGotEnoughPoints, MSGBOX_DEFAULT goto BattleFrontier_Lounge7_EventScript_ChooseNewMove end @@ -269,8 +267,7 @@ BattleFrontier_Lounge7_EventScript_TeachTutorMove:: special CloseBattleFrontierTutorWindow special ChooseMonForMoveTutor waitstate - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_Lounge7_EventScript_CancelChooseMon + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_Lounge7_EventScript_CancelChooseMon msgbox BattleFrontier_Lounge7_Text_IllTakeBattlePoints, MSGBOX_DEFAULT copyvar VAR_0x8004, VAR_0x8008 special TakeFrontierBattlePoints @@ -278,8 +275,7 @@ BattleFrontier_Lounge7_EventScript_TeachTutorMove:: end BattleFrontier_Lounge7_EventScript_ChooseNewMove:: - compare VAR_TEMP_E, 0 - goto_if_eq BattleFrontier_Lounge7_EventScript_ChooseNewLeftTutorMove + goto_if_eq VAR_TEMP_E, 0, BattleFrontier_Lounge7_EventScript_ChooseNewLeftTutorMove goto BattleFrontier_Lounge7_EventScript_ChooseNewRightTutorMove end diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc index 9157f0bef..f34373480 100644 --- a/data/maps/BattleFrontier_OutsideEast/scripts.inc +++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc @@ -11,8 +11,7 @@ BattleFrontier_OutsideEast_OnResume: BattleFrontier_OutsideEast_EventScript_TryRemoveSudowoodo:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -135,12 +134,9 @@ BattleFrontier_OutsideEast_EventScript_WaterSudowoodo:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo + goto_if_eq VAR_RESULT, B_OUTCOME_WON, BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo setflag FLAG_DEFEATED_SUDOWOODO release end diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc index f3af2b058..5ca5cb9fb 100644 --- a/data/maps/BattleFrontier_OutsideWest/scripts.inc +++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc @@ -21,8 +21,7 @@ BattleFrontier_OutsideWest_EventScript_FerryAttendant:: faceplayer msgbox BattleFrontier_OutsideWest_Text_MayISeeYourTicket, MSGBOX_DEFAULT checkitem ITEM_SS_TICKET - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_OutsideWest_EventScript_NoSSTicket + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_OutsideWest_EventScript_NoSSTicket message BattleFrontier_OutsideWest_Text_WhereWouldYouLikeToGo waitmessage goto BattleFrontier_OutsideWest_EventScript_ChooseFerryDestination @@ -44,8 +43,7 @@ BattleFrontier_OutsideWest_EventScript_NoSSTicket:: BattleFrontier_OutsideWest_EventScript_FerryToSlateport:: msgbox BattleFrontier_OutsideWest_Text_SlateportItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination + goto_if_eq VAR_RESULT, NO, BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination msgbox BattleFrontier_OutsideWest_Text_PleaseBoardFerry, MSGBOX_DEFAULT call BattleFrontier_OutsideWest_EventScript_BoardFerry warp MAP_SLATEPORT_CITY_HARBOR, 8, 11 @@ -55,8 +53,7 @@ BattleFrontier_OutsideWest_EventScript_FerryToSlateport:: BattleFrontier_OutsideWest_EventScript_FerryToLilycove:: msgbox BattleFrontier_OutsideWest_Text_LilycoveItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination + goto_if_eq VAR_RESULT, NO, BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination msgbox BattleFrontier_OutsideWest_Text_PleaseBoardFerry, MSGBOX_DEFAULT call BattleFrontier_OutsideWest_EventScript_BoardFerry warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 @@ -155,14 +152,10 @@ BattleFrontier_OutsideWest_EventScript_Camper:: lock faceplayer delay 20 - compare VAR_FACING, DIR_NORTH - call_if_eq BattleFrontier_OutsideWest_EventScript_CamperFaceFactory - compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_OutsideWest_EventScript_CamperAlreadyFacingFactory - compare VAR_FACING, DIR_WEST - call_if_eq BattleFrontier_OutsideWest_EventScript_CamperFaceFactory - compare VAR_FACING, DIR_EAST - call_if_eq BattleFrontier_OutsideWest_EventScript_CamperFaceFactory + call_if_eq VAR_FACING, DIR_NORTH, BattleFrontier_OutsideWest_EventScript_CamperFaceFactory + call_if_eq VAR_FACING, DIR_SOUTH, BattleFrontier_OutsideWest_EventScript_CamperAlreadyFacingFactory + call_if_eq VAR_FACING, DIR_WEST, BattleFrontier_OutsideWest_EventScript_CamperFaceFactory + call_if_eq VAR_FACING, DIR_EAST, BattleFrontier_OutsideWest_EventScript_CamperFaceFactory msgbox BattleFrontier_OutsideWest_Text_WhosRaisingThoseRentalMons, MSGBOX_DEFAULT release end @@ -180,14 +173,10 @@ BattleFrontier_OutsideWest_EventScript_Girl:: faceplayer message BattleFrontier_OutsideWest_Text_ScaredOfPikeBecauseSeviper waitmessage - compare VAR_FACING, DIR_NORTH - call_if_eq BattleFrontier_OutsideWest_EventScript_GirlShudderNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_OutsideWest_EventScript_GirlShudderSouth - compare VAR_FACING, DIR_WEST - call_if_eq BattleFrontier_OutsideWest_EventScript_GirlShudderWest - compare VAR_FACING, DIR_EAST - call_if_eq BattleFrontier_OutsideWest_EventScript_GirlShudderEast + call_if_eq VAR_FACING, DIR_NORTH, BattleFrontier_OutsideWest_EventScript_GirlShudderNorth + call_if_eq VAR_FACING, DIR_SOUTH, BattleFrontier_OutsideWest_EventScript_GirlShudderSouth + call_if_eq VAR_FACING, DIR_WEST, BattleFrontier_OutsideWest_EventScript_GirlShudderWest + call_if_eq VAR_FACING, DIR_EAST, BattleFrontier_OutsideWest_EventScript_GirlShudderEast waitbuttonpress release end @@ -237,8 +226,7 @@ BattleFrontier_OutsideWest_EventScript_Woman2:: faceplayer msgbox BattleFrontier_OutsideWest_Text_LetsPlayRockPaperScissors, MSGBOX_DEFAULT random 2 - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_OutsideWest_EventScript_WomanWonRockPaperScissors + goto_if_eq VAR_RESULT, 1, BattleFrontier_OutsideWest_EventScript_WomanWonRockPaperScissors goto BattleFrontier_OutsideWest_EventScript_WomanLostRockPaperScissors end diff --git a/data/maps/BattleFrontier_RankingHall/scripts.inc b/data/maps/BattleFrontier_RankingHall/scripts.inc index a6c62cf86..915ed98d9 100644 --- a/data/maps/BattleFrontier_RankingHall/scripts.inc +++ b/data/maps/BattleFrontier_RankingHall/scripts.inc @@ -86,8 +86,7 @@ BattleFrontier_RankingHall_EventScript_NinjaBoy:: lock faceplayer msgbox BattleFrontier_RankingHall_Text_IsYourNameOnThisList, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BattleFrontier_RankingHall_EventScript_NinjaBoyNameOnList + goto_if_eq VAR_RESULT, YES, BattleFrontier_RankingHall_EventScript_NinjaBoyNameOnList msgbox BattleFrontier_RankingHall_Text_WorkHarderIfYouSawFriendsName, MSGBOX_DEFAULT release end diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc index 9d2bc5947..affd05d34 100644 --- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc +++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc @@ -35,8 +35,7 @@ BattleFrontier_ScottsHouse_EventScript_CheckSilverSymbols:: goto_if_unset FLAG_SYS_PYRAMID_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield msgbox BattleFrontier_ScottsHouse_Text_YouveCollectedAllSilverSymbols, MSGBOX_DEFAULT giveitem ITEM_LANSAT_BERRY - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ScottsHouse_EventScript_BerryPocketFull + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_BerryPocketFull setflag FLAG_COLLECTED_ALL_SILVER_SYMBOLS setflag FLAG_TEMP_4 release @@ -52,8 +51,7 @@ BattleFrontier_ScottsHouse_EventScript_CheckGoldSymbols:: goto_if_unset FLAG_SYS_PYRAMID_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield msgbox BattleFrontier_ScottsHouse_Text_YouveCollectedAllGoldSymbols, MSGBOX_DEFAULT giveitem ITEM_STARF_BERRY - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ScottsHouse_EventScript_BerryPocketFull + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_BerryPocketFull setflag FLAG_COLLECTED_ALL_GOLD_SYMBOLS setflag FLAG_TEMP_4 release @@ -71,10 +69,8 @@ BattleFrontier_ScottsHouse_EventScript_GivenBerry:: BattleFrontier_ScottsHouse_EventScript_RandomComment:: random 3 - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_FrontierBrainComment - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_ArtisanCaveComment + goto_if_eq VAR_RESULT, 1, BattleFrontier_ScottsHouse_EventScript_FrontierBrainComment + goto_if_eq VAR_RESULT, 2, BattleFrontier_ScottsHouse_EventScript_ArtisanCaveComment msgbox BattleFrontier_ScottsHouse_Text_WhyIGoSeekingTrainers, MSGBOX_DEFAULT release end @@ -93,20 +89,17 @@ BattleFrontier_ScottsHouse_EventScript_CheckGiveSilverShield:: setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 50 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield + goto_if_ge VAR_RESULT, 50, BattleFrontier_ScottsHouse_EventScript_GiveSilverShield frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 50 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield + goto_if_ge VAR_RESULT, 50, BattleFrontier_ScottsHouse_EventScript_GiveSilverShield goto BattleFrontier_ScottsHouse_EventScript_RandomComment end BattleFrontier_ScottsHouse_EventScript_GiveSilverShield:: msgbox BattleFrontier_ScottsHouse_Text_Beat50TrainersInARow, MSGBOX_DEFAULT givedecoration DECOR_SILVER_SHIELD - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ScottsHouse_EventScript_NoRoomForShield + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_NoRoomForShield setflag FLAG_RECEIVED_SILVER_SHIELD setflag FLAG_TEMP_3 goto BattleFrontier_ScottsHouse_EventScript_GivenShield @@ -126,20 +119,17 @@ BattleFrontier_ScottsHouse_EventScript_CheckGiveGoldShield:: setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 100 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield + goto_if_ge VAR_RESULT, 100, BattleFrontier_ScottsHouse_EventScript_GiveGoldShield frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 100 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield + goto_if_ge VAR_RESULT, 100, BattleFrontier_ScottsHouse_EventScript_GiveGoldShield goto BattleFrontier_ScottsHouse_EventScript_RandomComment end BattleFrontier_ScottsHouse_EventScript_GiveGoldShield:: msgbox BattleFrontier_ScottsHouse_Text_Beat100TrainersInARow, MSGBOX_DEFAULT givedecoration DECOR_GOLD_SHIELD - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ScottsHouse_EventScript_NoRoomForShield + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_NoRoomForShield setflag FLAG_RECEIVED_GOLD_SHIELD setflag FLAG_TEMP_3 goto BattleFrontier_ScottsHouse_EventScript_GivenShield @@ -154,24 +144,17 @@ BattleFrontier_ScottsHouse_EventScript_WelcomeToFrontier:: msgbox BattleFrontier_ScottsHouse_Text_WelcomeToBattleFrontier, MSGBOX_DEFAULT closemessage delay 30 - compare VAR_FACING, DIR_NORTH - call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth - compare VAR_FACING, DIR_EAST - call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast - compare VAR_FACING, DIR_WEST - call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest + call_if_eq VAR_FACING, DIR_NORTH, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth + call_if_eq VAR_FACING, DIR_SOUTH, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth + call_if_eq VAR_FACING, DIR_EAST, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast + call_if_eq VAR_FACING, DIR_WEST, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest msgbox BattleFrontier_ScottsHouse_Text_HowMuchEffortItTookToMakeReal, MSGBOX_DEFAULT applymovement LOCALID_SCOTT, Common_Movement_FacePlayer waitmovement 0 msgbox BattleFrontier_ScottsHouse_Text_HaveThisAsMementoOfOurPathsCrossing, MSGBOX_DEFAULT - compare VAR_SCOTT_STATE, 13 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints - compare VAR_SCOTT_STATE, 9 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints - compare VAR_SCOTT_STATE, 6 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints + goto_if_eq VAR_SCOTT_STATE, 13, BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints + goto_if_ge VAR_SCOTT_STATE, 9, BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints + goto_if_ge VAR_SCOTT_STATE, 6, BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints goto BattleFrontier_ScottsHouse_EventScript_Give1BattlePoint end diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index cd1583b42..57d54d6fd 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -38,8 +38,7 @@ BirthIsland_Exterior_OnResume: BirthIsland_Exterior_EventScript_TryRemoveDeoxys:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_DEOXYS return @@ -92,12 +91,9 @@ BirthIsland_Exterior_EventScript_Deoxys:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BirthIsland_Exterior_EventScript_DefeatedDeoxys - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys + goto_if_eq VAR_RESULT, B_OUTCOME_WON, BirthIsland_Exterior_EventScript_DefeatedDeoxys + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, BirthIsland_Exterior_EventScript_RanFromDeoxys + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, BirthIsland_Exterior_EventScript_RanFromDeoxys setflag FLAG_BATTLED_DEOXYS release end diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index 8d3fa5b5e..e91238cbd 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -8,8 +8,7 @@ BirthIsland_Harbor_EventScript_Sailor:: lock faceplayer msgbox BirthIsland_Harbor_Text_SailorReturn, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BirthIsland_Harbor_EventScript_AsYouLike + goto_if_eq VAR_RESULT, NO, BirthIsland_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown diff --git a/data/maps/ContestHall/scripts.inc b/data/maps/ContestHall/scripts.inc index 3dd633f8f..7ca6a57f6 100644 --- a/data/maps/ContestHall/scripts.inc +++ b/data/maps/ContestHall/scripts.inc @@ -19,16 +19,11 @@ ContestHall_OnTransition: ContestHall_EventScript_ReadyContestMusic:: call ContestHall_EventScript_TryWaitForLink special GetContestMultiplayerId - compare VAR_RESULT, 0 - call_if_eq ContestHall_EventScript_SaveContestMusicPlayer1 - compare VAR_RESULT, 1 - call_if_eq ContestHall_EventScript_SaveContestMusicPlayer2 - compare VAR_RESULT, 2 - call_if_eq ContestHall_EventScript_SaveContestMusicPlayer3 - compare VAR_RESULT, 3 - call_if_eq ContestHall_EventScript_SaveContestMusicPlayer4 - compare VAR_RESULT, 4 - call_if_eq ContestHall_EventScript_SaveContestMusic + call_if_eq VAR_RESULT, 0, ContestHall_EventScript_SaveContestMusicPlayer1 + call_if_eq VAR_RESULT, 1, ContestHall_EventScript_SaveContestMusicPlayer2 + call_if_eq VAR_RESULT, 2, ContestHall_EventScript_SaveContestMusicPlayer3 + call_if_eq VAR_RESULT, 3, ContestHall_EventScript_SaveContestMusicPlayer4 + call_if_eq VAR_RESULT, 4, ContestHall_EventScript_SaveContestMusic return ContestHall_EventScript_SaveContestMusicPlayer1:: @@ -52,8 +47,7 @@ ContestHall_EventScript_SaveContestMusic:: return ContestHall_OnResume: - compare VAR_TEMP_9, 1 - call_if_eq ContestHall_EventScript_ReShowAudience + call_if_eq VAR_TEMP_9, 1, ContestHall_EventScript_ReShowAudience end ContestHall_EventScript_ReShowAudience:: @@ -84,8 +78,7 @@ ContestHall_EventScript_SetContestObjects:: ContestHall_EventScript_AddRandomAudienceMembers:: call ContestHall_EventScript_GetRandomAudienceGfxId call ContestHall_EventScript_SetRandomAudienceGfx - compare VAR_TEMP_0, 8 - goto_if_lt ContestHall_EventScript_AddRandomAudienceMembers + goto_if_lt VAR_TEMP_0, 8, ContestHall_EventScript_AddRandomAudienceMembers return ContestHall_EventScript_SetRandomAudienceGfx:: @@ -303,8 +296,7 @@ ContestHall_EventScript_RandomAudienceScientist1:: ContestHall_EventScript_CreateAudience:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_CreateWirelessContestAudience + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_CreateWirelessContestAudience switch VAR_CONTEST_TYPE case CONTEST_TYPE_NPC_NORMAL, ContestHall_EventScript_CreateNormalContestAudience case CONTEST_TYPE_NPC_SUPER, ContestHall_EventScript_CreateSuperContestAudience @@ -444,10 +436,8 @@ ContestHall_EventScript_SetExitWarpLinkContest:: LilycoveCity_ContestLobby_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LilycoveCity_ContestLobby_EventScript_SetPlayerGfxBrendan - compare VAR_RESULT, FEMALE - goto_if_eq LilycoveCity_ContestLobby_EventScript_SetPlayerGfxMay + goto_if_eq VAR_RESULT, MALE, LilycoveCity_ContestLobby_EventScript_SetPlayerGfxBrendan + goto_if_eq VAR_RESULT, FEMALE, LilycoveCity_ContestLobby_EventScript_SetPlayerGfxMay return LilycoveCity_ContestLobby_EventScript_SetPlayerGfxBrendan:: diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc index 0e7a3c281..2aaa61ebb 100644 --- a/data/maps/DesertRuins/scripts.inc +++ b/data/maps/DesertRuins/scripts.inc @@ -10,8 +10,7 @@ DesertRuins_OnResume: DesertRuins_EventScript_TryRemoveRegirock:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -68,12 +67,9 @@ DesertRuins_EventScript_Regirock:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq DesertRuins_EventScript_DefeatedRegirock - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq DesertRuins_EventScript_RanFromRegirock - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq DesertRuins_EventScript_RanFromRegirock + goto_if_eq VAR_RESULT, B_OUTCOME_WON, DesertRuins_EventScript_DefeatedRegirock + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, DesertRuins_EventScript_RanFromRegirock + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, DesertRuins_EventScript_RanFromRegirock setflag FLAG_DEFEATED_REGIROCK release end diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index ca6e82250..1250c2d76 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -54,8 +54,7 @@ DewfordTown_EventScript_CancelSailSelect:: DewfordTown_EventScript_ReturnToPetalburgPrompt:: msgbox DewfordTown_Text_SetSailBackToPetalburg, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq DewfordTown_EventScript_SailBackToPetalburg + goto_if_eq VAR_RESULT, YES, DewfordTown_EventScript_SailBackToPetalburg msgbox DewfordTown_Text_GoDeliverIllBeWaiting, MSGBOX_DEFAULT release end @@ -87,10 +86,8 @@ DewfordTown_EventScript_OldRodFisherman:: faceplayer goto_if_set FLAG_RECEIVED_OLD_ROD, DewfordTown_EventScript_HowsFishing msgbox DewfordTown_Text_GettingItchToFish, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq DewfordTown_EventScript_GiveOldRod - compare VAR_RESULT, NO - goto_if_eq DewfordTown_EventScript_NotGettingItchToFish + goto_if_eq VAR_RESULT, YES, DewfordTown_EventScript_GiveOldRod + goto_if_eq VAR_RESULT, NO, DewfordTown_EventScript_NotGettingItchToFish end DewfordTown_EventScript_GiveOldRod:: @@ -110,10 +107,8 @@ DewfordTown_EventScript_HowsFishing:: message DewfordTown_Text_HowsYourFishing waitmessage multichoice 20, 8, MULTI_HOWS_FISHING, TRUE - compare VAR_RESULT, 0 - goto_if_eq DewfordTown_EventScript_FishingExcellent - compare VAR_RESULT, 1 - goto_if_eq DewfordTown_EventScript_FishingNotSoGood + goto_if_eq VAR_RESULT, 0, DewfordTown_EventScript_FishingExcellent + goto_if_eq VAR_RESULT, 1, DewfordTown_EventScript_FishingNotSoGood end DewfordTown_EventScript_FishingExcellent:: @@ -607,10 +602,8 @@ DewfordTown_EventScript_TrendyPhraseBoy:: faceplayer call Common_EventScript_BufferTrendyPhrase msgbox DewfordTown_Text_XIsTheBiggestHappeningThingRight, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq DewfordTown_EventScript_ConfirmTrendyPhrase - compare VAR_RESULT, NO - goto_if_eq DewfordTown_EventScript_RejectTrendyPhrase + goto_if_eq VAR_RESULT, YES, DewfordTown_EventScript_ConfirmTrendyPhrase + goto_if_eq VAR_RESULT, NO, DewfordTown_EventScript_RejectTrendyPhrase end DewfordTown_EventScript_ConfirmTrendyPhrase:: @@ -624,16 +617,13 @@ DewfordTown_EventScript_RejectTrendyPhrase:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, TRUE - goto_if_eq DewfordTown_EventScript_GiveNewTrendyPhrase - compare VAR_RESULT, FALSE - goto_if_eq DewfordTown_EventScript_CancelNewTrendyPhrase + goto_if_eq VAR_RESULT, TRUE, DewfordTown_EventScript_GiveNewTrendyPhrase + goto_if_eq VAR_RESULT, FALSE, DewfordTown_EventScript_CancelNewTrendyPhrase end DewfordTown_EventScript_GiveNewTrendyPhrase:: incrementgamestat GAME_STAT_STARTED_TRENDS - compare VAR_0x8004, FALSE - goto_if_eq DewfordTown_EventScript_PhraseNotTrendyEnough + goto_if_eq VAR_0x8004, FALSE, DewfordTown_EventScript_PhraseNotTrendyEnough msgbox DewfordTown_Text_OfCourseIKnowAboutThat, MSGBOX_DEFAULT release end diff --git a/data/maps/DewfordTown_Gym/scripts.inc b/data/maps/DewfordTown_Gym/scripts.inc index 355ca15f4..81474af72 100644 --- a/data/maps/DewfordTown_Gym/scripts.inc +++ b/data/maps/DewfordTown_Gym/scripts.inc @@ -10,18 +10,12 @@ DewfordTown_Gym_EventScript_SetFlashLevel:: goto_if_defeated TRAINER_BRAWLY_1, DewfordTown_Gym_EventScript_SetLightsOn call DewfordTown_Gym_EventScript_CountTrainersDefeated copyvar VAR_0x8001, VAR_0x8000 - compare VAR_0x8000, 0 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel7 - compare VAR_0x8000, 1 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel6 - compare VAR_0x8000, 2 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel5 - compare VAR_0x8000, 3 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel4 - compare VAR_0x8000, 4 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel3 - compare VAR_0x8000, 5 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel2 + goto_if_eq VAR_0x8000, 0, DewfordTown_Gym_EventScript_SetFlashLevel7 + goto_if_eq VAR_0x8000, 1, DewfordTown_Gym_EventScript_SetFlashLevel6 + goto_if_eq VAR_0x8000, 2, DewfordTown_Gym_EventScript_SetFlashLevel5 + goto_if_eq VAR_0x8000, 3, DewfordTown_Gym_EventScript_SetFlashLevel4 + goto_if_eq VAR_0x8000, 4, DewfordTown_Gym_EventScript_SetFlashLevel3 + goto_if_eq VAR_0x8000, 5, DewfordTown_Gym_EventScript_SetFlashLevel2 goto DewfordTown_Gym_EventScript_SetFlashLevel1 DewfordTown_Gym_EventScript_SetLightsOn:: @@ -61,21 +55,14 @@ DewfordTown_Gym_EventScript_SetFlashLevel7:: DewfordTown_Gym_EventScript_BrightenRoom:: call DewfordTown_Gym_EventScript_CountTrainersDefeated nop1 - compare VAR_0x8000, VAR_0x8001 - goto_if_eq DewfordTown_Gym_EventScript_NoLightChange + goto_if_eq VAR_0x8000, VAR_0x8001, DewfordTown_Gym_EventScript_NoLightChange copyvar VAR_0x8001, VAR_0x8000 - compare VAR_0x8000, 1 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash1Trainer - compare VAR_0x8000, 2 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash2Trainers - compare VAR_0x8000, 3 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash3Trainers - compare VAR_0x8000, 4 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash4Trainers - compare VAR_0x8000, 5 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash5Trainers - compare VAR_0x8000, 6 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash6Trainers + goto_if_eq VAR_0x8000, 1, DewfordTown_Gym_EventScript_AnimateFlash1Trainer + goto_if_eq VAR_0x8000, 2, DewfordTown_Gym_EventScript_AnimateFlash2Trainers + goto_if_eq VAR_0x8000, 3, DewfordTown_Gym_EventScript_AnimateFlash3Trainers + goto_if_eq VAR_0x8000, 4, DewfordTown_Gym_EventScript_AnimateFlash4Trainers + goto_if_eq VAR_0x8000, 5, DewfordTown_Gym_EventScript_AnimateFlash5Trainers + goto_if_eq VAR_0x8000, 6, DewfordTown_Gym_EventScript_AnimateFlash6Trainers DewfordTown_Gym_EventScript_NoLightChange:: return @@ -148,8 +135,7 @@ DewfordTown_Gym_EventScript_StopCountingTrainers:: DewfordTown_Gym_EventScript_Brawly:: trainerbattle_single TRAINER_BRAWLY_1, DewfordTown_Gym_Text_BrawlyIntro, DewfordTown_Gym_Text_BrawlyDefeat, DewfordTown_Gym_EventScript_BrawlyDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq DewfordTown_Gym_EventScript_BrawlyRematch + goto_if_eq VAR_RESULT, TRUE, DewfordTown_Gym_EventScript_BrawlyRematch goto_if_unset FLAG_RECEIVED_TM08, DewfordTown_Gym_EventScript_GiveBulkUp2 msgbox DewfordTown_Gym_Text_BrawlyPostBattle, MSGBOX_DEFAULT release @@ -164,8 +150,7 @@ DewfordTown_Gym_EventScript_BrawlyDefeated:: setflag FLAG_DEFEATED_DEWFORD_GYM setflag FLAG_BADGE02_GET addvar VAR_PETALBURG_GYM_STATE, 1 - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_eq Common_EventScript_ReadyPetalburgGymForBattle + call_if_eq VAR_PETALBURG_GYM_STATE, 6, Common_EventScript_ReadyPetalburgGymForBattle setvar VAR_0x8008, 2 call Common_EventScript_SetGymTrainers call DewfordTown_Gym_EventScript_GiveBulkUp @@ -184,16 +169,14 @@ DewfordTown_Gym_EventScript_BrawlyDefeated:: DewfordTown_Gym_EventScript_GiveBulkUp:: giveitem ITEM_TM08 - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_BagIsFull msgbox DewfordTown_Gym_Text_ExplainBulkUp, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM08 return DewfordTown_Gym_EventScript_GiveBulkUp2: giveitem ITEM_TM08 - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull msgbox DewfordTown_Gym_Text_ExplainBulkUp, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM08 release diff --git a/data/maps/DewfordTown_Hall/scripts.inc b/data/maps/DewfordTown_Hall/scripts.inc index 9d8392ff1..6249a7fac 100644 --- a/data/maps/DewfordTown_Hall/scripts.inc +++ b/data/maps/DewfordTown_Hall/scripts.inc @@ -11,8 +11,7 @@ DewfordTown_Hall_EventScript_Girl:: faceplayer call Common_EventScript_BufferTrendyPhrase special IsTrendyPhraseBoring - compare VAR_RESULT, TRUE - goto_if_eq DewfordTown_Hall_EventScript_GirlBoredOfTrend + goto_if_eq VAR_RESULT, TRUE, DewfordTown_Hall_EventScript_GirlBoredOfTrend msgbox DewfordTown_Hall_Text_CantImagineLifeWithoutTrend, MSGBOX_DEFAULT release end @@ -36,10 +35,8 @@ DewfordTown_Hall_EventScript_Man:: call Common_EventScript_BufferTrendyPhrase special BufferDeepLinkPhrase msgbox DewfordTown_Hall_Text_DeepLinkBetweenXAndY, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq DewfordTown_Hall_EventScript_ConfirmTrendLink - compare VAR_RESULT, NO - goto_if_eq DewfordTown_Hall_EventScript_RejectTrendLink + goto_if_eq VAR_RESULT, YES, DewfordTown_Hall_EventScript_ConfirmTrendLink + goto_if_eq VAR_RESULT, NO, DewfordTown_Hall_EventScript_RejectTrendLink end DewfordTown_Hall_EventScript_ConfirmTrendLink:: @@ -196,15 +193,12 @@ DewfordTown_Hall_EventScript_DontMovePlayer1:: DewfordTown_Hall_EventScript_DebateReact1:: applymovement LOCALID_PSYCHIC_M, DewfordTown_Hall_Movement_PsychicWalkInPlaceLeft waitmovement 0 - compare VAR_0x8008, 0 - goto_if_eq DewfordTown_Hall_EventScript_PlayerReactWest - compare VAR_0x8008, 1 - goto_if_eq DewfordTown_Hall_EventScript_DontMovePlayer2 + goto_if_eq VAR_0x8008, 0, DewfordTown_Hall_EventScript_PlayerReactWest + goto_if_eq VAR_0x8008, 1, DewfordTown_Hall_EventScript_DontMovePlayer2 end DewfordTown_Hall_EventScript_PlayerReactWest:: - compare VAR_FACING, DIR_EAST - goto_if_eq DewfordTown_Hall_EventScript_DontMovePlayer1 + goto_if_eq VAR_FACING, DIR_EAST, DewfordTown_Hall_EventScript_DontMovePlayer1 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -215,17 +209,13 @@ DewfordTown_Hall_EventScript_DontMovePlayer2:: DewfordTown_Hall_EventScript_DebateReact2:: applymovement LOCALID_SCHOOL_KID_M, DewfordTown_Hall_Movement_SchoolKidWalkInPlaceRight waitmovement 0 - compare VAR_0x8008, 0 - goto_if_eq DewfordTown_Hall_EventScript_PlayerReactNorthSouth - compare VAR_0x8008, 1 - goto_if_eq DewfordTown_Hall_EventScript_PlayerReactEast + goto_if_eq VAR_0x8008, 0, DewfordTown_Hall_EventScript_PlayerReactNorthSouth + goto_if_eq VAR_0x8008, 1, DewfordTown_Hall_EventScript_PlayerReactEast end DewfordTown_Hall_EventScript_PlayerReactNorthSouth:: - compare VAR_FACING, DIR_NORTH - call_if_eq DewfordTown_Hall_EventScript_PlayerWalkInPlaceUp - compare VAR_FACING, DIR_SOUTH - call_if_eq DewfordTown_Hall_EventScript_PlayerWalkInPlaceDown + call_if_eq VAR_FACING, DIR_NORTH, DewfordTown_Hall_EventScript_PlayerWalkInPlaceUp + call_if_eq VAR_FACING, DIR_SOUTH, DewfordTown_Hall_EventScript_PlayerWalkInPlaceDown return DewfordTown_Hall_EventScript_PlayerWalkInPlaceUp:: @@ -239,8 +229,7 @@ DewfordTown_Hall_EventScript_PlayerWalkInPlaceDown:: return DewfordTown_Hall_EventScript_PlayerReactEast:: - compare VAR_FACING, DIR_WEST - goto_if_eq DewfordTown_Hall_EventScript_DontMovePlayer1 + goto_if_eq VAR_FACING, DIR_WEST, DewfordTown_Hall_EventScript_DontMovePlayer1 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -260,8 +249,7 @@ DewfordTown_Hall_EventScript_SludgeBombMan:: goto_if_set FLAG_RECEIVED_TM36, DewfordTown_Hall_EventScript_ReceivedSludgeBomb msgbox DewfordTown_Hall_Text_GiveYouSludgeBomb, MSGBOX_DEFAULT giveitem ITEM_TM36 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM36 release end diff --git a/data/maps/DewfordTown_House2/scripts.inc b/data/maps/DewfordTown_House2/scripts.inc index ae173f151..cb68664aa 100644 --- a/data/maps/DewfordTown_House2/scripts.inc +++ b/data/maps/DewfordTown_House2/scripts.inc @@ -7,8 +7,7 @@ DewfordTown_House2_EventScript_Man:: goto_if_set FLAG_RECEIVED_SILK_SCARF, DewfordTown_House2_EventScript_ExplainSilkScarf msgbox DewfordTown_House2_Text_WantYouToHaveSilkScarf, MSGBOX_DEFAULT giveitem ITEM_SILK_SCARF - compare VAR_RESULT, FALSE - goto_if_eq DewfordTown_House2_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, DewfordTown_House2_EventScript_NoRoomForScarf setflag FLAG_RECEIVED_SILK_SCARF release end diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index d33c57df8..103942280 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -57,17 +57,13 @@ EverGrandeCity_ChampionsRoom_EventScript_Defeated:: closemessage playse SE_DOOR checkplayergender - compare VAR_RESULT, MALE - call_if_eq EverGrandeCity_ChampionsRoom_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - call_if_eq EverGrandeCity_ChampionsRoom_EventScript_PlayBrendanMusic + call_if_eq VAR_RESULT, MALE, EverGrandeCity_ChampionsRoom_EventScript_PlayMayMusic + call_if_eq VAR_RESULT, FEMALE, EverGrandeCity_ChampionsRoom_EventScript_PlayBrendanMusic addobject LOCALID_RIVAL call EverGrandeCity_ChampionsRoom_EventScript_RivalApproachPlayer checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_MayAdvice - compare VAR_RESULT, FEMALE - goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_BrendanAdvice + goto_if_eq VAR_RESULT, MALE, EverGrandeCity_ChampionsRoom_EventScript_MayAdvice + goto_if_eq VAR_RESULT, FEMALE, EverGrandeCity_ChampionsRoom_EventScript_BrendanAdvice end EverGrandeCity_ChampionsRoom_EventScript_PlayMayMusic:: @@ -132,10 +128,8 @@ EverGrandeCity_ChampionsRoom_EventScript_BirchArrivesExitForHoF:: waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_WallaceWaitOutside, MSGBOX_DEFAULT checkplayergender - compare VAR_RESULT, MALE - call_if_eq EverGrandeCity_ChampionsRoom_EventScript_MayCongratulations - compare VAR_RESULT, FEMALE - call_if_eq EverGrandeCity_ChampionsRoom_EventScript_BrendanCongratulations + call_if_eq VAR_RESULT, MALE, EverGrandeCity_ChampionsRoom_EventScript_MayCongratulations + call_if_eq VAR_RESULT, FEMALE, EverGrandeCity_ChampionsRoom_EventScript_BrendanCongratulations closemessage applymovement LOCALID_WALLACE, EverGrandeCity_ChampionsRoom_Movement_WallaceExit applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerExit diff --git a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc index 75b16e775..80b1f568c 100644 --- a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc +++ b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc @@ -26,8 +26,7 @@ EverGrandeCity_DrakesRoom_EventScript_WalkInCloseDoor:: EverGrandeCity_DrakesRoom_OnLoad: call_if_set FLAG_DEFEATED_ELITE_4_DRAKE, EverGrandeCity_DrakesRoom_EventScript_ResetAdvanceToNextRoom - compare VAR_ELITE_4_STATE, 4 - call_if_eq EverGrandeCity_DrakesRoom_EventScript_CloseDoor + call_if_eq VAR_ELITE_4_STATE, 4, EverGrandeCity_DrakesRoom_EventScript_CloseDoor end EverGrandeCity_DrakesRoom_EventScript_ResetAdvanceToNextRoom:: diff --git a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc index 59f4440c4..b2d556448 100644 --- a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc +++ b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc @@ -25,8 +25,7 @@ EverGrandeCity_GlaciasRoom_EventScript_WalkInCloseDoor:: EverGrandeCity_GlaciasRoom_OnLoad: call_if_set FLAG_DEFEATED_ELITE_4_GLACIA, EverGrandeCity_GlaciasRoom_EventScript_ResetAdvanceToNextRoom - compare VAR_ELITE_4_STATE, 3 - call_if_eq EverGrandeCity_GlaciasRoom_EventScript_CloseDoor + call_if_eq VAR_ELITE_4_STATE, 3, EverGrandeCity_GlaciasRoom_EventScript_CloseDoor end EverGrandeCity_GlaciasRoom_EventScript_ResetAdvanceToNextRoom:: diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc index b494408f1..92b01af97 100644 --- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc +++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc @@ -46,10 +46,8 @@ EverGrandeCity_HallOfFame_EventScript_EnterHallOfFame:: setvar VAR_TEMP_1, 1 call EverGrandeCity_HallOfFame_EventScript_SetGameClearFlags checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EverGrandeCity_HallOfFame_EventScript_GameClearMale - compare VAR_RESULT, FEMALE - goto_if_eq EverGrandeCity_HallOfFame_EventScript_GameClearFemale + goto_if_eq VAR_RESULT, MALE, EverGrandeCity_HallOfFame_EventScript_GameClearMale + goto_if_eq VAR_RESULT, FEMALE, EverGrandeCity_HallOfFame_EventScript_GameClearFemale end EverGrandeCity_HallOfFame_EventScript_GameClearMale:: diff --git a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc index b64f5145a..ed272eb90 100644 --- a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc +++ b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc @@ -25,8 +25,7 @@ EverGrandeCity_PhoebesRoom_EventScript_WalkInCloseDoor:: EverGrandeCity_PhoebesRoom_OnLoad: call_if_set FLAG_DEFEATED_ELITE_4_PHOEBE, EverGrandeCity_PhoebesRoom_EventScript_ResetAdvanceToNextRoom - compare VAR_ELITE_4_STATE, 2 - call_if_eq EverGrandeCity_PhoebesRoom_EventScript_CloseDoor + call_if_eq VAR_ELITE_4_STATE, 2, EverGrandeCity_PhoebesRoom_EventScript_CloseDoor end EverGrandeCity_PhoebesRoom_EventScript_ResetAdvanceToNextRoom:: diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc index 1244b82fd..ec45732e8 100644 --- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc @@ -37,12 +37,9 @@ EverGrandeCity_PokemonCenter_1F_EventScript_Scott:: faceplayer msgbox EverGrandeCity_PokemonCenter_1F_Text_ScottHappyForYou, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq EverGrandeCity_PokemonCenter_1F_EventScript_ScottExitNorth - compare VAR_FACING, DIR_EAST - call_if_eq EverGrandeCity_PokemonCenter_1F_EventScript_ScottExit - compare VAR_FACING, DIR_WEST - call_if_eq EverGrandeCity_PokemonCenter_1F_EventScript_ScottExit + call_if_eq VAR_FACING, DIR_NORTH, EverGrandeCity_PokemonCenter_1F_EventScript_ScottExitNorth + call_if_eq VAR_FACING, DIR_EAST, EverGrandeCity_PokemonCenter_1F_EventScript_ScottExit + call_if_eq VAR_FACING, DIR_WEST, EverGrandeCity_PokemonCenter_1F_EventScript_ScottExit addvar VAR_SCOTT_STATE, 1 setflag FLAG_MET_SCOTT_IN_EVERGRANDE playse SE_EXIT diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc index ac7d4f9b4..c13e71697 100644 --- a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc @@ -55,10 +55,8 @@ EverGrandeCity_PokemonLeague_1F_EventScript_DoorGuard:: lockall goto_if_set FLAG_ENTERED_ELITE_FOUR, EverGrandeCity_PokemonLeague_1F_EventScript_GoForth getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_0, 11 - call_if_ge EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromRight - compare VAR_TEMP_0, 8 - call_if_le EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromLeft + call_if_ge VAR_TEMP_0, 11, EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromRight + call_if_le VAR_TEMP_0, 8, EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromLeft message EverGrandeCity_PokemonLeague_1F_Text_MustHaveAllGymBadges waitmessage delay 120 diff --git a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc index 3444d078b..03b4a4e03 100644 --- a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc +++ b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc @@ -12,8 +12,7 @@ EverGrandeCity_SidneysRoom_OnTransition: EverGrandeCity_SidneysRoom_OnLoad: call_if_set FLAG_DEFEATED_ELITE_4_SIDNEY, EverGrandeCity_SidneysRoom_EventScript_ResetAdvanceToNextRoom - compare VAR_ELITE_4_STATE, 1 - call_if_eq EverGrandeCity_SidneysRoom_EventScript_CloseDoor + call_if_eq VAR_ELITE_4_STATE, 1, EverGrandeCity_SidneysRoom_EventScript_CloseDoor end EverGrandeCity_SidneysRoom_EventScript_ResetAdvanceToNextRoom:: diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index 7fc90e4e1..707995dae 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -18,10 +18,8 @@ FallarborTown_BattleTentBattleRoom_OnTransition: FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale return FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: @@ -44,8 +42,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_ne FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge + goto_if_ne VAR_RESULT, 0, FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: tower_setopponent addobject LOCALID_OPPONENT @@ -103,10 +100,8 @@ FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum:: special HealPlayerParty FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge:: frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 1, FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, TRUE switch VAR_RESULT case 0, FallarborTown_BattleTentBattleRoom_EventScript_ContinueChallenge @@ -147,8 +142,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: @ Unreachable code block? The flow into the next block also doesnt make sense arena_get ARENA_DATA_WIN_STREAK - compare VAR_RESULT, MAX_STREAK - goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum + goto_if_eq VAR_RESULT, MAX_STREAK, FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum addvar VAR_RESULT, 1 arena_set ARENA_DATA_WIN_STREAK, VAR_RESULT @ See above diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc index d6826f037..1bcd04559 100644 --- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc +++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc @@ -106,8 +106,7 @@ FallarborTown_BattleTentLobby_EventScript_Attendant:: lock faceplayer fallarbortent_getprize - compare VAR_RESULT, ITEM_NONE - goto_if_ne FallarborTown_BattleTentLobby_EventScript_PrizeWaiting + goto_if_ne VAR_RESULT, ITEM_NONE, FallarborTown_BattleTentLobby_EventScript_PrizeWaiting special SavePlayerParty msgbox FallarborTown_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT FallarborTown_BattleTentLobby_EventScript_AskEnterChallenge:: @@ -125,8 +124,7 @@ FallarborTown_BattleTentLobby_EventScript_TryEnterChallenge:: setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES setvar VAR_RESULT, 2 frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT msgbox FallarborTown_BattleTentLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -134,8 +132,7 @@ FallarborTown_BattleTentLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge msgbox FallarborTown_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge @@ -153,8 +150,7 @@ FallarborTown_BattleTentLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq FallarborTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, FallarborTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed FallarborTown_BattleTentLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE diff --git a/data/maps/FallarborTown_CozmosHouse/scripts.inc b/data/maps/FallarborTown_CozmosHouse/scripts.inc index 3e5d02f2d..61f297e69 100644 --- a/data/maps/FallarborTown_CozmosHouse/scripts.inc +++ b/data/maps/FallarborTown_CozmosHouse/scripts.inc @@ -6,8 +6,7 @@ FallarborTown_CozmosHouse_EventScript_ProfCozmo:: faceplayer goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_GaveMeteorite checkitem ITEM_METEORITE - compare VAR_RESULT, TRUE - goto_if_eq FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite + goto_if_eq VAR_RESULT, TRUE, FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite msgbox FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow, MSGBOX_DEFAULT release end @@ -15,12 +14,10 @@ FallarborTown_CozmosHouse_EventScript_ProfCozmo:: FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite:: call_if_unset FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_NoticeMeteorite call_if_set FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_AskForMeteorite - compare VAR_RESULT, NO - goto_if_eq FallarborTown_CozmosHouse_EventScript_DeclineGiveMeteorite + goto_if_eq VAR_RESULT, NO, FallarborTown_CozmosHouse_EventScript_DeclineGiveMeteorite msgbox FallarborTown_CozmosHouse_Text_PleaseUseThisTM, MSGBOX_DEFAULT giveitem ITEM_TM27 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setvar VAR_0x8004, ITEM_METEORITE call Common_EventScript_PlayerHandedOverTheItem setflag FLAG_RECEIVED_TM27 diff --git a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc index 096f13877..f17754328 100644 --- a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc +++ b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc @@ -15,8 +15,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_MoveRelearner:: FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove:: checkitem ITEM_HEART_SCALE - compare VAR_RESULT, FALSE - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + goto_if_eq VAR_RESULT, FALSE, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale msgbox FallarborTown_MoveRelearnersHouse_Text_ThatsAHeartScaleWantMeToTeachMove, MSGBOX_YESNO switch VAR_RESULT case NO, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale @@ -27,13 +26,10 @@ FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon:: msgbox FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon, MSGBOX_DEFAULT special ChooseMonForMoveRelearner waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale special IsSelectedMonEgg - compare VAR_RESULT, TRUE - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_CantTeachEgg - compare VAR_0x8005, 0 - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_NoMoveToTeachMon + goto_if_eq VAR_RESULT, TRUE, FallarborTown_MoveRelearnersHouse_EventScript_CantTeachEgg + goto_if_eq VAR_0x8005, 0, FallarborTown_MoveRelearnersHouse_EventScript_NoMoveToTeachMon goto FallarborTown_MoveRelearnersHouse_EventScript_ChooseMove end @@ -41,8 +37,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_ChooseMove:: msgbox FallarborTown_MoveRelearnersHouse_Text_TeachWhichMove, MSGBOX_DEFAULT special TeachMoveRelearnerMove waitstate - compare VAR_0x8004, 0 - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon + goto_if_eq VAR_0x8004, 0, FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon msgbox FallarborTown_MoveRelearnersHouse_Text_HandedOverHeartScale, MSGBOX_DEFAULT removeitem ITEM_HEART_SCALE goto FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc index 2f4db2651..504b0dc6a 100644 --- a/data/maps/FarawayIsland_Entrance/scripts.inc +++ b/data/maps/FarawayIsland_Entrance/scripts.inc @@ -23,8 +23,7 @@ FarawayIsland_Entrance_EventScript_Sailor:: lock faceplayer msgbox FarawayIsland_Entrance_Text_SailorReturn, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq FarawayIsland_Entrance_EventScript_AsYouLike + goto_if_eq VAR_RESULT, NO, FarawayIsland_Entrance_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc index e35825be7..983b4709a 100644 --- a/data/maps/FarawayIsland_Interior/scripts.inc +++ b/data/maps/FarawayIsland_Interior/scripts.inc @@ -13,14 +13,10 @@ FarawayIsland_Interior_OnReturnToField: FarawayIsland_Interior_EventScript_TrySetMewAboveGrass:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq FarawayIsland_Interior_EventScript_SetMewAboveGrass - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq FarawayIsland_Interior_EventScript_SetMewAboveGrass - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_SetMewAboveGrass - compare VAR_RESULT, B_OUTCOME_MON_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_SetMewAboveGrass + goto_if_eq VAR_RESULT, B_OUTCOME_WON, FarawayIsland_Interior_EventScript_SetMewAboveGrass + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, FarawayIsland_Interior_EventScript_SetMewAboveGrass + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, FarawayIsland_Interior_EventScript_SetMewAboveGrass + goto_if_eq VAR_RESULT, B_OUTCOME_MON_TELEPORTED, FarawayIsland_Interior_EventScript_SetMewAboveGrass return FarawayIsland_Interior_EventScript_SetMewAboveGrass:: @@ -34,8 +30,7 @@ FarawayIsland_Interior_OnResume: FarawayIsland_Interior_EventScript_TryRemoveMew:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -127,14 +122,10 @@ FarawayIsland_Interior_EventScript_Mew:: message FarawayIsland_Interior_Text_Mew waitse playmoncry SPECIES_MEW, CRY_MODE_ENCOUNTER - compare VAR_FACING, DIR_NORTH - call_if_eq FarawayIsland_Interior_EventScript_FoundMewNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq FarawayIsland_Interior_EventScript_FoundMewSouth - compare VAR_FACING, DIR_WEST - call_if_eq FarawayIsland_Interior_EventScript_FoundMewWest - compare VAR_FACING, DIR_EAST - call_if_eq FarawayIsland_Interior_EventScript_FoundMewEast + call_if_eq VAR_FACING, DIR_NORTH, FarawayIsland_Interior_EventScript_FoundMewNorth + call_if_eq VAR_FACING, DIR_SOUTH, FarawayIsland_Interior_EventScript_FoundMewSouth + call_if_eq VAR_FACING, DIR_WEST, FarawayIsland_Interior_EventScript_FoundMewWest + call_if_eq VAR_FACING, DIR_EAST, FarawayIsland_Interior_EventScript_FoundMewEast special DestroyMewEmergingGrassSprite delay 40 waitmoncry @@ -147,14 +138,10 @@ FarawayIsland_Interior_EventScript_Mew:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq FarawayIsland_Interior_EventScript_MewDefeated - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq FarawayIsland_Interior_EventScript_PlayerOrMewRan - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_PlayerOrMewRan - compare VAR_RESULT, B_OUTCOME_MON_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_PlayerOrMewRan + goto_if_eq VAR_RESULT, B_OUTCOME_WON, FarawayIsland_Interior_EventScript_MewDefeated + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, FarawayIsland_Interior_EventScript_PlayerOrMewRan + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, FarawayIsland_Interior_EventScript_PlayerOrMewRan + goto_if_eq VAR_RESULT, B_OUTCOME_MON_TELEPORTED, FarawayIsland_Interior_EventScript_PlayerOrMewRan setflag FLAG_CAUGHT_MEW release end diff --git a/data/maps/FortreeCity/scripts.inc b/data/maps/FortreeCity/scripts.inc index a9fe64ade..f1694aaa8 100644 --- a/data/maps/FortreeCity/scripts.inc +++ b/data/maps/FortreeCity/scripts.inc @@ -56,16 +56,14 @@ FortreeCity_EventScript_Kecleon:: lock faceplayer checkitem ITEM_DEVON_SCOPE - compare VAR_RESULT, TRUE - goto_if_eq FortreeCity_EventScript_AskUseDevonScope + goto_if_eq VAR_RESULT, TRUE, FortreeCity_EventScript_AskUseDevonScope msgbox FortreeCity_Text_SomethingUnseeable, MSGBOX_DEFAULT release end FortreeCity_EventScript_AskUseDevonScope:: msgbox FortreeCity_Text_UnseeableUseDevonScope, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FortreeCity_EventScript_UseDevonScope + goto_if_eq VAR_RESULT, YES, FortreeCity_EventScript_UseDevonScope release end diff --git a/data/maps/FortreeCity_Gym/scripts.inc b/data/maps/FortreeCity_Gym/scripts.inc index caac72473..1c729bc44 100644 --- a/data/maps/FortreeCity_Gym/scripts.inc +++ b/data/maps/FortreeCity_Gym/scripts.inc @@ -18,8 +18,7 @@ FortreeCity_Gym_EventScript_InitRotatingGates:: FortreeCity_Gym_EventScript_Winona:: trainerbattle_single TRAINER_WINONA_1, FortreeCity_Gym_Text_WinonaIntro, FortreeCity_Gym_Text_WinonaDefeat, FortreeCity_Gym_EventScript_WinonaDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FortreeCity_Gym_EventScript_WinonaRematch + goto_if_eq VAR_RESULT, TRUE, FortreeCity_Gym_EventScript_WinonaRematch goto_if_unset FLAG_RECEIVED_TM40, FortreeCity_Gym_EventScript_GiveAerialAce2 msgbox FortreeCity_Gym_Text_WinonaPostBattle, MSGBOX_DEFAULT release @@ -50,8 +49,7 @@ FortreeCity_Gym_EventScript_WinonaDefeated:: FortreeCity_Gym_EventScript_GiveAerialAce2:: giveitem ITEM_TM40 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox FortreeCity_Gym_Text_ExplainAerialAce, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM40 release @@ -59,8 +57,7 @@ FortreeCity_Gym_EventScript_GiveAerialAce2:: FortreeCity_Gym_EventScript_GiveAerialAce:: giveitem ITEM_TM40 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox FortreeCity_Gym_Text_ExplainAerialAce, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM40 return diff --git a/data/maps/FortreeCity_House1/scripts.inc b/data/maps/FortreeCity_House1/scripts.inc index a16c26112..a072f5610 100644 --- a/data/maps/FortreeCity_House1/scripts.inc +++ b/data/maps/FortreeCity_House1/scripts.inc @@ -10,18 +10,15 @@ FortreeCity_House1_EventScript_Trader:: specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox FortreeCity_House1_Text_YouWillTradeWontYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq FortreeCity_House1_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, FortreeCity_House1_EventScript_DeclineTrade special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq FortreeCity_House1_EventScript_DeclineTrade + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, FortreeCity_House1_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies copyvar VAR_0x800B, VAR_RESULT - compare VAR_RESULT, VAR_0x8009 - goto_if_ne FortreeCity_House1_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, FortreeCity_House1_EventScript_NotRequestedMon copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8005, VAR_0x800A special CreateInGameTradePokemon diff --git a/data/maps/FortreeCity_House2/scripts.inc b/data/maps/FortreeCity_House2/scripts.inc index 29e9ea93c..cdd0fc99f 100644 --- a/data/maps/FortreeCity_House2/scripts.inc +++ b/data/maps/FortreeCity_House2/scripts.inc @@ -20,8 +20,7 @@ FortreeCity_House2_EventScript_HiddenPowerGiver:: case 0, FortreeCity_House2_EventScript_WrongGuess msgbox FortreeCity_House2_Text_YourHiddenPowerHasAwoken, MSGBOX_DEFAULT giveitem ITEM_TM10 - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM10 msgbox FortreeCity_House2_Text_ExplainHiddenPower, MSGBOX_DEFAULT release diff --git a/data/maps/FortreeCity_House4/scripts.inc b/data/maps/FortreeCity_House4/scripts.inc index c416cf147..ed9167417 100644 --- a/data/maps/FortreeCity_House4/scripts.inc +++ b/data/maps/FortreeCity_House4/scripts.inc @@ -34,8 +34,7 @@ FortreeCity_House4_EventScript_WingullReturned:: waitmovement 0 msgbox FortreeCity_House4_Text_WelcomeWingullTakeMentalHerb, MSGBOX_DEFAULT giveitem ITEM_MENTAL_HERB - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_MENTAL_HERB releaseall end diff --git a/data/maps/GraniteCave_StevensRoom/scripts.inc b/data/maps/GraniteCave_StevensRoom/scripts.inc index b57eb0de6..384e648ee 100644 --- a/data/maps/GraniteCave_StevensRoom/scripts.inc +++ b/data/maps/GraniteCave_StevensRoom/scripts.inc @@ -12,8 +12,7 @@ GraniteCave_StevensRoom_EventScript_Steven:: setflag FLAG_DELIVERED_STEVEN_LETTER msgbox GraniteCave_StevensRoom_Text_ThankYouTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM47 - compare VAR_RESULT, FALSE - call_if_eq GraniteCave_StevensRoom_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, GraniteCave_StevensRoom_EventScript_BagFull msgbox GraniteCave_StevensRoom_Text_CouldBecomeChampionLetsRegister, MSGBOX_DEFAULT closemessage delay 30 @@ -25,14 +24,10 @@ GraniteCave_StevensRoom_EventScript_Steven:: setflag FLAG_REGISTERED_STEVEN_POKENAV msgbox GraniteCave_StevensRoom_Text_IveGotToHurryAlong, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq GraniteCave_StevensRoom_EventScript_StevenExitNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq GraniteCave_StevensRoom_EventScript_StevenExitSouth - compare VAR_FACING, DIR_WEST - call_if_eq GraniteCave_StevensRoom_EventScript_StevenExitWestEast - compare VAR_FACING, DIR_EAST - call_if_eq GraniteCave_StevensRoom_EventScript_StevenExitWestEast + call_if_eq VAR_FACING, DIR_NORTH, GraniteCave_StevensRoom_EventScript_StevenExitNorth + call_if_eq VAR_FACING, DIR_SOUTH, GraniteCave_StevensRoom_EventScript_StevenExitSouth + call_if_eq VAR_FACING, DIR_WEST, GraniteCave_StevensRoom_EventScript_StevenExitWestEast + call_if_eq VAR_FACING, DIR_EAST, GraniteCave_StevensRoom_EventScript_StevenExitWestEast playse SE_EXIT removeobject LOCALID_STEVEN release diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc index 515279449..c59d5a97b 100644 --- a/data/maps/InsideOfTruck/scripts.inc +++ b/data/maps/InsideOfTruck/scripts.inc @@ -17,10 +17,8 @@ InsideOfTruck_EventScript_SetIntroFlags:: lockall setflag FLAG_HIDE_MAP_NAME_POPUP checkplayergender - compare VAR_RESULT, MALE - goto_if_eq InsideOfTruck_EventScript_SetIntroFlagsMale - compare VAR_RESULT, FEMALE - goto_if_eq InsideOfTruck_EventScript_SetIntroFlagsFemale + goto_if_eq VAR_RESULT, MALE, InsideOfTruck_EventScript_SetIntroFlagsMale + goto_if_eq VAR_RESULT, FEMALE, InsideOfTruck_EventScript_SetIntroFlagsFemale end InsideOfTruck_EventScript_SetIntroFlagsMale:: diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc index 83e4d015a..8f8236a5c 100644 --- a/data/maps/IslandCave/scripts.inc +++ b/data/maps/IslandCave/scripts.inc @@ -10,8 +10,7 @@ IslandCave_OnResume: IslandCave_EventScript_TryRemoveRegice:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -101,12 +100,9 @@ IslandCave_EventScript_Regice:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq IslandCave_EventScript_DefeatedRegice - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq IslandCave_EventScript_RanFromRegice - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq IslandCave_EventScript_RanFromRegice + goto_if_eq VAR_RESULT, B_OUTCOME_WON, IslandCave_EventScript_DefeatedRegice + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, IslandCave_EventScript_RanFromRegice + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, IslandCave_EventScript_RanFromRegice setflag FLAG_DEFEATED_REGICE release end diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc index 18a8c2999..f969a4dec 100644 --- a/data/maps/JaggedPass/scripts.inc +++ b/data/maps/JaggedPass/scripts.inc @@ -8,14 +8,12 @@ JaggedPass_MapScripts:: JaggedPass_OnResume: setstepcallback STEP_CB_ASH - compare VAR_JAGGED_PASS_STATE, 0 - call_if_eq JaggedPass_EventScript_CheckHasMagmaEmblem + call_if_eq VAR_JAGGED_PASS_STATE, 0, JaggedPass_EventScript_CheckHasMagmaEmblem end JaggedPass_EventScript_CheckHasMagmaEmblem:: checkitem ITEM_MAGMA_EMBLEM - compare VAR_RESULT, TRUE - goto_if_eq JaggedPass_EventScript_SetReadyToOpenHideout + goto_if_eq VAR_RESULT, TRUE, JaggedPass_EventScript_SetReadyToOpenHideout return JaggedPass_EventScript_SetReadyToOpenHideout:: @@ -23,8 +21,7 @@ JaggedPass_EventScript_SetReadyToOpenHideout:: return JaggedPass_OnTransition: - compare VAR_JAGGED_PASS_ASH_WEATHER, 1 - call_if_eq JaggedPass_EventScript_SetWeatherAsh + call_if_eq VAR_JAGGED_PASS_ASH_WEATHER, 1, JaggedPass_EventScript_SetWeatherAsh end JaggedPass_EventScript_SetWeatherAsh:: @@ -33,8 +30,7 @@ JaggedPass_EventScript_SetWeatherAsh:: return JaggedPass_OnLoad: - compare VAR_JAGGED_PASS_STATE, 1 - goto_if_le JaggedPass_EventScript_ConcealHideoutEntrance + goto_if_le VAR_JAGGED_PASS_STATE, 1, JaggedPass_EventScript_ConcealHideoutEntrance end JaggedPass_EventScript_ConcealHideoutEntrance:: @@ -106,8 +102,7 @@ JaggedPass_EventScript_Eric:: JaggedPass_EventScript_Diana:: trainerbattle_single TRAINER_DIANA_1, JaggedPass_Text_DianaIntro, JaggedPass_Text_DianaDefeat, JaggedPass_EventScript_RegisterDiana specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq JaggedPass_EventScript_DianaRematch + goto_if_eq VAR_RESULT, TRUE, JaggedPass_EventScript_DianaRematch msgbox JaggedPass_Text_DianaPostBattle, MSGBOX_DEFAULT release end @@ -127,8 +122,7 @@ JaggedPass_EventScript_DianaRematch:: JaggedPass_EventScript_Ethan:: trainerbattle_single TRAINER_ETHAN_1, JaggedPass_Text_EthanIntro, JaggedPass_Text_EthanDefeat, JaggedPass_EventScript_RegisterEthan specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq JaggedPass_EventScript_EthanRematch + goto_if_eq VAR_RESULT, TRUE, JaggedPass_EventScript_EthanRematch msgbox JaggedPass_Text_EthanPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/LavaridgeTown/scripts.inc b/data/maps/LavaridgeTown/scripts.inc index 2b7f8f331..3ce226c4c 100644 --- a/data/maps/LavaridgeTown/scripts.inc +++ b/data/maps/LavaridgeTown/scripts.inc @@ -12,10 +12,8 @@ LavaridgeTown_OnTransition: call_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, LavaridgeTown_EventScript_ShowMtChimneyTrainers call Common_EventScript_SetupRivalGfxId call Common_EventScript_SetupRivalOnBikeGfxId - compare VAR_LAVARIDGE_TOWN_STATE, 1 - call_if_eq LavaridgeTown_EventScript_CheckSetRivalPos - compare VAR_LAVARIDGE_TOWN_STATE, 1 - call_if_eq LavaridgeTown_EventScript_HideMapNamePopup + call_if_eq VAR_LAVARIDGE_TOWN_STATE, 1, LavaridgeTown_EventScript_CheckSetRivalPos + call_if_eq VAR_LAVARIDGE_TOWN_STATE, 1, LavaridgeTown_EventScript_HideMapNamePopup end LavaridgeTown_EventScript_ClearLavaridgeWhiteOut:: @@ -24,8 +22,7 @@ LavaridgeTown_EventScript_ClearLavaridgeWhiteOut:: LavaridgeTown_EventScript_CheckSetRivalPos:: getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 9 - goto_if_eq LavaridgeTown_EventScript_SetRivalPos + goto_if_eq VAR_0x8004, 9, LavaridgeTown_EventScript_SetRivalPos return LavaridgeTown_EventScript_SetRivalPos:: @@ -50,25 +47,17 @@ LavaridgeTown_OnFrame: LavaridgeTown_EventScript_RivalGiveGoGoggles:: lockall getplayerxy VAR_0x8008, VAR_0x8009 - compare VAR_0x8008, 9 - call_if_eq LavaridgeTown_EventScript_RivalNoticePlayer - compare VAR_0x8008, 9 - call_if_ne LavaridgeTown_EventScript_RivalExitHerbShop + call_if_eq VAR_0x8008, 9, LavaridgeTown_EventScript_RivalNoticePlayer + call_if_ne VAR_0x8008, 9, LavaridgeTown_EventScript_RivalExitHerbShop delay 20 checkplayergender - compare VAR_RESULT, MALE - call_if_eq LavaridgeTown_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - call_if_eq LavaridgeTown_EventScript_PlayBrendanMusic - compare VAR_0x8008, 9 - call_if_eq LavaridgeTown_EventScript_RivalApproachPlayer1 - compare VAR_0x8008, 9 - call_if_ne LavaridgeTown_EventScript_RivalApproachPlayer2 + call_if_eq VAR_RESULT, MALE, LavaridgeTown_EventScript_PlayMayMusic + call_if_eq VAR_RESULT, FEMALE, LavaridgeTown_EventScript_PlayBrendanMusic + call_if_eq VAR_0x8008, 9, LavaridgeTown_EventScript_RivalApproachPlayer1 + call_if_ne VAR_0x8008, 9, LavaridgeTown_EventScript_RivalApproachPlayer2 checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LavaridgeTown_EventScript_MayGiveGoGoggles - compare VAR_RESULT, FEMALE - goto_if_eq LavaridgeTown_EventScript_BrendanGiveGoGoggles + goto_if_eq VAR_RESULT, MALE, LavaridgeTown_EventScript_MayGiveGoGoggles + goto_if_eq VAR_RESULT, FEMALE, LavaridgeTown_EventScript_BrendanGiveGoGoggles end LavaridgeTown_EventScript_MayGiveGoGoggles:: @@ -92,10 +81,8 @@ LavaridgeTown_EventScript_RivalExit:: removeobject LOCALID_RIVAL addobject LOCALID_RIVAL_ON_BIKE delay 30 - compare VAR_0x8008, 9 - call_if_eq LavaridgeTown_EventScript_RivalExit1 - compare VAR_0x8008, 9 - call_if_ne LavaridgeTown_EventScript_RivalExit2 + call_if_eq VAR_0x8008, 9, LavaridgeTown_EventScript_RivalExit1 + call_if_ne VAR_0x8008, 9, LavaridgeTown_EventScript_RivalExit2 removeobject LOCALID_RIVAL_ON_BIKE setvar VAR_LAVARIDGE_TOWN_STATE, 2 clearflag FLAG_HIDE_MAP_NAME_POPUP @@ -214,8 +201,7 @@ LavaridgeTown_Movement_RivalExitHerbShop: LavaridgeTown_EventScript_HotSpringsTrigger:: specialvar VAR_RESULT, GetPlayerFacingDirection - compare VAR_RESULT, DIR_SOUTH - goto_if_eq LavaridgeTown_EventScript_EnteredHotSprings + goto_if_eq VAR_RESULT, DIR_SOUTH, LavaridgeTown_EventScript_EnteredHotSprings end LavaridgeTown_EventScript_EnteredHotSprings:: @@ -251,11 +237,9 @@ LavaridgeTown_EventScript_EggWoman:: faceplayer goto_if_set FLAG_RECEIVED_LAVARIDGE_EGG, LavaridgeTown_EventScript_ReceivedEgg msgbox LavaridgeTown_Text_HaveEggWillYouTakeIt, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LavaridgeTown_EventScript_DeclineEgg + goto_if_eq VAR_RESULT, NO, LavaridgeTown_EventScript_DeclineEgg getpartysize - compare VAR_RESULT, PARTY_SIZE - goto_if_eq LavaridgeTown_EventScript_NoRoomForEgg + goto_if_eq VAR_RESULT, PARTY_SIZE, LavaridgeTown_EventScript_NoRoomForEgg msgbox LavaridgeTown_Text_HopeYoullWalkPlentyWithEgg, MSGBOX_DEFAULT setflag FLAG_RECEIVED_LAVARIDGE_EGG playfanfare MUS_OBTAIN_ITEM diff --git a/data/maps/LavaridgeTown_Gym_1F/scripts.inc b/data/maps/LavaridgeTown_Gym_1F/scripts.inc index 608f32e24..6628360c1 100644 --- a/data/maps/LavaridgeTown_Gym_1F/scripts.inc +++ b/data/maps/LavaridgeTown_Gym_1F/scripts.inc @@ -51,8 +51,7 @@ LavaridgeTown_Gym_1F_EventScript_EndCheckBuryTrainers:: LavaridgeTown_Gym_1F_EventScript_Flannery:: trainerbattle_single TRAINER_FLANNERY_1, LavaridgeTown_Gym_1F_Text_FlanneryIntro, LavaridgeTown_Gym_1F_Text_FlanneryDefeat, LavaridgeTown_Gym_1F_EventScript_FlanneryDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq LavaridgeTown_Gym_1F_EventScript_FlanneryRematch + goto_if_eq VAR_RESULT, TRUE, LavaridgeTown_Gym_1F_EventScript_FlanneryRematch goto_if_unset FLAG_RECEIVED_TM50, LavaridgeTown_Gym_1F_EventScript_GiveOverheat2 msgbox LavaridgeTown_Gym_1F_Text_FlanneryPostBattle, MSGBOX_DEFAULT release @@ -67,8 +66,7 @@ LavaridgeTown_Gym_1F_EventScript_FlanneryDefeated:: setflag FLAG_DEFEATED_LAVARIDGE_GYM setflag FLAG_BADGE04_GET addvar VAR_PETALBURG_GYM_STATE, 1 - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_eq Common_EventScript_ReadyPetalburgGymForBattle + call_if_eq VAR_PETALBURG_GYM_STATE, 6, Common_EventScript_ReadyPetalburgGymForBattle setvar VAR_0x8008, 4 call Common_EventScript_SetGymTrainers setflag FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WALLY @@ -87,8 +85,7 @@ LavaridgeTown_Gym_1F_EventScript_FlanneryDefeated:: LavaridgeTown_Gym_1F_EventScript_GiveOverheat2:: giveitem ITEM_TM50 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox LavaridgeTown_Gym_1F_Text_ExplainOverheat, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM50 release @@ -96,8 +93,7 @@ LavaridgeTown_Gym_1F_EventScript_GiveOverheat2:: LavaridgeTown_Gym_1F_EventScript_GiveOverheat:: giveitem ITEM_TM50 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox LavaridgeTown_Gym_1F_Text_ExplainOverheat, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM50 return @@ -116,8 +112,7 @@ LavaridgeTown_Gym_EventScript_CheckTrainerScript:: call LavaridgeTown_Gym_1F_EventScript_SetTrainerTempVars release special ShouldTryGetTrainerScript - compare VAR_RESULT, 1 - goto_if_eq EventScript_GotoTrainerScript + goto_if_eq VAR_RESULT, 1, EventScript_GotoTrainerScript end LavaridgeTown_Gym_1F_EventScript_Axle:: diff --git a/data/maps/LavaridgeTown_HerbShop/scripts.inc b/data/maps/LavaridgeTown_HerbShop/scripts.inc index 2637f5c09..dbe1b564a 100644 --- a/data/maps/LavaridgeTown_HerbShop/scripts.inc +++ b/data/maps/LavaridgeTown_HerbShop/scripts.inc @@ -31,8 +31,7 @@ LavaridgeTown_HerbShop_EventScript_OldMan:: goto_if_set FLAG_RECEIVED_CHARCOAL, LavaridgeTown_HerbShop_EventScript_ExplainCharcoal msgbox LavaridgeTown_HerbShop_Text_YouveComeToLookAtHerbalMedicine, MSGBOX_DEFAULT giveitem ITEM_CHARCOAL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_CHARCOAL release end diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc index 648aae564..094592d64 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -42,8 +42,7 @@ LilycoveCity_EventScript_BerryGentleman:: random 10 addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_LILYCOVE_RECEIVED_BERRY msgbox LilycoveCity_Text_BecauseYoureTrainer, MSGBOX_DEFAULT release @@ -234,18 +233,15 @@ LilycoveCity_EventScript_Rival:: lock faceplayer checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LilycoveCity_EventScript_May - compare VAR_RESULT, FEMALE - goto_if_eq LilycoveCity_EventScript_Brendan + goto_if_eq VAR_RESULT, MALE, LilycoveCity_EventScript_May + goto_if_eq VAR_RESULT, FEMALE, LilycoveCity_EventScript_Brendan end LilycoveCity_EventScript_May:: playbgm MUS_ENCOUNTER_MAY, TRUE call_if_set FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_MayAskToBattleAgain call_if_unset FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_MayAskToBattle - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_EventScript_DeclineMayBattle + goto_if_eq VAR_RESULT, NO, LilycoveCity_EventScript_DeclineMayBattle msgbox LilycoveCity_Text_MayWontBeBeaten, MSGBOX_DEFAULT switch VAR_STARTER_MON case 0, LilycoveCity_EventScript_BattleMayTreecko @@ -273,8 +269,7 @@ LilycoveCity_EventScript_Brendan:: playbgm MUS_ENCOUNTER_BRENDAN, TRUE call_if_set FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_BrendanAskToBattleAgain call_if_unset FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_BrendanAskToBattle - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_EventScript_DeclineBrendanBattle + goto_if_eq VAR_RESULT, NO, LilycoveCity_EventScript_DeclineBrendanBattle msgbox LilycoveCity_Text_BrendanWontBeBeaten, MSGBOX_DEFAULT switch VAR_STARTER_MON case 0, LilycoveCity_EventScript_BattleBrendanTreecko @@ -332,10 +327,8 @@ LilycoveCity_EventScript_DefeatedMay:: msgbox LilycoveCity_Text_MayGoingBackToLittleroot, MSGBOX_DEFAULT setvar VAR_RESULT, FALSE call_if_set FLAG_BADGE06_GET, LilycoveCity_EventScript_CheckFinalBadge - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_EventScript_MayCollectBadges - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_EventScript_MayPokemonLeague + call_if_eq VAR_RESULT, FALSE, LilycoveCity_EventScript_MayCollectBadges + call_if_eq VAR_RESULT, TRUE, LilycoveCity_EventScript_MayPokemonLeague clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_PICHU_DOLL goto LilycoveCity_EventScript_RivalFlyAway @@ -366,10 +359,8 @@ LilycoveCity_EventScript_DefeatedBrendan:: msgbox LilycoveCity_Text_BrendanGoingBackToLittleroot, MSGBOX_DEFAULT setvar VAR_RESULT, FALSE call_if_set FLAG_BADGE06_GET, LilycoveCity_EventScript_CheckFinalBadge - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_EventScript_BrendanCollectBadges - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_EventScript_BrendanPokemonLeague + call_if_eq VAR_RESULT, FALSE, LilycoveCity_EventScript_BrendanCollectBadges + call_if_eq VAR_RESULT, TRUE, LilycoveCity_EventScript_BrendanPokemonLeague clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_SWABLU_DOLL goto LilycoveCity_EventScript_RivalFlyAway @@ -408,10 +399,8 @@ LilycoveCity_EventScript_SchoolKidM:: lock faceplayer msgbox LilycoveCity_Text_DoYouKnowAboutBerryBlender, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq LilycoveCity_EventScript_KnowAboutBerryBlender - compare VAR_RESULT, NO - call_if_eq LilycoveCity_EventScript_DontKnowAboutBerryBlender + call_if_eq VAR_RESULT, YES, LilycoveCity_EventScript_KnowAboutBerryBlender + call_if_eq VAR_RESULT, NO, LilycoveCity_EventScript_DontKnowAboutBerryBlender release end diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 84a790aed..fa884a096 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -18,8 +18,7 @@ LilycoveCity_ContestLobby_OnTransition: LilycoveCity_ContestLobby_EventScript_TryShowBlendMaster:: getpokenewsactive POKENEWS_BLENDMASTER - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_ShowBlendMaster + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_ShowBlendMaster clearflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER_REPLACEMENT setflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER return @@ -52,10 +51,8 @@ LilycoveCity_ContestLobby_EventScript_ContestArtist:: showcontestpainting CONTEST_WINNER_ARTIST lockall msgbox LilycoveCity_ContestLobby_Text_ShouldITakePaintingToMuseum, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePainting + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum + goto_if_eq VAR_RESULT, NO, LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePainting releaseall end @@ -65,8 +62,7 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum:: special SaveMuseumContestPainting setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0 specialvar VAR_RESULT, GiveMonArtistRibbon - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_ContestLobby_EventScript_ReceivedArtistRibbon + call_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_ReceivedArtistRibbon applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistExit waitmovement 0 removeobject LOCALID_ARTIST @@ -77,8 +73,7 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum:: LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePainting:: msgbox LilycoveCity_ContestLobby_Text_TakeHomeButIdLikeToTakeToMuseum, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum msgbox LilycoveCity_ContestLobby_Text_FineThatsTheWayItIs, MSGBOX_DEFAULT closemessage applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistExit @@ -225,10 +220,8 @@ LilycoveCity_ContestLobby_EventScript_LinkContestArtist:: fadescreen FADE_TO_BLACK showcontestpainting CONTEST_WINNER_ARTIST msgbox LilycoveCity_ContestLobby_Text_ShouldITakePaintingToMuseum, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePaintingLink + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink + goto_if_eq VAR_RESULT, NO, LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePaintingLink end LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink:: @@ -237,8 +230,7 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink:: special SaveMuseumContestPainting setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0 specialvar VAR_RESULT, GiveMonArtistRibbon - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_ContestLobby_EventScript_ReceivedLinkArtistRibbon + call_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_ReceivedLinkArtistRibbon applymovement LOCALID_ARTIST_LINK, LilycoveCity_ContestLobby_Movement_LinkArtistExit waitmovement 0 removeobject LOCALID_ARTIST_LINK @@ -249,8 +241,7 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink:: LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePaintingLink:: msgbox LilycoveCity_ContestLobby_Text_TakeHomeButIdLikeToTakeToMuseum, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink msgbox LilycoveCity_ContestLobby_Text_FineThatsTheWayItIs, MSGBOX_DEFAULT closemessage applymovement LOCALID_ARTIST_LINK, LilycoveCity_ContestLobby_Movement_LinkArtistExit @@ -327,8 +318,7 @@ LilycoveCity_ContestLobby_Movement_LinkArtistReturnToPlayer: LilycoveCity_ContestLobby_EventScript_ContestReceptionist:: special ClearLinkContestFlags specialvar VAR_RESULT, IsContestDebugActive @ Always FALSE - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_SetDebug + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_SetDebug call LilycoveCity_ContestLobby_EventScript_SpeakToContestReceptionist call LilycoveCity_ContestLobby_EventScript_LeadToContestHall special SetContestTrainerGfxIds @@ -648,11 +638,9 @@ LilycoveCity_ContestLobby_EventScript_AskEnterLinkContest:: LilycoveCity_ContestLobby_EventScript_TryEnterLinkContest:: msgbox LilycoveCity_ContestLobby_Text_ProgressWillBeSaved, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_RESULT, NO, LilycoveCity_ContestLobby_EventScript_CancelLinkContest call Common_EventScript_SaveGame - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_ContestLobby_EventScript_CancelLinkContest message LilycoveCity_ContestLobby_Text_WhichContestMode waitmessage specialvar VAR_TEMP_D, IsWirelessAdapterConnected @@ -671,8 +659,7 @@ LilycoveCity_ContestLobby_EventScript_EmeraldMode:: LilycoveCity_ContestLobby_EventScript_GlobalMode:: setvar VAR_TEMP_C, 1 - compare VAR_TEMP_D, 1 - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkNoWirelessGMode + goto_if_eq VAR_TEMP_D, 1, LilycoveCity_ContestLobby_EventScript_CancelLinkNoWirelessGMode goto LilycoveCity_ContestLobby_EventScript_ChooseLinkContestType end @@ -724,19 +711,13 @@ LilycoveCity_ContestLobby_EventScript_ChooseLinkContestMon:: msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon3, MSGBOX_DEFAULT setvar VAR_CONTEST_RANK, 0 choosecontestmon - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, LilycoveCity_ContestLobby_EventScript_CancelLinkContest special TryEnterContestMon - compare VAR_RESULT, CANT_ENTER_CONTEST - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkCantEnterLowRank - compare VAR_RESULT, CAN_ENTER_CONTEST_EQUAL_RANK - goto_if_eq LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest - compare VAR_RESULT, CAN_ENTER_CONTEST_HIGH_RANK - goto_if_eq LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest - compare VAR_RESULT, CANT_ENTER_CONTEST_EGG - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkCantEnterEgg - compare VAR_RESULT, CANT_ENTER_CONTEST_FAINTED - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkCantEnterFainted + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST, LilycoveCity_ContestLobby_EventScript_LinkCantEnterLowRank + goto_if_eq VAR_RESULT, CAN_ENTER_CONTEST_EQUAL_RANK, LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest + goto_if_eq VAR_RESULT, CAN_ENTER_CONTEST_HIGH_RANK, LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST_EGG, LilycoveCity_ContestLobby_EventScript_LinkCantEnterEgg + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST_FAINTED, LilycoveCity_ContestLobby_EventScript_LinkCantEnterFainted end LilycoveCity_ContestLobby_EventScript_LinkCantEnterLowRank:: @@ -760,29 +741,19 @@ LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest:: end LilycoveCity_ContestLobby_EventScript_TrySetUpLinkContest:: - compare VAR_TEMP_D, 1 - goto_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupType - compare VAR_TEMP_D, 2 - goto_if_ge LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_TEMP_D, 1, LilycoveCity_ContestLobby_EventScript_SetLinkGroupType + goto_if_ge VAR_TEMP_D, 2, LilycoveCity_ContestLobby_EventScript_CancelLinkContest message LilycoveCity_ContestLobby_Text_PleaseWaitBButtonCancel waitmessage copyvar VAR_0x8004, VAR_RESULT - compare VAR_TEMP_C, 0 - call_if_eq LilycoveCity_ContestLobby_EventScript_TryLinkEMode - compare VAR_TEMP_C, 1 - call_if_eq LilycoveCity_ContestLobby_EventScript_TryLinkGMode - compare VAR_TEMP_C, 2 - goto_if_ge LilycoveCity_ContestLobby_EventScript_CancelLinkContest - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkError - compare VAR_RESULT, LINKUP_FAILED_CONTEST_GMODE - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkModeDifference + call_if_eq VAR_TEMP_C, 0, LilycoveCity_ContestLobby_EventScript_TryLinkEMode + call_if_eq VAR_TEMP_C, 1, LilycoveCity_ContestLobby_EventScript_TryLinkGMode + goto_if_ge VAR_TEMP_C, 2, LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices + goto_if_eq VAR_RESULT, LINKUP_FAILED, LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, LilycoveCity_ContestLobby_EventScript_CancelLinkError + goto_if_eq VAR_RESULT, LINKUP_FAILED_CONTEST_GMODE, LilycoveCity_ContestLobby_EventScript_CancelLinkModeDifference messageinstant LilycoveCity_ContestLobby_Text_Transmitting contestlinktransfer switch VAR_0x8004 @@ -849,16 +820,11 @@ LilycoveCity_ContestLobby_EventScript_StartLinkContest:: end LilycoveCity_ContestLobby_EventScript_SetLinkGroupType:: - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_COOL - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupCoolContest - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_BEAUTY - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupBeautyContest - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_CUTE - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupCuteContest - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_SMART - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupSmartContest - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_TOUGH - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupToughContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_COOL, LilycoveCity_ContestLobby_EventScript_SetLinkGroupCoolContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_BEAUTY, LilycoveCity_ContestLobby_EventScript_SetLinkGroupBeautyContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_CUTE, LilycoveCity_ContestLobby_EventScript_SetLinkGroupCuteContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_SMART, LilycoveCity_ContestLobby_EventScript_SetLinkGroupSmartContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_TOUGH, LilycoveCity_ContestLobby_EventScript_SetLinkGroupToughContest goto LilycoveCity_ContestLobby_EventScript_DecideLinkLeader end @@ -895,23 +861,17 @@ LilycoveCity_ContestLobby_EventScript_DecideLinkLeader:: LilycoveCity_ContestLobby_EventScript_TryLeadGroup:: call LilycoveCity_ContestLobby_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq LilycoveCity_ContestLobby_EventScript_DecideLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq LilycoveCity_ContestLobby_EventScript_TryLeadGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided + goto_if_eq VAR_RESULT, LINKUP_FAILED, LilycoveCity_ContestLobby_EventScript_DecideLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, LilycoveCity_ContestLobby_EventScript_TryLeadGroup release end LilycoveCity_ContestLobby_EventScript_TryJoinGroup:: call LilycoveCity_ContestLobby_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq LilycoveCity_ContestLobby_EventScript_DecideLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq LilycoveCity_ContestLobby_EventScript_TryJoinGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided + goto_if_eq VAR_RESULT, LINKUP_FAILED, LilycoveCity_ContestLobby_EventScript_DecideLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, LilycoveCity_ContestLobby_EventScript_TryJoinGroup release end diff --git a/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc b/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc index a5e8b40cf..ca7481b53 100644 --- a/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc +++ b/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc @@ -7,8 +7,7 @@ LilycoveCity_CoveLilyMotel_2F_EventScript_GameDesigner:: call_if_unset FLAG_TEMP_2, LilycoveCity_CoveLilyMotel_2F_EventScript_ShowMeCompletedDex call_if_set FLAG_TEMP_2, LilycoveCity_CoveLilyMotel_2F_EventScript_ShowDiploma specialvar VAR_RESULT, HasAllHoennMons - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_CoveLilyMotel_2F_EventScript_AllHoennMonsFanfare + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_CoveLilyMotel_2F_EventScript_AllHoennMonsFanfare release end diff --git a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc index 3e7c4c4f6..d7d152408 100644 --- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc @@ -60,8 +60,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_1F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect @@ -70,8 +69,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_2F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect @@ -80,8 +78,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_3F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect @@ -90,8 +87,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_4F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect @@ -100,8 +96,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_5thFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_5F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc index 224d3c778..8c67ee149 100644 --- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc @@ -4,10 +4,8 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts:: LilycoveCity_DepartmentStoreRooftop_OnTransition: getpokenewsactive POKENEWS_LILYCOVE - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_HideSaleWoman + call_if_eq VAR_RESULT, TRUE, LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman + call_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_HideSaleWoman end LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman:: @@ -52,8 +50,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_Man:: lock faceplayer getpokenewsactive POKENEWS_LILYCOVE - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale + call_if_eq VAR_RESULT, TRUE, LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale msgbox LilycoveCity_DepartmentStoreRooftop_Text_SetDatesForClearOutSales, MSGBOX_DEFAULT release end @@ -126,23 +123,15 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade:: return LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: - compare VAR_TEMP_1, 0 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater - compare VAR_TEMP_1, 1 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop - compare VAR_TEMP_1, 2 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink + call_if_eq VAR_TEMP_1, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater + call_if_eq VAR_TEMP_1, 1, LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop + call_if_eq VAR_TEMP_1, 2, LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink checkitemspace VAR_TEMP_0 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink - compare VAR_TEMP_1, 0 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater - compare VAR_TEMP_1, 1 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop - compare VAR_TEMP_1, 2 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink + call_if_eq VAR_TEMP_1, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater + call_if_eq VAR_TEMP_1, 1, LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop + call_if_eq VAR_TEMP_1, 2, LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade updatemoneybox bufferitemname STR_VAR_1, VAR_TEMP_0 playse SE_VEND @@ -152,11 +141,9 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: bufferstdstring STR_VAR_3, STDSTRING_ITEMS msgbox gText_PutItemInPocket, MSGBOX_DEFAULT random 64 @ 1/64 chance of an additional drink dropping - compare VAR_RESULT, 0 - goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink + goto_if_ne VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink checkitemspace VAR_TEMP_0 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 @@ -164,11 +151,9 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: bufferstdstring STR_VAR_3, STDSTRING_ITEMS msgbox gText_PutItemInPocket, MSGBOX_DEFAULT random 64 @ 1/64 * the prev 1/64 chance of a third additional drink dropping, ~ 0.02% chance - compare VAR_RESULT, 0 - goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink + goto_if_ne VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink checkitemspace VAR_TEMP_0 - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink + goto_if_eq VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc index 45a0a844e..b0656cfd4 100644 --- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc @@ -11,12 +11,10 @@ LilycoveCity_DepartmentStore_1F_EventScript_LotteryClerk:: lock faceplayer dotimebasedevents - compare VAR_POKELOT_PRIZE_ITEM, ITEM_NONE - goto_if_ne LilycoveCity_DepartmentStore_1F_EventScript_GivePrizeFromEarlier + goto_if_ne VAR_POKELOT_PRIZE_ITEM, ITEM_NONE, LilycoveCity_DepartmentStore_1F_EventScript_GivePrizeFromEarlier goto_if_set FLAG_DAILY_PICKED_LOTO_TICKET, LilycoveCity_DepartmentStore_1F_EventScript_ComeBackTomorrow msgbox LilycoveCity_DepartmentStore_1F_Text_LotteryCornerDrawTicket, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_PleaseVisitAgain + goto_if_eq VAR_RESULT, NO, LilycoveCity_DepartmentStore_1F_EventScript_PleaseVisitAgain setflag FLAG_DAILY_PICKED_LOTO_TICKET message LilycoveCity_DepartmentStore_1F_Text_PleasePickTicket waitmessage @@ -34,25 +32,17 @@ LilycoveCity_DepartmentStore_1F_EventScript_LotteryClerk:: delay 10 applymovement LOCALID_LOTTERY_CLERK, Common_Movement_FacePlayer waitmovement 0 - compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_NoMatch + goto_if_eq VAR_0x8004, 0, LilycoveCity_DepartmentStore_1F_EventScript_NoMatch incrementgamestat GAME_STAT_WON_POKEMON_LOTTERY - compare VAR_0x8006, 0 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPartyMon - compare VAR_0x8006, 1 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPCMon + call_if_eq VAR_0x8006, 0, LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPartyMon + call_if_eq VAR_0x8006, 1, LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPCMon bufferitemname STR_VAR_1, VAR_0x8005 - compare VAR_0x8004, 1 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TwoDigitMatch - compare VAR_0x8004, 2 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_ThreeDigitMatch - compare VAR_0x8004, 3 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_FourDigitMatch - compare VAR_0x8004, 4 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_FullMatch + call_if_eq VAR_0x8004, 1, LilycoveCity_DepartmentStore_1F_EventScript_TwoDigitMatch + call_if_eq VAR_0x8004, 2, LilycoveCity_DepartmentStore_1F_EventScript_ThreeDigitMatch + call_if_eq VAR_0x8004, 3, LilycoveCity_DepartmentStore_1F_EventScript_FourDigitMatch + call_if_eq VAR_0x8004, 4, LilycoveCity_DepartmentStore_1F_EventScript_FullMatch giveitem VAR_0x8005 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_RecordPrizeNoRoom + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStore_1F_EventScript_RecordPrizeNoRoom special TryPutLotteryWinnerReportOnAir goto LilycoveCity_DepartmentStore_1F_EventScript_PleaseVisitAgain2 end @@ -115,8 +105,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_NoRoomForPrize:: LilycoveCity_DepartmentStore_1F_EventScript_GivePrizeFromEarlier:: msgbox LilycoveCity_DepartmentStore_1F_Text_PrizeWeveBeenHolding, MSGBOX_DEFAULT giveitem VAR_POKELOT_PRIZE_ITEM - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_NoRoomForPrize + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStore_1F_EventScript_NoRoomForPrize copyvar VAR_0x8004, VAR_POKELOT_PRIZE_PLACE copyvar VAR_0x8005, VAR_POKELOT_PRIZE_ITEM special TryPutLotteryWinnerReportOnAir diff --git a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc index d1d074c8c..a9683d13c 100644 --- a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc @@ -129,10 +129,8 @@ LilycoveCity_DepartmentStore_5F_EventScript_Woman:: lockall applymovement LOCALID_WOMAN, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 0 - goto_if_eq LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - goto_if_ge LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 0, LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal goto LilycoveCity_DepartmentStore_5F_EventScript_WomanLegendaryWeather end diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc index d8dfa0f21..63010dc4c 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -21,25 +21,18 @@ LilycoveCity_Harbor_EventScript_FerryAttendant:: call LilycoveCity_Harbor_EventScript_GetMysticTicketState call LilycoveCity_Harbor_EventScript_GetFirstTimeShowingTicket call LilycoveCity_Harbor_EventScript_GetHasTicketsState - compare VAR_TEMP_C, 2 - goto_if_eq LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime - compare VAR_TEMP_B, 1 - goto_if_eq LilycoveCity_Harbor_EventScript_EonTicketFirstTime - compare VAR_TEMP_B, 2 - goto_if_eq LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime - compare VAR_TEMP_B, 4 - goto_if_eq LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime - compare VAR_TEMP_B, 8 - goto_if_eq LilycoveCity_Harbor_EventScript_MysticTicketFirstTime - compare VAR_TEMP_B, 0 - goto_if_ne LilycoveCity_Harbor_EventScript_MultipleEventTicketsFirstTime + goto_if_eq VAR_TEMP_C, 2, LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime + goto_if_eq VAR_TEMP_B, 1, LilycoveCity_Harbor_EventScript_EonTicketFirstTime + goto_if_eq VAR_TEMP_B, 2, LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime + goto_if_eq VAR_TEMP_B, 4, LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime + goto_if_eq VAR_TEMP_B, 8, LilycoveCity_Harbor_EventScript_MysticTicketFirstTime + goto_if_ne VAR_TEMP_B, 0, LilycoveCity_Harbor_EventScript_MultipleEventTicketsFirstTime goto LilycoveCity_Harbor_EventScript_NoFirstTimeEventTickets end @ First goto_if_eq is unnecessary; identical scripts LilycoveCity_Harbor_EventScript_NoFirstTimeEventTickets:: - compare VAR_TEMP_A, 0 - goto_if_eq LilycoveCity_Harbor_EventScript_NoEventTickets + goto_if_eq VAR_TEMP_A, 0, LilycoveCity_Harbor_EventScript_NoEventTickets msgbox LilycoveCity_Harbor_Text_MayISeeYourTicket, MSGBOX_DEFAULT message LilycoveCity_Harbor_Text_FlashTicketWhereTo waitmessage @@ -92,8 +85,7 @@ LilycoveCity_Harbor_EventScript_GoToFarawayIsland:: LilycoveCity_Harbor_EventScript_GoToSlateport:: msgbox LilycoveCity_Harbor_Text_SlateportItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind + goto_if_eq VAR_RESULT, NO, LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_LILYCOVE call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_SS_TIDAL_CORRIDOR, 1, 10 @@ -103,8 +95,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateport:: LilycoveCity_Harbor_EventScript_GoToBattleFrontier:: msgbox LilycoveCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind + goto_if_eq VAR_RESULT, NO, LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate @@ -115,8 +106,7 @@ LilycoveCity_Harbor_EventScript_GetEonTicketState:: setvar VAR_TEMP_E, 0 goto_if_unset FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, Common_EventScript_NopReturn checkitem ITEM_EON_TICKET - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_NopReturn setvar VAR_TEMP_E, 1 goto_if_set FLAG_SHOWN_EON_TICKET, Common_EventScript_NopReturn setvar VAR_TEMP_E, 2 @@ -126,8 +116,7 @@ LilycoveCity_Harbor_EventScript_GetAuroraTicketState:: setvar VAR_TEMP_D, 0 goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, Common_EventScript_NopReturn checkitem ITEM_AURORA_TICKET - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_NopReturn setvar VAR_TEMP_D, 1 goto_if_set FLAG_SHOWN_AURORA_TICKET, Common_EventScript_NopReturn setvar VAR_TEMP_D, 2 @@ -137,8 +126,7 @@ LilycoveCity_Harbor_EventScript_GetOldSeaMapState:: setvar VAR_TEMP_C, 0 goto_if_unset FLAG_ENABLE_SHIP_FARAWAY_ISLAND, Common_EventScript_NopReturn checkitem ITEM_OLD_SEA_MAP - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_NopReturn setvar VAR_TEMP_C, 1 goto_if_set FLAG_SHOWN_OLD_SEA_MAP, Common_EventScript_NopReturn setvar VAR_TEMP_C, 2 @@ -148,8 +136,7 @@ LilycoveCity_Harbor_EventScript_GetMysticTicketState:: setvar VAR_TEMP_9, 0 goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, Common_EventScript_NopReturn checkitem ITEM_MYSTIC_TICKET - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_NopReturn setvar VAR_TEMP_9, 1 goto_if_set FLAG_SHOWN_MYSTIC_TICKET, Common_EventScript_NopReturn setvar VAR_TEMP_9, 2 @@ -157,14 +144,10 @@ LilycoveCity_Harbor_EventScript_GetMysticTicketState:: LilycoveCity_Harbor_EventScript_GetFirstTimeShowingTicket:: setvar VAR_TEMP_B, 0 - compare VAR_TEMP_E, 2 - call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingEonTicket - compare VAR_TEMP_D, 2 - call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingAuroraTicket - compare VAR_TEMP_C, 2 - call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingOldSeaMap - compare VAR_TEMP_9, 2 - call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingMysticTicket + call_if_eq VAR_TEMP_E, 2, LilycoveCity_Harbor_EventScript_SetFirstTimeShowingEonTicket + call_if_eq VAR_TEMP_D, 2, LilycoveCity_Harbor_EventScript_SetFirstTimeShowingAuroraTicket + call_if_eq VAR_TEMP_C, 2, LilycoveCity_Harbor_EventScript_SetFirstTimeShowingOldSeaMap + call_if_eq VAR_TEMP_9, 2, LilycoveCity_Harbor_EventScript_SetFirstTimeShowingMysticTicket return LilycoveCity_Harbor_EventScript_SetFirstTimeShowingEonTicket:: @@ -185,14 +168,10 @@ LilycoveCity_Harbor_EventScript_SetFirstTimeShowingMysticTicket:: LilycoveCity_Harbor_EventScript_GetHasTicketsState:: setvar VAR_TEMP_A, 0 - compare VAR_TEMP_E, 1 - call_if_eq LilycoveCity_Harbor_EventScript_SetHasEonTicket - compare VAR_TEMP_D, 1 - call_if_eq LilycoveCity_Harbor_EventScript_SetHasAuroraTicket - compare VAR_TEMP_C, 1 - call_if_eq LilycoveCity_Harbor_EventScript_SetHasOldSeaMap - compare VAR_TEMP_9, 1 - call_if_eq LilycoveCity_Harbor_EventScript_SetHasMysticTicket + call_if_eq VAR_TEMP_E, 1, LilycoveCity_Harbor_EventScript_SetHasEonTicket + call_if_eq VAR_TEMP_D, 1, LilycoveCity_Harbor_EventScript_SetHasAuroraTicket + call_if_eq VAR_TEMP_C, 1, LilycoveCity_Harbor_EventScript_SetHasOldSeaMap + call_if_eq VAR_TEMP_9, 1, LilycoveCity_Harbor_EventScript_SetHasMysticTicket return LilycoveCity_Harbor_EventScript_SetHasEonTicket:: @@ -259,26 +238,18 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime:: waitmovement 0 applymovement LOCALID_FERRY_SAILOR, Common_Movement_Delay48 waitmovement 0 - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayEast addobject LOCALID_BRINEY - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_BrineyFaceSailorNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_BrineyFaceSailorEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_BrineyFaceSailorNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_BrineyFaceSailorEast msgbox EventTicket_Text_BrineyHoldOnASecond, MSGBOX_DEFAULT - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_BrineyFacePlayerNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_BrineyFacePlayerEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_BrineyFacePlayerNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_BrineyFacePlayerEast msgbox EventTicket_Text_BrineyLetsSail, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepart warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38 @@ -364,10 +335,8 @@ LilycoveCity_Harbor_EventScript_BoardFerryWithSailor:: waitmovement 0 delay 30 removeobject LOCALID_FERRY_SAILOR - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast delay 30 hideobjectat OBJ_EVENT_ID_PLAYER, 0 setvar VAR_0x8004, LOCALID_SS_TIDAL @@ -395,8 +364,7 @@ LilycoveCity_Harbor_EventScript_NoTicket:: @ Unused LilycoveCity_Harbor_EventScript_GoToSlateportUnused:: msgbox LilycoveCity_Harbor_Text_SlateportItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind + goto_if_eq VAR_RESULT, NO, LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_LILYCOVE call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_SS_TIDAL_CORRIDOR, 1, 10 @@ -407,8 +375,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateportUnused:: @ Unused LilycoveCity_Harbor_EventScript_GoToBattleFrontierUnused:: msgbox LilycoveCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind + goto_if_eq VAR_RESULT, NO, LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate @@ -428,10 +395,8 @@ LilycoveCity_Harbor_EventScript_BoardFerry:: waitmovement 0 delay 30 hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast delay 30 hideobjectat OBJ_EVENT_ID_PLAYER, 0 setvar VAR_0x8004, LOCALID_SS_TIDAL diff --git a/data/maps/LilycoveCity_House2/scripts.inc b/data/maps/LilycoveCity_House2/scripts.inc index c7664c641..965d82acf 100644 --- a/data/maps/LilycoveCity_House2/scripts.inc +++ b/data/maps/LilycoveCity_House2/scripts.inc @@ -7,8 +7,7 @@ LilycoveCity_House2_EventScript_FatMan:: goto_if_set FLAG_RECEIVED_TM44, LilycoveCity_House2_EventScript_ReceivedRest msgbox LilycoveCity_House2_Text_NotAwakeYetHaveThis, MSGBOX_DEFAULT giveitem ITEM_TM44 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM44 msgbox LilycoveCity_House2_Text_SleepIsEssential, MSGBOX_DEFAULT release diff --git a/data/maps/LilycoveCity_House3/scripts.inc b/data/maps/LilycoveCity_House3/scripts.inc index de76c58b6..57e680473 100644 --- a/data/maps/LilycoveCity_House3/scripts.inc +++ b/data/maps/LilycoveCity_House3/scripts.inc @@ -11,8 +11,7 @@ LilycoveCity_House3_EventScript_PokefanF:: lock faceplayer msgbox LilycoveCity_House3_Text_LearnFromMasterOfPokeblocks, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_House3_EventScript_DeclinePokeblockLearn + goto_if_eq VAR_RESULT, NO, LilycoveCity_House3_EventScript_DeclinePokeblockLearn msgbox LilycoveCity_House3_Text_ExplainPokeblocks, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection diff --git a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc index 12c4ead3e..2d9d446f9 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc @@ -14,10 +14,8 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_Curator:: message LilycoveCity_LilycoveMuseum_1F_Text_ImCuratorHaveYouViewedOurPaintings waitmessage multichoice 20, 8, MULTI_VIEWED_PAINTINGS, TRUE - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_SawPaintings - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_NotYet + goto_if_eq VAR_RESULT, 0, LilycoveCity_LilycoveMuseum_1F_EventScript_SawPaintings + goto_if_eq VAR_RESULT, 1, LilycoveCity_LilycoveMuseum_1F_EventScript_NotYet end LilycoveCity_LilycoveMuseum_1F_EventScript_NotYet:: @@ -26,10 +24,8 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_NotYet:: LilycoveCity_LilycoveMuseum_1F_EventScript_SawPaintings:: msgbox LilycoveCity_LilycoveMuseum_1F_Text_HaveYouAnInterestInPaintings, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_NotInterested - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_InterestedInPaintings + goto_if_eq VAR_RESULT, NO, LilycoveCity_LilycoveMuseum_1F_EventScript_NotInterested + goto_if_eq VAR_RESULT, YES, LilycoveCity_LilycoveMuseum_1F_EventScript_InterestedInPaintings end LilycoveCity_LilycoveMuseum_1F_EventScript_NotInterested:: diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc index bf220b04f..9212ca67d 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc @@ -121,8 +121,7 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_GiveGlassOrnament:: applymovement LOCALID_CURATOR, Common_Movement_FacePlayer msgbox LilycoveCity_LilycoveMuseum_2F_Text_TokenOfGratitude, MSGBOX_DEFAULT givedecoration DECOR_GLASS_ORNAMENT - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_NoRoomForGlassOrnament + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_LilycoveMuseum_2F_EventScript_NoRoomForGlassOrnament setflag FLAG_RECEIVED_GLASS_ORNAMENT closemessage releaseall diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc index eead1f675..db042653e 100644 --- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc +++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc @@ -18,20 +18,16 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget:: msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMonShouldForget, MSGBOX_DEFAULT special ChoosePartyMon waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain special IsSelectedMonEgg - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_EggCantForgetMoves + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_MoveDeletersHouse_EventScript_EggCantForgetMoves special GetNumMovesSelectedMonHas - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_MonOnlyKnowsOneMove + goto_if_eq VAR_RESULT, 1, LilycoveCity_MoveDeletersHouse_EventScript_MonOnlyKnowsOneMove msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMoveShouldBeForgotten, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK special MoveDeleterChooseMoveToForget fadescreen FADE_FROM_BLACK - compare VAR_0x8005, MAX_MON_MOVES - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget + goto_if_eq VAR_0x8005, MAX_MON_MOVES, LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget special BufferMoveDeleterNicknameAndMove msgbox LilycoveCity_MoveDeletersHouse_Text_MonsMoveShouldBeForgotten, MSGBOX_YESNO switch VAR_RESULT @@ -42,8 +38,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget:: LilycoveCity_MoveDeletersHouse_EventScript_TryForgetMove:: special IsLastMonThatKnowsSurf - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_LastMonWithSurf + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_MoveDeletersHouse_EventScript_LastMonWithSurf special MoveDeleterForgetMove playfanfare MUS_MOVE_DELETED waitfanfare diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc index 03f2657e7..a7f853afa 100644 --- a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc @@ -13,10 +13,8 @@ LilycoveCity_PokemonCenter_1F_OnTransition: @ SetLilycoveLadyGfx returns TRUE if its the Contest Lady LilycoveCity_PokemonCenter_1F_EventScript_SetLilycoveLadyGfx:: special SetLilycoveLadyGfx - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_HideContestLadyMon - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ShowContestLadyMon + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_HideContestLadyMon + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_ShowContestLadyMon end LilycoveCity_PokemonCenter_1F_EventScript_HideContestLadyMon:: diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc index 63e708488..ba8001324 100644 --- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc +++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc @@ -73,10 +73,8 @@ LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlHideFromPlayer: LilycoveCity_PokemonTrainerFanClub_OnTransition: call LilycoveCity_PokemonTrainerFanClub_EventScript_HideOrShowInterviewer - compare VAR_LILYCOVE_FAN_CLUB_STATE, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_SetFanMemberPositionsForFirstFanMeeting - compare VAR_LILYCOVE_FAN_CLUB_STATE, 2 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_SetFanMemberPositionsForFirstFanMeeting + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 2, LilycoveCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions end LilycoveCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions:: @@ -84,42 +82,33 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions:: call LilycoveCity_PokemonTrainerFanClub_EventScript_CheckSetUpTVShow setvar VAR_0x8004, FANCLUB_MEMBER1 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember1ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember1ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER2 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember2ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember2ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER3 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember3ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember3ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER4 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember4ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember4ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER5 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember5ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember5ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER6 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember6ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember6ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER7 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember7ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember7ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER8 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember8ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember8ToFarTable end LilycoveCity_PokemonTrainerFanClub_EventScript_HideOrShowInterviewer:: specialvar VAR_RESULT, ShouldHideFanClubInterviewer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_HideInterviewer + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_HideInterviewer clearflag FLAG_HIDE_LILYCOVE_FAN_CLUB_INTERVIEWER clearflag FLAG_FAN_CLUB_STRENGTH_SHARED return @@ -134,38 +123,29 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_CheckSetUpTVShow:: setvar VAR_0x8005, NUM_TRAINER_FAN_CLUB_MEMBERS setvar VAR_0x8004, FANCLUB_MEMBER1 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER2 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER3 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER4 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER5 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER6 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER7 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER8 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan - compare VAR_0x8005, 5 - goto_if_ge LilycoveCity_PokemonTrainerFanClub_EventScript_TrySetUpTVShow + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + goto_if_ge VAR_0x8005, 5, LilycoveCity_PokemonTrainerFanClub_EventScript_TrySetUpTVShow return LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan:: @@ -222,22 +202,18 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Man:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER6 special BufferFanClubTrainerName - compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayerNotChampion + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayerNotChampion specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ManOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_ManOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_TrainersPowerIsOutOfTheOrdinary, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ManOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_ManOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YoureOneWeWantToWin, MSGBOX_DEFAULT release end @@ -262,22 +238,18 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Lass:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER1 special BufferFanClubTrainerName - compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayerNotChampion + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayerNotChampion specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LassOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_LassOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_ICantHelpLikingBrawly, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LassOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_LassOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_ImPullingForYou, MSGBOX_DEFAULT release end @@ -302,22 +274,18 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanM:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER2 special BufferFanClubTrainerName - compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayerNotChampion + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayerNotChampion specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_LongWayToGoComparedToNorman, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YouveSurpassedYourFather, MSGBOX_DEFAULT release end @@ -342,22 +310,18 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirl:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER3 special BufferFanClubTrainerName - compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayerNotChampion + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayerNotChampion specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_EveryoneThinksTrainerIsCool, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_OhWoweeItsPlayer, MSGBOX_DEFAULT release end @@ -383,19 +347,16 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoy:: setvar VAR_0x8004, FANCLUB_MEMBER4 special BufferFanClubTrainerName specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_TrainerIsWickedlyCool, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_WantToBeStrongLikeYou, MSGBOX_DEFAULT release end @@ -416,19 +377,16 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Boy:: setvar VAR_0x8004, FANCLUB_MEMBER5 special BufferFanClubTrainerName specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_BoyPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_BoyPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_BoyOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_BoyOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_ThinkTrainerIsNumberOne, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_BoyPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_BoyOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_BoyOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YoureAmazingAfterAll, MSGBOX_DEFAULT release end @@ -449,19 +407,16 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Woman:: setvar VAR_0x8004, FANCLUB_MEMBER7 special BufferFanClubTrainerName specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_WomanPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_WomanPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_WomanOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_WomanOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_TrainerIsStandout, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_WomanPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_WomanOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_WomanOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YouChangedMyMind, MSGBOX_DEFAULT release end @@ -482,19 +437,16 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertF:: setvar VAR_0x8004, FANCLUB_MEMBER8 special BufferFanClubTrainerName specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_HaventRealizedPotential, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YouImpressive, MSGBOX_DEFAULT release end @@ -521,8 +473,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Interviewer:: LilycoveCity_PokemonTrainerFanClub_EventScript_Interview:: setvar VAR_0x8005, TVSHOW_FAN_CLUB_SPECIAL special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_AlreadyInterviewed2 + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_AlreadyInterviewed2 copyvar VAR_0x800A, VAR_0x8006 setvar VAR_0x8004, FANCLUB_MEMBER1 special BufferFanClubTrainerName @@ -532,10 +483,8 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Interview:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion end LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion:: @@ -547,10 +496,8 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion:: setvar VAR_0x8004, FANCLUB_MEMBER1 special BufferFanClubTrainerName msgbox LilycoveCity_PokemonTrainerFanClub_Text_HaveYouForgottenTrainer, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_AskForOpinion + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonTrainerFanClub_EventScript_AskForOpinion end LilycoveCity_PokemonTrainerFanClub_EventScript_AskForOpinion:: @@ -562,10 +509,8 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_AskForOpinion:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion end LilycoveCity_PokemonTrainerFanClub_EventScript_RateTrainer:: @@ -592,10 +537,8 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_CancelRateTrainer:: setvar VAR_0x8004, FANCLUB_MEMBER1 special BufferFanClubTrainerName msgbox LilycoveCity_PokemonTrainerFanClub_Text_HaveYouForgottenTrainer2, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_RateTrainer + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonTrainerFanClub_EventScript_RateTrainer end LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer:: diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc index f8a7244bf..69961bf36 100644 --- a/data/maps/LittlerootTown/scripts.inc +++ b/data/maps/LittlerootTown/scripts.inc @@ -42,23 +42,15 @@ LittlerootTown_MapScripts:: LittlerootTown_OnTransition: setflag FLAG_VISITED_LITTLEROOT_TOWN call Common_EventScript_SetupRivalGfxId - compare VAR_LITTLEROOT_INTRO_STATE, 2 - call_if_eq LittlerootTown_EventScript_MoveMomToMaysDoor + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 2, LittlerootTown_EventScript_MoveMomToMaysDoor call_if_unset FLAG_RESCUED_BIRCH, LittlerootTown_EventScript_SetTwinPos - compare VAR_LITTLEROOT_TOWN_STATE, 3 - call_if_eq LittlerootTown_EventScript_SetMomStandingInFrontOfDoorPos - compare VAR_LITTLEROOT_HOUSES_STATE_MAY, 4 - call_if_eq LittlerootTown_EventScript_SetExitedHouseAfterLatiSSTicketEvent - compare VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 4 - call_if_eq LittlerootTown_EventScript_SetExitedHouseAfterLatiSSTicketEvent - compare VAR_OLDALE_RIVAL_STATE, 1 - call_if_eq LittlerootTown_EventScript_MoveRivalFromOldale - compare VAR_LITTLEROOT_RIVAL_STATE, 3 - call_if_eq LittlerootTown_EventScript_SetRivalLeftForRoute103 - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 1 - call_if_eq LittlerootTown_EventScript_HideMapNamePopup - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - call_if_eq LittlerootTown_EventScript_LeftLabAfterDexUpgrade + call_if_eq VAR_LITTLEROOT_TOWN_STATE, 3, LittlerootTown_EventScript_SetMomStandingInFrontOfDoorPos + call_if_eq VAR_LITTLEROOT_HOUSES_STATE_MAY, 4, LittlerootTown_EventScript_SetExitedHouseAfterLatiSSTicketEvent + call_if_eq VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 4, LittlerootTown_EventScript_SetExitedHouseAfterLatiSSTicketEvent + call_if_eq VAR_OLDALE_RIVAL_STATE, 1, LittlerootTown_EventScript_MoveRivalFromOldale + call_if_eq VAR_LITTLEROOT_RIVAL_STATE, 3, LittlerootTown_EventScript_SetRivalLeftForRoute103 + call_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 1, LittlerootTown_EventScript_HideMapNamePopup + call_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_EventScript_LeftLabAfterDexUpgrade end LittlerootTown_EventScript_LeftLabAfterDexUpgrade:: @@ -88,8 +80,7 @@ LittlerootTown_EventScript_MoveMomToMaysDoor:: return LittlerootTown_EventScript_SetTwinPos:: - compare VAR_LITTLEROOT_TOWN_STATE, 0 - goto_if_eq LittlerootTown_EventScript_SetTwinGuardingRoutePos + goto_if_eq VAR_LITTLEROOT_TOWN_STATE, 0, LittlerootTown_EventScript_SetTwinGuardingRoutePos setobjectxyperm LOCALID_TWIN, 10, 1 setobjectmovementtype LOCALID_TWIN, MOVEMENT_TYPE_FACE_UP return @@ -103,10 +94,8 @@ LittlerootTown_EventScript_SetMomStandingInFrontOfDoorPos:: clearflag FLAG_HIDE_LITTLEROOT_TOWN_MOM_OUTSIDE setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_DOWN checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_SetMomInFrontOfDoorMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_SetMomInFrontOfDoorFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetMomInFrontOfDoorMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_SetMomInFrontOfDoorFemale return LittlerootTown_EventScript_SetMomInFrontOfDoorMale:: @@ -243,8 +232,7 @@ LittlerootTown_EventScript_SetRivalBirchPosForDexUpgrade:: addobject LOCALID_BIRCH addobject LOCALID_RIVAL checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeMale + goto_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeMale goto LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeFemale end @@ -271,8 +259,7 @@ LittlerootTown_EventScript_Twin:: faceplayer goto_if_set FLAG_ADVENTURE_STARTED, LittlerootTown_EventScript_GoodLuck goto_if_set FLAG_RESCUED_BIRCH, LittlerootTown_EventScript_YouSavedBirch - compare VAR_LITTLEROOT_TOWN_STATE, 0 - goto_if_ne LittlerootTown_EventScript_GoSaveBirch + goto_if_ne VAR_LITTLEROOT_TOWN_STATE, 0, LittlerootTown_EventScript_GoSaveBirch msgbox LittlerootTown_Text_IfYouGoInGrassPokemonWillJumpOut, MSGBOX_DEFAULT release end @@ -416,10 +403,8 @@ LittlerootTown_EventScript_BirchsLabSign:: LittlerootTown_EventScript_BrendansHouseSign:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_PlayersHouseSignMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_BirchsHouseSignFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_PlayersHouseSignMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_BirchsHouseSignFemale releaseall end @@ -434,10 +419,8 @@ LittlerootTown_EventScript_BirchsHouseSignFemale:: LittlerootTown_EventScript_MaysHouseSign:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_BirchsHouseSignMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_PlayersHouseSignFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_BirchsHouseSignMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_PlayersHouseSignFemale releaseall end @@ -489,28 +472,20 @@ LittlerootTown_EventScript_GiveRunningShoesTrigger5:: LittlerootTown_EventScript_GiveRunningShoesTrigger:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_MomNoticePlayerMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_MomNoticePlayerFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_MomNoticePlayerMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_MomNoticePlayerFemale checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_SetHomeDoorCoordsMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_SetHomeDoorCoordsFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetHomeDoorCoordsMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_SetHomeDoorCoordsFemale msgbox LittlerootTown_Text_WaitPlayer, MSGBOX_DEFAULT closemessage checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_MomApproachPlayerMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_MomApproachPlayerFemale call LittlerootTown_EventScript_GiveRunningShoes checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_MomReturnHomeMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_MomReturnHomeFemale goto LittlerootTown_EventScript_SetReceivedRunningShoes end @@ -535,33 +510,21 @@ LittlerootTown_EventScript_MomNoticePlayerFemale:: return LittlerootTown_EventScript_MomApproachPlayerMale:: - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_EventScript_MomApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_EventScript_MomApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale2 - compare VAR_0x8008, 3 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale3 - compare VAR_0x8008, 4 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale4 - compare VAR_0x8008, 5 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale5 + call_if_eq VAR_0x8008, 0, LittlerootTown_EventScript_MomApproachPlayer0 + call_if_eq VAR_0x8008, 1, LittlerootTown_EventScript_MomApproachPlayer1 + call_if_eq VAR_0x8008, 2, LittlerootTown_EventScript_MomApproachPlayerMale2 + call_if_eq VAR_0x8008, 3, LittlerootTown_EventScript_MomApproachPlayerMale3 + call_if_eq VAR_0x8008, 4, LittlerootTown_EventScript_MomApproachPlayerMale4 + call_if_eq VAR_0x8008, 5, LittlerootTown_EventScript_MomApproachPlayerMale5 return LittlerootTown_EventScript_MomApproachPlayerFemale:: - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_EventScript_MomApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_EventScript_MomApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale2 - compare VAR_0x8008, 3 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale3 - compare VAR_0x8008, 4 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale4 - compare VAR_0x8008, 5 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale5 + call_if_eq VAR_0x8008, 0, LittlerootTown_EventScript_MomApproachPlayer0 + call_if_eq VAR_0x8008, 1, LittlerootTown_EventScript_MomApproachPlayer1 + call_if_eq VAR_0x8008, 2, LittlerootTown_EventScript_MomApproachPlayerFemale2 + call_if_eq VAR_0x8008, 3, LittlerootTown_EventScript_MomApproachPlayerFemale3 + call_if_eq VAR_0x8008, 4, LittlerootTown_EventScript_MomApproachPlayerFemale4 + call_if_eq VAR_0x8008, 5, LittlerootTown_EventScript_MomApproachPlayerFemale5 return LittlerootTown_EventScript_MomApproachPlayer0:: @@ -635,33 +598,21 @@ LittlerootTown_EventScript_MomApproachPlayerFemale5:: return LittlerootTown_EventScript_MomReturnHomeMale:: - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_EventScript_MomReturnHome0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_EventScript_MomReturnHome1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale2 - compare VAR_0x8008, 3 - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale3 - compare VAR_0x8008, 4 - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale4 - compare VAR_0x8008, 5 - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale5 + call_if_eq VAR_0x8008, 0, LittlerootTown_EventScript_MomReturnHome0 + call_if_eq VAR_0x8008, 1, LittlerootTown_EventScript_MomReturnHome1 + call_if_eq VAR_0x8008, 2, LittlerootTown_EventScript_MomReturnHomeMale2 + call_if_eq VAR_0x8008, 3, LittlerootTown_EventScript_MomReturnHomeMale3 + call_if_eq VAR_0x8008, 4, LittlerootTown_EventScript_MomReturnHomeMale4 + call_if_eq VAR_0x8008, 5, LittlerootTown_EventScript_MomReturnHomeMale5 return LittlerootTown_EventScript_MomReturnHomeFemale:: - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_EventScript_MomReturnHome0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_EventScript_MomReturnHome1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale2 - compare VAR_0x8008, 3 - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale3 - compare VAR_0x8008, 4 - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale4 - compare VAR_0x8008, 5 - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale5 + call_if_eq VAR_0x8008, 0, LittlerootTown_EventScript_MomReturnHome0 + call_if_eq VAR_0x8008, 1, LittlerootTown_EventScript_MomReturnHome1 + call_if_eq VAR_0x8008, 2, LittlerootTown_EventScript_MomReturnHomeFemale2 + call_if_eq VAR_0x8008, 3, LittlerootTown_EventScript_MomReturnHomeFemale3 + call_if_eq VAR_0x8008, 4, LittlerootTown_EventScript_MomReturnHomeFemale4 + call_if_eq VAR_0x8008, 5, LittlerootTown_EventScript_MomReturnHomeFemale5 return LittlerootTown_EventScript_MomReturnHome0:: @@ -924,10 +875,8 @@ LittlerootTown_EventScript_Mom:: lock faceplayer checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_SetHomeDoorCoordsMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_SetHomeDoorCoordsFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetHomeDoorCoordsMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_SetHomeDoorCoordsFemale call LittlerootTown_EventScript_GiveRunningShoes applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterUp waitmovement 0 diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc index 15bd96f25..cce8cd59b 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -9,8 +9,7 @@ LittlerootTown_BrendansHouse_1F_MapScripts:: .byte 0 LittlerootTown_BrendansHouse_1F_OnLoad: - compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_lt LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes + call_if_lt VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual end @@ -21,8 +20,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes:: LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual + goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual return LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual:: @@ -30,12 +28,9 @@ LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual:: return LittlerootTown_BrendansHouse_1F_OnTransition: - compare VAR_LITTLEROOT_INTRO_STATE, 3 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToDoor - compare VAR_LITTLEROOT_INTRO_STATE, 5 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToStairs - compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToTV + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToDoor + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToStairs + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToTV end LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToStairs:: @@ -156,23 +151,16 @@ LittlerootTown_BrendansHouse_1F_EventScript_MeetRival:: waitmovement 0 applymovement LOCALID_RIVAL, Common_Movement_Delay48 waitmovement 0 - compare VAR_0x8008, 1 - call_if_ne LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan + call_if_ne VAR_0x8008, 1, LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan playbgm MUS_ENCOUNTER_BRENDAN, TRUE - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer2 + call_if_eq VAR_0x8008, 0, LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer0 + call_if_eq VAR_0x8008, 1, LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer1 + call_if_eq VAR_0x8008, 2, LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer2 msgbox RivalsHouse_1F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs2 + call_if_eq VAR_0x8008, 0, LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs0 + call_if_eq VAR_0x8008, 1, LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs1 + call_if_eq VAR_0x8008, 2, LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs2 playse SE_EXIT removeobject LOCALID_RIVAL setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_BRENDAN diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc index b4db71e29..993172683 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc @@ -6,28 +6,23 @@ LittlerootTown_BrendansHouse_2F_MapScripts:: .byte 0 LittlerootTown_BrendansHouse_2F_OnTransition: - compare VAR_LITTLEROOT_RIVAL_STATE, 2 - call_if_lt LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan - compare VAR_LITTLEROOT_RIVAL_STATE, 3 - call_if_ge LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos - compare VAR_LITTLEROOT_INTRO_STATE, 4 - call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet + call_if_lt VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan + call_if_ge VAR_LITTLEROOT_RIVAL_STATE, 3, LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 4, PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet call SecretBase_EventScript_SetDecorationFlags setvar VAR_SECRET_BASE_INITIALIZED, 0 end LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos:: goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos - compare VAR_BIRCH_LAB_STATE, 2 - goto_if_ge LittlerootTown_BrendansHouse_2F_EventScript_Ret + goto_if_ge VAR_BIRCH_LAB_STATE, 2, LittlerootTown_BrendansHouse_2F_EventScript_Ret goto LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_Ret - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret @ Odd that the MaysHouse equivalent was used here instead + goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_2F_EventScript_Ret + @ Odd that the MaysHouse equivalent was used below instead + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 LittlerootTown_MaysHouse_2F_EventScript_Ret setobjectxyperm LOCALID_RIVAL, 0, 2 setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP return @@ -37,8 +32,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_Ret:: LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan:: checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan return LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan:: @@ -51,14 +45,12 @@ LittlerootTown_BrendansHouse_2F_OnWarp: LittlerootTown_BrendansHouse_2F_EventScript_CheckInitDecor:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq SecretBase_EventScript_InitDecorations + goto_if_eq VAR_RESULT, MALE, SecretBase_EventScript_InitDecorations end LittlerootTown_BrendansHouse_2F_EventScript_RivalsPokeBall:: lockall - compare VAR_LITTLEROOT_RIVAL_STATE, 2 - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan + goto_if_eq VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT releaseall end @@ -75,14 +67,10 @@ LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan:: waitmovement 0 delay 10 playbgm MUS_ENCOUNTER_BRENDAN, TRUE - compare VAR_FACING, DIR_NORTH - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth - compare VAR_FACING, DIR_WEST - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest - compare VAR_FACING, DIR_EAST - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast + call_if_eq VAR_FACING, DIR_NORTH, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth + call_if_eq VAR_FACING, DIR_SOUTH, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth + call_if_eq VAR_FACING, DIR_WEST, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest + call_if_eq VAR_FACING, DIR_EAST, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast setvar VAR_LITTLEROOT_RIVAL_STATE, 3 setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM @@ -250,10 +238,8 @@ LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanEast: LittlerootTown_BrendansHouse_2F_EventScript_PC:: lockall checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC + goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC end LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC:: diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc index b022402d0..b4c4775c3 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -9,8 +9,7 @@ LittlerootTown_MaysHouse_1F_MapScripts:: .byte 0 LittlerootTown_MaysHouse_1F_OnLoad: - compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_lt LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes + call_if_lt VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual end @@ -21,8 +20,7 @@ LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes:: LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual:: checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual return LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual:: @@ -30,12 +28,9 @@ LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual:: return LittlerootTown_MaysHouse_1F_OnTransition: - compare VAR_LITTLEROOT_INTRO_STATE, 3 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToDoor - compare VAR_LITTLEROOT_INTRO_STATE, 5 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs - compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToTV + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_MaysHouse_1F_EventScript_MoveMomToDoor + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_MaysHouse_1F_EventScript_MoveMomToTV end LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs:: @@ -123,8 +118,7 @@ RivalsHouse_1F_EventScript_RivalMom:: faceplayer goto_if_set FLAG_DEFEATED_RIVAL_ROUTE103, RivalsHouse_1F_EventScript_GoHomeEverySoOften goto_if_set FLAG_SYS_POKEMON_GET, RivalsHouse_1F_EventScript_RivalIsOnRoute103 - compare VAR_LITTLEROOT_RIVAL_STATE, 3 - goto_if_eq RivalsHouse_1F_EventScript_RivalTooBusy + goto_if_eq VAR_LITTLEROOT_RIVAL_STATE, 3, RivalsHouse_1F_EventScript_RivalTooBusy special GetRivalSonDaughterString msgbox RivalsHouse_1F_Text_LikeChildLikeFather, MSGBOX_DEFAULT release @@ -190,23 +184,16 @@ LittlerootTown_MaysHouse_1F_EventScript_MeetRival:: waitmovement 0 applymovement LOCALID_RIVAL, Common_Movement_Delay48 waitmovement 0 - compare VAR_0x8008, 1 - call_if_ne LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay + call_if_ne VAR_0x8008, 1, LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay playbgm MUS_ENCOUNTER_MAY, TRUE - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2 + call_if_eq VAR_0x8008, 0, LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer0 + call_if_eq VAR_0x8008, 1, LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer1 + call_if_eq VAR_0x8008, 2, LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2 msgbox RivalsHouse_1F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2 + call_if_eq VAR_0x8008, 0, LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs0 + call_if_eq VAR_0x8008, 1, LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1 + call_if_eq VAR_0x8008, 2, LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2 playse SE_EXIT removeobject LOCALID_RIVAL setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MAY diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc index af6877a88..7403f3fcf 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc @@ -6,28 +6,22 @@ LittlerootTown_MaysHouse_2F_MapScripts:: .byte 0 LittlerootTown_MaysHouse_2F_OnTransition: - compare VAR_LITTLEROOT_RIVAL_STATE, 2 - call_if_lt LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay - compare VAR_LITTLEROOT_RIVAL_STATE, 3 - call_if_ge LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos - compare VAR_LITTLEROOT_INTRO_STATE, 4 - call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet + call_if_lt VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay + call_if_ge VAR_LITTLEROOT_RIVAL_STATE, 3, LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 4, PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet call SecretBase_EventScript_SetDecorationFlags setvar VAR_SECRET_BASE_INITIALIZED, 0 end LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos:: goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos - compare VAR_BIRCH_LAB_STATE, 2 - goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret + goto_if_ge VAR_BIRCH_LAB_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_Ret goto LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos:: checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_Ret - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_MaysHouse_2F_EventScript_Ret + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_Ret setobjectxyperm LOCALID_RIVAL, 8, 2 setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP return @@ -37,8 +31,7 @@ LittlerootTown_MaysHouse_2F_EventScript_Ret:: LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay + goto_if_eq VAR_RESULT, MALE, LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay return LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay:: @@ -51,14 +44,12 @@ LittlerootTown_MaysHouse_2F_OnWarp: LittlerootTown_MaysHouse_2F_EventScript_CheckInitDecor:: checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq SecretBase_EventScript_InitDecorations + goto_if_eq VAR_RESULT, FEMALE, SecretBase_EventScript_InitDecorations end LittlerootTown_MaysHouse_2F_EventScript_RivalsPokeBall:: lockall - compare VAR_LITTLEROOT_RIVAL_STATE, 2 - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMay + goto_if_eq VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_MeetMay msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT releaseall end @@ -75,14 +66,10 @@ LittlerootTown_MaysHouse_2F_EventScript_MeetMay:: waitmovement 0 delay 10 playbgm MUS_ENCOUNTER_MAY, TRUE - compare VAR_FACING, DIR_NORTH - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth - compare VAR_FACING, DIR_WEST - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest - compare VAR_FACING, DIR_EAST - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast + call_if_eq VAR_FACING, DIR_NORTH, LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth + call_if_eq VAR_FACING, DIR_SOUTH, LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth + call_if_eq VAR_FACING, DIR_WEST, LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest + call_if_eq VAR_FACING, DIR_EAST, LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast setvar VAR_LITTLEROOT_RIVAL_STATE, 3 setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM @@ -252,10 +239,8 @@ RivalsHouse_2F_EventScript_Rival:: lockall goto_if_set FLAG_MET_RIVAL_LILYCOVE, RivalsHouse_2F_EventScript_RivalPostLilycove checkplayergender - compare VAR_RESULT, MALE - goto_if_eq RivalsHouse_2F_EventScript_May - compare VAR_RESULT, FEMALE - goto_if_eq RivalsHouse_2F_EventScript_Brendan + goto_if_eq VAR_RESULT, MALE, RivalsHouse_2F_EventScript_May + goto_if_eq VAR_RESULT, FEMALE, RivalsHouse_2F_EventScript_Brendan end RivalsHouse_2F_EventScript_May:: @@ -272,10 +257,8 @@ RivalsHouse_2F_EventScript_RivalPostLilycove:: applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer waitmovement 0 checkplayergender - compare VAR_RESULT, MALE - call_if_eq RivalsHouse_2F_EventScript_MayPostLilycove - compare VAR_RESULT, FEMALE - call_if_eq RivalsHouse_2F_EventScript_BrendanPostLilycove + call_if_eq VAR_RESULT, MALE, RivalsHouse_2F_EventScript_MayPostLilycove + call_if_eq VAR_RESULT, FEMALE, RivalsHouse_2F_EventScript_BrendanPostLilycove setflag FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE releaseall end @@ -301,10 +284,8 @@ RivalsHouse_2F_EventScript_BrendanWhereShouldIGoNext:: LittlerootTown_MaysHouse_2F_EventScript_PC:: lockall checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC + goto_if_eq VAR_RESULT, MALE, LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC end LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC:: diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index 857099f26..7c7f47d2e 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -29,18 +29,14 @@ LittlerootTown_ProfessorBirchsLab_MapScripts:: LittlerootTown_ProfessorBirchsLab_OnTransition: call Common_EventScript_SetupRivalGfxId call ProfBirch_EventScript_UpdateLocation - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_SetAfterJohtoStarterLayout - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 4 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_SetJohtoStarterLayout - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 3 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_CheckReadyForJohtoStarter + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_SetAfterJohtoStarterLayout + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 4, LittlerootTown_ProfessorBirchsLab_EventScript_SetJohtoStarterLayout + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 3, LittlerootTown_ProfessorBirchsLab_EventScript_CheckReadyForJohtoStarter end LittlerootTown_ProfessorBirchsLab_EventScript_CheckReadyForJohtoStarter:: specialvar VAR_RESULT, HasAllHoennMons - compare VAR_RESULT, TRUE - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SetReadyForJohtoStarter + goto_if_eq VAR_RESULT, TRUE, LittlerootTown_ProfessorBirchsLab_EventScript_SetReadyForJohtoStarter setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_WANDER_UP_AND_DOWN setobjectxyperm LOCALID_RIVAL, 5, 10 end @@ -123,10 +119,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveStarterEvent:: playfanfare MUS_OBTAIN_ITEM waitfanfare msgbox LittlerootTown_ProfessorBirchsLab_Text_WhyNotGiveNicknameToMon, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_NicknameStarter - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_GoSeeRival + goto_if_eq VAR_RESULT, YES, LittlerootTown_ProfessorBirchsLab_EventScript_NicknameStarter + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_GoSeeRival end LittlerootTown_ProfessorBirchsLab_EventScript_NicknameStarter:: @@ -137,10 +131,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_NicknameStarter:: LittlerootTown_ProfessorBirchsLab_EventScript_GoSeeRival:: msgbox LittlerootTown_ProfessorBirchsLab_Text_MightBeGoodIdeaToGoSeeRival, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival + goto_if_eq VAR_RESULT, YES, LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival end LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival:: @@ -152,10 +144,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival:: LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival:: msgbox LittlerootTown_ProfessorBirchsLab_Text_DontBeThatWay, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival + goto_if_eq VAR_RESULT, YES, LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival end LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedexEvent:: @@ -195,10 +185,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_UpgradeToNationalDex:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayUpgradeComment - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanUpgradeComment + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayUpgradeComment + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanUpgradeComment playse SE_PC_ON waitse delay 20 @@ -288,8 +276,7 @@ LittlerootTown_ProfessorBirchsLab_Movement_PlayerEnterLabForJohtoStarter: LittlerootTown_ProfessorBirchsLab_EventScript_Aide:: lock faceplayer - compare VAR_BIRCH_LAB_STATE, 3 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AideReceivedStarter + goto_if_ge VAR_BIRCH_LAB_STATE, 3, LittlerootTown_ProfessorBirchsLab_EventScript_AideReceivedStarter goto_if_set FLAG_BIRCH_AIDE_MET, LittlerootTown_ProfessorBirchsLab_EventScript_AideAlreadyMet msgbox LittlerootTown_ProfessorBirchsLab_Text_BirchAwayOnFieldwork, MSGBOX_DEFAULT setflag FLAG_BIRCH_AIDE_MET @@ -308,40 +295,34 @@ LittlerootTown_ProfessorBirchsLab_EventScript_AideReceivedStarter:: LittlerootTown_ProfessorBirchsLab_EventScript_Cyndaquil:: release - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_CYNDAQUIL, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeCyndaquil, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime goto LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil end LittlerootTown_ProfessorBirchsLab_EventScript_Totodile:: release - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_TOTODILE, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeTotodile, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime goto LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile end LittlerootTown_ProfessorBirchsLab_EventScript_Chikorita:: release - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_CHIKORITA, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeChikorita, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime goto LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita end @@ -360,10 +341,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil:: bufferspeciesname STR_VAR_1, SPECIES_CYNDAQUIL setvar VAR_TEMP_1, SPECIES_CYNDAQUIL givemon SPECIES_CYNDAQUIL, 5, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty - compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC + goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty + goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC hidemonpic goto Common_EventScript_NoMoreRoomForPokemon end @@ -372,8 +351,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_CYNDAQUIL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil @@ -383,8 +361,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_CYNDAQUIL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_CyndaquilTransferredToPC + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_CyndaquilTransferredToPC call Common_EventScript_NameReceivedBoxMon goto LittlerootTown_ProfessorBirchsLab_EventScript_CyndaquilTransferredToPC end @@ -405,10 +382,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile:: bufferspeciesname STR_VAR_1, SPECIES_TOTODILE setvar VAR_TEMP_1, SPECIES_TOTODILE givemon SPECIES_TOTODILE, 5, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty - compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC + goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty + goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC hidemonpic goto Common_EventScript_NoMoreRoomForPokemon end @@ -417,8 +392,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_TOTODILE msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile @@ -428,8 +402,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_TOTODILE msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_TotodileTransferredToPC + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_TotodileTransferredToPC call Common_EventScript_NameReceivedBoxMon goto LittlerootTown_ProfessorBirchsLab_EventScript_TotodileTransferredToPC end @@ -450,10 +423,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita:: bufferspeciesname STR_VAR_1, SPECIES_CHIKORITA setvar VAR_TEMP_1, SPECIES_CHIKORITA givemon SPECIES_CHIKORITA, 5, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty - compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC + goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty + goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC hidemonpic goto Common_EventScript_NoMoreRoomForPokemon end @@ -462,8 +433,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_CHIKORITA msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedChikorita + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedChikorita call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedChikorita @@ -473,8 +443,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_CHIKORITA msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_ChikoritaTransferredToPC + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ChikoritaTransferredToPC call Common_EventScript_NameReceivedBoxMon goto LittlerootTown_ProfessorBirchsLab_EventScript_ChikoritaTransferredToPC end @@ -501,10 +470,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter:: LittlerootTown_ProfessorBirchsLab_EventScript_Birch:: lock faceplayer - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 5 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_CanHaveAnyOneOfRarePokemon - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_GrassyPatchWaiting + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 5, LittlerootTown_ProfessorBirchsLab_EventScript_CanHaveAnyOneOfRarePokemon + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_ProfessorBirchsLab_EventScript_GrassyPatchWaiting goto_if_unset FLAG_HAS_MATCH_CALL, LittlerootTown_ProfessorBirchsLab_EventScript_TryRatePokedexOrRegister goto_if_unset FLAG_ENABLE_PROF_BIRCH_MATCH_CALL, EventScript_RegisterProfBirch goto LittlerootTown_ProfessorBirchsLab_EventScript_TryRatePokedexOrRegister @@ -522,12 +489,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GrassyPatchWaiting:: LittlerootTown_ProfessorBirchsLab_EventScript_TryRatePokedexOrRegister:: goto_if_unset FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_UNKNOWN_0x380, ProfBirch_EventScript_RatePokedexOrRegister - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 3 - goto_if_eq ProfBirch_EventScript_RatePokedexOrRegister - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge ProfBirch_EventScript_RatePokedexOrRegister - compare VAR_BIRCH_LAB_STATE, 5 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_PokemonAwait + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 3, ProfBirch_EventScript_RatePokedexOrRegister + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, ProfBirch_EventScript_RatePokedexOrRegister + goto_if_eq VAR_BIRCH_LAB_STATE, 5, LittlerootTown_ProfessorBirchsLab_EventScript_PokemonAwait msgbox LittlerootTown_ProfessorBirchsLab_Text_BirchRivalGoneHome, MSGBOX_DEFAULT release end @@ -556,10 +520,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedex:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayGivePokeBalls - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanGivePokeBalls + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayGivePokeBalls + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanGivePokeBalls setvar VAR_BIRCH_LAB_STATE, 5 setflag FLAG_ADVENTURE_STARTED setvar VAR_OLDALE_TOWN_STATE, 1 @@ -571,8 +533,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedex:: LittlerootTown_ProfessorBirchsLab_EventScript_MayGivePokeBalls:: msgbox LittlerootTown_ProfessorBirchsLab_Text_MayGotPokedexTooTakeThese, MSGBOX_DEFAULT giveitem ITEM_POKE_BALL, 5 - compare VAR_RESULT, FALSE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayNoRoomForPokeBalls + call_if_eq VAR_RESULT, FALSE, LittlerootTown_ProfessorBirchsLab_EventScript_MayNoRoomForPokeBalls msgbox LittlerootTown_ProfessorBirchsLab_Text_CatchCutePokemonWithPokeBalls, MSGBOX_DEFAULT setvar VAR_RESULT, 0 return @@ -580,8 +541,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_MayGivePokeBalls:: LittlerootTown_ProfessorBirchsLab_EventScript_BrendanGivePokeBalls:: msgbox LittlerootTown_ProfessorBirchsLab_Text_BrendanGotPokedexTooTakeThese, MSGBOX_DEFAULT giveitem ITEM_POKE_BALL, 5 - compare VAR_RESULT, FALSE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanNoRoomForPokeBalls + call_if_eq VAR_RESULT, FALSE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanNoRoomForPokeBalls msgbox LittlerootTown_ProfessorBirchsLab_Text_CatchCoolPokemonWithPokeBalls, MSGBOX_DEFAULT setvar VAR_RESULT, 1 return @@ -621,17 +581,12 @@ LittlerootTown_ProfessorBirchsLab_EventScript_Machine:: LittlerootTown_ProfessorBirchsLab_EventScript_Rival:: lock faceplayer - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 5 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_RivalFuturePlans - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_RivalHaveYouGoneToBattleFrontier - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_RivalTakeBreakFromFieldwork + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 5, LittlerootTown_ProfessorBirchsLab_EventScript_RivalFuturePlans + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_RivalHaveYouGoneToBattleFrontier + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_ProfessorBirchsLab_EventScript_RivalTakeBreakFromFieldwork checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayWhereShouldIGoNext - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanWhereShouldIGoNext + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayWhereShouldIGoNext + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanWhereShouldIGoNext release end @@ -645,10 +600,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_BrendanWhereShouldIGoNext:: LittlerootTown_ProfessorBirchsLab_EventScript_RivalFuturePlans:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayWhatNextImStayingHere - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanPreferCollectingSlowly + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayWhatNextImStayingHere + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanPreferCollectingSlowly release end @@ -662,10 +615,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_BrendanPreferCollectingSlowly: LittlerootTown_ProfessorBirchsLab_EventScript_RivalHaveYouGoneToBattleFrontier:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayHaveYouGoneToBattleFrontier - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanHaveYouGoneToBattleFrontier + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayHaveYouGoneToBattleFrontier + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanHaveYouGoneToBattleFrontier release end @@ -679,10 +630,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_BrendanHaveYouGoneToBattleFrontier LittlerootTown_ProfessorBirchsLab_EventScript_RivalTakeBreakFromFieldwork:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayTakeBreakFromFieldwork - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanTakeBreakFromFieldwork + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayTakeBreakFromFieldwork + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanTakeBreakFromFieldwork release end diff --git a/data/maps/MarineCave_End/scripts.inc b/data/maps/MarineCave_End/scripts.inc index 296ef02f8..1d988a444 100644 --- a/data/maps/MarineCave_End/scripts.inc +++ b/data/maps/MarineCave_End/scripts.inc @@ -11,8 +11,7 @@ MarineCave_End_OnResume: MarineCave_End_EventScript_TryRemoveKyogre:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_KYOGRE return @@ -43,12 +42,9 @@ MarineCave_End_EventScript_Kyogre:: clearflag FLAG_SYS_CTRL_OBJ_DELETE setvar VAR_TEMP_1, 0 specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq MarineCave_End_EventScript_DefeatedKyogre - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq MarineCave_End_EventScript_RanFromKyogre - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq MarineCave_End_EventScript_RanFromKyogre + goto_if_eq VAR_RESULT, B_OUTCOME_WON, MarineCave_End_EventScript_DefeatedKyogre + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, MarineCave_End_EventScript_RanFromKyogre + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, MarineCave_End_EventScript_RanFromKyogre setvar VAR_SHOULD_END_ABNORMAL_WEATHER, 1 setflag FLAG_DEFEATED_KYOGRE releaseall diff --git a/data/maps/MauvilleCity/scripts.inc b/data/maps/MauvilleCity/scripts.inc index eb243ec59..2ad39aec1 100644 --- a/data/maps/MauvilleCity/scripts.inc +++ b/data/maps/MauvilleCity/scripts.inc @@ -107,10 +107,8 @@ MauvilleCity_EventScript_Wally:: end MauvilleCity_EventScript_BattleWallyPrompt:: - compare VAR_RESULT, YES - call_if_eq MauvilleCity_EventScript_BattleWally - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_EventScript_DeclineWallyBattle + call_if_eq VAR_RESULT, YES, MauvilleCity_EventScript_BattleWally + goto_if_eq VAR_RESULT, NO, MauvilleCity_EventScript_DeclineWallyBattle closemessage switch VAR_FACING case DIR_NORTH, MauvilleCity_EventScript_WallyAndUncleExitNorth @@ -164,19 +162,15 @@ MauvilleCity_EventScript_DefeatedWally:: setflag FLAG_DEFEATED_WALLY_MAUVILLE setvar VAR_WALLY_CALL_STEP_COUNTER, 0 setflag FLAG_ENABLE_FIRST_WALLY_POKENAV_CALL - compare VAR_FACING, DIR_NORTH - call_if_eq MauvilleCity_EventScript_ScottApproachPlayerNorth - compare VAR_FACING, DIR_EAST - call_if_eq MauvilleCity_EventScript_ScottApproachPlayerEast + call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottApproachPlayerNorth + call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottApproachPlayerEast applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox MauvilleCity_Text_ScottYouDidntHoldBack, MSGBOX_DEFAULT closemessage addvar VAR_SCOTT_STATE, 1 - compare VAR_FACING, DIR_NORTH - call_if_eq MauvilleCity_EventScript_ScottExitNorth - compare VAR_FACING, DIR_EAST - call_if_eq MauvilleCity_EventScript_ScottExitEast + call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottExitNorth + call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottExitEast removeobject LOCALID_SCOTT releaseall end @@ -425,8 +419,7 @@ MauvilleCity_EventScript_Wattson:: lock faceplayer goto_if_set FLAG_GOT_TM24_FROM_WATTSON, MauvilleCity_EventScript_ReceivedThunderbolt - compare VAR_NEW_MAUVILLE_STATE, 2 - goto_if_eq MauvilleCity_EventScript_CompletedNewMauville + goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, MauvilleCity_EventScript_CompletedNewMauville goto_if_set FLAG_GOT_BASEMENT_KEY_FROM_WATTSON, MauvilleCity_EventScript_BegunNewMauville msgbox MauvilleCity_Text_WattsonNeedFavorTakeKey, MSGBOX_DEFAULT giveitem ITEM_BASEMENT_KEY @@ -443,8 +436,7 @@ MauvilleCity_EventScript_BegunNewMauville:: MauvilleCity_EventScript_CompletedNewMauville:: msgbox MauvilleCity_Text_WattsonThanksTakeTM, MSGBOX_DEFAULT giveitem ITEM_TM24 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_GOT_TM24_FROM_WATTSON msgbox MauvilleCity_Text_WattsonYoungTakeCharge, MSGBOX_DEFAULT release diff --git a/data/maps/MauvilleCity_BikeShop/scripts.inc b/data/maps/MauvilleCity_BikeShop/scripts.inc index 5ce43c1ba..089338410 100644 --- a/data/maps/MauvilleCity_BikeShop/scripts.inc +++ b/data/maps/MauvilleCity_BikeShop/scripts.inc @@ -8,18 +8,14 @@ MauvilleCity_BikeShop_EventScript_Rydel:: goto_if_set FLAG_DECLINED_BIKE, MauvilleCity_BikeShop_EventScript_SkipGreeting msgbox MauvilleCity_BikeShop_Text_RydelGreeting, MSGBOX_DEFAULT msgbox MauvilleCity_BikeShop_Text_DidYouComeFromFarAway, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_BikeShop_EventScript_YesFar - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_BikeShop_EventScript_NotFar + goto_if_eq VAR_RESULT, YES, MauvilleCity_BikeShop_EventScript_YesFar + goto_if_eq VAR_RESULT, NO, MauvilleCity_BikeShop_EventScript_NotFar end MauvilleCity_BikeShop_EventScript_SkipGreeting:: msgbox MauvilleCity_BikeShop_Text_DidYouComeFromFarAway, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_BikeShop_EventScript_YesFar - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_BikeShop_EventScript_NotFar + goto_if_eq VAR_RESULT, YES, MauvilleCity_BikeShop_EventScript_YesFar + goto_if_eq VAR_RESULT, NO, MauvilleCity_BikeShop_EventScript_NotFar end MauvilleCity_BikeShop_EventScript_ChooseBike:: @@ -62,21 +58,17 @@ MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes:: MauvilleCity_BikeShop_EventScript_AskSwitchBikes:: msgbox MauvilleCity_BikeShop_Text_WantToSwitchBikes, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchBikes - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_BikeShop_EventScript_KeepBike + goto_if_eq VAR_RESULT, YES, MauvilleCity_BikeShop_EventScript_SwitchBikes + goto_if_eq VAR_RESULT, NO, MauvilleCity_BikeShop_EventScript_KeepBike end @ If the player does not have a bike on them Rydel assumes its stored in the PC MauvilleCity_BikeShop_EventScript_SwitchBikes:: msgbox MauvilleCity_BikeShop_Text_IllSwitchBikes, MSGBOX_DEFAULT checkitem ITEM_ACRO_BIKE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchAcroForMach + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_BikeShop_EventScript_SwitchAcroForMach checkitem ITEM_MACH_BIKE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchMachForAcro + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_BikeShop_EventScript_SwitchMachForAcro msgbox MauvilleCity_BikeShop_Text_OhYourBikeIsInPC, MSGBOX_DEFAULT release end diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc index 451e8acb5..b7c8603a3 100644 --- a/data/maps/MauvilleCity_GameCorner/scripts.inc +++ b/data/maps/MauvilleCity_GameCorner/scripts.inc @@ -17,8 +17,7 @@ MauvilleCity_GameCorner_EventScript_CoinsClerk:: faceplayer msgbox MauvilleCity_GameCorner_Text_ThisIsMauvilleGameCorner, MSGBOX_DEFAULT checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NeedCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NeedCoinCase message MauvilleCity_GameCorner_Text_WereYouLookingForCoins waitmessage showmoneybox 0, 0 @@ -44,11 +43,9 @@ MauvilleCity_GameCorner_EventScript_ChooseCoinsDefault500:: MauvilleCity_GameCorner_EventScript_Buy50Coins:: checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, (MAX_COINS + 1 - 50) - goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1 - 50), MauvilleCity_GameCorner_EventScript_NoRoomForCoins checkmoney COINS_PRICE_50 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NotEnoughMoney addcoins 50 removemoney COINS_PRICE_50 updatemoneybox @@ -62,11 +59,9 @@ MauvilleCity_GameCorner_EventScript_Buy50Coins:: MauvilleCity_GameCorner_EventScript_Buy500Coins:: checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, (MAX_COINS + 1 - 500) - goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1 - 500), MauvilleCity_GameCorner_EventScript_NoRoomForCoins checkmoney COINS_PRICE_500 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NotEnoughMoney addcoins 500 removemoney COINS_PRICE_500 updatemoneybox @@ -109,8 +104,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerDolls:: faceplayer msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT checkitem ITEM_COIN_CASE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage release end @@ -153,8 +147,7 @@ MauvilleCity_GameCorner_EventScript_MudkipDoll:: MauvilleCity_GameCorner_EventScript_ConfirmDollPrize:: msgbox MauvilleCity_GameCorner_Text_SoYourChoiceIsX, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_GameCorner_EventScript_CancelDollSelect + goto_if_eq VAR_RESULT, NO, MauvilleCity_GameCorner_EventScript_CancelDollSelect switch VAR_TEMP_1 case 1, MauvilleCity_GameCorner_EventScript_BuyTreeckoDoll case 2, MauvilleCity_GameCorner_EventScript_BuyTorchicDoll @@ -163,12 +156,10 @@ MauvilleCity_GameCorner_EventScript_ConfirmDollPrize:: MauvilleCity_GameCorner_EventScript_BuyTreeckoDoll:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, DOLL_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll + goto_if_lt VAR_TEMP_2, DOLL_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll bufferdecorationname STR_VAR_2, DECOR_TREECKO_DOLL checkdecorspace DECOR_TREECKO_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForDoll removecoins DOLL_COINS adddecoration DECOR_TREECKO_DOLL updatecoinsbox 1, 1 @@ -179,12 +170,10 @@ MauvilleCity_GameCorner_EventScript_BuyTreeckoDoll:: MauvilleCity_GameCorner_EventScript_BuyTorchicDoll:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, DOLL_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll + goto_if_lt VAR_TEMP_2, DOLL_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll bufferdecorationname STR_VAR_2, DECOR_TORCHIC_DOLL checkdecorspace DECOR_TORCHIC_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForDoll removecoins DOLL_COINS adddecoration DECOR_TORCHIC_DOLL updatecoinsbox 1, 1 @@ -195,12 +184,10 @@ MauvilleCity_GameCorner_EventScript_BuyTorchicDoll:: MauvilleCity_GameCorner_EventScript_BuyMudkipDoll:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, DOLL_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll + goto_if_lt VAR_TEMP_2, DOLL_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll bufferdecorationname STR_VAR_2, DECOR_MUDKIP_DOLL checkdecorspace DECOR_MUDKIP_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForDoll removecoins DOLL_COINS adddecoration DECOR_MUDKIP_DOLL updatecoinsbox 1, 1 @@ -230,8 +217,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerTMs:: faceplayer msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT checkitem ITEM_COIN_CASE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage release end @@ -292,8 +278,7 @@ MauvilleCity_GameCorner_EventScript_TM13:: MauvilleCity_GameCorner_EventScript_ConfirmTMPrize:: special BufferTMHMMoveName msgbox MauvilleCity_GameCorner_Text_SoYourChoiceIsTheTMX, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_GameCorner_EventScript_CancelTMSelect + goto_if_eq VAR_RESULT, NO, MauvilleCity_GameCorner_EventScript_CancelTMSelect switch VAR_TEMP_1 case 1, MauvilleCity_GameCorner_EventScript_BuyTM32 case 2, MauvilleCity_GameCorner_EventScript_BuyTM29 @@ -304,11 +289,9 @@ MauvilleCity_GameCorner_EventScript_ConfirmTMPrize:: MauvilleCity_GameCorner_EventScript_BuyTM32:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM32_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM32_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM32 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM32_COINS additem ITEM_TM32 updatecoinsbox 1, 1 @@ -319,11 +302,9 @@ MauvilleCity_GameCorner_EventScript_BuyTM32:: MauvilleCity_GameCorner_EventScript_BuyTM29:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM29_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM29_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM29 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM29_COINS additem ITEM_TM29 updatecoinsbox 1, 1 @@ -334,11 +315,9 @@ MauvilleCity_GameCorner_EventScript_BuyTM29:: MauvilleCity_GameCorner_EventScript_BuyTM35:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM35_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM35_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM35 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM35_COINS additem ITEM_TM35 updatecoinsbox 1, 1 @@ -349,11 +328,9 @@ MauvilleCity_GameCorner_EventScript_BuyTM35:: MauvilleCity_GameCorner_EventScript_BuyTM24:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM24_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM24_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM24 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM24_COINS additem ITEM_TM24 updatecoinsbox 1, 1 @@ -364,11 +341,9 @@ MauvilleCity_GameCorner_EventScript_BuyTM24:: MauvilleCity_GameCorner_EventScript_BuyTM13:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM13_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM13_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM13 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM13_COINS additem ITEM_TM13 updatecoinsbox 1, 1 @@ -406,8 +381,7 @@ MauvilleCity_GameCorner_EventScript_Girl:: faceplayer goto_if_set FLAG_RECEIVED_STARTER_DOLL, MauvilleCity_GameCorner_EventScript_ReceivedStarterDoll msgbox MauvilleCity_GameCorner_Text_GotTwoOfSameDollWantOne, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_GameCorner_EventScript_DeclineStarterDoll + goto_if_eq VAR_RESULT, NO, MauvilleCity_GameCorner_EventScript_DeclineStarterDoll switch VAR_STARTER_MON case 0, MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll case 1, MauvilleCity_GameCorner_EventScript_GiveTorchicDoll @@ -417,8 +391,7 @@ MauvilleCity_GameCorner_EventScript_Girl:: MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll:: bufferdecorationname STR_VAR_2, DECOR_TREECKO_DOLL checkdecorspace DECOR_TREECKO_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll msgbox MauvilleCity_GameCorner_Text_HereYouGo2, MSGBOX_DEFAULT givedecoration DECOR_TREECKO_DOLL setflag FLAG_RECEIVED_STARTER_DOLL @@ -428,8 +401,7 @@ MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll:: MauvilleCity_GameCorner_EventScript_GiveTorchicDoll:: bufferdecorationname STR_VAR_2, DECOR_TORCHIC_DOLL checkdecorspace DECOR_TORCHIC_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll msgbox MauvilleCity_GameCorner_Text_HereYouGo2, MSGBOX_DEFAULT givedecoration DECOR_TORCHIC_DOLL setflag FLAG_RECEIVED_STARTER_DOLL @@ -439,8 +411,7 @@ MauvilleCity_GameCorner_EventScript_GiveTorchicDoll:: MauvilleCity_GameCorner_EventScript_GiveMudkipDoll:: bufferdecorationname STR_VAR_2, DECOR_MUDKIP_DOLL checkdecorspace DECOR_MUDKIP_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll msgbox MauvilleCity_GameCorner_Text_HereYouGo2, MSGBOX_DEFAULT givedecoration DECOR_MUDKIP_DOLL setflag FLAG_RECEIVED_STARTER_DOLL @@ -467,8 +438,7 @@ MauvilleCity_GameCorner_EventScript_PokefanM:: lock faceplayer checkitem ITEM_COIN_CASE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_GameCorner_EventScript_TryGive20Coins + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_GameCorner_EventScript_TryGive20Coins msgbox MauvilleCity_GameCorner_Text_NeedCoinCaseGoNextDoor, MSGBOX_DEFAULT goto MauvilleCity_GameCorner_EventScript_NPCReturnToSlots end @@ -476,8 +446,7 @@ MauvilleCity_GameCorner_EventScript_PokefanM:: MauvilleCity_GameCorner_EventScript_TryGive20Coins:: goto_if_set FLAG_RECEIVED_20_COINS, MauvilleCity_GameCorner_EventScript_PokefanMNormal checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, 1 @ Only give 20 coins if player has no coins - goto_if_ge MauvilleCity_GameCorner_EventScript_PokefanMNormal + goto_if_ge VAR_TEMP_1, 1, MauvilleCity_GameCorner_EventScript_PokefanMNormal @ Only give 20 coins if player has no coins setflag FLAG_RECEIVED_20_COINS addcoins 20 msgbox MauvilleCity_GameCorner_Text_LuckOnlyLastSoLongTakeCoins, MSGBOX_DEFAULT @@ -535,8 +504,7 @@ MauvilleCity_GameCorner_EventScript_Woman:: MauvilleCity_GameCorner_EventScript_SlotMachine0:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -546,8 +514,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine0:: MauvilleCity_GameCorner_EventScript_SlotMachine1:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 1 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -557,8 +524,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine1:: MauvilleCity_GameCorner_EventScript_SlotMachine2:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 2 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -568,8 +534,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine2:: MauvilleCity_GameCorner_EventScript_SlotMachine3:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 3 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -579,8 +544,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine3:: MauvilleCity_GameCorner_EventScript_SlotMachine4:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 4 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -590,8 +554,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine4:: MauvilleCity_GameCorner_EventScript_SlotMachine5:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 5 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -601,8 +564,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine5:: MauvilleCity_GameCorner_EventScript_SlotMachine6:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 6 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -612,8 +574,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine6:: MauvilleCity_GameCorner_EventScript_SlotMachine7:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 7 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -623,8 +584,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine7:: MauvilleCity_GameCorner_EventScript_SlotMachine8:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 8 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -634,8 +594,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine8:: MauvilleCity_GameCorner_EventScript_SlotMachine9:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 9 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -645,8 +604,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine9:: MauvilleCity_GameCorner_EventScript_SlotMachine10:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 10 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -656,8 +614,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine10:: MauvilleCity_GameCorner_EventScript_SlotMachine11:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 11 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT diff --git a/data/maps/MauvilleCity_Gym/scripts.inc b/data/maps/MauvilleCity_Gym/scripts.inc index d446e44b9..de924d7d9 100644 --- a/data/maps/MauvilleCity_Gym/scripts.inc +++ b/data/maps/MauvilleCity_Gym/scripts.inc @@ -76,11 +76,9 @@ MauvilleCity_Gym_EventScript_DeactivatePuzzle:: MauvilleCity_Gym_EventScript_Wattson:: trainerbattle_single TRAINER_WATTSON_1, MauvilleCity_Gym_Text_WattsonIntro, MauvilleCity_Gym_Text_WattsonDefeat, MauvilleCity_Gym_EventScript_WattsonDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_Gym_EventScript_WattsonRematch + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_Gym_EventScript_WattsonRematch goto_if_unset FLAG_RECEIVED_TM34, MauvilleCity_Gym_EventScript_GiveShockWave2 - compare VAR_NEW_MAUVILLE_STATE, 2 - goto_if_eq MauvilleCity_Gym_EventScript_CompletedNewMauville + goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, MauvilleCity_Gym_EventScript_CompletedNewMauville msgbox MauvilleCity_Gym_Text_WattsonPostBattle, MSGBOX_DEFAULT release end @@ -95,8 +93,7 @@ MauvilleCity_Gym_EventScript_WattsonDefeated:: setflag FLAG_DEFEATED_MAUVILLE_GYM setflag FLAG_BADGE03_GET addvar VAR_PETALBURG_GYM_STATE, 1 - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_eq Common_EventScript_ReadyPetalburgGymForBattle + call_if_eq VAR_PETALBURG_GYM_STATE, 6, Common_EventScript_ReadyPetalburgGymForBattle setvar VAR_0x8008, 3 call Common_EventScript_SetGymTrainers special MauvilleGymDeactivatePuzzle @@ -116,8 +113,7 @@ MauvilleCity_Gym_EventScript_WattsonDefeated:: MauvilleCity_Gym_EventScript_GiveShockWave2:: giveitem ITEM_TM34 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox MauvilleCity_Gym_Text_ExplainShockWave, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM34 release @@ -125,8 +121,7 @@ MauvilleCity_Gym_EventScript_GiveShockWave2:: MauvilleCity_Gym_EventScript_GiveShockWave:: giveitem ITEM_TM34 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox MauvilleCity_Gym_Text_ExplainShockWave, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM34 return @@ -144,8 +139,7 @@ MauvilleCity_Gym_EventScript_WattsonRematch:: MauvilleCity_Gym_EventScript_Switch1:: lockall goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_SwitchDoNothing - compare VAR_MAUVILLE_GYM_STATE, 1 - goto_if_eq MauvilleCity_Gym_EventScript_SwitchDoNothing + goto_if_eq VAR_MAUVILLE_GYM_STATE, 1, MauvilleCity_Gym_EventScript_SwitchDoNothing setvar VAR_MAUVILLE_GYM_STATE, 1 setvar VAR_0x8004, 0 goto MauvilleCity_Gym_EventScript_PressFloorSwitch @@ -154,8 +148,7 @@ MauvilleCity_Gym_EventScript_Switch1:: MauvilleCity_Gym_EventScript_Switch2:: lockall goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_SwitchDoNothing - compare VAR_MAUVILLE_GYM_STATE, 2 - goto_if_eq MauvilleCity_Gym_EventScript_SwitchDoNothing + goto_if_eq VAR_MAUVILLE_GYM_STATE, 2, MauvilleCity_Gym_EventScript_SwitchDoNothing setvar VAR_MAUVILLE_GYM_STATE, 2 setvar VAR_0x8004, 1 goto MauvilleCity_Gym_EventScript_PressFloorSwitch @@ -164,8 +157,7 @@ MauvilleCity_Gym_EventScript_Switch2:: MauvilleCity_Gym_EventScript_Switch3:: lockall goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_SwitchDoNothing - compare VAR_MAUVILLE_GYM_STATE, 3 - goto_if_eq MauvilleCity_Gym_EventScript_SwitchDoNothing + goto_if_eq VAR_MAUVILLE_GYM_STATE, 3, MauvilleCity_Gym_EventScript_SwitchDoNothing setvar VAR_MAUVILLE_GYM_STATE, 3 setvar VAR_0x8004, 2 goto MauvilleCity_Gym_EventScript_PressFloorSwitch @@ -174,8 +166,7 @@ MauvilleCity_Gym_EventScript_Switch3:: MauvilleCity_Gym_EventScript_Switch4:: lockall goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_SwitchDoNothing - compare VAR_MAUVILLE_GYM_STATE, 4 - goto_if_eq MauvilleCity_Gym_EventScript_SwitchDoNothing + goto_if_eq VAR_MAUVILLE_GYM_STATE, 4, MauvilleCity_Gym_EventScript_SwitchDoNothing setvar VAR_MAUVILLE_GYM_STATE, 4 setvar VAR_0x8004, 3 goto MauvilleCity_Gym_EventScript_PressFloorSwitch diff --git a/data/maps/MauvilleCity_House2/scripts.inc b/data/maps/MauvilleCity_House2/scripts.inc index 441a4f165..193e0c04c 100644 --- a/data/maps/MauvilleCity_House2/scripts.inc +++ b/data/maps/MauvilleCity_House2/scripts.inc @@ -7,8 +7,7 @@ MauvilleCity_House2_EventScript_Woman:: goto_if_set FLAG_RECEIVED_COIN_CASE, MauvilleCity_House2_EventScript_ReceivedCoinCase msgbox MauvilleCity_House2_Text_BuyHarborMailAtSlateport, MSGBOX_DEFAULT checkitem ITEM_HARBOR_MAIL - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_House2_EventScript_AskToTradeForHarborMail + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_House2_EventScript_AskToTradeForHarborMail release end @@ -19,10 +18,8 @@ MauvilleCity_House2_EventScript_AskToTradeForHarborMail:: applymovement VAR_LAST_TALKED, Common_Movement_Delay48 waitmovement 0 msgbox MauvilleCity_House2_Text_TradeHarborMailForCoinCase, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_House2_EventScript_AcceptTrade - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_House2_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, YES, MauvilleCity_House2_EventScript_AcceptTrade + goto_if_eq VAR_RESULT, NO, MauvilleCity_House2_EventScript_DeclineTrade end MauvilleCity_House2_EventScript_AcceptTrade:: diff --git a/data/maps/MeteorFalls_1F_2R/scripts.inc b/data/maps/MeteorFalls_1F_2R/scripts.inc index 706d362be..4e3e9b321 100644 --- a/data/maps/MeteorFalls_1F_2R/scripts.inc +++ b/data/maps/MeteorFalls_1F_2R/scripts.inc @@ -4,8 +4,7 @@ MeteorFalls_1F_2R_MapScripts:: MeteorFalls_1F_2R_EventScript_Nicolas:: trainerbattle_single TRAINER_NICOLAS_1, MeteorFalls_1F_2R_Text_NicolasIntro, MeteorFalls_1F_2R_Text_NicolasDefeat, MeteorFalls_1F_2R_EventScript_RegisterNicolas specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MeteorFalls_1F_2R_EventScript_RematchNicolas + goto_if_eq VAR_RESULT, TRUE, MeteorFalls_1F_2R_EventScript_RematchNicolas msgbox MeteorFalls_1F_2R_Text_NicolasPostBattle, MSGBOX_DEFAULT release end @@ -26,8 +25,7 @@ MeteorFalls_1F_2R_EventScript_RematchNicolas:: MeteorFalls_1F_2R_EventScript_John:: trainerbattle_double TRAINER_JOHN_AND_JAY_1, MeteorFalls_1F_2R_Text_JohnIntro, MeteorFalls_1F_2R_Text_JohnDefeat, MeteorFalls_1F_2R_Text_JohnNotEnoughMons, MeteorFalls_1F_2R_EventScript_RegisterJohn specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MeteorFalls_1F_2R_EventScript_RematchJohn + goto_if_eq VAR_RESULT, TRUE, MeteorFalls_1F_2R_EventScript_RematchJohn msgbox MeteorFalls_1F_2R_Text_JohnPostBattle, MSGBOX_DEFAULT release end @@ -46,8 +44,7 @@ MeteorFalls_1F_2R_EventScript_RematchJohn:: MeteorFalls_1F_2R_EventScript_Jay:: trainerbattle_double TRAINER_JOHN_AND_JAY_1, MeteorFalls_1F_2R_Text_JayIntro, MeteorFalls_1F_2R_Text_JayDefeat, MeteorFalls_1F_2R_Text_JayNotEnoughMons, MeteorFalls_1F_2R_EventScript_RegisterJay specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MeteorFalls_1F_2R_EventScript_RematchJay + goto_if_eq VAR_RESULT, TRUE, MeteorFalls_1F_2R_EventScript_RematchJay msgbox MeteorFalls_1F_2R_Text_JayPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/MirageTower_4F/scripts.inc b/data/maps/MirageTower_4F/scripts.inc index 8d88c6990..61bde877c 100644 --- a/data/maps/MirageTower_4F/scripts.inc +++ b/data/maps/MirageTower_4F/scripts.inc @@ -8,8 +8,7 @@ MirageTower_4F_EventScript_RootFossil:: lock faceplayer msgbox MirageTower_4F_Text_TakeRootFossil, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MirageTower_4F_EventScript_LeaveRootFossil + goto_if_eq VAR_RESULT, NO, MirageTower_4F_EventScript_LeaveRootFossil giveitem ITEM_ROOT_FOSSIL closemessage setflag FLAG_HIDE_MIRAGE_TOWER_ROOT_FOSSIL @@ -29,8 +28,7 @@ MirageTower_4F_EventScript_ClawFossil:: lock faceplayer msgbox MirageTower_4F_Text_TakeClawFossil, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MirageTower_4F_EventScript_LeaveClawFossil + goto_if_eq VAR_RESULT, NO, MirageTower_4F_EventScript_LeaveClawFossil giveitem ITEM_CLAW_FOSSIL closemessage setflag FLAG_HIDE_MIRAGE_TOWER_CLAW_FOSSIL diff --git a/data/maps/MossdeepCity/scripts.inc b/data/maps/MossdeepCity/scripts.inc index f5af3a391..836490cbd 100644 --- a/data/maps/MossdeepCity/scripts.inc +++ b/data/maps/MossdeepCity/scripts.inc @@ -233,12 +233,10 @@ MossdeepCity_EventScript_KingsRockBoy:: faceplayer goto_if_set FLAG_RECEIVED_KINGS_ROCK, MossdeepCity_EventScript_ReceivedKingsRock msgbox MossdeepCity_Text_WantKingsRockStevenGaveMe, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_EventScript_DeclineKingsRock + goto_if_eq VAR_RESULT, NO, MossdeepCity_EventScript_DeclineKingsRock msgbox MossdeepCity_Text_YouCanKeepIt, MSGBOX_DEFAULT giveitem ITEM_KINGS_ROCK - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_KINGS_ROCK release end @@ -262,10 +260,8 @@ MossdeepCity_EventScript_Scott:: faceplayer msgbox MossdeepCity_Text_ScottSomethingWrongWithTown, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq MossdeepCity_EventScript_ScottExitNorth - compare VAR_FACING, DIR_EAST - call_if_eq MossdeepCity_EventScript_ScottExitEast + call_if_eq VAR_FACING, DIR_NORTH, MossdeepCity_EventScript_ScottExitNorth + call_if_eq VAR_FACING, DIR_EAST, MossdeepCity_EventScript_ScottExitEast addvar VAR_SCOTT_STATE, 1 removeobject LOCALID_SCOTT release diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc index 7b63de2e7..b47011d68 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -51,8 +51,7 @@ MossdeepCity_Gym_EventScript_SetSwitch4Metatiles:: MossdeepCity_Gym_EventScript_TateAndLiza:: trainerbattle_double TRAINER_TATE_AND_LIZA_1, MossdeepCity_Gym_Text_TateAndLizaIntro, MossdeepCity_Gym_Text_TateAndLizaDefeat, MossdeepCity_Gym_Text_TateAndLizaNeedTwoMons, MossdeepCity_Gym_EventScript_TateAndLizaDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MossdeepCity_Gym_EventScript_TateAndLizaRematch + goto_if_eq VAR_RESULT, TRUE, MossdeepCity_Gym_EventScript_TateAndLizaRematch goto_if_unset FLAG_RECEIVED_TM04, MossdeepCity_Gym_EventScript_GiveCalmMind2 msgbox MossdeepCity_Gym_Text_TateAndLizaPostBattle, MSGBOX_DEFAULT release @@ -92,8 +91,7 @@ MossdeepCity_Gym_EventScript_TateAndLizaDefeated:: MossdeepCity_Gym_EventScript_GiveCalmMind2:: giveitem ITEM_TM04 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM04 release @@ -101,8 +99,7 @@ MossdeepCity_Gym_EventScript_GiveCalmMind2:: MossdeepCity_Gym_EventScript_GiveCalmMind:: giveitem ITEM_TM04 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM04 return diff --git a/data/maps/MossdeepCity_House1/scripts.inc b/data/maps/MossdeepCity_House1/scripts.inc index 1bb1dede6..433defa66 100644 --- a/data/maps/MossdeepCity_House1/scripts.inc +++ b/data/maps/MossdeepCity_House1/scripts.inc @@ -7,8 +7,7 @@ MossdeepCity_House1_EventScript_BlackBelt:: bufferleadmonspeciesname STR_VAR_1 msgbox MossdeepCity_House1_Text_HmmYourPokemon, MSGBOX_DEFAULT specialvar VAR_RESULT, GetPokeblockNameByMonNature - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_House1_EventScript_NeutralNature + goto_if_eq VAR_RESULT, 0, MossdeepCity_House1_EventScript_NeutralNature msgbox MossdeepCity_House1_Text_ItLikesXPokeblocks, MSGBOX_DEFAULT release end diff --git a/data/maps/MossdeepCity_House2/scripts.inc b/data/maps/MossdeepCity_House2/scripts.inc index 5f568ac77..56a838196 100644 --- a/data/maps/MossdeepCity_House2/scripts.inc +++ b/data/maps/MossdeepCity_House2/scripts.inc @@ -21,10 +21,8 @@ MossdeepCity_House2_EventScript_Wingull:: closemessage setflag FLAG_WINGULL_DELIVERED_MAIL clearflag FLAG_HIDE_FORTREE_CITY_HOUSE_4_WINGULL - compare VAR_FACING, DIR_NORTH - call_if_eq MossdeepCity_House2_EventScript_WingullExitNorth - compare VAR_FACING, DIR_WEST - call_if_eq MossdeepCity_House2_EventScript_WingullExitWest + call_if_eq VAR_FACING, DIR_NORTH, MossdeepCity_House2_EventScript_WingullExitNorth + call_if_eq VAR_FACING, DIR_WEST, MossdeepCity_House2_EventScript_WingullExitWest removeobject LOCALID_WINGULL release end diff --git a/data/maps/MossdeepCity_House3/scripts.inc b/data/maps/MossdeepCity_House3/scripts.inc index 51df05fe0..73b0cc26e 100644 --- a/data/maps/MossdeepCity_House3/scripts.inc +++ b/data/maps/MossdeepCity_House3/scripts.inc @@ -6,8 +6,7 @@ MossdeepCity_House3_EventScript_SuperRodFisherman:: faceplayer goto_if_set FLAG_RECEIVED_SUPER_ROD, MossdeepCity_House3_EventScript_ReceivedSuperRod msgbox MossdeepCity_House3_Text_YouWantSuperRod, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_House3_EventScript_DeclineSuperRod + goto_if_eq VAR_RESULT, NO, MossdeepCity_House3_EventScript_DeclineSuperRod msgbox MossdeepCity_House3_Text_SuperRodIsSuper, MSGBOX_DEFAULT giveitem ITEM_SUPER_ROD setflag FLAG_RECEIVED_SUPER_ROD diff --git a/data/maps/MossdeepCity_House4/scripts.inc b/data/maps/MossdeepCity_House4/scripts.inc index 7b7348f4e..8d0046857 100644 --- a/data/maps/MossdeepCity_House4/scripts.inc +++ b/data/maps/MossdeepCity_House4/scripts.inc @@ -18,8 +18,7 @@ MossdeepCity_House4_EventScript_NinjaBoy:: lock faceplayer special CheckPlayerHasSecretBase - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_House4_EventScript_NoSecretBase + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_House4_EventScript_NoSecretBase special GetSecretBaseNearbyMapName msgbox MossdeepCity_House4_Text_YouMadeSecretBaseNearX, MSGBOX_DEFAULT release diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index 4177c73ac..263b07105 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -11,8 +11,7 @@ MossdeepCity_SpaceCenter_1F_MapScripts:: .byte 0 MossdeepCity_SpaceCenter_1F_OnTransition: - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma end MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma:: @@ -25,12 +24,9 @@ MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma:: setobjectxyperm LOCALID_SCIENTIST_1, 3, 4 setobjectmovementtype LOCALID_SCIENTIST_1, MOVEMENT_TYPE_FACE_RIGHT setobjectmovementtype LOCALID_SCIENTIST_2, MOVEMENT_TYPE_FACE_RIGHT - compare VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 1 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft - compare VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardDown - compare VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 3 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight + goto_if_eq VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 1, MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft + goto_if_eq VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardDown + goto_if_eq VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 3, MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight end MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft:: @@ -47,8 +43,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight:: end MossdeepCity_SpaceCenter_1F_OnLoad: - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_le MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote + goto_if_le VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote end MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote:: @@ -58,15 +53,12 @@ MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote:: MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounter:: lock faceplayer - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma dotimebasedevents specialvar VAR_RESULT, GetWeekCount buffernumberstring STR_VAR_1, VAR_RESULT - compare VAR_RESULT, 0 - call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYet - compare VAR_RESULT, 1 - call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumber + call_if_eq VAR_RESULT, 0, MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYet + call_if_ge VAR_RESULT, 1, MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumber closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 @@ -85,10 +77,8 @@ MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma:: dotimebasedevents specialvar VAR_RESULT, GetWeekCount buffernumberstring STR_VAR_1, VAR_RESULT - compare VAR_RESULT, 0 - call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYetMagma - compare VAR_RESULT, 1 - call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumberMagma + call_if_eq VAR_RESULT, 0, MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYetMagma + call_if_ge VAR_RESULT, 1, MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumberMagma closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterRight waitmovement 0 @@ -106,8 +96,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumberMagma:: MossdeepCity_SpaceCenter_1F_EventScript_Scientist:: lock faceplayer - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_ScientistMagma + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_ScientistMagma msgbox MossdeepCity_SpaceCenter_1F_Text_RocketLaunchDemandsPerfection, MSGBOX_DEFAULT release end @@ -122,13 +111,11 @@ MossdeepCity_SpaceCenter_1F_EventScript_ScientistMagma:: MossdeepCity_SpaceCenter_1F_EventScript_SunStoneMan:: lock faceplayer - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_SunStoneManMagma + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_SunStoneManMagma goto_if_set FLAG_RECEIVED_SUN_STONE_MOSSDEEP, MossdeepCity_SpaceCenter_1F_EventScript_GaveSunStone msgbox MossdeepCity_SpaceCenter_1F_Text_FoundThisYouCanHaveIt, MSGBOX_DEFAULT giveitem ITEM_SUN_STONE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP msgbox MossdeepCity_SpaceCenter_1F_Text_HoennFamousForMeteorShowers, MSGBOX_DEFAULT release @@ -143,8 +130,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_SunStoneManMagma:: goto_if_set FLAG_RECEIVED_SUN_STONE_MOSSDEEP, MossdeepCity_SpaceCenter_1F_EventScript_GaveSunStoneMagma msgbox MossdeepCity_SpaceCenter_1F_Text_MagmaCantStealFuelTakeThis, MSGBOX_DEFAULT giveitem ITEM_SUN_STONE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP msgbox MossdeepCity_SpaceCenter_1F_Text_CantStrollOnBeachWithMagma, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterRight @@ -163,10 +149,8 @@ MossdeepCity_SpaceCenter_1F_EventScript_Woman:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_1F_EventScript_WomanNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_WomanMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_1F_EventScript_WomanNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_WomanMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_WomanNormal goto MossdeepCity_SpaceCenter_1F_EventScript_WomanMagma end @@ -184,10 +168,8 @@ MossdeepCity_SpaceCenter_1F_EventScript_OldMan:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_1F_EventScript_OldManNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_OldManMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_1F_EventScript_OldManNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_OldManMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_OldManNormal goto MossdeepCity_SpaceCenter_1F_EventScript_OldManMagma end diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index 02278a13b..4a22bf8ee 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -15,10 +15,8 @@ MossdeepCity_SpaceCenter_2F_MapScripts:: .byte 0 MossdeepCity_SpaceCenter_2F_OnTransition: - compare VAR_MOSSDEEP_CITY_STATE, 2 - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_MoveCivilians - compare VAR_MOSSDEEP_SPACE_CENTER_STATE, 2 - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_MoveDefeatedGrunts + call_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_MoveCivilians + call_if_eq VAR_MOSSDEEP_SPACE_CENTER_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_MoveDefeatedGrunts end MossdeepCity_SpaceCenter_2F_EventScript_MoveCivilians:: @@ -48,8 +46,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ThreeMagmaGrunts:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_Delay48 waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_YoureOutnumberedTakeUsOn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts + goto_if_eq VAR_RESULT, YES, MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts msgbox MossdeepCity_SpaceCenter_2F_Text_GoodAnswer, MSGBOX_DEFAULT closemessage applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_PlayerExit @@ -109,10 +106,8 @@ MossdeepCity_SpaceCenter_2F_EventScript_Scientist:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_ScientistNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_ScientistMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_ScientistNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_ScientistMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_ScientistNormal goto MossdeepCity_SpaceCenter_2F_EventScript_ScientistMagma end @@ -130,10 +125,8 @@ MossdeepCity_SpaceCenter_2F_EventScript_Gentleman:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_GentlemanNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_GentlemanMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_GentlemanNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_GentlemanMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_GentlemanNormal goto MossdeepCity_SpaceCenter_2F_EventScript_GentlemanMagma end @@ -151,10 +144,8 @@ MossdeepCity_SpaceCenter_2F_EventScript_RichBoy:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_RichBoyNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_RichBoyMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_RichBoyNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_RichBoyMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_RichBoyNormal goto MossdeepCity_SpaceCenter_2F_EventScript_RichBoyMagma end @@ -246,8 +237,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt:: applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_StevenAreYouReadyToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle + goto_if_eq VAR_RESULT, YES, MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle msgbox MossdeepCity_SpaceCenter_2F_Text_StevenHurryGetReadyQuickly, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown @@ -262,8 +252,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_ne MossdeepCity_SpaceCenter_2F_EventScript_DoStevenMultiBattle + goto_if_ne VAR_RESULT, 0, MossdeepCity_SpaceCenter_2F_EventScript_DoStevenMultiBattle special LoadPlayerParty goto MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt @@ -358,10 +347,8 @@ MossdeepCity_SpaceCenter_2F_EventScript_TabithaTrainer:: MossdeepCity_SpaceCenter_2F_EventScript_RivalRayquazaCall:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_MayRayquazaCall - compare VAR_RESULT, FEMALE - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_BrendanRayquazaCall + call_if_eq VAR_RESULT, MALE, MossdeepCity_SpaceCenter_2F_EventScript_MayRayquazaCall + call_if_eq VAR_RESULT, FEMALE, MossdeepCity_SpaceCenter_2F_EventScript_BrendanRayquazaCall closemessage clearflag FLAG_DEFEATED_MAGMA_SPACE_CENTER releaseall diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index a5a3d0980..aac12ec2a 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -16,8 +16,7 @@ MossdeepCity_StevensHouse_EventScript_HideStevensNote:: return MossdeepCity_StevensHouse_OnTransition: - compare VAR_STEVENS_HOUSE_STATE, 2 - call_if_eq MossdeepCity_StevensHouse_EventScript_SetStevenPos + call_if_eq VAR_STEVENS_HOUSE_STATE, 2, MossdeepCity_StevensHouse_EventScript_SetStevenPos end MossdeepCity_StevensHouse_EventScript_SetStevenPos:: @@ -76,8 +75,7 @@ MossdeepCity_StevensHouse_Movement_StevenReturn: MossdeepCity_StevensHouse_EventScript_BeldumPokeball:: lockall msgbox MossdeepCity_StevensHouse_Text_TakeBallContainingBeldum, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_StevensHouse_EventScript_LeaveBeldum + goto_if_eq VAR_RESULT, NO, MossdeepCity_StevensHouse_EventScript_LeaveBeldum goto MossdeepCity_StevensHouse_EventScript_GiveBeldum end @@ -89,18 +87,15 @@ MossdeepCity_StevensHouse_EventScript_LeaveBeldum:: MossdeepCity_StevensHouse_EventScript_GiveBeldum:: setvar VAR_TEMP_1, SPECIES_BELDUM givemon SPECIES_BELDUM, 5, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_StevensHouse_EventScript_SendBeldumParty - compare VAR_RESULT, 1 - goto_if_eq MossdeepCity_StevensHouse_EventScript_SendBeldumPC + goto_if_eq VAR_RESULT, 0, MossdeepCity_StevensHouse_EventScript_SendBeldumParty + goto_if_eq VAR_RESULT, 1, MossdeepCity_StevensHouse_EventScript_SendBeldumPC goto Common_EventScript_NoMoreRoomForPokemon end MossdeepCity_StevensHouse_EventScript_SendBeldumParty:: call MossdeepCity_StevensHouse_EventScript_ReceivedBeldumFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_StevensHouse_EventScript_ReceivedBeldum + goto_if_eq VAR_RESULT, NO, MossdeepCity_StevensHouse_EventScript_ReceivedBeldum call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto MossdeepCity_StevensHouse_EventScript_ReceivedBeldum @@ -109,8 +104,7 @@ MossdeepCity_StevensHouse_EventScript_SendBeldumParty:: MossdeepCity_StevensHouse_EventScript_SendBeldumPC:: call MossdeepCity_StevensHouse_EventScript_ReceivedBeldumFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC + goto_if_eq VAR_RESULT, NO, MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC call Common_EventScript_NameReceivedBoxMon goto MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC end diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index 7081e54de..193163325 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -63,18 +63,14 @@ MtChimney_EventScript_Maxie:: fadescreen FADE_FROM_BLACK setobjectxyperm LOCALID_ARCHIE, 10, 12 addobject LOCALID_ARCHIE - compare VAR_FACING, DIR_EAST - call_if_eq MtChimney_EventScript_ArchieApproachPlayerEast - compare VAR_FACING, DIR_NORTH - call_if_eq MtChimney_EventScript_ArchieApproachPlayerNorth + call_if_eq VAR_FACING, DIR_EAST, MtChimney_EventScript_ArchieApproachPlayerEast + call_if_eq VAR_FACING, DIR_NORTH, MtChimney_EventScript_ArchieApproachPlayerNorth applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MtChimney_Text_ArchieThankYou, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_EAST - call_if_eq MtChimney_EventScript_ArchieExitEast - compare VAR_FACING, DIR_NORTH - call_if_eq MtChimney_EventScript_ArchieExitNorth + call_if_eq VAR_FACING, DIR_EAST, MtChimney_EventScript_ArchieExitEast + call_if_eq VAR_FACING, DIR_NORTH, MtChimney_EventScript_ArchieExitNorth removeobject LOCALID_ARCHIE setflag FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA setflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY @@ -109,18 +105,14 @@ MtChimney_EventScript_LavaCookieLady:: faceplayer showmoneybox 0, 0 msgbox MtChimney_Text_LavaCookiesJust200, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MtChimney_EventScript_DeclineLavaCookie + goto_if_eq VAR_RESULT, NO, MtChimney_EventScript_DeclineLavaCookie checkmoney 200 - compare VAR_RESULT, FALSE - goto_if_eq MtChimney_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, MtChimney_EventScript_NotEnoughMoney msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT checkitemspace ITEM_LAVA_COOKIE - compare VAR_RESULT, TRUE - call_if_eq MtChimney_EventScript_RemoveMoney + call_if_eq VAR_RESULT, TRUE, MtChimney_EventScript_RemoveMoney giveitem ITEM_LAVA_COOKIE - compare VAR_RESULT, FALSE - goto_if_eq MtChimney_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, MtChimney_EventScript_BagIsFull hidemoneybox release end @@ -453,8 +445,7 @@ MtChimney_EventScript_MeteoriteMachine:: goto_if_unset FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, MtChimney_EventScript_MachineOn goto_if_set FLAG_RECEIVED_METEORITE, MtChimney_EventScript_MachineOff msgbox MtChimney_Text_RemoveTheMeteorite, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MtChimney_EventScript_LeaveMeteoriteAlone + goto_if_eq VAR_RESULT, NO, MtChimney_EventScript_LeaveMeteoriteAlone msgbox MtChimney_Text_PlayerRemovedMeteorite, MSGBOX_DEFAULT giveitem ITEM_METEORITE setflag FLAG_RECEIVED_METEORITE @@ -483,8 +474,7 @@ MtChimney_EventScript_RouteSign:: MtChimney_EventScript_Shelby:: trainerbattle_single TRAINER_SHELBY_1, MtChimney_Text_ShelbyIntro, MtChimney_Text_ShelbyDefeat, MtChimney_EventScript_DefeatedShelby specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MtChimney_EventScript_RematchShelby + goto_if_eq VAR_RESULT, TRUE, MtChimney_EventScript_RematchShelby msgbox MtChimney_Text_ShelbyPostBattle, MSGBOX_DEFAULT release end @@ -525,8 +515,7 @@ MtChimney_EventScript_Grunt1:: MtChimney_EventScript_Sawyer:: trainerbattle_single TRAINER_SAWYER_1, MtChimney_Text_SawyerIntro, MtChimney_Text_SawyerDefeat, MtChimney_EventScript_SawyerDefeated specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MtChimney_EventScript_SawyerRematch + goto_if_eq VAR_RESULT, TRUE, MtChimney_EventScript_SawyerRematch msgbox MtChimney_Text_SawyerPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/MtChimney_CableCarStation/scripts.inc b/data/maps/MtChimney_CableCarStation/scripts.inc index a3a2b360e..b3e36a496 100644 --- a/data/maps/MtChimney_CableCarStation/scripts.inc +++ b/data/maps/MtChimney_CableCarStation/scripts.inc @@ -6,8 +6,7 @@ MtChimney_CableCarStation_MapScripts:: .byte 0 MtChimney_CableCarStation_OnTransition: - compare VAR_CABLE_CAR_STATION_STATE, 1 - call_if_eq MtChimney_CableCarStation_EventScript_MoveAttendantAside + call_if_eq VAR_CABLE_CAR_STATION_STATE, 1, MtChimney_CableCarStation_EventScript_MoveAttendantAside end MtChimney_CableCarStation_EventScript_MoveAttendantAside:: @@ -34,10 +33,8 @@ MtChimney_CableCarStation_EventScript_Attendant:: lock faceplayer msgbox MtChimney_CableCarStation_Text_CableCarReadyGetOn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MtChimney_CableCarStation_EventScript_RideCableCar - compare VAR_RESULT, NO - goto_if_eq MtChimney_CableCarStation_EventScript_DeclineRide + goto_if_eq VAR_RESULT, YES, MtChimney_CableCarStation_EventScript_RideCableCar + goto_if_eq VAR_RESULT, NO, MtChimney_CableCarStation_EventScript_DeclineRide end MtChimney_CableCarStation_EventScript_RideCableCar:: diff --git a/data/maps/MtPyre_1F/scripts.inc b/data/maps/MtPyre_1F/scripts.inc index 1354b2ac1..f97149b05 100644 --- a/data/maps/MtPyre_1F/scripts.inc +++ b/data/maps/MtPyre_1F/scripts.inc @@ -7,8 +7,7 @@ MtPyre_1F_EventScript_CleanseTagWoman:: goto_if_set FLAG_RECEIVED_CLEANSE_TAG, MtPyre_1F_EventScript_ReceivedCleanseTag msgbox MtPyre_1F_Text_TakeThisForYourOwnGood, MSGBOX_DEFAULT giveitem ITEM_CLEANSE_TAG - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_CLEANSE_TAG release end diff --git a/data/maps/MtPyre_3F/scripts.inc b/data/maps/MtPyre_3F/scripts.inc index b91a589bc..ff15f9939 100644 --- a/data/maps/MtPyre_3F/scripts.inc +++ b/data/maps/MtPyre_3F/scripts.inc @@ -14,8 +14,7 @@ MtPyre_3F_EventScript_Kayla:: MtPyre_3F_EventScript_Gabrielle:: trainerbattle_single TRAINER_GABRIELLE_1, MtPyre_3F_Text_GabrielleIntro, MtPyre_3F_Text_GabrielleDefeat, MtPyre_3F_EventScript_RegisterGabrielle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MtPyre_3F_EventScript_RematchGabrielle + goto_if_eq VAR_RESULT, TRUE, MtPyre_3F_EventScript_RematchGabrielle msgbox MtPyre_3F_Text_GabriellePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/MtPyre_6F/scripts.inc b/data/maps/MtPyre_6F/scripts.inc index 4b7df8e7c..4de3f6e8b 100644 --- a/data/maps/MtPyre_6F/scripts.inc +++ b/data/maps/MtPyre_6F/scripts.inc @@ -4,8 +4,7 @@ MtPyre_6F_MapScripts:: MtPyre_6F_EventScript_Valerie:: trainerbattle_single TRAINER_VALERIE_1, MtPyre_6F_Text_ValerieIntro, MtPyre_6F_Text_ValerieDefeat, MtPyre_6F_EventScript_RegisterValerie specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MtPyre_6F_EventScript_RematchValerie + goto_if_eq VAR_RESULT, TRUE, MtPyre_6F_EventScript_RematchValerie msgbox MtPyre_6F_Text_ValeriePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/MtPyre_Exterior/scripts.inc b/data/maps/MtPyre_Exterior/scripts.inc index 01279d645..83bced735 100644 --- a/data/maps/MtPyre_Exterior/scripts.inc +++ b/data/maps/MtPyre_Exterior/scripts.inc @@ -8,8 +8,7 @@ MtPyre_Exterior_OnTransition: MtPyre_Exterior_EventScript_CheckEnterFromSummit:: getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_1, 12 - goto_if_lt MtPyre_Exterior_EventScript_EnterFromSummit + goto_if_lt VAR_TEMP_1, 12, MtPyre_Exterior_EventScript_EnterFromSummit return MtPyre_Exterior_EventScript_EnterFromSummit:: diff --git a/data/maps/MtPyre_Summit/scripts.inc b/data/maps/MtPyre_Summit/scripts.inc index cd58627af..3de60df3f 100644 --- a/data/maps/MtPyre_Summit/scripts.inc +++ b/data/maps/MtPyre_Summit/scripts.inc @@ -11,8 +11,7 @@ MtPyre_Summit_MapScripts:: .byte 0 MtPyre_Summit_OnTransition: - compare VAR_MT_PYRE_STATE, 2 - call_if_eq MtPyre_Summit_EventScript_SetArchieMaxiePositions + call_if_eq VAR_MT_PYRE_STATE, 2, MtPyre_Summit_EventScript_SetArchieMaxiePositions end MtPyre_Summit_EventScript_SetArchieMaxiePositions:: @@ -45,12 +44,9 @@ MtPyre_Summit_EventScript_TeamAquaExits:: applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 50 - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_ArchieFacePlayer0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_ArchieFacePlayer1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_ArchieFacePlayer2 msgbox MtPyre_Summit_Text_ArchieWeGotTheOrbLetsGo, MSGBOX_DEFAULT closemessage fadescreen FADE_TO_BLACK @@ -65,12 +61,9 @@ MtPyre_Summit_EventScript_TeamAquaExits:: fadescreen FADE_FROM_BLACK delay 20 setvar VAR_MT_PYRE_STATE, 1 - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_OldLadyApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_OldLadyApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_OldLadyApproachPlayer2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_OldLadyApproachPlayer0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_OldLadyApproachPlayer1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_OldLadyApproachPlayer2 msgbox MtPyre_Summit_Text_BothOrbsTakenMagmaLeftThis, MSGBOX_DEFAULT giveitem ITEM_MAGMA_EMBLEM setflag FLAG_RECEIVED_RED_OR_BLUE_ORB @@ -142,19 +135,15 @@ MtPyre_Summit_EventScript_OldMan:: faceplayer goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, MtPyre_Summit_EventScript_OldManAfterRayquaza msgbox MtPyre_Summit_Text_WillYouHearOutMyTale, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq MtPyre_Summit_EventScript_OldManTale - compare VAR_RESULT, NO - call_if_eq MtPyre_Summit_EventScript_DeclineOldManTale + call_if_eq VAR_RESULT, YES, MtPyre_Summit_EventScript_OldManTale + call_if_eq VAR_RESULT, NO, MtPyre_Summit_EventScript_DeclineOldManTale release end MtPyre_Summit_EventScript_OldManAfterRayquaza:: msgbox MtPyre_Summit_Text_HearTheNewLegendOfHoenn, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq MtPyre_Summit_EventScript_OldManNewTale - compare VAR_RESULT, NO - call_if_eq MtPyre_Summit_EventScript_DeclineOldManTale + call_if_eq VAR_RESULT, YES, MtPyre_Summit_EventScript_OldManNewTale + call_if_eq VAR_RESULT, NO, MtPyre_Summit_EventScript_DeclineOldManTale release end @@ -174,8 +163,7 @@ MtPyre_Summit_EventScript_OldLady:: lock faceplayer goto_if_set FLAG_RETURNED_RED_OR_BLUE_ORB, MtPyre_Summit_EventScript_OldLadyAfterOrbsReturned - compare VAR_MT_PYRE_STATE, 3 - call_if_ge MtPyre_Summit_EventScript_OldLadyOrbsReturned + call_if_ge VAR_MT_PYRE_STATE, 3, MtPyre_Summit_EventScript_OldLadyOrbsReturned goto_if_set FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, MtPyre_Summit_EventScript_OldLadyLegendariesAwake msgbox MtPyre_Summit_Text_OrbsHaveBeenTaken, MSGBOX_DEFAULT release @@ -219,32 +207,23 @@ MtPyre_Summit_EventScript_ArchieMaxieReturnOrbs:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 60 - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_ArchieMaxieBeginExit0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_ArchieMaxieBeginExit1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_ArchieMaxieBeginExit2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_ArchieMaxieBeginExit0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_ArchieMaxieBeginExit1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_ArchieMaxieBeginExit2 playse SE_PIN applymovement LOCALID_MAXIE, Common_Movement_ExclamationMark waitmovement 0 applymovement LOCALID_MAXIE, Common_Movement_Delay48 waitmovement 0 delay 30 - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachPlayer2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_MaxieApproachPlayer0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_MaxieApproachPlayer1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_MaxieApproachPlayer2 msgbox MtPyre_Summit_Text_MaxieSilence, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachArchie0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachArchie1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachArchie2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_MaxieApproachArchie0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_MaxieApproachArchie1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_MaxieApproachArchie2 delay 30 applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieExit applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieExit diff --git a/data/maps/NavelRock_Bottom/scripts.inc b/data/maps/NavelRock_Bottom/scripts.inc index d79c00c68..f6687a36f 100644 --- a/data/maps/NavelRock_Bottom/scripts.inc +++ b/data/maps/NavelRock_Bottom/scripts.inc @@ -25,8 +25,7 @@ NavelRock_Bottom_OnResume: NavelRock_Bottom_EventScript_TryRemoveLugia:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_LUGIA return @@ -63,12 +62,9 @@ NavelRock_Bottom_EventScript_Lugia:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NavelRock_Bottom_EventScript_DefeatedLugia - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NavelRock_Bottom_EventScript_RanFromLugia - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NavelRock_Bottom_EventScript_RanFromLugia + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NavelRock_Bottom_EventScript_DefeatedLugia + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NavelRock_Bottom_EventScript_RanFromLugia + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NavelRock_Bottom_EventScript_RanFromLugia setflag FLAG_CAUGHT_LUGIA release end diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index 759434cde..a98175917 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -8,8 +8,7 @@ NavelRock_Harbor_EventScript_Sailor:: lock faceplayer msgbox NavelRock_Harbor_Text_SailorReturn, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq NavelRock_Harbor_EventScript_AsYouLike + goto_if_eq VAR_RESULT, NO, NavelRock_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown diff --git a/data/maps/NavelRock_Top/scripts.inc b/data/maps/NavelRock_Top/scripts.inc index e8b3e7e29..2805f5677 100644 --- a/data/maps/NavelRock_Top/scripts.inc +++ b/data/maps/NavelRock_Top/scripts.inc @@ -28,8 +28,7 @@ NavelRock_Top_OnResume: NavelRock_Top_EventScript_TryRemoveHoOh:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_HO_OH return @@ -68,12 +67,9 @@ NavelRock_Top_EventScript_HoOh:: clearflag FLAG_SYS_CTRL_OBJ_DELETE setvar VAR_LAST_TALKED, LOCALID_HO_OH specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NavelRock_Top_EventScript_DefeatedHoOh - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NavelRock_Top_EventScript_RanFromHoOh - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NavelRock_Top_EventScript_RanFromHoOh + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NavelRock_Top_EventScript_DefeatedHoOh + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NavelRock_Top_EventScript_RanFromHoOh + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NavelRock_Top_EventScript_RanFromHoOh setflag FLAG_CAUGHT_HO_OH releaseall end diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc index 50582ce38..4c498190e 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -4,8 +4,7 @@ NewMauville_Entrance_MapScripts:: .byte 0 NewMauville_Entrance_OnLoad: - compare VAR_NEW_MAUVILLE_STATE, 0 - call_if_eq NewMauville_Entrance_EventScript_CloseDoor + call_if_eq VAR_NEW_MAUVILLE_STATE, 0, NewMauville_Entrance_EventScript_CloseDoor end NewMauville_Entrance_EventScript_CloseDoor:: @@ -27,11 +26,9 @@ NewMauville_Entrance_EventScript_Door:: waitmovement 0 msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT checkitem ITEM_BASEMENT_KEY - compare VAR_RESULT, FALSE - goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor + goto_if_eq VAR_RESULT, FALSE, NewMauville_Entrance_EventScript_DontOpenDoor msgbox NewMauville_Entrance_Text_UseBasementKey, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor + goto_if_eq VAR_RESULT, NO, NewMauville_Entrance_EventScript_DontOpenDoor msgbox NewMauville_Entrance_Text_UsedBasementKey, MSGBOX_DEFAULT setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, FALSE setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, FALSE diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc index 543b030e1..51748380a 100644 --- a/data/maps/NewMauville_Inside/scripts.inc +++ b/data/maps/NewMauville_Inside/scripts.inc @@ -5,17 +5,14 @@ NewMauville_Inside_MapScripts:: .byte 0 NewMauville_Inside_OnResume: - compare VAR_TEMP_1, 1 - call_if_eq NewMauville_Inside_EventScript_SetBarrierStateBlueButton - compare VAR_TEMP_2, 1 - call_if_eq NewMauville_Inside_EventScript_SetBarrierStateGreenButton + call_if_eq VAR_TEMP_1, 1, NewMauville_Inside_EventScript_SetBarrierStateBlueButton + call_if_eq VAR_TEMP_2, 1, NewMauville_Inside_EventScript_SetBarrierStateGreenButton call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NewMauville_Inside_EventScript_TryRemoveVoltorb end NewMauville_Inside_EventScript_TryRemoveVoltorb:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -40,8 +37,7 @@ NewMauville_Inside_EventScript_ShowVoltorb3:: return NewMauville_Inside_OnLoad: - compare VAR_NEW_MAUVILLE_STATE, 2 - call_if_eq NewMauville_Inside_EventScript_SetGeneratorOffMetatiles + call_if_eq VAR_NEW_MAUVILLE_STATE, 2, NewMauville_Inside_EventScript_SetGeneratorOffMetatiles end NewMauville_Inside_EventScript_BlueButton:: @@ -167,8 +163,7 @@ NewMauville_Inside_EventScript_SetGeneratorOffMetatiles:: NewMauville_Inside_EventScript_Generator:: lockall - compare VAR_NEW_MAUVILLE_STATE, 2 - goto_if_eq NewMauville_Inside_EventScript_GeneratorOff + goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, NewMauville_Inside_EventScript_GeneratorOff msgbox NewMauville_Inside_Text_GeneratorRadiatingHeat, MSGBOX_DEFAULT releaseall end @@ -190,12 +185,9 @@ NewMauville_Inside_EventScript_Voltorb1:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb1 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb1 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb1 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NewMauville_Inside_EventScript_DefeatedVoltorb1 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NewMauville_Inside_EventScript_DefeatedVoltorb1 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NewMauville_Inside_EventScript_DefeatedVoltorb1 setflag FLAG_DEFEATED_VOLTORB_1_NEW_MAUVILLE release end @@ -217,12 +209,9 @@ NewMauville_Inside_EventScript_Voltorb2:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb2 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb2 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb2 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NewMauville_Inside_EventScript_DefeatedVoltorb2 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NewMauville_Inside_EventScript_DefeatedVoltorb2 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NewMauville_Inside_EventScript_DefeatedVoltorb2 setflag FLAG_DEFEATED_VOLTORB_2_NEW_MAUVILLE release end @@ -244,12 +233,9 @@ NewMauville_Inside_EventScript_Voltorb3:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb3 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb3 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb3 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NewMauville_Inside_EventScript_DefeatedVoltorb3 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NewMauville_Inside_EventScript_DefeatedVoltorb3 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NewMauville_Inside_EventScript_DefeatedVoltorb3 setflag FLAG_DEFEATED_VOLTORB_3_NEW_MAUVILLE release end diff --git a/data/maps/OldaleTown/scripts.inc b/data/maps/OldaleTown/scripts.inc index 7d4ce4389..3f43386cb 100644 --- a/data/maps/OldaleTown/scripts.inc +++ b/data/maps/OldaleTown/scripts.inc @@ -76,8 +76,7 @@ OldaleTown_EventScript_GoToMartEast:: OldaleTown_EventScript_ExplainPokemonMart:: msgbox OldaleTown_Text_ThisIsAPokemonMart, MSGBOX_DEFAULT giveitem ITEM_POTION - compare VAR_RESULT, FALSE - goto_if_eq OldaleTown_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, OldaleTown_EventScript_BagIsFull msgbox OldaleTown_Text_PotionExplanation, MSGBOX_DEFAULT setflag FLAG_RECEIVED_POTION_OLDALE fadedefaultbgm @@ -260,10 +259,8 @@ OldaleTown_EventScript_RivalTrigger3:: OldaleTown_EventScript_ShowRivalMessage:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq OldaleTown_EventScript_ShowMayMessage - compare VAR_RESULT, FEMALE - goto_if_eq OldaleTown_EventScript_ShowBrendanMessage + goto_if_eq VAR_RESULT, MALE, OldaleTown_EventScript_ShowMayMessage + goto_if_eq VAR_RESULT, FEMALE, OldaleTown_EventScript_ShowBrendanMessage end OldaleTown_EventScript_ShowMayMessage:: @@ -278,10 +275,8 @@ OldaleTown_EventScript_ShowBrendanMessage:: OldaleTown_EventScript_RivalFinish:: closemessage - compare VAR_0x8009, 0 - call_if_eq OldaleTown_EventScript_DoExitMovement1 - compare VAR_0x8009, 1 - call_if_eq OldaleTown_EventScript_DoExitMovement2 + call_if_eq VAR_0x8009, 0, OldaleTown_EventScript_DoExitMovement1 + call_if_eq VAR_0x8009, 1, OldaleTown_EventScript_DoExitMovement2 applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalExit waitmovement 0 removeobject LOCALID_RIVAL @@ -291,8 +286,7 @@ OldaleTown_EventScript_RivalFinish:: end OldaleTown_EventScript_DoExitMovement1:: - compare VAR_FACING, DIR_SOUTH - goto_if_ne OldaleTown_EventScript_DoExitMovement2 + goto_if_ne VAR_FACING, DIR_SOUTH, OldaleTown_EventScript_DoExitMovement2 applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalExit waitmovement 0 return diff --git a/data/maps/PacifidlogTown_House2/scripts.inc b/data/maps/PacifidlogTown_House2/scripts.inc index ea0710c3d..3dedcec30 100644 --- a/data/maps/PacifidlogTown_House2/scripts.inc +++ b/data/maps/PacifidlogTown_House2/scripts.inc @@ -11,19 +11,16 @@ PacifidlogTown_House2_EventScript_FanClubYoungerBrother:: call_if_unset FLAG_MET_FANCLUB_YOUNGER_BROTHER, PacifidlogTown_House2_EventScript_FirstMonAssessment setflag FLAG_MET_FANCLUB_YOUNGER_BROTHER specialvar VAR_RESULT, GetLeadMonFriendshipScore - compare VAR_RESULT, 4 - goto_if_ge PacifidlogTown_House2_EventScript_GiveReturn + goto_if_ge VAR_RESULT, 4, PacifidlogTown_House2_EventScript_GiveReturn specialvar VAR_RESULT, GetLeadMonFriendshipScore - compare VAR_RESULT, 2 - goto_if_ge PacifidlogTown_House2_EventScript_PutInEffort + goto_if_ge VAR_RESULT, 2, PacifidlogTown_House2_EventScript_PutInEffort goto PacifidlogTown_House2_EventScript_GiveFrustration end PacifidlogTown_House2_EventScript_UpdateFanClubTMFlag:: goto_if_unset FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, Common_EventScript_NopReturn specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable - compare VAR_RESULT, 0 - call_if_eq PacifidlogTown_House2_EventScript_ClearReceivedFanClubTM + call_if_eq VAR_RESULT, 0, PacifidlogTown_House2_EventScript_ClearReceivedFanClubTM return PacifidlogTown_House2_EventScript_MonAssessment:: @@ -42,8 +39,7 @@ PacifidlogTown_House2_EventScript_ClearReceivedFanClubTM:: PacifidlogTown_House2_EventScript_GiveReturn:: msgbox PacifidlogTown_House2_Text_AdoringPokemonTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM27 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK special SetPacifidlogTMReceivedDay msgbox PacifidlogTown_House2_Text_ExplainReturnFrustration, MSGBOX_DEFAULT @@ -58,8 +54,7 @@ PacifidlogTown_House2_EventScript_PutInEffort:: PacifidlogTown_House2_EventScript_GiveFrustration:: msgbox PacifidlogTown_House2_Text_ViciousPokemonTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM21 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK special SetPacifidlogTMReceivedDay msgbox PacifidlogTown_House2_Text_ExplainReturnFrustration, MSGBOX_DEFAULT diff --git a/data/maps/PacifidlogTown_House3/scripts.inc b/data/maps/PacifidlogTown_House3/scripts.inc index fbdeb74a5..5582f3b6b 100644 --- a/data/maps/PacifidlogTown_House3/scripts.inc +++ b/data/maps/PacifidlogTown_House3/scripts.inc @@ -10,18 +10,15 @@ PacifidlogTown_House3_EventScript_Trader:: specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox PacifidlogTown_House3_Text_WillingToTradeIt, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq PacifidlogTown_House3_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, PacifidlogTown_House3_EventScript_DeclineTrade special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq PacifidlogTown_House3_EventScript_DeclineTrade + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, PacifidlogTown_House3_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies copyvar VAR_0x800B, VAR_RESULT - compare VAR_RESULT, VAR_0x8009 - goto_if_ne PacifidlogTown_House3_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, PacifidlogTown_House3_EventScript_NotRequestedMon copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8005, VAR_0x800A special CreateInGameTradePokemon diff --git a/data/maps/PacifidlogTown_House4/scripts.inc b/data/maps/PacifidlogTown_House4/scripts.inc index 12d7197bd..f17abcd30 100644 --- a/data/maps/PacifidlogTown_House4/scripts.inc +++ b/data/maps/PacifidlogTown_House4/scripts.inc @@ -13,10 +13,8 @@ PacifidlogTown_House4_EventScript_Boy:: lock faceplayer msgbox PacifidlogTown_House4_Text_WhereDidYouComeFrom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PacifidlogTown_House4_EventScript_Yes - compare VAR_RESULT, NO - goto_if_eq PacifidlogTown_House4_EventScript_No + goto_if_eq VAR_RESULT, YES, PacifidlogTown_House4_EventScript_Yes + goto_if_eq VAR_RESULT, NO, PacifidlogTown_House4_EventScript_No end PacifidlogTown_House4_EventScript_Yes:: diff --git a/data/maps/PacifidlogTown_House5/scripts.inc b/data/maps/PacifidlogTown_House5/scripts.inc index 5da4fb902..474a2663e 100644 --- a/data/maps/PacifidlogTown_House5/scripts.inc +++ b/data/maps/PacifidlogTown_House5/scripts.inc @@ -5,8 +5,7 @@ PacifidlogTown_House5_EventScript_MirageIslandWatcher:: lock faceplayer specialvar VAR_RESULT, IsMirageIslandPresent - compare VAR_RESULT, TRUE - goto_if_eq PacifidlogTown_House5_EventScript_MirageIslandPresent + goto_if_eq VAR_RESULT, TRUE, PacifidlogTown_House5_EventScript_MirageIslandPresent msgbox PacifidlogTown_House5_Text_CantSeeMirageIslandToday, MSGBOX_DEFAULT release end diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc index 25b39a3eb..3609b2622 100644 --- a/data/maps/PetalburgCity/scripts.inc +++ b/data/maps/PetalburgCity/scripts.inc @@ -11,14 +11,10 @@ PetalburgCity_MapScripts:: PetalburgCity_OnTransition: setflag FLAG_VISITED_PETALBURG_CITY - compare VAR_PETALBURG_CITY_STATE, 0 - call_if_eq PetalburgCity_EventScript_MoveGymBoyToWestEntrance - compare VAR_PETALBURG_CITY_STATE, 2 - call_if_eq PetalburgCity_EventScript_DisableMapNameAndMusic - compare VAR_PETALBURG_CITY_STATE, 4 - call_if_eq PetalburgCity_EventScript_DisableMapNameAndMusic - compare VAR_PETALBURG_GYM_STATE, 8 - call_if_eq PetalburgCity_EventScript_SetGymDoorsUnlocked + call_if_eq VAR_PETALBURG_CITY_STATE, 0, PetalburgCity_EventScript_MoveGymBoyToWestEntrance + call_if_eq VAR_PETALBURG_CITY_STATE, 2, PetalburgCity_EventScript_DisableMapNameAndMusic + call_if_eq VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_EventScript_DisableMapNameAndMusic + call_if_eq VAR_PETALBURG_GYM_STATE, 8, PetalburgCity_EventScript_SetGymDoorsUnlocked end PetalburgCity_EventScript_MoveGymBoyToWestEntrance:: @@ -277,24 +273,16 @@ PetalburgCity_EventScript_ShowGymToPlayer:: waitmovement 0 applymovement LOCALID_GYM_BOY, Common_Movement_Delay48 waitmovement 0 - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_EventScript_BoyApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_EventScript_BoyApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_EventScript_BoyApproachPlayer2 - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_EventScript_BoyApproachPlayer3 + call_if_eq VAR_0x8008, 0, PetalburgCity_EventScript_BoyApproachPlayer0 + call_if_eq VAR_0x8008, 1, PetalburgCity_EventScript_BoyApproachPlayer1 + call_if_eq VAR_0x8008, 2, PetalburgCity_EventScript_BoyApproachPlayer2 + call_if_eq VAR_0x8008, 3, PetalburgCity_EventScript_BoyApproachPlayer3 msgbox PetalburgCity_Text_AreYouRookieTrainer, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_EventScript_LeadPlayerToGym0 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_EventScript_LeadPlayerToGym1 - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_EventScript_LeadPlayerToGym2 - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_EventScript_LeadPlayerToGym3 + call_if_eq VAR_0x8008, 0, PetalburgCity_EventScript_LeadPlayerToGym0 + call_if_eq VAR_0x8008, 1, PetalburgCity_EventScript_LeadPlayerToGym1 + call_if_eq VAR_0x8008, 2, PetalburgCity_EventScript_LeadPlayerToGym2 + call_if_eq VAR_0x8008, 3, PetalburgCity_EventScript_LeadPlayerToGym3 msgbox PetalburgCity_Text_ThisIsPetalburgGym, MSGBOX_DEFAULT applymovement LOCALID_GYM_BOY, Common_Movement_WalkInPlaceFasterRight applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight @@ -571,14 +559,10 @@ PetalburgCity_EventScript_Scott:: delay 30 msgbox PetalburgCity_Text_ImLookingForTalentedTrainers, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_EventScript_ScottExit0 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_EventScript_ScottExit1 - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_EventScript_ScottExit2 - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_EventScript_ScottExit3 + call_if_eq VAR_0x8008, 0, PetalburgCity_EventScript_ScottExit0 + call_if_eq VAR_0x8008, 1, PetalburgCity_EventScript_ScottExit1 + call_if_eq VAR_0x8008, 2, PetalburgCity_EventScript_ScottExit2 + call_if_eq VAR_0x8008, 3, PetalburgCity_EventScript_ScottExit3 setvar VAR_SCOTT_PETALBURG_ENCOUNTER, 1 removeobject LOCALID_SCOTT releaseall diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index 251f24aa6..836da26bf 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -10,10 +10,8 @@ PetalburgCity_Gym_MapScripts:: .byte 0 PetalburgCity_Gym_OnLoad: - compare VAR_PETALBURG_GYM_STATE, 6 - goto_if_eq PetalburgCity_Gym_EventScript_OpenUnlockedDoors - compare VAR_PETALBURG_GYM_STATE, 7 - call_if_ge PetalburgCity_Gym_EventScript_UnlockAllDoors + goto_if_eq VAR_PETALBURG_GYM_STATE, 6, PetalburgCity_Gym_EventScript_OpenUnlockedDoors + call_if_ge VAR_PETALBURG_GYM_STATE, 7, PetalburgCity_Gym_EventScript_UnlockAllDoors end @ NOTE: Strength and OHKO rooms are misleading. Both are more accurately Critical-Hit @@ -42,10 +40,8 @@ PetalburgCity_Gym_EventScript_UnlockAllDoors:: return PetalburgCity_Gym_OnTransition: - compare VAR_PETALBURG_GYM_STATE, 1 - call_if_eq PetalburgCity_Gym_EventScript_MoveWallyToEntrance - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_lt PetalburgCity_Gym_EventScript_MoveNormanToEntrance + call_if_eq VAR_PETALBURG_GYM_STATE, 1, PetalburgCity_Gym_EventScript_MoveWallyToEntrance + call_if_lt VAR_PETALBURG_GYM_STATE, 6, PetalburgCity_Gym_EventScript_MoveNormanToEntrance call_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_CheckNormanForRematch end @@ -60,10 +56,8 @@ PetalburgCity_Gym_EventScript_MoveNormanToEntrance:: PetalburgCity_Gym_EventScript_CheckNormanForRematch:: setorcopyvar VAR_TRAINER_BATTLE_OPPONENT_A, TRAINER_NORMAN_1 specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_Gym_EventScript_DontMoveNormanToFront - compare VAR_PETALBURG_GYM_STATE, 8 - goto_if_eq PetalburgCity_Gym_EventScript_DontMoveNormanToFront + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontMoveNormanToFront + goto_if_eq VAR_PETALBURG_GYM_STATE, 8, PetalburgCity_Gym_EventScript_DontMoveNormanToFront setobjectxyperm LOCALID_NORMAN, 4, 107 return @@ -152,66 +146,42 @@ PetalburgCity_Gym_EventScript_BeginWallyTutorialEast:: PetalburgCity_Gym_EventScript_BeginWallyTutorial:: addobject LOCALID_WALLY playse SE_DOOR - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_WallyArriveSouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_WallyArriveNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_WallyArriveWestEast - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_WallyArriveWestEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_WallyArriveSouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallyArriveNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_WallyArriveWestEast + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_WallyArriveWestEast msgbox PetalburgCity_Gym_Text_WallyIdLikeAPokemon, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_DadOhYoureWallyRight, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_WallyIveNeverCaughtAPokemon, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_DadHmISee, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerSouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerWest - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_NormanAddressPlayerSouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_NormanAddressPlayerNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_NormanAddressPlayerWest + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_NormanAddressPlayerEast msgbox PetalburgCity_Gym_Text_DadPlayerGoWithWally, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallySouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallyNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallyWest - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallyEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_NormanAddressWallySouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_NormanAddressWallyNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_NormanAddressWallyWest + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_NormanAddressWallyEast msgbox PetalburgCity_Gym_Text_IllLoanYouMyZigzagoon, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_WallyThankYouAndDadGivesPokeBall, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_WallyOhWowThankYou, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorSouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorWest - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorEast - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_WallyFacePlayer - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_WallyFaceDown - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_WallyFacePlayer - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_WallyFacePlayer + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_NormanFaceDoorSouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_NormanFaceDoorNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_NormanFaceDoorWest + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_NormanFaceDoorEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_WallyFacePlayer + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallyFaceDown + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_WallyFacePlayer + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_WallyFacePlayer msgbox PetalburgCity_Gym_Text_WouldYouReallyComeWithMe, MSGBOX_DEFAULT closemessage setflag FLAG_DONT_TRANSITION_MUSIC playbgm MUS_FOLLOW_ME, FALSE - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallySouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallyNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallyWest - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallyEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_ExitGymWithWallySouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_ExitGymWithWallyNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_ExitGymWithWallyWest + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_ExitGymWithWallyEast removeobject LOCALID_WALLY setflag FLAG_HIDE_PETALBURG_CITY_WALLYS_MOM setvar VAR_PETALBURG_GYM_STATE, 1 @@ -361,8 +331,7 @@ PetalburgCity_Gym_EventScript_NormanFaceDoorEast:: PetalburgCity_Gym_EventScript_NormanPostBattle:: call PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_Gym_EventScript_GiveEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_GiveEnigmaBerry goto_if_unset FLAG_RECEIVED_TM42, PetalburgCity_Gym_EventScript_GiveFacade2 goto_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_NoAmountOfTrainingIsEnough msgbox PetalburgCity_Gym_Text_DadGoingToKeepTraining, MSGBOX_DEFAULT @@ -381,16 +350,12 @@ PetalburgCity_Gym_EventScript_NormanRematch:: PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry:: specialvar VAR_RESULT, IsEnigmaBerryValid - compare VAR_RESULT, FALSE - goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + goto_if_eq VAR_RESULT, FALSE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry checkitem ITEM_ENIGMA_BERRY - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry checkpcitem ITEM_ENIGMA_BERRY - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry - compare VAR_ENIGMA_BERRY_AVAILABLE, 0 - goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + goto_if_eq VAR_ENIGMA_BERRY_AVAILABLE, 0, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry msgbox PetalburgCity_Gym_Text_GiveEnigmaBerry, MSGBOX_DEFAULT setvar VAR_RESULT, TRUE return @@ -401,8 +366,7 @@ PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry:: PetalburgCity_Gym_EventScript_GiveEnigmaBerry:: giveitem ITEM_ENIGMA_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setvar VAR_ENIGMA_BERRY_AVAILABLE, 0 release end @@ -442,8 +406,7 @@ PetalburgCity_Gym_EventScript_NormanBattle:: PetalburgCity_Gym_EventScript_GiveFacade:: giveitem ITEM_TM42 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull setflag FLAG_RECEIVED_TM42 msgbox PetalburgCity_Gym_Text_ExplainFacade, MSGBOX_DEFAULT return @@ -469,31 +432,22 @@ PetalburgCity_Gym_EventScript_WallysDadArrives:: applymovement LOCALID_WALLYS_DAD, Common_Movement_Delay48 waitmovement 0 delay 10 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadApproachPlayerNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadApproachPlayerEast - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadApproachPlayerWest + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallysDadApproachPlayerNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_WallysDadApproachPlayerEast + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_WallysDadApproachPlayerWest msgbox PetalburgCity_Gym_Text_PleaseComeWithMe, MSGBOX_DEFAULT closemessage delay 20 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadFaceNormanNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadFaceNormanEast - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadFaceNormanWest + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallysDadFaceNormanNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_WallysDadFaceNormanEast + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_WallysDadFaceNormanWest msgbox PetalburgCity_Gym_Text_LetMeBorrowPlayer, MSGBOX_DEFAULT closemessage setflag FLAG_DONT_TRANSITION_MUSIC playbgm MUS_FOLLOW_ME, FALSE - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallysDadNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallysDadEast - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallysDadWest + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_ExitGymWithWallysDadNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_ExitGymWithWallysDadEast + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_ExitGymWithWallysDadWest removeobject LOCALID_WALLYS_DAD setvar VAR_PETALBURG_CITY_STATE, 4 clearflag FLAG_HIDE_PETALBURG_CITY_WALLYS_DAD @@ -782,15 +736,12 @@ PetalburgCity_Gym_EventScript_NoAmountOfTrainingIsEnough:: PetalburgCity_Gym_EventScript_SpeedRoomDoor:: lockall - compare VAR_PETALBURG_GYM_STATE, 6 - goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked + goto_if_lt VAR_PETALBURG_GYM_STATE, 6, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 7 setvar VAR_0x8009, 85 msgbox PetalburgCity_Gym_Text_EnterSpeedRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_EnterRoom:: @@ -813,15 +764,12 @@ PetalburgCity_Gym_EventScript_DoorLocked:: @ VAR_0x8008 and VAR_0x8009 below are the x and y coordinates of the warp PetalburgCity_Gym_EventScript_AccuracyRoomDoor:: lockall - compare VAR_PETALBURG_GYM_STATE, 6 - goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked + goto_if_lt VAR_PETALBURG_GYM_STATE, 6, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 1 setvar VAR_0x8009, 98 msgbox PetalburgCity_Gym_Text_EnterAccuracyRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_ConfusionRoomDoor:: @@ -830,10 +778,8 @@ PetalburgCity_Gym_EventScript_ConfusionRoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 46 msgbox PetalburgCity_Gym_Text_EnterConfusionRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_LeftDefenseRoomDoor:: @@ -842,10 +788,8 @@ PetalburgCity_Gym_EventScript_LeftDefenseRoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 59 msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RightDefenseRoomDoor:: @@ -854,10 +798,8 @@ PetalburgCity_Gym_EventScript_RightDefenseRoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 59 msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RecoveryRoomDoor:: @@ -866,10 +808,8 @@ PetalburgCity_Gym_EventScript_RecoveryRoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 72 msgbox PetalburgCity_Gym_Text_EnterRecoveryRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_LeftStrengthRoomDoor:: @@ -878,10 +818,8 @@ PetalburgCity_Gym_EventScript_LeftStrengthRoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 20 msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RightStrengthRoomDoor:: @@ -890,10 +828,8 @@ PetalburgCity_Gym_EventScript_RightStrengthRoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 20 msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_LeftOHKORoomDoor:: @@ -902,10 +838,8 @@ PetalburgCity_Gym_EventScript_LeftOHKORoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 33 msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RightOHKORoomDoor:: @@ -914,10 +848,8 @@ PetalburgCity_Gym_EventScript_RightOHKORoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 33 msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_LeftGymLeadersRoomDoor:: @@ -926,10 +858,8 @@ PetalburgCity_Gym_EventScript_LeftGymLeadersRoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 7 msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RightGymLeadersRoomDoor:: @@ -938,10 +868,8 @@ PetalburgCity_Gym_EventScript_RightGymLeadersRoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 7 msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_Randall:: @@ -1067,73 +995,57 @@ PetalburgCity_Gym_EventScript_JodyPostBadge:: @ VAR_0x8005 below is 0 when the door should be slid open and 1 when it should be unlocked immediately PetalburgCity_Gym_EventScript_OpenGymEntranceDoors:: setvar VAR_0x8004, 1 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetEntranceRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenSpeedRoomDoors:: setvar VAR_0x8004, 2 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetSpeedRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenAccuracyRoomDoors:: setvar VAR_0x8004, 3 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetAccuracyRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenConfusionRoomDoors:: setvar VAR_0x8004, 4 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetConfusionRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenDefenseRoomDoors:: setvar VAR_0x8004, 5 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetDefenseRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenRecoveryRoomDoors:: setvar VAR_0x8004, 6 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetRecoveryRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenStrengthRoomDoors:: setvar VAR_0x8004, 7 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetStrengthRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenOHKORoomDoors:: setvar VAR_0x8004, 8 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetOHKORoomDoorMetatiles return diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc index 58b58054f..3dadd3184 100644 --- a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc @@ -31,18 +31,14 @@ PetalburgCity_PokemonCenter_1F_EventScript_Woman:: faceplayer msgbox PetalburgCity_PokemonCenter_1F_Text_ManyTypesOfPokemon, MSGBOX_DEFAULT specialvar VAR_RESULT, IsStarterInParty - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayStarterTypeInfo + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_PokemonCenter_1F_EventScript_SayStarterTypeInfo release end PetalburgCity_PokemonCenter_1F_EventScript_SayStarterTypeInfo:: - compare VAR_STARTER_MON, 0 - call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayTreeckoType - compare VAR_STARTER_MON, 1 - call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayTorchicType - compare VAR_STARTER_MON, 2 - call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayMudkipType + call_if_eq VAR_STARTER_MON, 0, PetalburgCity_PokemonCenter_1F_EventScript_SayTreeckoType + call_if_eq VAR_STARTER_MON, 1, PetalburgCity_PokemonCenter_1F_EventScript_SayTorchicType + call_if_eq VAR_STARTER_MON, 2, PetalburgCity_PokemonCenter_1F_EventScript_SayMudkipType release end diff --git a/data/maps/PetalburgWoods/scripts.inc b/data/maps/PetalburgWoods/scripts.inc index dd2d9273f..94bd39014 100644 --- a/data/maps/PetalburgWoods/scripts.inc +++ b/data/maps/PetalburgWoods/scripts.inc @@ -92,8 +92,7 @@ PetalburgWoods_EventScript_DevonResearcherPostBattle:: waitmovement 0 msgbox PetalburgWoods_Text_ThatWasAwfullyClose, MSGBOX_DEFAULT giveitem ITEM_GREAT_BALL - compare VAR_RESULT, FALSE - goto_if_eq PetalburgWoods_EventScript_BagFull + goto_if_eq VAR_RESULT, FALSE, PetalburgWoods_EventScript_BagFull goto PetalburgWoods_EventScript_DevonResearcherFinish end @@ -255,8 +254,7 @@ PetalburgWoods_EventScript_Girl:: goto_if_set FLAG_RECEIVED_MIRACLE_SEED, PetalburgWoods_EventScript_ExplainMiracleSeed msgbox PetalburgWoods_Text_TryUsingThisItem, MSGBOX_DEFAULT giveitem ITEM_MIRACLE_SEED - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_MIRACLE_SEED release end @@ -282,12 +280,10 @@ PetalburgWoods_EventScript_Lyle:: PetalburgWoods_EventScript_James:: trainerbattle_single TRAINER_JAMES_1, PetalburgWoods_Text_InstantlyPopularWithBugPokemon, PetalburgWoods_Text_CantBePopularIfILose, PetalburgWoods_EventScript_TryRegisterJames specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq PetalburgWoods_EventScript_JamesRematch + goto_if_eq VAR_RESULT, TRUE, PetalburgWoods_EventScript_JamesRematch setvar VAR_0x8004, TRAINER_JAMES_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq PetalburgWoods_EventScript_TryRegisterJames2 + goto_if_eq VAR_RESULT, FALSE, PetalburgWoods_EventScript_TryRegisterJames2 msgbox PetalburgWoods_Text_PeopleRespectYou, MSGBOX_DEFAULT release end diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc index 02071aad1..dd0ef5dce 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -241,10 +241,8 @@ Route101_EventScript_BirchsBag:: setvar VAR_ROUTE101_STATE, 3 clearflag FLAG_HIDE_MAP_NAME_POPUP checkplayergender - compare VAR_RESULT, MALE - call_if_eq Route101_EventScript_HideMayInBedroom - compare VAR_RESULT, FEMALE - call_if_eq Route101_EventScript_HideBrendanInBedroom + call_if_eq VAR_RESULT, MALE, Route101_EventScript_HideMayInBedroom + call_if_eq VAR_RESULT, FEMALE, Route101_EventScript_HideBrendanInBedroom warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5 waitstate release diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index cc1eaa4bb..6131ef9e0 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -20,12 +20,10 @@ Route102_EventScript_Boy:: Route102_EventScript_Calvin:: trainerbattle_single TRAINER_CALVIN_1, Route102_Text_CalvinIntro, Route102_Text_CalvinDefeated, Route102_EventScript_CalvinRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route102_EventScript_CalvinRematch + goto_if_eq VAR_RESULT, TRUE, Route102_EventScript_CalvinRematch setvar VAR_0x8004, TRAINER_CALVIN_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route102_EventScript_CalvinTryRegister + goto_if_eq VAR_RESULT, FALSE, Route102_EventScript_CalvinTryRegister msgbox Route102_Text_CalvinPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc index cf7bc72b5..e2b75e0c3 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -22,10 +22,8 @@ Route103_EventScript_OpenAlteringCave:: Route103_EventScript_Rival:: lockall checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route103_EventScript_RivalMay - compare VAR_RESULT, FEMALE - goto_if_eq Route103_EventScript_RivalBrendan + goto_if_eq VAR_RESULT, MALE, Route103_EventScript_RivalMay + goto_if_eq VAR_RESULT, FEMALE, Route103_EventScript_RivalBrendan end Route103_EventScript_RivalMay:: @@ -211,8 +209,7 @@ Route103_EventScript_Daisy:: Route103_EventScript_Amy:: trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_AmyIntro, Route103_Text_AmyDefeated, Route103_Text_AmyNotEnoughPokemon, Route102_EventScript_AmyRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route102_EventScript_AmyRematch + goto_if_eq VAR_RESULT, TRUE, Route102_EventScript_AmyRematch msgbox Route103_Text_AmyPostBattle, MSGBOX_AUTOCLOSE end @@ -230,8 +227,7 @@ Route102_EventScript_AmyRematch:: Route103_EventScript_Liv:: trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_LivIntro, Route103_Text_LivDefeated, Route103_Text_LivNotEnoughPokemon, Route102_EventScript_LivRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route102_EventScript_LivRematch + goto_if_eq VAR_RESULT, TRUE, Route102_EventScript_LivRematch msgbox Route103_Text_LivPostBattle, MSGBOX_AUTOCLOSE end @@ -254,8 +250,7 @@ Route103_EventScript_Andrew:: Route103_EventScript_Miguel:: trainerbattle_single TRAINER_MIGUEL_1, Route103_Text_MiguelIntro, Route103_Text_MiguelDefeated, Route102_EventScript_MiguelRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route103_EventScript_MiguelRematch + goto_if_eq VAR_RESULT, TRUE, Route103_EventScript_MiguelRematch msgbox Route103_Text_MiguelPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index 4cbe5c045..68aeb0a21 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -33,8 +33,7 @@ Route104_EventScript_HideWhiteHerbFlorist:: return Route104_EventScript_TrySetRivalPos:: - compare VAR_BOARD_BRINEY_BOAT_STATE, 1 - goto_if_ge Route104_EventScript_DontSetRivalPos + goto_if_ge VAR_BOARD_BRINEY_BOAT_STATE, 1, Route104_EventScript_DontSetRivalPos goto_if_set FLAG_MET_RIVAL_RUSTBORO, Route104_EventScript_DontSetRivalPos goto_if_unset FLAG_REGISTER_RIVAL_POKENAV, Route104_EventScript_DontSetRivalPos setobjectxyperm LOCALID_RIVAL, 17, 52 @@ -77,10 +76,8 @@ Route104_EventScript_RivalTrigger:: @ Unused, shares script with Rustboro encounter instead Route104_EventScript_PlayRivalMusic:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route104_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - goto_if_eq Route104_EventScript_PlayBrendanMusic + goto_if_eq VAR_RESULT, MALE, Route104_EventScript_PlayMayMusic + goto_if_eq VAR_RESULT, FEMALE, Route104_EventScript_PlayBrendanMusic return Route104_EventScript_PlayMayMusic:: @@ -93,10 +90,8 @@ Route104_EventScript_PlayBrendanMusic:: Route104_EventScript_RivalEncounter:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route104_EventScript_MayEncounter - compare VAR_RESULT, FEMALE - goto_if_eq Route104_EventScript_BrendanEncounter + goto_if_eq VAR_RESULT, MALE, Route104_EventScript_MayEncounter + goto_if_eq VAR_RESULT, FEMALE, Route104_EventScript_BrendanEncounter end Route104_EventScript_MayEncounter:: @@ -121,8 +116,7 @@ Route104_EventScript_MayEncounter:: waitmovement 0 copyobjectxytoperm LOCALID_RIVAL msgbox Route104_Text_MayMinesDecentLetsBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route104_EventScript_BattleMay + goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleMay msgbox Route104_Text_MayHaventRaisedPokemon, MSGBOX_DEFAULT call Route104_EventScript_RestoreMusic releaseall @@ -144,8 +138,7 @@ Route104_Movement_PlayerFaceRival: Route104_EventScript_MayAskToBattle:: msgbox Route104_Text_MayLetsBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route104_EventScript_BattleMay + goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleMay msgbox Route104_Text_MayHaventRaisedPokemon, MSGBOX_DEFAULT releaseall end @@ -160,8 +153,7 @@ Route104_EventScript_BattleMay:: Route104_EventScript_MayDefeated:: msgbox Route104_Text_MayPostBattle, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq Route104_EventScript_RestoreMusic + call_if_eq VAR_0x8008, 0, Route104_EventScript_RestoreMusic releaseall end @@ -210,8 +202,7 @@ Route104_EventScript_BrendanEncounter:: waitmovement 0 copyobjectxytoperm LOCALID_RIVAL msgbox Route104_Text_BrendanDoingGreatLetsBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route104_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleBrendan msgbox Route104_Text_BrendanNoConfidence, MSGBOX_DEFAULT call Route104_EventScript_RestoreMusic releaseall @@ -219,8 +210,7 @@ Route104_EventScript_BrendanEncounter:: Route104_EventScript_BrendanAskToBattle:: msgbox Route104_Text_BrendanLetsBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route104_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleBrendan msgbox Route104_Text_BrendanNoConfidence, MSGBOX_DEFAULT releaseall end @@ -235,8 +225,7 @@ Route104_EventScript_BattleBrendan:: Route104_EventScript_BrendanDefeated:: msgbox Route104_Text_BrendanPostBattle, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq Route104_EventScript_RestoreMusic + call_if_eq VAR_0x8008, 0, Route104_EventScript_RestoreMusic releaseall end @@ -274,8 +263,7 @@ Route104_EventScript_ExpertF:: goto_if_set FLAG_RECEIVED_CHESTO_BERRY_ROUTE_104, Route104_EventScript_ReceivedBerry msgbox Route104_Text_PlantBerriesInSoilTakeThis, MSGBOX_DEFAULT giveitem ITEM_CHESTO_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_CHESTO_BERRY_ROUTE_104 msgbox Route104_Text_TrainersOftenMakeMonHoldBerries, MSGBOX_DEFAULT release @@ -292,8 +280,7 @@ Route104_EventScript_WhiteHerbFlorist:: goto_if_set FLAG_RECEIVED_WHITE_HERB, Route104_EventScript_ReceivedWhiteHerb msgbox Route104_Text_DontNeedThisTakeIt, MSGBOX_DEFAULT giveitem ITEM_WHITE_HERB - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_WHITE_HERB release end @@ -345,8 +332,7 @@ Route104_EventScript_Boy2:: goto_if_set FLAG_RECEIVED_TM09, Route104_EventScript_ReceivedBulletSeed msgbox Route104_Text_LikeFillingMouthWithSeedsTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM09 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM09 release end @@ -873,12 +859,10 @@ Route104_EventScript_Billy:: Route104_EventScript_Haley:: trainerbattle_single TRAINER_HALEY_1, Route104_Text_HaleyIntro, Route104_Text_HaleyDefeat, Route104_EventScript_TryRegisterHaleyAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route104_EventScript_RematchHaley + goto_if_eq VAR_RESULT, TRUE, Route104_EventScript_RematchHaley setvar VAR_0x8004, TRAINER_HALEY_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route104_EventScript_TryRegisterHaley + goto_if_eq VAR_RESULT, FALSE, Route104_EventScript_TryRegisterHaley msgbox Route104_Text_HaleyPostBattle, MSGBOX_DEFAULT release end @@ -916,12 +900,10 @@ Route104_EventScript_RematchHaley:: Route104_EventScript_Winston:: trainerbattle_single TRAINER_WINSTON_1, Route104_Text_WinstonIntro, Route104_Text_WinstonDefeat, Route104_EventScript_TryRegisterWinstonAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route104_EventScript_RematchWinston + goto_if_eq VAR_RESULT, TRUE, Route104_EventScript_RematchWinston setvar VAR_0x8004, TRAINER_WINSTON_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route104_EventScript_TryRegisterWinston + goto_if_eq VAR_RESULT, FALSE, Route104_EventScript_TryRegisterWinston msgbox Route104_Text_WinstonPostBattle, MSGBOX_DEFAULT release end @@ -959,12 +941,10 @@ Route104_EventScript_RematchWinston:: Route104_EventScript_Cindy:: trainerbattle_single TRAINER_CINDY_1, Route104_Text_CindyIntro, Route104_Text_CindyDefeat, Route104_EventScript_TryRegisterCindyAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route104_EventScript_RematchCindy + goto_if_eq VAR_RESULT, TRUE, Route104_EventScript_RematchCindy setvar VAR_0x8004, TRAINER_CINDY_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route104_EventScript_TryRegisterCindy + goto_if_eq VAR_RESULT, FALSE, Route104_EventScript_TryRegisterCindy msgbox Route104_Text_CindyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc index ed2a5d717..4c693cb4f 100644 --- a/data/maps/Route104_MrBrineysHouse/scripts.inc +++ b/data/maps/Route104_MrBrineysHouse/scripts.inc @@ -7,8 +7,7 @@ Route104_MrBrineysHouse_MapScripts:: Route104_MrBrineysHouse_OnTransition: setflag FLAG_LANDMARK_MR_BRINEY_HOUSE - compare VAR_BRINEY_HOUSE_STATE, 1 - call_if_eq Route104_MrBrineysHouse_EventScript_SetBrineyPeekoPos + call_if_eq VAR_BRINEY_HOUSE_STATE, 1, Route104_MrBrineysHouse_EventScript_SetBrineyPeekoPos call_if_set FLAG_RECEIVED_POKENAV, Route104_MrBrineysHouse_EventScript_HideRustboroRival end @@ -36,8 +35,7 @@ Route104_MrBrineysHouse_EventScript_SailingIntro:: setflag FLAG_MR_BRINEY_SAILING_INTRO msgbox Route104_MrBrineysHouse_Text_WaitUpPeeko, MSGBOX_DEFAULT msgbox Route104_MrBrineysHouse_Text_ItsYouLetsSailToDewford, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing + goto_if_eq VAR_RESULT, NO, Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing goto Route104_MrBrineysHouse_EventScript_SailToDewford end @@ -53,15 +51,13 @@ Route104_MrBrineysHouse_EventScript_WhereAreWeBound:: Route104_MrBrineysHouse_EventScript_SailBothDeliveries:: msgbox Route104_MrBrineysHouse_Text_NeedToMakeDeliveriesSailToDewford, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing + goto_if_eq VAR_RESULT, NO, Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing goto Route104_MrBrineysHouse_EventScript_SailToDewford end Route104_MrBrineysHouse_EventScript_SailDeliverPackage:: msgbox Route104_MrBrineysHouse_Text_NeedToDeliverPackageSailToDewford, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing + goto_if_eq VAR_RESULT, NO, Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing goto Route104_MrBrineysHouse_EventScript_SailToDewford end diff --git a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc index 34f5ba42c..5f0ec28fa 100644 --- a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc +++ b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc @@ -23,19 +23,15 @@ Route104_PrettyPetalFlowerShop_EventScript_ShopOwner:: goto_if_set FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_PrettyPetalFlowerShop_EventScript_AlreadyMet setflag FLAG_MET_PRETTY_PETAL_SHOP_OWNER msgbox Route104_PrettyPetalFlowerShop_Text_IntroLearnAboutBerries, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries - compare VAR_RESULT, NO - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries + call_if_eq VAR_RESULT, YES, Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries + call_if_eq VAR_RESULT, NO, Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries release end Route104_PrettyPetalFlowerShop_EventScript_AlreadyMet:: msgbox Route104_PrettyPetalFlowerShop_Text_LearnAboutBerries, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries - compare VAR_RESULT, NO - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries + call_if_eq VAR_RESULT, YES, Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries + call_if_eq VAR_RESULT, NO, Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries release end @@ -92,8 +88,7 @@ Route104_PrettyPetalFlowerShop_EventScript_RandomBerryGirl:: random 8 addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY msgbox Route104_PrettyPetalFlowerShop_Text_MachineMixesBerries, MSGBOX_DEFAULT release diff --git a/data/maps/Route105/scripts.inc b/data/maps/Route105/scripts.inc index 2184edf5a..bfad0daaa 100644 --- a/data/maps/Route105/scripts.inc +++ b/data/maps/Route105/scripts.inc @@ -6,10 +6,8 @@ Route105_MapScripts:: Route105_OnLoad: call_if_unset FLAG_REGI_DOORS_OPENED, Route105_CloseRegiEntrance - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_NORTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute105North - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_SOUTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute105South + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_NORTH, AbnormalWeather_EventScript_PlaceTilesRoute105North + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_SOUTH, AbnormalWeather_EventScript_PlaceTilesRoute105South end Route105_CloseRegiEntrance:: @@ -18,12 +16,9 @@ Route105_CloseRegiEntrance:: return Route105_OnTransition: - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_NORTH - call_if_eq AbnormalWeather_StartKyogreWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_SOUTH - call_if_eq AbnormalWeather_StartKyogreWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_NORTH, AbnormalWeather_StartKyogreWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_SOUTH, AbnormalWeather_StartKyogreWeather end Route105_OnFrame: @@ -63,8 +58,7 @@ Route105_EventScript_Josue:: Route105_EventScript_Andres:: trainerbattle_single TRAINER_ANDRES_1, Route105_Text_AndresIntro, Route105_Text_AndresDefeated, Route105_EventScript_AndresRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route105_EventScript_AndresRematch + goto_if_eq VAR_RESULT, TRUE, Route105_EventScript_AndresRematch msgbox Route105_Text_AndresPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route106/scripts.inc b/data/maps/Route106/scripts.inc index 2107ce1c3..0202f57f0 100644 --- a/data/maps/Route106/scripts.inc +++ b/data/maps/Route106/scripts.inc @@ -18,8 +18,7 @@ Route106_EventScript_Kyla:: Route106_EventScript_Elliot:: trainerbattle_single TRAINER_ELLIOT_1, Route106_Text_ElliotIntro, Route106_Text_ElliotDefeated, Route106_EventScript_ElliotRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route106_EventScript_ElliotRematch + goto_if_eq VAR_RESULT, TRUE, Route106_EventScript_ElliotRematch msgbox Route106_Text_ElliotPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route107/scripts.inc b/data/maps/Route107/scripts.inc index cffeafb08..b61e3e705 100644 --- a/data/maps/Route107/scripts.inc +++ b/data/maps/Route107/scripts.inc @@ -9,8 +9,7 @@ Route107_EventScript_Darrin:: Route107_EventScript_Tony:: trainerbattle_single TRAINER_TONY_1, Route107_Text_TonyIntro, Route107_Text_TonyDefeated, Route107_EventScript_TonyRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route107_EventScript_TonyRematch + goto_if_eq VAR_RESULT, TRUE, Route107_EventScript_TonyRematch msgbox Route107_Text_TonyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route108/scripts.inc b/data/maps/Route108/scripts.inc index 866391554..cc2a3e9c3 100644 --- a/data/maps/Route108/scripts.inc +++ b/data/maps/Route108/scripts.inc @@ -29,8 +29,7 @@ Route108_EventScript_Carolina:: Route108_EventScript_Cory:: trainerbattle_single TRAINER_CORY_1, Route108_Text_CoryIntro, Route108_Text_CoryDefeated, Route108_EventScript_CoryRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route108_EventScript_CoryRematch + goto_if_eq VAR_RESULT, TRUE, Route108_EventScript_CoryRematch msgbox Route108_Text_CoryPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index 08f0a1701..f0353fef4 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -282,8 +282,7 @@ Route109_EventScript_MrBriney:: Route109_EventScript_HaveNotDeliveredDevonGood:: message Route109_Text_BrineySailToDewfordQuestion msgbox Route109_Text_BrineySailToDewfordQuestion, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route109_EventScript_StayHere + goto_if_eq VAR_RESULT, NO, Route109_EventScript_StayHere goto Route109_EventScript_SailToDewford end @@ -334,8 +333,7 @@ Route109_EventScript_SoftSandGirl:: goto_if_set FLAG_RECEIVED_SOFT_SAND, Route109_EventScript_AlreadyReceivedSoftSand msgbox Route109_Text_YouCanHaveThis, MSGBOX_DEFAULT giveitem ITEM_SOFT_SAND - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 @@ -399,8 +397,7 @@ Route109_EventScript_Edmond:: Route109_EventScript_Ricky:: trainerbattle_single TRAINER_RICKY_1, Route109_Text_RickyIntro, Route109_Text_RickyDefeated, Route109_EventScript_RickyRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route109_EventScript_RickyRematch + goto_if_eq VAR_RESULT, TRUE, Route109_EventScript_RickyRematch msgbox Route109_Text_RickyPostBattle, MSGBOX_DEFAULT release end @@ -421,8 +418,7 @@ Route109_EventScript_RickyRematch:: Route109_EventScript_Lola:: trainerbattle_single TRAINER_LOLA_1, Route109_Text_LolaIntro, Route109_Text_LolaDefeated, Route109_EventScript_LolaRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route109_EventScript_LolaRematch + goto_if_eq VAR_RESULT, TRUE, Route109_EventScript_LolaRematch msgbox Route109_Text_LolaPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc index d1a892b7c..afb2a4aa0 100644 --- a/data/maps/Route109_SeashoreHouse/scripts.inc +++ b/data/maps/Route109_SeashoreHouse/scripts.inc @@ -25,8 +25,7 @@ Route109_SeashoreHouse_EventScript_AlreadyGaveIntroduction:: Route109_SeashoreHouse_EventScript_DefeatedTrainers:: msgbox Route109_SeashoreHouse_Text_TakeTheseSodaPopBottles, MSGBOX_DEFAULT giveitem ITEM_SODA_POP, 6 - compare VAR_RESULT, FALSE - goto_if_eq Route109_SeashoreHouse_EventScript_BagFull + goto_if_eq VAR_RESULT, FALSE, Route109_SeashoreHouse_EventScript_BagFull setflag FLAG_RECEIVED_6_SODA_POP release end @@ -39,8 +38,7 @@ Route109_SeashoreHouse_EventScript_BagFull:: Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop:: showmoneybox 0, 0 msgbox Route109_SeashoreHouse_Text_WantToBuySodaPop, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route109_SeashoreHouse_EventScript_BuySodaPop + goto_if_eq VAR_RESULT, YES, Route109_SeashoreHouse_EventScript_BuySodaPop msgbox Route109_SeashoreHouse_Text_ThatsTooBad, MSGBOX_DEFAULT hidemoneybox release @@ -48,11 +46,9 @@ Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop:: Route109_SeashoreHouse_EventScript_BuySodaPop:: checkmoney 300 - compare VAR_RESULT, FALSE - goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, Route109_SeashoreHouse_EventScript_NotEnoughMoney checkitemspace ITEM_SODA_POP - compare VAR_RESULT, FALSE - goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughSpace + goto_if_eq VAR_RESULT, FALSE, Route109_SeashoreHouse_EventScript_NotEnoughSpace msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT removemoney 300 updatemoneybox diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc index abb42cc12..7d16c8b10 100644 --- a/data/maps/Route110/scripts.inc +++ b/data/maps/Route110/scripts.inc @@ -16,8 +16,7 @@ Route110_OnResume: Route110_OnTransition: call Common_EventScript_SetupRivalGfxId call Common_EventScript_SetupRivalOnBikeGfxId - compare VAR_CYCLING_CHALLENGE_STATE, 1 - call_if_eq Route110_EventScript_SaveCyclingMusic + call_if_eq VAR_CYCLING_CHALLENGE_STATE, 1, Route110_EventScript_SaveCyclingMusic end Route110_EventScript_SaveCyclingMusic:: @@ -136,8 +135,7 @@ Route110_EventScript_TrickHouseSign:: Route110_EventScript_CyclingRoadResultsSign:: lockall specialvar VAR_RESULT, GetRecordedCyclingRoadResults - compare VAR_RESULT, FALSE - goto_if_eq Route110_EventScript_NoRecordSet + goto_if_eq VAR_RESULT, FALSE, Route110_EventScript_NoRecordSet msgbox Route110_Text_BestRecord, MSGBOX_DEFAULT releaseall end @@ -151,10 +149,8 @@ Route110_EventScript_ChallengeGuy:: lock faceplayer specialvar VAR_RESULT, GetPlayerAvatarBike - compare VAR_RESULT, 1 - goto_if_eq Route110_EventScript_PlayerRidingAcroBike - compare VAR_CYCLING_CHALLENGE_STATE, 0 - goto_if_eq Route110_EventScript_PlayerNotRidingBike + goto_if_eq VAR_RESULT, 1, Route110_EventScript_PlayerRidingAcroBike + goto_if_eq VAR_CYCLING_CHALLENGE_STATE, 0, Route110_EventScript_PlayerNotRidingBike msgbox Route110_Text_AlwaysAimHigher, MSGBOX_DEFAULT release end @@ -182,8 +178,7 @@ Route110_EventScript_Jaclyn:: Route110_EventScript_Edwin:: trainerbattle_single TRAINER_EDWIN_1, Route110_Text_EdwinIntro, Route110_Text_EdwinDefeated, Route110_EventScript_EdwinRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route110_EventScript_EdwinRematch + goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_EdwinRematch msgbox Route110_Text_EdwinPostBattle, MSGBOX_DEFAULT release end @@ -219,8 +214,7 @@ Route110_EventScript_Anthony:: Route110_EventScript_Benjamin:: trainerbattle_single TRAINER_BENJAMIN_1, Route110_Text_BenjaminIntro, Route110_Text_BenjaminDefeated, Route110_EventScript_BenjaminRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route110_EventScript_BenjaminRematch + goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_BenjaminRematch msgbox Route110_Text_BenjaminPostBattle, MSGBOX_DEFAULT release end @@ -246,8 +240,7 @@ Route110_EventScript_Jasmine:: Route110_EventScript_Abigail:: trainerbattle_single TRAINER_ABIGAIL_1, Route110_Text_AbigailIntro, Route110_Text_AbigailDefeated, Route110_EventScript_AbigailRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route110_EventScript_AbigailRematch + goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_AbigailRematch msgbox Route110_Text_AbigailPostBattle, MSGBOX_DEFAULT release end @@ -268,8 +261,7 @@ Route110_EventScript_AbigailRematch:: Route110_EventScript_Isabel:: trainerbattle_single TRAINER_ISABEL_1, Route110_Text_IsabelIntro, Route110_Text_IsabelDefeated, Route110_EventScript_IsabelRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route110_EventScript_IsabelRematch + goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_IsabelRematch msgbox Route110_Text_IsabelPostBattle, MSGBOX_DEFAULT release end @@ -384,10 +376,8 @@ Route110_EventScript_RivalTrigger3:: Route110_EventScript_RivalScene:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq Route110_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - call_if_eq Route110_EventScript_PlayBrendanMusic + call_if_eq VAR_RESULT, MALE, Route110_EventScript_PlayMayMusic + call_if_eq VAR_RESULT, FEMALE, Route110_EventScript_PlayBrendanMusic applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -395,17 +385,12 @@ Route110_EventScript_RivalScene:: applymovement LOCALID_RIVAL, Common_Movement_Delay48 waitmovement 0 delay 30 - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_RivalApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_RivalApproachPlayer2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_RivalApproachPlayer3 + call_if_eq VAR_0x8008, 1, Route110_EventScript_RivalApproachPlayer1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_RivalApproachPlayer2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_RivalApproachPlayer3 checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route110_EventScript_MayBattle - compare VAR_RESULT, FEMALE - goto_if_eq Route110_EventScript_BrendanBattle + goto_if_eq VAR_RESULT, MALE, Route110_EventScript_MayBattle + goto_if_eq VAR_RESULT, FEMALE, Route110_EventScript_BrendanBattle releaseall end @@ -483,23 +468,17 @@ Route110_EventScript_GiveItemfinder:: Route110_EventScript_RivalExit:: closemessage - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_MoveRival1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_MoveRival2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_MoveRival3 + call_if_eq VAR_0x8008, 1, Route110_EventScript_MoveRival1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_MoveRival2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_MoveRival3 setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_RIGHT setobjectmovementtype LOCALID_RIVAL_ON_BIKE, MOVEMENT_TYPE_FACE_RIGHT removeobject LOCALID_RIVAL addobject LOCALID_RIVAL_ON_BIKE delay 45 - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_RivalExit1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_RivalExit2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_RivalExit3 + call_if_eq VAR_0x8008, 1, Route110_EventScript_RivalExit1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_RivalExit2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_RivalExit3 removeobject LOCALID_RIVAL_ON_BIKE setvar VAR_ROUTE110_STATE, 1 savebgm MUS_DUMMY @@ -625,14 +604,10 @@ Route110_EventScript_BirchScene:: waitmovement 0 applymovement LOCALID_BIRCH, Common_Movement_Delay48 waitmovement 0 - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_BirchApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_BirchApproachPlayer2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_BirchApproachPlayer3 - compare VAR_0x8008, 4 - call_if_eq Route110_EventScript_BirchApproachPlayer4 + call_if_eq VAR_0x8008, 1, Route110_EventScript_BirchApproachPlayer1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_BirchApproachPlayer2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_BirchApproachPlayer3 + call_if_eq VAR_0x8008, 4, Route110_EventScript_BirchApproachPlayer4 msgbox Route110_Text_ImagineSeeingYouHere, MSGBOX_DEFAULT closemessage delay 20 @@ -656,14 +631,10 @@ Route110_EventScript_BirchScene:: setflag FLAG_ENABLE_PROF_BIRCH_MATCH_CALL msgbox Route110_Text_KeepAnEyeOutForRival, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_BirchExit1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_BirchExit2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_BirchExit3 - compare VAR_0x8008, 4 - call_if_eq Route110_EventScript_BirchExit4 + call_if_eq VAR_0x8008, 1, Route110_EventScript_BirchExit1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_BirchExit2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_BirchExit3 + call_if_eq VAR_0x8008, 4, Route110_EventScript_BirchExit4 removeobject LOCALID_BIRCH setvar VAR_REGISTER_BIRCH_STATE, 2 releaseall diff --git a/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc index 4bad754c4..5eb1f3dea 100644 --- a/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc +++ b/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc @@ -11,8 +11,7 @@ Route110_SeasideCyclingRoadNorthEntrance_EventScript_Clerk:: Route110_SeasideCyclingRoadNorthEntrance_EventScript_BikeCheck:: lockall specialvar VAR_RESULT, GetPlayerAvatarBike - compare VAR_RESULT, 0 - goto_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_NoBike + goto_if_eq VAR_RESULT, 0, Route110_SeasideCyclingRoadNorthEntrance_EventScript_NoBike setflag FLAG_SYS_CYCLING_ROAD setvar VAR_TEMP_1, 1 releaseall diff --git a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc index 92b4b3e44..df53f55cc 100644 --- a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc +++ b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc @@ -3,10 +3,8 @@ Route110_SeasideCyclingRoadSouthEntrance_MapScripts:: .byte 0 Route110_SeasideCyclingRoadSouthEntrance_OnTransition: - compare VAR_CYCLING_CHALLENGE_STATE, 3 - call_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge - compare VAR_CYCLING_CHALLENGE_STATE, 2 - call_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge + call_if_eq VAR_CYCLING_CHALLENGE_STATE, 3, Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge + call_if_eq VAR_CYCLING_CHALLENGE_STATE, 2, Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge end Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge:: @@ -23,10 +21,8 @@ Route110_SeasideCyclingRoadSouthEntrance_EventScript_Clerk:: Route110_SeasideCyclingRoadSouthEntrance_EventScript_BikeCheck:: lockall specialvar VAR_RESULT, GetPlayerAvatarBike - compare VAR_RESULT, 2 - call_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_OnMachBike - compare VAR_RESULT, 0 - goto_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_NoBike + call_if_eq VAR_RESULT, 2, Route110_SeasideCyclingRoadSouthEntrance_EventScript_OnMachBike + goto_if_eq VAR_RESULT, 0, Route110_SeasideCyclingRoadSouthEntrance_EventScript_NoBike setflag FLAG_SYS_CYCLING_ROAD setvar VAR_TEMP_1, 1 releaseall diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc index 116c3a4fe..be8f75e96 100644 --- a/data/maps/Route110_TrickHouseEnd/scripts.inc +++ b/data/maps/Route110_TrickHouseEnd/scripts.inc @@ -8,8 +8,7 @@ Route110_TrickHouseEnd_MapScripts:: .byte 0 Route110_TrickHouseEnd_OnResume: - compare VAR_TEMP_1, 1 - call_if_eq Route110_TrickHouseEnd_EventScript_SetDoorClosedMetatile + call_if_eq VAR_TEMP_1, 1, Route110_TrickHouseEnd_EventScript_SetDoorClosedMetatile end Route110_TrickHouseEnd_OnTransition: @@ -63,8 +62,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle1:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_RARE_CANDY - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -76,8 +74,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle2:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_TIMER_BALL - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -89,8 +86,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle3:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_HARD_STONE - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -102,8 +98,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle4:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_SMOKE_BALL - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -115,8 +110,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle5:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_TM12 - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -128,8 +122,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle6:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_MAGNET - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -141,8 +134,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle7:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_PP_MAX - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -152,14 +144,10 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle7:: Route110_TrickHouseEnd_EventScript_CompletedPuzzle8:: msgbox Route110_TrickHouseEnd_Text_AllNightPolishingFloors, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_SOUTH - call_if_eq Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwaySouth - compare VAR_FACING, DIR_NORTH - call_if_eq Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayNorth - compare VAR_FACING, DIR_WEST - call_if_eq Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayWest - compare VAR_FACING, DIR_EAST - call_if_eq Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayEast + call_if_eq VAR_FACING, DIR_SOUTH, Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwaySouth + call_if_eq VAR_FACING, DIR_NORTH, Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayNorth + call_if_eq VAR_FACING, DIR_WEST, Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayWest + call_if_eq VAR_FACING, DIR_EAST, Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayEast delay 30 msgbox Route110_TrickHouseEnd_Text_FountainOfIdeasRunDry, MSGBOX_DEFAULT closemessage @@ -169,8 +157,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle8:: msgbox Route110_TrickHouseEnd_Text_DefeatedMePreferWhichTent, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 call Route110_TrickHouseEnd_EventScript_ChooseTent - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_NoRoomForTent + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_NoRoomForTent msgbox Route110_TrickHouseEnd_Text_LeavingOnJourney, MSGBOX_DEFAULT call Route110_TrickHouseEnd_EventScript_TrickMasterExit special ResetTrickHouseNuggetFlag diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index a0250c44c..44dda8c5c 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -17,18 +17,12 @@ Route110_TrickHouseEntrance_MapScripts:: Route110_TrickHouseEntrance_OnTransition: setflag FLAG_LANDMARK_TRICK_HOUSE - compare VAR_TRICK_HOUSE_ENTER_FROM_CORRIDOR, 1 - goto_if_eq Route110_TrickHouseEntrance_EventScript_EnterFromCorridor - compare VAR_TRICK_HOUSE_PRIZE_PICKUP, 1 - goto_if_eq Route110_TrickHouseEntrance_EventScript_SetReadyToGiveReward - compare VAR_TRICK_HOUSE_FOUND_TRICK_MASTER, 1 - goto_if_eq Route110_TrickHouseEntrance_EventScript_MoveTrickMasterToDoor - compare VAR_TRICK_HOUSE_ENTRANCE_STATE, 5 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle - compare VAR_TRICK_HOUSE_ENTRANCE_STATE, 3 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle - compare VAR_TRICK_HOUSE_ENTRANCE_STATE, 0 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle + goto_if_eq VAR_TRICK_HOUSE_ENTER_FROM_CORRIDOR, 1, Route110_TrickHouseEntrance_EventScript_EnterFromCorridor + goto_if_eq VAR_TRICK_HOUSE_PRIZE_PICKUP, 1, Route110_TrickHouseEntrance_EventScript_SetReadyToGiveReward + goto_if_eq VAR_TRICK_HOUSE_FOUND_TRICK_MASTER, 1, Route110_TrickHouseEntrance_EventScript_MoveTrickMasterToDoor + call_if_eq VAR_TRICK_HOUSE_ENTRANCE_STATE, 5, Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle + call_if_eq VAR_TRICK_HOUSE_ENTRANCE_STATE, 3, Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle + call_if_eq VAR_TRICK_HOUSE_ENTRANCE_STATE, 0, Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle switch VAR_TRICK_HOUSE_ENTRANCE_STATE case 0, Route110_TrickHouseEntrance_EventScript_ReadyBeingWatchedTrigger case 1, Route110_TrickHouseEntrance_EventScript_SetNotBeingWatched1 @@ -38,8 +32,7 @@ Route110_TrickHouseEntrance_OnTransition: Route110_TrickHouseEntrance_EventScript_SetReadyToGiveReward:: setvar VAR_TRICK_HOUSE_BEING_WATCHED_STATE, 1 - compare VAR_TRICK_HOUSE_LEVEL, 8 - goto_if_eq Route110_TrickHouseEntrance_EventScript_ReadyToGiveTentReward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 8, Route110_TrickHouseEntrance_EventScript_ReadyToGiveTentReward setvar VAR_TRICK_HOUSE_ENTRANCE_STATE, 2 end @@ -55,22 +48,14 @@ Route110_TrickHouseEntrance_EventScript_EnterFromCorridor:: Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle:: setvar VAR_TRICK_HOUSE_ENTRANCE_STATE, 0 - compare VAR_TRICK_HOUSE_LEVEL, 1 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle2 - compare VAR_TRICK_HOUSE_LEVEL, 2 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle3 - compare VAR_TRICK_HOUSE_LEVEL, 3 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle4 - compare VAR_TRICK_HOUSE_LEVEL, 4 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle5 - compare VAR_TRICK_HOUSE_LEVEL, 5 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle6 - compare VAR_TRICK_HOUSE_LEVEL, 6 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle7 - compare VAR_TRICK_HOUSE_LEVEL, 7 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle8 - compare VAR_TRICK_HOUSE_LEVEL, 8 - call_if_eq Route110_TrickHouseEntrance_EventScript_FinishedPuzzles + call_if_eq VAR_TRICK_HOUSE_LEVEL, 1, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle2 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 2, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle3 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 3, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle4 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 4, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle5 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 5, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle6 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 6, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle7 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 7, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle8 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 8, Route110_TrickHouseEntrance_EventScript_FinishedPuzzles return Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle2:: @@ -216,8 +201,7 @@ Route110_TrickHouseEntrance_OnFrame: Route110_TrickHouseEntrance_EventScript_BeginChallenge:: lockall delay 20 - compare VAR_TRICK_HOUSE_LEVEL, 0 - call_if_eq Route110_TrickHouseEntrance_EventScript_MeetTrickMaster + call_if_eq VAR_TRICK_HOUSE_LEVEL, 0, Route110_TrickHouseEntrance_EventScript_MeetTrickMaster msgbox Route110_TrickHouseEntrance_Text_ComeToChallengeTrickHouse, MSGBOX_DEFAULT closemessage delay 20 @@ -251,22 +235,14 @@ Route110_TrickHouseEntrance_EventScript_FoundTrickMaster:: waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_Delay48 waitmovement 0 - compare VAR_TRICK_HOUSE_LEVEL, 0 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBeneathDesk - compare VAR_TRICK_HOUSE_LEVEL, 1 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBehindTree - compare VAR_TRICK_HOUSE_LEVEL, 2 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundInDresser - compare VAR_TRICK_HOUSE_LEVEL, 3 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBeyondWindow - compare VAR_TRICK_HOUSE_LEVEL, 4 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundInPlanter - compare VAR_TRICK_HOUSE_LEVEL, 5 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundInCupboard - compare VAR_TRICK_HOUSE_LEVEL, 6 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBehindWindow - compare VAR_TRICK_HOUSE_LEVEL, 7 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBeneathCushion + call_if_eq VAR_TRICK_HOUSE_LEVEL, 0, Route110_TrickHouseEntrance_EventScript_FoundBeneathDesk + call_if_eq VAR_TRICK_HOUSE_LEVEL, 1, Route110_TrickHouseEntrance_EventScript_FoundBehindTree + call_if_eq VAR_TRICK_HOUSE_LEVEL, 2, Route110_TrickHouseEntrance_EventScript_FoundInDresser + call_if_eq VAR_TRICK_HOUSE_LEVEL, 3, Route110_TrickHouseEntrance_EventScript_FoundBeyondWindow + call_if_eq VAR_TRICK_HOUSE_LEVEL, 4, Route110_TrickHouseEntrance_EventScript_FoundInPlanter + call_if_eq VAR_TRICK_HOUSE_LEVEL, 5, Route110_TrickHouseEntrance_EventScript_FoundInCupboard + call_if_eq VAR_TRICK_HOUSE_LEVEL, 6, Route110_TrickHouseEntrance_EventScript_FoundBehindWindow + call_if_eq VAR_TRICK_HOUSE_LEVEL, 7, Route110_TrickHouseEntrance_EventScript_FoundBeneathCushion closemessage setvar VAR_TRICK_HOUSE_FOUND_TRICK_MASTER, 1 warpsilent MAP_ROUTE110_TRICK_HOUSE_ENTRANCE, 6, 2 @@ -352,88 +328,67 @@ Route110_TrickHouseEntrance_EventScript_GiveReward:: applymovement LOCALID_TRICK_MASTER, Common_Movement_FacePlayer waitmovement 0 msgbox Route110_TrickHouseEntrance_Text_YoureHereToAcceptReward, MSGBOX_DEFAULT - compare VAR_TRICK_HOUSE_LEVEL, 1 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle1Reward - compare VAR_TRICK_HOUSE_LEVEL, 2 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle2Reward - compare VAR_TRICK_HOUSE_LEVEL, 3 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle3Reward - compare VAR_TRICK_HOUSE_LEVEL, 4 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle4Reward - compare VAR_TRICK_HOUSE_LEVEL, 5 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle5Reward - compare VAR_TRICK_HOUSE_LEVEL, 6 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle6Reward - compare VAR_TRICK_HOUSE_LEVEL, 7 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle7Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 1, Route110_TrickHouseEntrance_EventScript_GivePuzzle1Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 2, Route110_TrickHouseEntrance_EventScript_GivePuzzle2Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 3, Route110_TrickHouseEntrance_EventScript_GivePuzzle3Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 4, Route110_TrickHouseEntrance_EventScript_GivePuzzle4Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 5, Route110_TrickHouseEntrance_EventScript_GivePuzzle5Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 6, Route110_TrickHouseEntrance_EventScript_GivePuzzle6Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 7, Route110_TrickHouseEntrance_EventScript_GivePuzzle7Reward end Route110_TrickHouseEntrance_EventScript_GivePuzzle1Reward:: giveitem ITEM_RARE_CANDY - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle2Reward:: giveitem ITEM_TIMER_BALL - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle3Reward:: giveitem ITEM_HARD_STONE - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle4Reward:: giveitem ITEM_SMOKE_BALL - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle5Reward:: giveitem ITEM_TM12 - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle6Reward:: giveitem ITEM_MAGNET - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle7Reward:: giveitem ITEM_PP_MAX - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end @@ -451,10 +406,8 @@ Route110_TrickHouseEntrance_EventScript_MechadollReward:: waitmovement 0 msgbox Route110_TrickHouseEntrance_Text_MechadollWhichTent, MSGBOX_DEFAULT call Route110_TrickHouseEntrance_EventScript_ChooseTent - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_ReceivedTent - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_NoRoomForDecor + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_ReceivedTent + call_if_eq VAR_RESULT, FALSE, Common_EventScript_NoRoomForDecor msgbox Route110_TrickHouseEntrance_Text_PCFullAgain, MSGBOX_DEFAULT releaseall end @@ -506,8 +459,7 @@ Route110_TrickHouseEntrance_EventScript_ItsAScroll:: Route110_TrickHouseEntrance_EventScript_GoInHolePrompt:: msgbox Route110_TrickHouseEntrance_Text_GoInHoleBehindScroll, MSGBOX_YESNO closemessage - compare VAR_RESULT, YES - goto_if_eq Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom + goto_if_eq VAR_RESULT, YES, Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom releaseall end @@ -588,8 +540,7 @@ Route110_TrickHouseEntrance_EventScript_LeftOnJourneyNote:: end Route110_TrickHouseEntrance_EventScript_CheckLevelForMessage:: - compare VAR_TRICK_HOUSE_LEVEL, 8 - goto_if_eq Route110_TrickHouseEntrance_EventScript_LeftOnJourneyNote2 + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 8, Route110_TrickHouseEntrance_EventScript_LeftOnJourneyNote2 msgbox Route110_TrickHouseEntrance_Text_ItsAScroll, MSGBOX_DEFAULT releaseall end @@ -613,8 +564,7 @@ Route110_TrickHousePuzzle_EventScript_Door:: end Route110_TrickHousePuzzle1_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle1_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2 @@ -624,8 +574,7 @@ Route110_TrickHousePuzzle1_EventScript_Door:: end Route110_TrickHousePuzzle2_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle2_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_2_STATE, 2 @@ -635,8 +584,7 @@ Route110_TrickHousePuzzle2_EventScript_Door:: end Route110_TrickHousePuzzle3_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle3_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_3_STATE, 2 @@ -646,8 +594,7 @@ Route110_TrickHousePuzzle3_EventScript_Door:: end Route110_TrickHousePuzzle4_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle4_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_4_STATE, 2 @@ -657,8 +604,7 @@ Route110_TrickHousePuzzle4_EventScript_Door:: end Route110_TrickHousePuzzle5_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle5_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_5_STATE, 2 @@ -668,8 +614,7 @@ Route110_TrickHousePuzzle5_EventScript_Door:: end Route110_TrickHousePuzzle6_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle6_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_6_STATE, 2 @@ -679,8 +624,7 @@ Route110_TrickHousePuzzle6_EventScript_Door:: end Route110_TrickHousePuzzle7_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle7_EventScript_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE, 2 @@ -690,8 +634,7 @@ Route110_TrickHousePuzzle7_EventScript_Door:: end Route110_TrickHousePuzzle8_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle8_EventScript_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_8_STATE, 2 @@ -722,12 +665,9 @@ Route110_TrickHouseEntrance_EventScript_TrickMasterHiding:: lockall msgbox Route110_TrickHouseEntrance_Text_YoureBeingWatched, MSGBOX_DEFAULT releaseall - compare VAR_TRICK_HOUSE_LEVEL, 0 - call_if_eq Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle1 - compare VAR_TRICK_HOUSE_LEVEL, 1 - call_if_eq Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle2 - compare VAR_TRICK_HOUSE_LEVEL, 2 - call_if_eq Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle3 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 0, Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle1 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 1, Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle2 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 2, Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle3 setvar VAR_TRICK_HOUSE_BEING_WATCHED_STATE, 1 end diff --git a/data/maps/Route110_TrickHousePuzzle1/scripts.inc b/data/maps/Route110_TrickHousePuzzle1/scripts.inc index 920a43819..2ed769167 100644 --- a/data/maps/Route110_TrickHousePuzzle1/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle1/scripts.inc @@ -3,8 +3,7 @@ Route110_TrickHousePuzzle1_MapScripts:: .byte 0 Route110_TrickHousePuzzle1_OnLoad: - compare VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2 - goto_if_eq Route110_TrickHousePuzzle1_EventScript_OpenDoor + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2, Route110_TrickHousePuzzle1_EventScript_OpenDoor end Route110_TrickHousePuzzle1_EventScript_OpenDoor:: @@ -13,8 +12,7 @@ Route110_TrickHousePuzzle1_EventScript_OpenDoor:: Route110_TrickHousePuzzle1_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle1_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0, Route110_TrickHousePuzzle1_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle2/scripts.inc b/data/maps/Route110_TrickHousePuzzle2/scripts.inc index 4e8c52cf4..012a62d93 100644 --- a/data/maps/Route110_TrickHousePuzzle2/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle2/scripts.inc @@ -4,14 +4,10 @@ Route110_TrickHousePuzzle2_MapScripts:: .byte 0 Route110_TrickHousePuzzle2_OnResume: - compare VAR_TEMP_1, 1 - call_if_eq Route110_TrickHousePuzzle2_EventScript_PressButton1 - compare VAR_TEMP_2, 1 - call_if_eq Route110_TrickHousePuzzle2_EventScript_PressButton2 - compare VAR_TEMP_3, 1 - call_if_eq Route110_TrickHousePuzzle2_EventScript_PressButton3 - compare VAR_TEMP_4, 1 - call_if_eq Route110_TrickHousePuzzle2_EventScript_PressButton4 + call_if_eq VAR_TEMP_1, 1, Route110_TrickHousePuzzle2_EventScript_PressButton1 + call_if_eq VAR_TEMP_2, 1, Route110_TrickHousePuzzle2_EventScript_PressButton2 + call_if_eq VAR_TEMP_3, 1, Route110_TrickHousePuzzle2_EventScript_PressButton3 + call_if_eq VAR_TEMP_4, 1, Route110_TrickHousePuzzle2_EventScript_PressButton4 end Route110_TrickHousePuzzle2_OnTransition: @@ -23,8 +19,7 @@ Route110_TrickHousePuzzle2_OnTransition: Route110_TrickHousePuzzle2_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle2_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0, Route110_TrickHousePuzzle2_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle3/scripts.inc b/data/maps/Route110_TrickHousePuzzle3/scripts.inc index 2b732124f..1831639b1 100644 --- a/data/maps/Route110_TrickHousePuzzle3/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle3/scripts.inc @@ -5,10 +5,8 @@ Route110_TrickHousePuzzle3_MapScripts:: Route110_TrickHousePuzzle3_OnResume: call Route110_TrickHousePuzzle3_EventScript_UpdateButtonMetatiles - compare VAR_TEMP_9, 0 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetDoorsState0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetDoorsState1 + call_if_eq VAR_TEMP_9, 0, Route110_TrickHousePuzzle3_EventScript_SetDoorsState0 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle3_EventScript_SetDoorsState1 end Route110_TrickHousePuzzle3_OnTransition: @@ -25,14 +23,10 @@ Route110_TrickHousePuzzle3_EventScript_UpdateButtonMetatiles:: setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Up, FALSE setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Up, FALSE setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Up, FALSE - compare VAR_TEMP_8, 1 - call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile - compare VAR_TEMP_8, 2 - call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton2Metatile - compare VAR_TEMP_8, 3 - call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton3Metatile - compare VAR_TEMP_8, 4 - call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton4Metatile + call_if_eq VAR_TEMP_8, 1, Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile + call_if_eq VAR_TEMP_8, 2, Route110_TrickHousePuzzle3_EventScript_PressedButton2Metatile + call_if_eq VAR_TEMP_8, 3, Route110_TrickHousePuzzle3_EventScript_PressedButton3Metatile + call_if_eq VAR_TEMP_8, 4, Route110_TrickHousePuzzle3_EventScript_PressedButton4Metatile return Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile:: @@ -241,14 +235,10 @@ Route110_TrickHousePuzzle3_EventScript_SetButton:: setvar VAR_TEMP_2, 0 setvar VAR_TEMP_3, 0 setvar VAR_TEMP_4, 0 - compare VAR_TEMP_8, 1 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetButton1 - compare VAR_TEMP_8, 2 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetButton2 - compare VAR_TEMP_8, 3 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetButton3 - compare VAR_TEMP_8, 4 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetButton4 + call_if_eq VAR_TEMP_8, 1, Route110_TrickHousePuzzle3_EventScript_SetButton1 + call_if_eq VAR_TEMP_8, 2, Route110_TrickHousePuzzle3_EventScript_SetButton2 + call_if_eq VAR_TEMP_8, 3, Route110_TrickHousePuzzle3_EventScript_SetButton3 + call_if_eq VAR_TEMP_8, 4, Route110_TrickHousePuzzle3_EventScript_SetButton4 return Route110_TrickHousePuzzle3_EventScript_SetButton1:: @@ -268,15 +258,11 @@ Route110_TrickHousePuzzle3_EventScript_SetButton4:: return Route110_TrickHousePuzzle3_EventScript_AlternateDoors:: - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetDoorsState0 - compare VAR_TEMP_9, 0 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetDoorsState1 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle3_EventScript_SetDoorsState0 + call_if_eq VAR_TEMP_9, 0, Route110_TrickHousePuzzle3_EventScript_SetDoorsState1 special DrawWholeMapView - compare VAR_TEMP_9, 1 - goto_if_eq Route110_TrickHousePuzzle3_EventScript_ClearAltDoorState - compare VAR_TEMP_9, 0 - goto_if_eq Route110_TrickHousePuzzle3_EventScript_SetAltDoorState + goto_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle3_EventScript_ClearAltDoorState + goto_if_eq VAR_TEMP_9, 0, Route110_TrickHousePuzzle3_EventScript_SetAltDoorState end Route110_TrickHousePuzzle3_EventScript_ClearAltDoorState:: @@ -291,8 +277,7 @@ Route110_TrickHousePuzzle3_EventScript_SetAltDoorState:: Route110_TrickHousePuzzle3_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle3_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0, Route110_TrickHousePuzzle3_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle4/scripts.inc b/data/maps/Route110_TrickHousePuzzle4/scripts.inc index 10f49adb5..2350d4ceb 100644 --- a/data/maps/Route110_TrickHousePuzzle4/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle4/scripts.inc @@ -3,8 +3,7 @@ Route110_TrickHousePuzzle4_MapScripts:: Route110_TrickHousePuzzle4_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle4_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0, Route110_TrickHousePuzzle4_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle5/scripts.inc b/data/maps/Route110_TrickHousePuzzle5/scripts.inc index c15c4ee73..e0fa432bd 100644 --- a/data/maps/Route110_TrickHousePuzzle5/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle5/scripts.inc @@ -19,8 +19,7 @@ Route110_TrickHousePuzzle5_OnTransition: Route110_TrickHousePuzzle5_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0, Route110_TrickHousePuzzle5_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end @@ -33,8 +32,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll1:: lockall applymovement LOCALID_MECHADOLL_1, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_1, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_1, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll1Activate end @@ -43,8 +41,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll2:: lockall applymovement LOCALID_MECHADOLL_2, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_2, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_2, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll2Activate end @@ -53,8 +50,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll3:: lockall applymovement LOCALID_MECHADOLL_3, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_3, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_3, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll3Activate end @@ -63,8 +59,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll4:: lockall applymovement LOCALID_MECHADOLL_4, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_4, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_4, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll4Activate end @@ -73,8 +68,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll5:: lockall applymovement LOCALID_MECHADOLL_5, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_5, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_5, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll5Activate end @@ -226,14 +220,10 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll1Activate:: waitmovement 0 applymovement LOCALID_MECHADOLL_1, Common_Movement_Delay48 waitmovement 0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 - compare VAR_TEMP_9, 2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 - compare VAR_TEMP_9, 3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 - compare VAR_TEMP_9, 4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 + call_if_eq VAR_TEMP_9, 2, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 + call_if_eq VAR_TEMP_9, 3, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 + call_if_eq VAR_TEMP_9, 4, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 msgbox Route110_TrickHousePuzzle5_Text_Mechadoll1Intro, MSGBOX_DEFAULT random 3 switch VAR_RESULT @@ -250,16 +240,11 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll2Activate:: waitmovement 0 applymovement LOCALID_MECHADOLL_2, Common_Movement_Delay48 waitmovement 0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight1 - compare VAR_TEMP_9, 2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight2 - compare VAR_TEMP_9, 3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight3 - compare VAR_TEMP_9, 4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight4 - compare VAR_TEMP_9, 5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight5 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight1 + call_if_eq VAR_TEMP_9, 2, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight2 + call_if_eq VAR_TEMP_9, 3, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight3 + call_if_eq VAR_TEMP_9, 4, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight4 + call_if_eq VAR_TEMP_9, 5, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight5 msgbox Route110_TrickHousePuzzle5_Text_Mechadoll2Intro, MSGBOX_DEFAULT random 3 switch VAR_RESULT @@ -276,14 +261,10 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll3Activate:: waitmovement 0 applymovement LOCALID_MECHADOLL_3, Common_Movement_Delay48 waitmovement 0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 - compare VAR_TEMP_9, 2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 - compare VAR_TEMP_9, 3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 - compare VAR_TEMP_9, 4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 + call_if_eq VAR_TEMP_9, 2, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 + call_if_eq VAR_TEMP_9, 3, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 + call_if_eq VAR_TEMP_9, 4, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 msgbox Route110_TrickHousePuzzle5_Text_Mechadoll3Intro, MSGBOX_DEFAULT random 3 switch VAR_RESULT @@ -300,14 +281,10 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll4Activate:: waitmovement 0 applymovement LOCALID_MECHADOLL_4, Common_Movement_Delay48 waitmovement 0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 - compare VAR_TEMP_9, 2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 - compare VAR_TEMP_9, 3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 - compare VAR_TEMP_9, 4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 + call_if_eq VAR_TEMP_9, 2, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 + call_if_eq VAR_TEMP_9, 3, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 + call_if_eq VAR_TEMP_9, 4, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 msgbox Route110_TrickHousePuzzle5_Text_Mechadoll4Intro, MSGBOX_DEFAULT random 3 switch VAR_RESULT @@ -487,133 +464,83 @@ Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough:: @ Mechadoll 5 never walks, all the Mechadoll5Walk scripts are unused @ No mechadoll walks left 5 paces, all the WalkLeft5 scripts are unused Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft1 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft2 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft3 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft4 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft5:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft5 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight1:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight1 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight2:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight2 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight3:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight3 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight4:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight4 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight5:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight5 return Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft1:: diff --git a/data/maps/Route110_TrickHousePuzzle6/scripts.inc b/data/maps/Route110_TrickHousePuzzle6/scripts.inc index 35d657acc..e442d094d 100644 --- a/data/maps/Route110_TrickHousePuzzle6/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle6/scripts.inc @@ -17,8 +17,7 @@ Route110_TrickHousePuzzle6_EventScript_InitPuzzle:: Route110_TrickHousePuzzle6_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle6_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0, Route110_TrickHousePuzzle6_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle7/scripts.inc b/data/maps/Route110_TrickHousePuzzle7/scripts.inc index 473c39992..a47df82ca 100644 --- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc @@ -72,8 +72,7 @@ Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOff:: return Route110_TrickHousePuzzle7_OnTransition: - compare VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1 - goto_if_eq Route110_TrickHousePuzzle7_EventScript_TeleportedTransition + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1, Route110_TrickHousePuzzle7_EventScript_TeleportedTransition clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1 clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2 clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3 @@ -85,8 +84,7 @@ Route110_TrickHousePuzzle7_EventScript_TeleportedTransition:: end Route110_TrickHousePuzzle7_OnLoad: - compare VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1 - call_if_eq Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles + call_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1, Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles end Route110_TrickHousePuzzle7_OnFrame: @@ -99,8 +97,7 @@ Route110_TrickHousePuzzle7_EventScript_ClearState2:: Route110_TrickHousePuzzle7_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle7_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0, Route110_TrickHousePuzzle7_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle8/scripts.inc b/data/maps/Route110_TrickHousePuzzle8/scripts.inc index 310751e5d..371f61000 100644 --- a/data/maps/Route110_TrickHousePuzzle8/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle8/scripts.inc @@ -3,8 +3,7 @@ Route110_TrickHousePuzzle8_MapScripts:: Route110_TrickHousePuzzle8_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle8_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0, Route110_TrickHousePuzzle8_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 2007c89f6..6cb83b452 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -15,8 +15,7 @@ Route111_MapScripts:: Route111_OnLoad: call_if_unset FLAG_REGI_DOORS_OPENED, Route111_EventScript_CloseDesertRuins - compare VAR_MIRAGE_TOWER_STATE, 1 - call_if_eq Route111_EventScript_ShowTemporaryMirageTower + call_if_eq VAR_MIRAGE_TOWER_STATE, 1, Route111_EventScript_ShowTemporaryMirageTower end Route111_EventScript_CloseDesertRuins:: @@ -50,10 +49,8 @@ Route111_OnTransition: setvar VAR_TRAINER_HILL_IS_ACTIVE, 0 special SetMirageTowerVisibility call_if_unset FLAG_MIRAGE_TOWER_VISIBLE, Route111_EventScript_SetLayoutNoMirageTower - compare VAR_MIRAGE_TOWER_STATE, 1 - call_if_eq Route111_EventScript_SetFallingPlayerGfx - compare VAR_MIRAGE_TOWER_STATE, 2 - call_if_eq Route111_EventScript_SetMirageTowerGone + call_if_eq VAR_MIRAGE_TOWER_STATE, 1, Route111_EventScript_SetFallingPlayerGfx + call_if_eq VAR_MIRAGE_TOWER_STATE, 2, Route111_EventScript_SetMirageTowerGone call Route111_EventScript_CheckSetSandstorm call GabbyAndTy_EventScript_UpdateLocation goto_if_not_defeated TRAINER_VICKY, Route111_EventScript_SetWinstratesNotDefeated @@ -61,10 +58,8 @@ Route111_OnTransition: Route111_EventScript_SetFallingPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route111_EventScript_SetFallingPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq Route111_EventScript_SetFallingPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, Route111_EventScript_SetFallingPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, Route111_EventScript_SetFallingPlayerGfxFemale return Route111_EventScript_SetFallingPlayerGfxMale:: @@ -77,16 +72,11 @@ Route111_EventScript_SetFallingPlayerGfxFemale:: Route111_EventScript_CheckSetSandstorm:: getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_1, 34 - goto_if_lt Route111_EventScript_EndCheckSetSandstorm - compare VAR_TEMP_1, 107 - goto_if_gt Route111_EventScript_EndCheckSetSandstorm - compare VAR_TEMP_1, 72 - goto_if_gt Route111_EventScript_SetSandstorm - compare VAR_TEMP_0, 2000 - goto_if_gt Route111_EventScript_EndCheckSetSandstorm - compare VAR_TEMP_0, 8 - goto_if_lt Route111_EventScript_EndCheckSetSandstorm + goto_if_lt VAR_TEMP_1, 34, Route111_EventScript_EndCheckSetSandstorm + goto_if_gt VAR_TEMP_1, 107, Route111_EventScript_EndCheckSetSandstorm + goto_if_gt VAR_TEMP_1, 72, Route111_EventScript_SetSandstorm + goto_if_gt VAR_TEMP_0, 2000, Route111_EventScript_EndCheckSetSandstorm + goto_if_lt VAR_TEMP_0, 8, Route111_EventScript_EndCheckSetSandstorm Route111_EventScript_SetSandstorm:: setweather WEATHER_SANDSTORM Route111_EventScript_EndCheckSetSandstorm:: @@ -170,8 +160,7 @@ Route111_EventScript_Girl:: goto_if_set FLAG_DAILY_ROUTE_111_RECEIVED_BERRY, Route111_EventScript_ReceivedBerry msgbox Route111_Text_WateredPlantsEveryDayTakeBerry, MSGBOX_DEFAULT giveitem ITEM_RAZZ_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_ROUTE_111_RECEIVED_BERRY special GetPlayerBigGuyGirlString msgbox Route111_Text_GoingToTryToMakeDifferentColorBerries, MSGBOX_DEFAULT @@ -211,8 +200,7 @@ Route111_EventScript_ViciousSandstormTriggerRight:: Route111_EventScript_ViciousSandstormTrigger:: checkitem ITEM_GO_GOGGLES - compare VAR_RESULT, FALSE - goto_if_eq Route111_EventScript_PreventRouteAccess + goto_if_eq VAR_RESULT, FALSE, Route111_EventScript_PreventRouteAccess setvar VAR_TEMP_3, 1 releaseall end @@ -220,14 +208,10 @@ Route111_EventScript_ViciousSandstormTrigger:: Route111_EventScript_PreventRouteAccess:: msgbox gText_SandstormIsVicious, MSGBOX_DEFAULT closemessage - compare VAR_0x8004, 0 - call_if_eq Route111_EventScript_PushUpFromRoute - compare VAR_0x8004, 1 - call_if_eq Route111_EventScript_PushDownFromRoute - compare VAR_0x8004, 2 - call_if_eq Route111_EventScript_PushLeftFromRoute - compare VAR_0x8004, 3 - call_if_eq Route111_EventScript_PushRightFromRoute + call_if_eq VAR_0x8004, 0, Route111_EventScript_PushUpFromRoute + call_if_eq VAR_0x8004, 1, Route111_EventScript_PushDownFromRoute + call_if_eq VAR_0x8004, 2, Route111_EventScript_PushLeftFromRoute + call_if_eq VAR_0x8004, 3, Route111_EventScript_PushRightFromRoute releaseall end @@ -285,8 +269,7 @@ Route111_EventScript_Victor:: faceplayer setflag FLAG_LANDMARK_WINSTRATE_FAMILY msgbox Route111_Text_BattleOurFamily, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route111_EventScript_BattleWinstrates + goto_if_eq VAR_RESULT, YES, Route111_EventScript_BattleWinstrates msgbox Route111_Text_IsThatSo, MSGBOX_DEFAULT release end @@ -420,10 +403,8 @@ Route111_EventScript_Man2:: Route111_EventScript_Hiker:: lock faceplayer - compare VAR_MIRAGE_TOWER_STATE, 3 - goto_if_eq Route111_EventScript_HikerMirageTowerGone - compare VAR_MIRAGE_TOWER_STATE, 2 - goto_if_eq Route111_EventScript_HikerMirageTowerDisintegrated + goto_if_eq VAR_MIRAGE_TOWER_STATE, 3, Route111_EventScript_HikerMirageTowerGone + goto_if_eq VAR_MIRAGE_TOWER_STATE, 2, Route111_EventScript_HikerMirageTowerDisintegrated goto_if_set FLAG_MIRAGE_TOWER_VISIBLE, Route111_EventScript_HikerMirageTowerVisible msgbox Route111_Text_ShouldBeMirageTowerAroundHere, MSGBOX_DEFAULT release @@ -478,8 +459,7 @@ Route111_EventScript_Becky:: Route111_EventScript_Dusty:: trainerbattle_single TRAINER_DUSTY_1, Route111_Text_DustyIntro, Route111_Text_DustyDefeat, Route111_EventScript_RegisterDusty specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route111_EventScript_RematchDusty + goto_if_eq VAR_RESULT, TRUE, Route111_EventScript_RematchDusty msgbox Route111_Text_DustyPostBattle, MSGBOX_DEFAULT release end @@ -515,8 +495,7 @@ Route111_EventScript_Daisuke:: Route111_EventScript_Wilton:: trainerbattle_single TRAINER_WILTON_1, Route111_Text_WiltonIntro, Route111_Text_WiltonDefeat, Route111_EventScript_RegisterWilton specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route111_EventScript_RematchWilton + goto_if_eq VAR_RESULT, TRUE, Route111_EventScript_RematchWilton msgbox Route111_Text_WiltonPostBattle, MSGBOX_DEFAULT release end @@ -537,8 +516,7 @@ Route111_EventScript_RematchWilton:: Route111_EventScript_Brooke:: trainerbattle_single TRAINER_BROOKE_1, Route111_Text_BrookeIntro, Route111_Text_BrookeDefeat, Route111_EventScript_RegisterBrooke specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route111_EventScript_RematchBrooke + goto_if_eq VAR_RESULT, TRUE, Route111_EventScript_RematchBrooke msgbox Route111_Text_BrookePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route111_OldLadysRestStop/scripts.inc b/data/maps/Route111_OldLadysRestStop/scripts.inc index 645ce4de4..6b7b5a8ab 100644 --- a/data/maps/Route111_OldLadysRestStop/scripts.inc +++ b/data/maps/Route111_OldLadysRestStop/scripts.inc @@ -10,10 +10,8 @@ Route111_OldLadysRestStop_EventScript_OldLady:: lock faceplayer msgbox Route111_OldLadysRestStop_Text_RestUpHere, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route111_OldLadysRestStop_EventScript_Rest - compare VAR_RESULT, NO - goto_if_eq Route111_OldLadysRestStop_EventScript_DeclineRest + goto_if_eq VAR_RESULT, YES, Route111_OldLadysRestStop_EventScript_Rest + goto_if_eq VAR_RESULT, NO, Route111_OldLadysRestStop_EventScript_DeclineRest end Route111_OldLadysRestStop_EventScript_Rest:: @@ -21,10 +19,8 @@ Route111_OldLadysRestStop_EventScript_Rest:: closemessage call Common_EventScript_OutOfCenterPartyHeal msgbox Route111_OldLadysRestStop_Text_StillTiredTakeAnotherRest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route111_OldLadysRestStop_EventScript_Rest - compare VAR_RESULT, NO - goto_if_eq Route111_OldLadysRestStop_EventScript_DeclineRest + goto_if_eq VAR_RESULT, YES, Route111_OldLadysRestStop_EventScript_Rest + goto_if_eq VAR_RESULT, NO, Route111_OldLadysRestStop_EventScript_DeclineRest end Route111_OldLadysRestStop_EventScript_DeclineRest:: diff --git a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc index eedd83f06..a163c7b4f 100644 --- a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc +++ b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc @@ -21,8 +21,7 @@ Route111_WinstrateFamilysHouse_EventScript_Victoria:: goto_if_set FLAG_RECEIVED_MACHO_BRACE, Route111_WinstrateFamilysHouse_EventScript_ReceivedMachoBrace msgbox Route111_WinstrateFamilysHouse_Text_LikeYouToHaveMachoBrace, MSGBOX_DEFAULT giveitem ITEM_MACHO_BRACE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_MACHO_BRACE goto Route111_WinstrateFamilysHouse_EventScript_FaceOriginalDirection end diff --git a/data/maps/Route112/scripts.inc b/data/maps/Route112/scripts.inc index abea230be..a6c248e1f 100644 --- a/data/maps/Route112/scripts.inc +++ b/data/maps/Route112/scripts.inc @@ -71,8 +71,7 @@ Route112_EventScript_Brice:: Route112_EventScript_Trent:: trainerbattle_single TRAINER_TRENT_1, Route112_Text_TrentIntro, Route112_Text_TrentDefeat, Route112_EventScript_RegisterTrent specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route112_EventScript_RematchTrent + goto_if_eq VAR_RESULT, TRUE, Route112_EventScript_RematchTrent msgbox Route112_Text_TrentPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route112_CableCarStation/scripts.inc b/data/maps/Route112_CableCarStation/scripts.inc index 0fcbc0a34..3ce4f62e2 100644 --- a/data/maps/Route112_CableCarStation/scripts.inc +++ b/data/maps/Route112_CableCarStation/scripts.inc @@ -7,8 +7,7 @@ Route112_CableCarStation_MapScripts:: Route112_CableCarStation_OnTransition: setescapewarp MAP_ROUTE112, 28, 28 - compare VAR_CABLE_CAR_STATION_STATE, 2 - call_if_eq Route112_CableCarStation_EventScript_MoveAttendantAside + call_if_eq VAR_CABLE_CAR_STATION_STATE, 2, Route112_CableCarStation_EventScript_MoveAttendantAside end Route112_CableCarStation_EventScript_MoveAttendantAside:: @@ -35,10 +34,8 @@ Route112_CableCarStation_EventScript_Attendant:: lock faceplayer msgbox Route112_CableCarStation_Text_CableCarReadyGetOn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route112_CableCarStation_EventScript_RideCableCar - compare VAR_RESULT, NO - goto_if_eq Route112_CableCarStation_EventScript_DeclineRide + goto_if_eq VAR_RESULT, YES, Route112_CableCarStation_EventScript_RideCableCar + goto_if_eq VAR_RESULT, NO, Route112_CableCarStation_EventScript_DeclineRide end Route112_CableCarStation_EventScript_RideCableCar:: diff --git a/data/maps/Route113/scripts.inc b/data/maps/Route113/scripts.inc index 0a8bb092c..4f02e74b6 100644 --- a/data/maps/Route113/scripts.inc +++ b/data/maps/Route113/scripts.inc @@ -14,10 +14,8 @@ Route113_OnTransition: Route113_EventScript_CheckSetAshWeather:: getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_0, 19 - goto_if_lt Route113_EventScript_DontSetAshWeather - compare VAR_TEMP_0, 84 - goto_if_gt Route113_EventScript_DontSetAshWeather + goto_if_lt VAR_TEMP_0, 19, Route113_EventScript_DontSetAshWeather + goto_if_gt VAR_TEMP_0, 84, Route113_EventScript_DontSetAshWeather setweather WEATHER_VOLCANIC_ASH return @@ -61,8 +59,7 @@ Route113_EventScript_Dillon:: Route113_EventScript_Madeline:: trainerbattle_single TRAINER_MADELINE_1, Route113_Text_MadelineIntro, Route113_Text_MadelineDefeat, Route113_EventScript_RegisterMadeline specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route113_EventScript_RematchMadeline + goto_if_eq VAR_RESULT, TRUE, Route113_EventScript_RematchMadeline msgbox Route113_Text_MadelinePostBattle, MSGBOX_DEFAULT release end @@ -83,8 +80,7 @@ Route113_EventScript_RematchMadeline:: Route113_EventScript_Lao:: trainerbattle_single TRAINER_LAO_1, Route113_Text_LaoIntro, Route113_Text_LaoDefeat, Route113_EventScript_RegisterLao specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route113_EventScript_RematchLao + goto_if_eq VAR_RESULT, TRUE, Route113_EventScript_RematchLao msgbox Route113_Text_LaoPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc index fd980bf84..41182b2ae 100644 --- a/data/maps/Route113_GlassWorkshop/scripts.inc +++ b/data/maps/Route113_GlassWorkshop/scripts.inc @@ -13,8 +13,7 @@ Route113_GlassWorkshop_MapScripts:: Route113_GlassWorkshop_OnTransition: setflag FLAG_LANDMARK_GLASS_WORKSHOP - compare VAR_GLASS_WORKSHOP_STATE, 1 - call_if_eq Route113_GlassWorkshop_EventScript_ReenterWorkshopAfterSootSack + call_if_eq VAR_GLASS_WORKSHOP_STATE, 1, Route113_GlassWorkshop_EventScript_ReenterWorkshopAfterSootSack end Route113_GlassWorkshop_EventScript_ReenterWorkshopAfterSootSack:: @@ -24,12 +23,9 @@ Route113_GlassWorkshop_EventScript_ReenterWorkshopAfterSootSack:: Route113_GlassWorkshop_EventScript_GlassWorker:: lock faceplayer - compare VAR_GLASS_WORKSHOP_STATE, 10 - goto_if_ge Route113_GlassWorkshop_EventScript_GiveItemAfterNoRoom - compare VAR_GLASS_WORKSHOP_STATE, 2 - goto_if_eq Route113_GlassWorkshop_EventScript_CheckCollectedAsh - compare VAR_GLASS_WORKSHOP_STATE, 1 - goto_if_eq Route113_GlassWorkshop_EventScript_ExplainSootSack + goto_if_ge VAR_GLASS_WORKSHOP_STATE, 10, Route113_GlassWorkshop_EventScript_GiveItemAfterNoRoom + goto_if_eq VAR_GLASS_WORKSHOP_STATE, 2, Route113_GlassWorkshop_EventScript_CheckCollectedAsh + goto_if_eq VAR_GLASS_WORKSHOP_STATE, 1, Route113_GlassWorkshop_EventScript_ExplainSootSack msgbox Route113_GlassWorkshop_Text_GoCollectAshWithThis, MSGBOX_DEFAULT giveitem ITEM_SOOT_SACK setvar VAR_GLASS_WORKSHOP_STATE, 1 @@ -44,11 +40,9 @@ Route113_GlassWorkshop_EventScript_ExplainSootSack:: Route113_GlassWorkshop_EventScript_CheckCollectedAsh:: checkitem ITEM_SOOT_SACK - compare VAR_RESULT, FALSE - goto_if_eq Route113_GlassWorkshop_EventScript_SootSackNotInBag + goto_if_eq VAR_RESULT, FALSE, Route113_GlassWorkshop_EventScript_SootSackNotInBag msgbox Route113_GlassWorkshop_Text_LetsSeeCollectedAshes, MSGBOX_DEFAULT - compare VAR_ASH_GATHER_COUNT, LOWEST_ASH_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAsh + goto_if_lt VAR_ASH_GATHER_COUNT, LOWEST_ASH_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAsh message Route113_GlassWorkshop_Text_WhichGlassItemWoudYouLike waitmessage goto Route113_GlassWorkshop_EventScript_ChooseGlassItem @@ -80,11 +74,9 @@ Route113_GlassWorkshop_EventScript_BlueFlute:: setvar VAR_0x8008, ITEM_BLUE_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, BLUE_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, BLUE_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, BLUE_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 10 subvar VAR_ASH_GATHER_COUNT, BLUE_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -94,11 +86,9 @@ Route113_GlassWorkshop_EventScript_YellowFlute:: setvar VAR_0x8008, ITEM_YELLOW_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, YELLOW_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, YELLOW_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, YELLOW_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 11 subvar VAR_ASH_GATHER_COUNT, YELLOW_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -108,11 +98,9 @@ Route113_GlassWorkshop_EventScript_RedFlute:: setvar VAR_0x8008, ITEM_RED_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, RED_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, RED_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, RED_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 12 subvar VAR_ASH_GATHER_COUNT, RED_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -122,11 +110,9 @@ Route113_GlassWorkshop_EventScript_WhiteFlute:: setvar VAR_0x8008, ITEM_WHITE_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, WHITE_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, WHITE_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, WHITE_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 13 subvar VAR_ASH_GATHER_COUNT, WHITE_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -136,11 +122,9 @@ Route113_GlassWorkshop_EventScript_BlackFlute:: setvar VAR_0x8008, ITEM_BLACK_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, BLACK_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, BLACK_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, BLACK_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 14 subvar VAR_ASH_GATHER_COUNT, BLACK_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -151,11 +135,9 @@ Route113_GlassWorkshop_EventScript_PrettyChair:: setvar VAR_0x8008, DECOR_PRETTY_CHAIR bufferdecorationname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, PRETTY_CHAIR_PRICE - compare VAR_ASH_GATHER_COUNT, PRETTY_CHAIR_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, PRETTY_CHAIR_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 15 subvar VAR_ASH_GATHER_COUNT, PRETTY_CHAIR_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -166,11 +148,9 @@ Route113_GlassWorkshop_EventScript_PrettyDesk:: setvar VAR_0x8008, DECOR_PRETTY_DESK bufferdecorationname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, PRETTY_DESK_PRICE - compare VAR_ASH_GATHER_COUNT, PRETTY_DESK_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, PRETTY_DESK_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 16 subvar VAR_ASH_GATHER_COUNT, PRETTY_DESK_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -211,24 +191,20 @@ Route113_GlassWorkshop_EventScript_MakeGlassItem:: delay 30 fadescreen FADE_FROM_BLACK msgbox Route113_GlassWorkshop_Text_IveFinishedGlassItem, MSGBOX_DEFAULT - compare VAR_0x8009, 0 - call_if_eq Route113_GlassWorkshop_EventScript_GiveGlassFlute - compare VAR_0x8009, 1 - call_if_eq Route113_GlassWorkshop_EventScript_GiveGlassDecor + call_if_eq VAR_0x8009, 0, Route113_GlassWorkshop_EventScript_GiveGlassFlute + call_if_eq VAR_0x8009, 1, Route113_GlassWorkshop_EventScript_GiveGlassDecor setvar VAR_GLASS_WORKSHOP_STATE, 2 release end Route113_GlassWorkshop_EventScript_GiveGlassFlute:: giveitem VAR_0x8008 - compare VAR_RESULT, FALSE - goto_if_eq Route113_GlassWorkshop_EventScript_NoRoomForFlute + goto_if_eq VAR_RESULT, FALSE, Route113_GlassWorkshop_EventScript_NoRoomForFlute return Route113_GlassWorkshop_EventScript_GiveGlassDecor:: givedecoration VAR_0x8008 - compare VAR_RESULT, FALSE - goto_if_eq Route113_GlassWorkshop_EventScript_NoRoomForDecor + goto_if_eq VAR_RESULT, FALSE, Route113_GlassWorkshop_EventScript_NoRoomForDecor return Route113_GlassWorkshop_EventScript_NoRoomForFlute:: @@ -305,10 +281,8 @@ Route113_GlassWorkshop_EventScript_GivePrettyDesk:: Route113_GlassWorkshop_EventScript_TryGiveItemAgain:: msgbox Route113_GlassWorkshop_Text_IveFinishedGlassItem, MSGBOX_DEFAULT - compare VAR_0x8009, 0 - call_if_eq Route113_GlassWorkshop_EventScript_GiveGlassFlute - compare VAR_0x8009, 1 - call_if_eq Route113_GlassWorkshop_EventScript_GiveGlassDecor + call_if_eq VAR_0x8009, 0, Route113_GlassWorkshop_EventScript_GiveGlassFlute + call_if_eq VAR_0x8009, 1, Route113_GlassWorkshop_EventScript_GiveGlassDecor setvar VAR_GLASS_WORKSHOP_STATE, 2 release end diff --git a/data/maps/Route114/scripts.inc b/data/maps/Route114/scripts.inc index c0420fbf6..abf70ea08 100644 --- a/data/maps/Route114/scripts.inc +++ b/data/maps/Route114/scripts.inc @@ -5,19 +5,14 @@ Route114_MapScripts:: .byte 0 Route114_OnTransition: - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH - call_if_eq AbnormalWeather_StartGroudonWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH - call_if_eq AbnormalWeather_StartGroudonWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH, AbnormalWeather_StartGroudonWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH, AbnormalWeather_StartGroudonWeather end Route114_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute114North - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute114South + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH, AbnormalWeather_EventScript_PlaceTilesRoute114North + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH, AbnormalWeather_EventScript_PlaceTilesRoute114South end Route114_OnFrame: @@ -34,8 +29,7 @@ Route114_EventScript_Man:: addvar VAR_RESULT, NUM_ROUTE_114_MAN_BERRIES_SKIPPED addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_ROUTE_114_RECEIVED_BERRY msgbox Route114_Text_TryBerryCrushWithFriends, MSGBOX_DEFAULT release @@ -52,8 +46,7 @@ Route114_EventScript_RoarGentleman:: goto_if_set FLAG_RECEIVED_TM05, Route114_EventScript_ReceivedRoar msgbox Route114_Text_AllMyMonDoesIsRoarTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM05 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM05 msgbox Route114_Text_ExplainRoar, MSGBOX_DEFAULT release @@ -109,8 +102,7 @@ Route114_EventScript_Nancy:: Route114_EventScript_Steve:: trainerbattle_single TRAINER_STEVE_1, Route114_Text_SteveIntro, Route114_Text_SteveDefeat, Route114_EventScript_RegisterSteve specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route114_EventScript_RematchSteve + goto_if_eq VAR_RESULT, TRUE, Route114_EventScript_RematchSteve msgbox Route114_Text_StevePostBattle, MSGBOX_DEFAULT release end @@ -131,8 +123,7 @@ Route114_EventScript_RematchSteve:: Route114_EventScript_Bernie:: trainerbattle_single TRAINER_BERNIE_1, Route114_Text_BernieIntro, Route114_Text_BernieDefeat, Route114_EventScript_RegisterBernie specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route114_EventScript_RematchBernie + goto_if_eq VAR_RESULT, TRUE, Route114_EventScript_RematchBernie msgbox Route114_Text_BerniePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route114_FossilManiacsHouse/scripts.inc b/data/maps/Route114_FossilManiacsHouse/scripts.inc index f291cd5ee..ba3c0c60e 100644 --- a/data/maps/Route114_FossilManiacsHouse/scripts.inc +++ b/data/maps/Route114_FossilManiacsHouse/scripts.inc @@ -12,8 +12,7 @@ Route114_FossilManiacsHouse_EventScript_FossilManiacsBrother:: goto_if_set FLAG_RECEIVED_TM28, Route114_FossilManiacsHouse_EventScript_ReceivedDig msgbox Route114_FossilManiacsHouse_Text_HaveThisToDigLikeMyBrother, MSGBOX_DEFAULT giveitem ITEM_TM28 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM28 release end diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc index 500e12bee..72138bbe4 100644 --- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc +++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc @@ -38,11 +38,9 @@ Route114_FossilManiacsTunnel_EventScript_FossilManiac:: faceplayer goto_if_set FLAG_RECEIVED_REVIVED_FOSSIL_MON, Route114_FossilManiacsTunnel_EventScript_PlayerRevivedFossil checkitem ITEM_ROOT_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil + goto_if_eq VAR_RESULT, TRUE, Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil checkitem ITEM_CLAW_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil + goto_if_eq VAR_RESULT, TRUE, Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil msgbox Route114_FossilManiacsTunnel_Text_LookInDesertForFossils, MSGBOX_DEFAULT release end diff --git a/data/maps/Route114_LanettesHouse/scripts.inc b/data/maps/Route114_LanettesHouse/scripts.inc index 5a7ccb341..9143b2795 100644 --- a/data/maps/Route114_LanettesHouse/scripts.inc +++ b/data/maps/Route114_LanettesHouse/scripts.inc @@ -13,8 +13,7 @@ Route114_LanettesHouse_EventScript_Lanette:: setflag FLAG_SYS_PC_LANETTE msgbox Route114_LanettesHouse_Text_EverythingClutteredKeepThis, MSGBOX_DEFAULT givedecoration DECOR_LOTAD_DOLL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowNoRoomForDecor + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowNoRoomForDecor setflag FLAG_RECEIVED_DOLL_LANETTE release end @@ -27,16 +26,14 @@ Route114_LanettesHouse_EventScript_OfferAdvice:: Route114_LanettesHouse_EventScript_Notebook:: lockall msgbox Route114_LanettesHouse_Text_ResearchNotesPage1, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route114_LanettesHouse_EventScript_NotebookPage2 + goto_if_eq VAR_RESULT, YES, Route114_LanettesHouse_EventScript_NotebookPage2 msgbox Route114_LanettesHouse_Text_ClosedTheNotebook, MSGBOX_DEFAULT releaseall end Route114_LanettesHouse_EventScript_NotebookPage2:: msgbox Route114_LanettesHouse_Text_ResearchNotesPage2, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq Route114_LanettesHouse_EventScript_NotebookPage3 + call_if_eq VAR_RESULT, YES, Route114_LanettesHouse_EventScript_NotebookPage3 releaseall end diff --git a/data/maps/Route115/scripts.inc b/data/maps/Route115/scripts.inc index 600e6751f..e00fdb27d 100644 --- a/data/maps/Route115/scripts.inc +++ b/data/maps/Route115/scripts.inc @@ -5,19 +5,14 @@ Route115_MapScripts:: .byte 0 Route115_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_WEST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute115West - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_EAST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute115East + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_WEST, AbnormalWeather_EventScript_PlaceTilesRoute115West + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_EAST, AbnormalWeather_EventScript_PlaceTilesRoute115East end Route115_OnTransition: - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_WEST - call_if_eq AbnormalWeather_StartGroudonWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_EAST - call_if_eq AbnormalWeather_StartGroudonWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_WEST, AbnormalWeather_StartGroudonWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_EAST, AbnormalWeather_StartGroudonWeather end Route115_OnFrame: @@ -39,8 +34,7 @@ Route115_EventScript_MeteorFallsSign:: Route115_EventScript_Timothy:: trainerbattle_single TRAINER_TIMOTHY_1, Route115_Text_TimothyIntro, Route115_Text_TimothyDefeat, Route115_EventScript_RegisterTimothy specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route115_EventScript_RematchTimothy + goto_if_eq VAR_RESULT, TRUE, Route115_EventScript_RematchTimothy msgbox Route115_Text_TimothyPostBattle, MSGBOX_DEFAULT release end @@ -66,8 +60,7 @@ Route115_EventScript_Koichi:: Route115_EventScript_Nob:: trainerbattle_single TRAINER_NOB_1, Route115_Text_NobIntro, Route115_Text_NobDefeat, Route115_EventScript_RegisterNob specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route115_EventScript_RematchNob + goto_if_eq VAR_RESULT, TRUE, Route115_EventScript_RematchNob msgbox Route115_Text_NobPostBattle, MSGBOX_DEFAULT release end @@ -88,8 +81,7 @@ Route115_EventScript_RematchNob:: Route115_EventScript_Cyndy:: trainerbattle_single TRAINER_CYNDY_1, Route115_Text_CyndyIntro, Route115_Text_CyndyDefeat, Route115_EventScript_RegisterCyndy specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route115_EventScript_RematchCyndy + goto_if_eq VAR_RESULT, TRUE, Route115_EventScript_RematchCyndy msgbox Route115_Text_CyndyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc index 7657e2061..2a464d199 100644 --- a/data/maps/Route116/scripts.inc +++ b/data/maps/Route116/scripts.inc @@ -9,12 +9,9 @@ Route116_MapScripts:: Route116_OnTransition: call_if_set FLAG_RECOVERED_DEVON_GOODS, Route116_EventScript_SetWandasBoyfriendPos - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_NORTH - call_if_eq AbnormalWeather_StartGroudonWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_SOUTH - call_if_eq AbnormalWeather_StartGroudonWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_NORTH, AbnormalWeather_StartGroudonWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_SOUTH, AbnormalWeather_StartGroudonWeather end Route116_EventScript_SetWandasBoyfriendPos:: @@ -22,10 +19,8 @@ Route116_EventScript_SetWandasBoyfriendPos:: return Route116_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_NORTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute116North - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_SOUTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute116South + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_NORTH, AbnormalWeather_EventScript_PlaceTilesRoute116North + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_SOUTH, AbnormalWeather_EventScript_PlaceTilesRoute116South end Route116_OnFrame: @@ -62,18 +57,13 @@ Route116_EventScript_DevonEmployee:: Route116_EventScript_GiveRepeatBall:: setflag FLAG_MET_DEVON_EMPLOYEE giveitem ITEM_REPEAT_BALL - compare VAR_RESULT, FALSE - goto_if_eq Route116_EventScript_NoRoomForRepeatBall + goto_if_eq VAR_RESULT, FALSE, Route116_EventScript_NoRoomForRepeatBall msgbox Route116_Text_NewBallAvailableAtMart, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq Route116_EventScript_DevonEmployeeExit - compare VAR_FACING, DIR_SOUTH - call_if_eq Route116_EventScript_DevonEmployeeExit - compare VAR_FACING, DIR_WEST - call_if_eq Route116_EventScript_DevonEmployeeExit - compare VAR_FACING, DIR_EAST - call_if_eq Route116_EventScript_DevonEmployeeExitEast + call_if_eq VAR_FACING, DIR_NORTH, Route116_EventScript_DevonEmployeeExit + call_if_eq VAR_FACING, DIR_SOUTH, Route116_EventScript_DevonEmployeeExit + call_if_eq VAR_FACING, DIR_WEST, Route116_EventScript_DevonEmployeeExit + call_if_eq VAR_FACING, DIR_EAST, Route116_EventScript_DevonEmployeeExitEast removeobject VAR_LAST_TALKED clearflag FLAG_HIDE_RUSTBORO_CITY_DEVON_CORP_3F_EMPLOYEE setflag FLAG_RECEIVED_REPEAT_BALL @@ -166,11 +156,9 @@ Route116_EventScript_GlassesMan:: lock faceplayer checkitem ITEM_BLACK_GLASSES - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_PlayerHasGlasses + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_PlayerHasGlasses specialvar VAR_RESULT, FoundBlackGlasses - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_FoundGlassesNotOnPlayer + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_FoundGlassesNotOnPlayer msgbox Route116_Text_CanYouHelpMeFindGlasses, MSGBOX_DEFAULT release end @@ -185,8 +173,7 @@ Route116_EventScript_PlayerHasGlasses:: msgbox Route116_Text_CanYouHelpMeFindGlasses, MSGBOX_DEFAULT msgbox Route116_Text_MayISeeThoseGlasses, MSGBOX_DEFAULT specialvar VAR_RESULT, FoundBlackGlasses - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_FoundGlassesOnPlayer + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_FoundGlassesOnPlayer msgbox Route116_Text_NotWhatImLookingFor, MSGBOX_DEFAULT release end @@ -199,14 +186,10 @@ Route116_EventScript_FoundGlassesOnPlayer:: Route116_EventScript_GlassesManExit:: delay 20 - compare VAR_FACING, DIR_NORTH - call_if_eq Route116_EventScript_GlassesManExitNormal - compare VAR_FACING, DIR_SOUTH - call_if_eq Route116_EventScript_GlassesManExitNormal - compare VAR_FACING, DIR_WEST - call_if_eq Route116_EventScript_GlassesManExitNormal - compare VAR_FACING, DIR_EAST - call_if_eq Route116_EventScript_GlassesManExitEast + call_if_eq VAR_FACING, DIR_NORTH, Route116_EventScript_GlassesManExitNormal + call_if_eq VAR_FACING, DIR_SOUTH, Route116_EventScript_GlassesManExitNormal + call_if_eq VAR_FACING, DIR_WEST, Route116_EventScript_GlassesManExitNormal + call_if_eq VAR_FACING, DIR_EAST, Route116_EventScript_GlassesManExitEast removeobject VAR_LAST_TALKED release end @@ -259,12 +242,10 @@ Route116_EventScript_Jose:: Route116_EventScript_Jerry:: trainerbattle_single TRAINER_JERRY_1, Route116_Text_JerryIntro, Route116_Text_JerryDefeat, Route116_EventScript_TryRegisterJerryAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_RematchJerry + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_RematchJerry setvar VAR_0x8004, TRAINER_JERRY_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route116_EventScript_TryRegisterJerry + goto_if_eq VAR_RESULT, FALSE, Route116_EventScript_TryRegisterJerry msgbox Route116_Text_JerryPostBattle, MSGBOX_DEFAULT release end @@ -312,12 +293,10 @@ Route116_EventScript_Janice:: Route116_EventScript_Karen:: trainerbattle_single TRAINER_KAREN_1, Route116_Text_KarenIntro, Route116_Text_KarenDefeat, Route116_EventScript_TryRegisterKarenAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_RematchKaren + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_RematchKaren setvar VAR_0x8004, TRAINER_KAREN_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route116_EventScript_TryRegisterKaren + goto_if_eq VAR_RESULT, FALSE, Route116_EventScript_TryRegisterKaren msgbox Route116_Text_KarenPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route117/scripts.inc b/data/maps/Route117/scripts.inc index f6ab88591..37d589ce3 100644 --- a/data/maps/Route117/scripts.inc +++ b/data/maps/Route117/scripts.inc @@ -41,8 +41,7 @@ Route117_EventScript_DayCareSign:: Route117_EventScript_Isaac:: trainerbattle_single TRAINER_ISAAC_1, Route117_Text_IsaacIntro, Route117_Text_IsaacDefeat, Route117_EventScript_RegisterIsaac specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchIsaac + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchIsaac msgbox Route117_Text_IsaacPostBattle, MSGBOX_DEFAULT release end @@ -63,8 +62,7 @@ Route117_EventScript_RematchIsaac:: Route117_EventScript_Lydia:: trainerbattle_single TRAINER_LYDIA_1, Route117_Text_LydiaIntro, Route117_Text_LydiaDefeat, Route117_EventScript_RegisterLydia specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchLydia + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchLydia msgbox Route117_Text_LydiaPostBattle, MSGBOX_DEFAULT release end @@ -85,8 +83,7 @@ Route117_EventScript_RematchLydia:: Route117_EventScript_Dylan:: trainerbattle_single TRAINER_DYLAN_1, Route117_Text_DylanIntro, Route117_Text_DylanDefeat, Route117_EventScript_RegisterDylan specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchDylan + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchDylan msgbox Route117_Text_DylanPostBattle, MSGBOX_DEFAULT release end @@ -107,8 +104,7 @@ Route117_EventScript_RematchDylan:: Route117_EventScript_Maria:: trainerbattle_single TRAINER_MARIA_1, Route117_Text_MariaIntro, Route117_Text_MariaDefeat, Route117_EventScript_RegisterMaria specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchMaria + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchMaria msgbox Route117_Text_MariaPostBattle, MSGBOX_DEFAULT release end @@ -134,8 +130,7 @@ Route117_EventScript_Derek:: Route117_EventScript_Anna:: trainerbattle_double TRAINER_ANNA_AND_MEG_1, Route117_Text_AnnaIntro, Route117_Text_AnnaDefeat, Route117_Text_AnnaNotEnoughMons, Route117_EventScript_RegisterAnna specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchAnna + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchAnna msgbox Route117_Text_AnnaPostBattle, MSGBOX_DEFAULT release end @@ -154,8 +149,7 @@ Route117_EventScript_RematchAnna:: Route117_EventScript_Meg:: trainerbattle_double TRAINER_ANNA_AND_MEG_1, Route117_Text_MegIntro, Route117_Text_MegDefeat, Route117_Text_MegNotEnoughMons, Route117_EventScript_RegisterMeg specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchMeg + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchMeg msgbox Route117_Text_MegPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route118/scripts.inc b/data/maps/Route118/scripts.inc index 5b68804b5..92dd8847d 100644 --- a/data/maps/Route118/scripts.inc +++ b/data/maps/Route118/scripts.inc @@ -8,19 +8,14 @@ Route118_MapScripts:: Route118_OnTransition: call GabbyAndTy_EventScript_UpdateLocation - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_EAST - call_if_eq AbnormalWeather_StartGroudonWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_WEST - call_if_eq AbnormalWeather_StartGroudonWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_EAST, AbnormalWeather_StartGroudonWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_WEST, AbnormalWeather_StartGroudonWeather end Route118_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_EAST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute118East - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_WEST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute118West + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_EAST, AbnormalWeather_EventScript_PlaceTilesRoute118East + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_WEST, AbnormalWeather_EventScript_PlaceTilesRoute118West end Route118_OnFrame: @@ -32,10 +27,8 @@ Route118_EventScript_GoodRodFisherman:: faceplayer goto_if_set FLAG_RECEIVED_GOOD_ROD, Route118_EventScript_ReceivedGoodRod msgbox Route118_Text_YouAgreeGoodRodIsGood, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route118_EventScript_ReceiveGoodRod - compare VAR_RESULT, NO - goto_if_eq Route118_EventScript_DeclineGoodRod + goto_if_eq VAR_RESULT, YES, Route118_EventScript_ReceiveGoodRod + goto_if_eq VAR_RESULT, NO, Route118_EventScript_DeclineGoodRod end Route118_EventScript_ReceiveGoodRod:: @@ -103,12 +96,9 @@ Route118_EventScript_StevenTrigger:: delay 30 msgbox Route118_Text_StevenQuestions, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq Route118_EventScript_StevenExit0 - compare VAR_0x8008, 1 - call_if_eq Route118_EventScript_StevenExit1 - compare VAR_0x8008, 2 - call_if_eq Route118_EventScript_StevenExit2 + call_if_eq VAR_0x8008, 0, Route118_EventScript_StevenExit0 + call_if_eq VAR_0x8008, 1, Route118_EventScript_StevenExit1 + call_if_eq VAR_0x8008, 2, Route118_EventScript_StevenExit2 setvar VAR_ROUTE118_STATE, 1 removeobject LOCALID_STEVEN releaseall @@ -190,8 +180,7 @@ Route118_Movement_StevenExit2: Route118_EventScript_Rose:: trainerbattle_single TRAINER_ROSE_1, Route118_Text_RoseIntro, Route118_Text_RoseDefeat, Route118_EventScript_RegisterRose specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route118_EventScript_RematchRose + goto_if_eq VAR_RESULT, TRUE, Route118_EventScript_RematchRose msgbox Route118_Text_RosePostBattle, MSGBOX_DEFAULT release end @@ -222,8 +211,7 @@ Route118_EventScript_Wade:: Route118_EventScript_Dalton:: trainerbattle_single TRAINER_DALTON_1, Route118_Text_DaltonIntro, Route118_Text_DaltonDefeat, Route118_EventScript_RegisterDalton specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route118_EventScript_RematchDalton + goto_if_eq VAR_RESULT, TRUE, Route118_EventScript_RematchDalton msgbox Route118_Text_DaltonPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route119/scripts.inc b/data/maps/Route119/scripts.inc index 839f4101b..94094206c 100644 --- a/data/maps/Route119/scripts.inc +++ b/data/maps/Route119/scripts.inc @@ -13,16 +13,14 @@ Route119_OnResume: Route119_EventScript_TryRemoveKecleon:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return Route119_OnTransition: call Common_EventScript_SetupRivalGfxId call Common_EventScript_SetupRivalOnBikeGfxId - compare VAR_WEATHER_INSTITUTE_STATE, 1 - call_if_eq Route119_EventScript_MoveInstituteWorkersDownstairs + call_if_eq VAR_WEATHER_INSTITUTE_STATE, 1, Route119_EventScript_MoveInstituteWorkersDownstairs special SetRoute119Weather end @@ -46,30 +44,22 @@ Route119_EventScript_RivalEncounter:: lockall addobject LOCALID_RIVAL_ON_BIKE checkplayergender - compare VAR_RESULT, MALE - call_if_eq Route119_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - call_if_eq Route119_EventScript_PlayBrendanMusic + call_if_eq VAR_RESULT, MALE, Route119_EventScript_PlayMayMusic + call_if_eq VAR_RESULT, FEMALE, Route119_EventScript_PlayBrendanMusic delay 65 - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_RivalEnter1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_RivalEnter2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_RivalEnter1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_RivalEnter2 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_SetRivalPos1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_SetRivalPos2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_SetRivalPos1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_SetRivalPos2 removeobject LOCALID_RIVAL_ON_BIKE addobject LOCALID_RIVAL delay 30 checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route119_EventScript_BattleMay - compare VAR_RESULT, FEMALE - goto_if_eq Route119_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, MALE, Route119_EventScript_BattleMay + goto_if_eq VAR_RESULT, FEMALE, Route119_EventScript_BattleBrendan releaseall end @@ -148,36 +138,28 @@ Route119_EventScript_GiveFlyHM:: Route119_EventScript_RivalExitScottArrive:: closemessage - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_SetRivalPos1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_SetRivalPos2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_SetRivalPos1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_SetRivalPos2 removeobject LOCALID_RIVAL addobject LOCALID_RIVAL_ON_BIKE delay 30 - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_RivalExit1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_RivalExit2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_RivalExit1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_RivalExit2 removeobject LOCALID_RIVAL_ON_BIKE setvar VAR_ROUTE119_STATE, 1 savebgm MUS_DUMMY fadedefaultbgm delay 60 - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_SetScottPos1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_SetScottPos2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_SetScottPos1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_SetScottPos2 addobject LOCALID_SCOTT applymovement LOCALID_SCOTT, Route119_Movement_ScottEnter waitmovement 0 addvar VAR_SCOTT_STATE, 1 msgbox Route119_Text_ScottWayToGoBeSeeingYou, MSGBOX_DEFAULT closemessage - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_ScottExit1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_ScottExit2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_ScottExit1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_ScottExit2 removeobject LOCALID_SCOTT releaseall end @@ -372,8 +354,7 @@ Route119_EventScript_Kent:: Route119_EventScript_Jackson:: trainerbattle_single TRAINER_JACKSON_1, Route119_Text_JacksonIntro, Route119_Text_JacksonDefeat, Route119_EventScript_RegisterJackson specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route119_EventScript_RematchJackson + goto_if_eq VAR_RESULT, TRUE, Route119_EventScript_RematchJackson msgbox Route119_Text_JacksonPostBattle, MSGBOX_DEFAULT release end @@ -394,8 +375,7 @@ Route119_EventScript_RematchJackson:: Route119_EventScript_Catherine:: trainerbattle_single TRAINER_CATHERINE_1, Route119_Text_CatherineIntro, Route119_Text_CatherineDefeat, Route119_EventScript_RegisterCatherine specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route119_EventScript_RematchCatherine + goto_if_eq VAR_RESULT, TRUE, Route119_EventScript_RematchCatherine msgbox Route119_Text_CatherinePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route119_WeatherInstitute_1F/scripts.inc b/data/maps/Route119_WeatherInstitute_1F/scripts.inc index 33ba0b025..cce41bfb5 100644 --- a/data/maps/Route119_WeatherInstitute_1F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_1F/scripts.inc @@ -5,8 +5,7 @@ Route119_WeatherInstitute_1F_MapScripts:: .byte 0 Route119_WeatherInstitute_1F_OnTransition: - compare VAR_WEATHER_INSTITUTE_STATE, 0 - call_if_eq Route119_WeatherInstitute_1F_EventScript_SetLittleBoyPos + call_if_eq VAR_WEATHER_INSTITUTE_STATE, 0, Route119_WeatherInstitute_1F_EventScript_SetLittleBoyPos end Route119_WeatherInstitute_1F_EventScript_SetLittleBoyPos:: @@ -18,8 +17,7 @@ Route119_WeatherInstitute_1F_EventScript_LittleBoy:: lock faceplayer special GetPlayerBigGuyGirlString - compare VAR_WEATHER_INSTITUTE_STATE, 0 - goto_if_eq Route119_WeatherInstitute_1F_EventScript_LittleBoyTeamAquaHere + goto_if_eq VAR_WEATHER_INSTITUTE_STATE, 0, Route119_WeatherInstitute_1F_EventScript_LittleBoyTeamAquaHere msgbox Route119_WeatherInstitute_1F_Text_WowYoureStrong, MSGBOX_DEFAULT release end @@ -36,8 +34,7 @@ Route119_WeatherInstitute_1F_EventScript_InstituteWorker1:: setvar VAR_0x8004, 0 call_if_set FLAG_DEFEATED_KYOGRE, Route119_WeatherInstitute_1F_EventScript_LegendaryDefeated call_if_set FLAG_DEFEATED_GROUDON, Route119_WeatherInstitute_1F_EventScript_LegendaryDefeated - compare VAR_0x8004, 2 @ Both defeated - goto_if_eq Route119_WeatherInstitute_1F_EventScript_StudyingRain + goto_if_eq VAR_0x8004, 2, Route119_WeatherInstitute_1F_EventScript_StudyingRain @ Both defeated msgbox Route119_WeatherInstitute_1F_Text_NoticingAbnormalWeather, MSGBOX_DEFAULT release end diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 3a2957d5e..0b2227e8b 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -10,10 +10,8 @@ Route119_WeatherInstitute_2F_MapScripts:: .byte 0 Route119_WeatherInstitute_2F_OnTransition: - compare VAR_WEATHER_INSTITUTE_STATE, 0 - call_if_eq Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaHere - compare VAR_WEATHER_INSTITUTE_STATE, 1 - call_if_eq Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaGone + call_if_eq VAR_WEATHER_INSTITUTE_STATE, 0, Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaHere + call_if_eq VAR_WEATHER_INSTITUTE_STATE, 1, Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaGone call_if_set FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_2F_EventScript_SetScientistPosGameClear end @@ -92,18 +90,15 @@ Route119_WeatherInstitute_2F_EventScript_ReceiveCastform:: msgbox Route119_WeatherInstitute_2F_Text_ThanksPleaseTakePokemon, MSGBOX_DEFAULT setvar VAR_TEMP_1, SPECIES_CASTFORM givemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER - compare VAR_RESULT, 0 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty - compare VAR_RESULT, 1 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC + goto_if_eq VAR_RESULT, 0, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty + goto_if_eq VAR_RESULT, 1, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC goto Common_EventScript_NoMoreRoomForPokemon end Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty:: call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route119_WeatherInstitute_2F_EventScript_ExplainCastform + goto_if_eq VAR_RESULT, NO, Route119_WeatherInstitute_2F_EventScript_ExplainCastform call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto Route119_WeatherInstitute_2F_EventScript_ExplainCastform @@ -112,8 +107,7 @@ Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty:: Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC:: call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route119_WeatherInstitute_2F_EventScript_SendCastformToPC + goto_if_eq VAR_RESULT, NO, Route119_WeatherInstitute_2F_EventScript_SendCastformToPC call Common_EventScript_NameReceivedBoxMon goto Route119_WeatherInstitute_2F_EventScript_SendCastformToPC end @@ -147,12 +141,10 @@ Route119_WeatherInstitute_2F_EventScript_TryStartAbnormalWeather:: setvar VAR_0x8004, 0 call_if_set FLAG_DEFEATED_KYOGRE, Route119_WeatherInstitute_2F_EventScript_LegendaryDefeated call_if_set FLAG_DEFEATED_GROUDON, Route119_WeatherInstitute_2F_EventScript_LegendaryDefeated - compare VAR_0x8004, 2 @ Both defeated - goto_if_eq Route119_WeatherInstitute_2F_EventScript_NoAbnormalWeather + goto_if_eq VAR_0x8004, 2, Route119_WeatherInstitute_2F_EventScript_NoAbnormalWeather @ Both defeated call_if_unset FLAG_TEMP_2, Route119_WeatherInstitute_2F_EventScript_CreateAbnormalWeather specialvar VAR_RESULT, GetAbnormalWeatherMapNameAndType - compare VAR_RESULT, 1 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_KyogreWeather + goto_if_eq VAR_RESULT, 1, Route119_WeatherInstitute_2F_EventScript_KyogreWeather msgbox Route119_WeatherInstitute_2F_Text_GroudonWeather, MSGBOX_DEFAULT release end diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index e28637592..baf721a5c 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -13,32 +13,24 @@ Route120_OnResume: end Route120_EventScript_RemoveKecleonObject:: - compare VAR_0x8009, 0 - call_if_eq Route120_EventScript_RemoveBridgeKecleon - compare VAR_0x8009, 1 - call_if_eq Route120_EventScript_RemoveKecleon - compare VAR_0x8009, 2 - call_if_eq Route120_EventScript_RemoveKecleon - compare VAR_0x8009, 3 - call_if_eq Route120_EventScript_RemoveKecleon - compare VAR_0x8009, 4 - call_if_eq Route120_EventScript_RemoveKecleon - compare VAR_0x8009, 5 - call_if_eq Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 0, Route120_EventScript_RemoveBridgeKecleon + call_if_eq VAR_0x8009, 1, Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 2, Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 3, Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 4, Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 5, Route120_EventScript_RemoveKecleon return Route120_EventScript_RemoveBridgeKecleon:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_BRIDGE_KECLEON removeobject LOCALID_BRIDGE_KECLEON_SHADOW return Route120_EventScript_RemoveKecleon:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -71,12 +63,9 @@ Route120_OnTransition: Route120_EventScript_SetWeather:: getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_1, 14 - goto_if_le Route120_EventScript_SetSunnyWeather - compare VAR_TEMP_1, 60 - goto_if_le Route120_EventScript_TrySetRainyWeather - compare VAR_TEMP_1, 61 - goto_if_ge Route120_EventScript_SetCloudyWeather + goto_if_le VAR_TEMP_1, 14, Route120_EventScript_SetSunnyWeather + goto_if_le VAR_TEMP_1, 60, Route120_EventScript_TrySetRainyWeather + goto_if_ge VAR_TEMP_1, 61, Route120_EventScript_SetCloudyWeather return Route120_EventScript_SetCloudyWeather:: @@ -88,10 +77,8 @@ Route120_EventScript_SetSunnyWeather:: return Route120_EventScript_TrySetRainyWeather:: - compare VAR_TEMP_0, 7 - goto_if_le Route120_EventScript_SetRainyWeather - compare VAR_TEMP_0, 19 - goto_if_le Route120_EventScript_SetSunnyWeather + goto_if_le VAR_TEMP_0, 7, Route120_EventScript_SetRainyWeather + goto_if_le VAR_TEMP_0, 19, Route120_EventScript_SetSunnyWeather goto Route120_EventScript_SetRainyWeather end @@ -105,10 +92,8 @@ Route120_EventScript_BerryBeauty:: dotimebasedevents goto_if_set FLAG_DAILY_ROUTE_120_RECEIVED_BERRY, Route120_EventScript_ReceivedBerry msgbox Route120_Text_BerriesExpressionOfLoveIsntIt, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq Route120_EventScript_BerryLove - compare VAR_RESULT, NO - call_if_eq Route120_EventScript_BerryNotLove + call_if_eq VAR_RESULT, YES, Route120_EventScript_BerryLove + call_if_eq VAR_RESULT, NO, Route120_EventScript_BerryNotLove specialvar VAR_RESULT, GetPlayerTrainerIdOnesDigit switch VAR_RESULT case 0, Route120_EventScript_GiveFigyBerry @@ -150,8 +135,7 @@ Route120_EventScript_GiveIapapaBerry:: Route120_EventScript_GiveBerry:: giveitem VAR_0x8004 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_ROUTE_120_RECEIVED_BERRY msgbox Route120_Text_BerryIsRareRaiseItWithCare, MSGBOX_DEFAULT release @@ -175,8 +159,7 @@ Route120_EventScript_Steven:: faceplayer goto_if_set FLAG_NOT_READY_FOR_BATTLE_ROUTE_120, Route120_EventScript_StevenAskReadyForBattle msgbox Route120_Text_StevenGreeting, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route120_EventScript_StevenNotReady + goto_if_eq VAR_RESULT, NO, Route120_EventScript_StevenNotReady goto Route120_EventScript_StevenBattleKecleon end @@ -188,18 +171,15 @@ Route120_EventScript_StevenNotReady:: Route120_EventScript_StevenAskReadyForBattle:: msgbox Route120_Text_StevenReadyForBattle, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route120_EventScript_StevenNotReady + goto_if_eq VAR_RESULT, NO, Route120_EventScript_StevenNotReady goto Route120_EventScript_StevenBattleKecleon end Route120_EventScript_StevenBattleKecleon:: msgbox Route120_Text_StevenShowMeYourPower, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq Route120_EventScript_PlayerApproachKecleonNorth - compare VAR_FACING, DIR_WEST - call_if_eq Route120_EventScript_PlayerApproachKecleonWest + call_if_eq VAR_FACING, DIR_NORTH, Route120_EventScript_PlayerApproachKecleonNorth + call_if_eq VAR_FACING, DIR_WEST, Route120_EventScript_PlayerApproachKecleonWest applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 @@ -219,12 +199,9 @@ Route120_EventScript_StevenBattleKecleon:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq Route120_EventScript_RemoveBridgeKecleonPostBattle - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq Route120_EventScript_RemoveBridgeKecleonPostBattle - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq Route120_EventScript_RemoveBridgeKecleonPostBattle + goto_if_eq VAR_RESULT, B_OUTCOME_WON, Route120_EventScript_RemoveBridgeKecleonPostBattle + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, Route120_EventScript_RemoveBridgeKecleonPostBattle + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, Route120_EventScript_RemoveBridgeKecleonPostBattle goto Route120_EventScript_StevenGiveDeconScope end @@ -296,8 +273,7 @@ Route120_EventScript_Colin:: Route120_EventScript_Robert:: trainerbattle_single TRAINER_ROBERT_1, Route120_Text_RobertIntro, Route120_Text_RobertDefeat, Route120_EventScript_RegisterRobert specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route120_EventScript_RematchRobert + goto_if_eq VAR_RESULT, TRUE, Route120_EventScript_RematchRobert msgbox Route120_Text_RobertPostBattle, MSGBOX_DEFAULT release end @@ -328,8 +304,7 @@ Route120_EventScript_Jenna:: Route120_EventScript_Jeffrey:: trainerbattle_single TRAINER_JEFFREY_1, Route120_Text_JeffreyIntro, Route120_Text_JeffreyDefeat, Route120_EventScript_RegisterJeffrey specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route120_EventScript_RematchJeffrey + goto_if_eq VAR_RESULT, TRUE, Route120_EventScript_RematchJeffrey msgbox Route120_Text_JeffreyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route121/scripts.inc b/data/maps/Route121/scripts.inc index 3bd0a42ee..317328825 100644 --- a/data/maps/Route121/scripts.inc +++ b/data/maps/Route121/scripts.inc @@ -77,8 +77,7 @@ Route121_EventScript_Vanessa:: Route121_EventScript_Walter:: trainerbattle_single TRAINER_WALTER_1, Route121_Text_WalterIntro, Route121_Text_WalterDefeat, Route121_EventScript_RegisterWalter specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route121_EventScript_RematchWalter + goto_if_eq VAR_RESULT, TRUE, Route121_EventScript_RematchWalter msgbox Route121_Text_WalterPostBattle, MSGBOX_DEFAULT release end @@ -114,8 +113,7 @@ Route121_EventScript_Joy:: Route121_EventScript_Jessica:: trainerbattle_single TRAINER_JESSICA_1, Route121_Text_JessicaIntro, Route121_Text_JessicaDefeat, Route121_EventScript_RegisterJessica specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route121_EventScript_RematchJessica + goto_if_eq VAR_RESULT, TRUE, Route121_EventScript_RematchJessica msgbox Route121_Text_JessicaPostBattle, MSGBOX_DEFAULT release end @@ -156,8 +154,7 @@ Route121_EventScript_Marcel:: Route121_EventScript_Cristin:: trainerbattle_single TRAINER_CRISTIN_1, Route121_Text_CristinIntro, Route121_Text_CristinDefeat, Route121_EventScript_RegisterCristin specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route121_EventScript_RematchCristin + goto_if_eq VAR_RESULT, TRUE, Route121_EventScript_RematchCristin msgbox Route121_Text_CristinPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 5050612f7..92fdc2d0b 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -33,8 +33,7 @@ Route121_SafariZoneEntrance_EventScript_InfoAttendant:: lock faceplayer msgbox Route121_SafariZoneEntrance_Text_WelcomeFirstTime, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route121_SafariZoneEntrance_EventScript_FirstTimeInfo + goto_if_eq VAR_RESULT, YES, Route121_SafariZoneEntrance_EventScript_FirstTimeInfo msgbox Route121_SafariZoneEntrance_Text_ComeInAndEnjoy, MSGBOX_DEFAULT release end @@ -50,20 +49,17 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger:: waitmovement 0 showmoneybox 0, 0 msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone + goto_if_eq VAR_RESULT, YES, Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone msgbox Route121_SafariZoneEntrance_Text_PlayAnotherTime, MSGBOX_DEFAULT goto Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter end Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, 0 - goto_if_eq Route121_SafariZoneEntrance_EventScript_NoPokeblockCase + goto_if_eq VAR_RESULT, 0, Route121_SafariZoneEntrance_EventScript_NoPokeblockCase call Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon checkmoney 500 - compare VAR_RESULT, 0 - goto_if_eq Route121_SafariZoneEntrance_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, 0, Route121_SafariZoneEntrance_EventScript_NotEnoughMoney playse SE_SHOP msgbox Route121_SafariZoneEntrance_Text_ThatWillBe500Please, MSGBOX_DEFAULT removemoney 500 @@ -86,11 +82,9 @@ Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon:: getpartysize - compare VAR_RESULT, PARTY_SIZE - goto_if_ne Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon + goto_if_ne VAR_RESULT, PARTY_SIZE, Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon specialvar VAR_RESULT, ScriptCheckFreePokemonStorageSpace - compare VAR_RESULT, 1 - goto_if_eq Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon + goto_if_eq VAR_RESULT, 1, Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon msgbox Route121_SafariZoneEntrance_Text_PCIsFull, MSGBOX_DEFAULT goto Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter end diff --git a/data/maps/Route123/scripts.inc b/data/maps/Route123/scripts.inc index 6ce0de654..fe6366126 100644 --- a/data/maps/Route123/scripts.inc +++ b/data/maps/Route123/scripts.inc @@ -12,12 +12,10 @@ Route123_EventScript_GigaDrainGirl:: goto_if_set FLAG_RECEIVED_TM19, Route123_EventScript_ReceivedGigaDrain msgbox Route123_Text_LoveGrassMonsHaveAny, MSGBOX_DEFAULT special IsGrassTypeInParty - compare VAR_RESULT, FALSE - goto_if_eq Route123_EventScript_NoGrassMons + goto_if_eq VAR_RESULT, FALSE, Route123_EventScript_NoGrassMons msgbox Route123_Text_YouLikeGrassMonsTooHaveThis, MSGBOX_DEFAULT giveitem ITEM_TM19 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM19 msgbox Route123_Text_CheckTreesWithMyGrassMon, MSGBOX_DEFAULT release @@ -62,8 +60,7 @@ Route123_EventScript_Violet:: Route123_EventScript_Cameron:: trainerbattle_single TRAINER_CAMERON_1, Route123_Text_CameronIntro, Route123_Text_CameronDefeat, Route123_EventScript_RegisterCameron specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route123_EventScript_RematchCameron + goto_if_eq VAR_RESULT, TRUE, Route123_EventScript_RematchCameron msgbox Route123_Text_CameronPostBattle, MSGBOX_DEFAULT release end @@ -84,8 +81,7 @@ Route123_EventScript_RematchCameron:: Route123_EventScript_Jacki:: trainerbattle_single TRAINER_JACKI_1, Route123_Text_JackiIntro, Route123_Text_JackiDefeat, Route123_EventScript_RegisterJacki specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route123_EventScript_RematchJacki + goto_if_eq VAR_RESULT, TRUE, Route123_EventScript_RematchJacki msgbox Route123_Text_JackiPostBattle, MSGBOX_DEFAULT release end @@ -156,8 +152,7 @@ Route123_EventScript_Davis:: Route123_EventScript_Fernando:: trainerbattle_single TRAINER_FERNANDO_1, Route123_Text_FernandoIntro, Route123_Text_FernandoDefeat, Route123_EventScript_RegisterFernando specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route123_EventScript_RematchFernando + goto_if_eq VAR_RESULT, TRUE, Route123_EventScript_RematchFernando msgbox Route123_Text_FernandoPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route123_BerryMastersHouse/scripts.inc b/data/maps/Route123_BerryMastersHouse/scripts.inc index a9fbfd9d0..bdc0b0456 100644 --- a/data/maps/Route123_BerryMastersHouse/scripts.inc +++ b/data/maps/Route123_BerryMastersHouse/scripts.inc @@ -16,16 +16,14 @@ Route123_BerryMastersHouse_EventScript_BerryMaster:: addvar VAR_RESULT, NUM_BERRY_MASTER_BERRIES_SKIPPED addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_BERRY_MASTER_RECEIVED_BERRY msgbox Route123_BerryMastersHouse_Text_WhyBeStingyTakeAnother, MSGBOX_DEFAULT random NUM_BERRY_MASTER_BERRIES addvar VAR_RESULT, NUM_BERRY_MASTER_BERRIES_SKIPPED addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox Route123_BerryMastersHouse_Text_VisitPrettyPetalFlowerShop, MSGBOX_DEFAULT release end @@ -45,10 +43,8 @@ Route123_BerryMastersHouse_EventScript_BerryMastersWife:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, TRUE - goto_if_eq Route123_BerryMastersHouse_EventScript_GavePhrase - compare VAR_RESULT, FALSE - goto_if_eq Route123_BerryMastersHouse_EventScript_CancelPhrase + goto_if_eq VAR_RESULT, TRUE, Route123_BerryMastersHouse_EventScript_GavePhrase + goto_if_eq VAR_RESULT, FALSE, Route123_BerryMastersHouse_EventScript_CancelPhrase end Route123_BerryMastersHouse_EventScript_CancelPhrase:: @@ -58,18 +54,12 @@ Route123_BerryMastersHouse_EventScript_CancelPhrase:: end Route123_BerryMastersHouse_EventScript_GavePhrase:: - compare VAR_0x8004, NOT_SPECIAL_PHRASE - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveNormalBerry - compare VAR_0x8004, PHRASE_GREAT_BATTLE - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveSpelonBerry - compare VAR_0x8004, PHRASE_CHALLENGE_CONTEST - goto_if_eq Route123_BerryMastersHouse_EventScript_GivePamtreBerry - compare VAR_0x8004, PHRASE_OVERWHELMING_LATIAS - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveWatmelBerry - compare VAR_0x8004, PHRASE_COOL_LATIOS - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveDurinBerry - compare VAR_0x8004, PHRASE_SUPER_HUSTLE - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveBelueBerry + goto_if_eq VAR_0x8004, NOT_SPECIAL_PHRASE, Route123_BerryMastersHouse_EventScript_GiveNormalBerry + goto_if_eq VAR_0x8004, PHRASE_GREAT_BATTLE, Route123_BerryMastersHouse_EventScript_GiveSpelonBerry + goto_if_eq VAR_0x8004, PHRASE_CHALLENGE_CONTEST, Route123_BerryMastersHouse_EventScript_GivePamtreBerry + goto_if_eq VAR_0x8004, PHRASE_OVERWHELMING_LATIAS, Route123_BerryMastersHouse_EventScript_GiveWatmelBerry + goto_if_eq VAR_0x8004, PHRASE_COOL_LATIOS, Route123_BerryMastersHouse_EventScript_GiveDurinBerry + goto_if_eq VAR_0x8004, PHRASE_SUPER_HUSTLE, Route123_BerryMastersHouse_EventScript_GiveBelueBerry end Route123_BerryMastersHouse_EventScript_GiveNormalBerry:: @@ -77,8 +67,7 @@ Route123_BerryMastersHouse_EventScript_GiveNormalBerry:: random NUM_BERRY_MASTER_WIFE_BERRIES addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull goto Route123_BerryMastersHouse_EventScript_GaveBerry release end @@ -87,8 +76,7 @@ Route123_BerryMastersHouse_EventScript_GiveSpelonBerry:: goto_if_set FLAG_RECEIVED_SPELON_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_SPELON_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SPELON_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end @@ -97,8 +85,7 @@ Route123_BerryMastersHouse_EventScript_GivePamtreBerry:: goto_if_set FLAG_RECEIVED_PAMTRE_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_PAMTRE_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_PAMTRE_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end @@ -107,8 +94,7 @@ Route123_BerryMastersHouse_EventScript_GiveWatmelBerry:: goto_if_set FLAG_RECEIVED_WATMEL_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_WATMEL_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_WATMEL_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end @@ -117,8 +103,7 @@ Route123_BerryMastersHouse_EventScript_GiveDurinBerry:: goto_if_set FLAG_RECEIVED_DURIN_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_DURIN_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_DURIN_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end @@ -127,8 +112,7 @@ Route123_BerryMastersHouse_EventScript_GiveBelueBerry:: goto_if_set FLAG_RECEIVED_BELUE_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_BELUE_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_BELUE_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end diff --git a/data/maps/Route124/scripts.inc b/data/maps/Route124/scripts.inc index d1cd8ef8c..108b915da 100644 --- a/data/maps/Route124/scripts.inc +++ b/data/maps/Route124/scripts.inc @@ -23,8 +23,7 @@ Route124_EventScript_Roland:: Route124_EventScript_Jenny:: trainerbattle_single TRAINER_JENNY_1, Route124_Text_JennyIntro, Route124_Text_JennyDefeat, Route124_EventScript_RegisterJenny specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route124_EventScript_RematchJenny + goto_if_eq VAR_RESULT, TRUE, Route124_EventScript_RematchJenny msgbox Route124_Text_JennyPostBattle, MSGBOX_DEFAULT release end @@ -55,8 +54,7 @@ Route124_EventScript_Chad:: Route124_EventScript_Lila:: trainerbattle_double TRAINER_LILA_AND_ROY_1, Route124_Text_LilaIntro, Route124_Text_LilaDefeat, Route124_Text_LilaNotEnoughMons, Route124_EventScript_RegisterLila specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route124_EventScript_RematchLila + goto_if_eq VAR_RESULT, TRUE, Route124_EventScript_RematchLila msgbox Route124_Text_LilaPostBattle, MSGBOX_DEFAULT release end @@ -75,8 +73,7 @@ Route124_EventScript_RematchLila:: Route124_EventScript_Roy:: trainerbattle_double TRAINER_LILA_AND_ROY_1, Route124_Text_RoyIntro, Route124_Text_RoyDefeat, Route124_Text_RoyNotEnoughMons, Route124_EventScript_RegisterRoy specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route124_EventScript_RematchRoy + goto_if_eq VAR_RESULT, TRUE, Route124_EventScript_RematchRoy msgbox Route124_Text_RoyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc index 06e16be35..b100438f5 100644 --- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc +++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc @@ -22,25 +22,20 @@ Route124_DivingTreasureHuntersHouse_EventScript_SkipGreeting:: Route124_DivingTreasureHuntersHouse_EventScript_CheckPlayerHasShard:: call Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards - compare VAR_TEMP_1, 0 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_NoShards + goto_if_eq VAR_TEMP_1, 0, Route124_DivingTreasureHuntersHouse_EventScript_NoShards goto Route124_DivingTreasureHuntersHouse_EventScript_HasShard end Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards:: setvar VAR_TEMP_1, 0 checkitem ITEM_RED_SHARD - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard checkitem ITEM_YELLOW_SHARD - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard checkitem ITEM_BLUE_SHARD - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard checkitem ITEM_GREEN_SHARD - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard return Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard:: @@ -246,14 +241,11 @@ Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard:: bufferitemname STR_VAR_1, VAR_0x8008 bufferitemname STR_VAR_2, VAR_0x8009 msgbox Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade checkitemspace VAR_0x8009 - compare VAR_RESULT, TRUE - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard + goto_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_TradeShard checkitem VAR_0x8008, 2 - compare VAR_RESULT, FALSE - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard + goto_if_eq VAR_RESULT, FALSE, Route124_DivingTreasureHuntersHouse_EventScript_TradeShard goto Route124_DivingTreasureHuntersHouse_EventScript_BagFull end @@ -262,11 +254,9 @@ Route124_DivingTreasureHuntersHouse_EventScript_TradeShard:: giveitem VAR_0x8009 msgbox Route124_DivingTreasureHuntersHouse_Text_ItsADeal, MSGBOX_DEFAULT call Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards - compare VAR_TEMP_1, 0 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_EndTrade + goto_if_eq VAR_TEMP_1, 0, Route124_DivingTreasureHuntersHouse_EventScript_EndTrade msgbox Route124_DivingTreasureHuntersHouse_Text_TradeSomethingElse, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_ShowTradeOptions + goto_if_eq VAR_RESULT, YES, Route124_DivingTreasureHuntersHouse_EventScript_ShowTradeOptions goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end diff --git a/data/maps/Route125/scripts.inc b/data/maps/Route125/scripts.inc index 7a2d3f15f..cafdf8fbb 100644 --- a/data/maps/Route125/scripts.inc +++ b/data/maps/Route125/scripts.inc @@ -6,19 +6,14 @@ Route125_MapScripts:: Route125_OnTransition: call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetAbnormalWeather - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_WEST - call_if_eq AbnormalWeather_StartKyogreWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_EAST - call_if_eq AbnormalWeather_StartKyogreWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_WEST, AbnormalWeather_StartKyogreWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_EAST, AbnormalWeather_StartKyogreWeather end Route125_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_WEST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute125West - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_EAST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute125East + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_WEST, AbnormalWeather_EventScript_PlaceTilesRoute125West + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_EAST, AbnormalWeather_EventScript_PlaceTilesRoute125East end Route125_OnFrame: @@ -48,8 +43,7 @@ Route125_EventScript_Sharon:: Route125_EventScript_Ernest:: trainerbattle_single TRAINER_ERNEST_1, Route125_Text_ErnestIntro, Route125_Text_ErnestDefeat, Route125_EventScript_RegisterErnest specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route125_EventScript_RematchErnest + goto_if_eq VAR_RESULT, TRUE, Route125_EventScript_RematchErnest msgbox Route125_Text_ErnestPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route126/scripts.inc b/data/maps/Route126/scripts.inc index 79f5bb11b..752cd2d4d 100644 --- a/data/maps/Route126/scripts.inc +++ b/data/maps/Route126/scripts.inc @@ -44,8 +44,7 @@ Route126_EventScript_Sienna:: Route126_EventScript_Pablo:: trainerbattle_single TRAINER_PABLO_1, Route126_Text_PabloIntro, Route126_Text_PabloDefeat, Route126_EventScript_RegisterPablo specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route126_EventScript_RematchPablo + goto_if_eq VAR_RESULT, TRUE, Route126_EventScript_RematchPablo msgbox Route126_Text_PabloPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route127/scripts.inc b/data/maps/Route127/scripts.inc index 426e81470..05bfb14ff 100644 --- a/data/maps/Route127/scripts.inc +++ b/data/maps/Route127/scripts.inc @@ -6,19 +6,14 @@ Route127_MapScripts:: Route127_OnTransition: call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetAbnormalWeather - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_NORTH - call_if_eq AbnormalWeather_StartKyogreWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_SOUTH - call_if_eq AbnormalWeather_StartKyogreWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_NORTH, AbnormalWeather_StartKyogreWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_SOUTH, AbnormalWeather_StartKyogreWeather end Route127_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_NORTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute127North - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_SOUTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute127South + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_NORTH, AbnormalWeather_EventScript_PlaceTilesRoute127North + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_SOUTH, AbnormalWeather_EventScript_PlaceTilesRoute127South end Route127_OnFrame: @@ -63,8 +58,7 @@ Route127_EventScript_Athena:: Route127_EventScript_Koji:: trainerbattle_single TRAINER_KOJI_1, Route127_Text_KojiIntro, Route127_Text_KojiDefeat, Route127_EventScript_RegisterKoji specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route127_EventScript_RematchKoji + goto_if_eq VAR_RESULT, TRUE, Route127_EventScript_RematchKoji msgbox Route127_Text_KojiPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route128/scripts.inc b/data/maps/Route128/scripts.inc index e550f2bd1..d08605128 100644 --- a/data/maps/Route128/scripts.inc +++ b/data/maps/Route128/scripts.inc @@ -181,8 +181,7 @@ Route128_Movement_MaxieApproachPlayer: Route128_EventScript_Isaiah:: trainerbattle_single TRAINER_ISAIAH_1, Route128_Text_IsaiahIntro, Route128_Text_IsaiahDefeat, Route128_EventScript_RegisterIsaiah specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route128_EventScript_RematchIsaiah + goto_if_eq VAR_RESULT, TRUE, Route128_EventScript_RematchIsaiah msgbox Route128_Text_IsaiahPostBattle, MSGBOX_DEFAULT release end @@ -203,8 +202,7 @@ Route128_EventScript_RematchIsaiah:: Route128_EventScript_Katelyn:: trainerbattle_single TRAINER_KATELYN_1, Route128_Text_KatelynIntro, Route128_Text_KatelynDefeat, Route128_EventScript_RegisterKatelyn specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route128_EventScript_RematchKatelyn + goto_if_eq VAR_RESULT, TRUE, Route128_EventScript_RematchKatelyn msgbox Route128_Text_KatelynPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route129/scripts.inc b/data/maps/Route129/scripts.inc index e996722cc..7055675a0 100644 --- a/data/maps/Route129/scripts.inc +++ b/data/maps/Route129/scripts.inc @@ -5,21 +5,15 @@ Route129_MapScripts:: .byte 0 Route129_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_WEST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute129West - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_EAST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute129East + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_WEST, AbnormalWeather_EventScript_PlaceTilesRoute129West + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_EAST, AbnormalWeather_EventScript_PlaceTilesRoute129East end Route129_OnTransition: - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_ge Route129_EventScript_CheckSetAbnormalWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_WEST - call_if_eq AbnormalWeather_StartKyogreWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_EAST - call_if_eq AbnormalWeather_StartKyogreWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, Route129_EventScript_CheckSetAbnormalWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_WEST, AbnormalWeather_StartKyogreWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_EAST, AbnormalWeather_StartKyogreWeather end Route129_EventScript_CheckSetAbnormalWeather:: diff --git a/data/maps/Route130/scripts.inc b/data/maps/Route130/scripts.inc index fe360a36b..7e0ecc8bd 100644 --- a/data/maps/Route130/scripts.inc +++ b/data/maps/Route130/scripts.inc @@ -3,11 +3,9 @@ Route130_MapScripts:: .byte 0 Route130_OnTransition: - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_ge Route130_EventScript_CheckSetAbnormalWeather + call_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, Route130_EventScript_CheckSetAbnormalWeather specialvar VAR_RESULT, IsMirageIslandPresent - compare VAR_RESULT, TRUE - goto_if_eq Route130_EventScript_SetMirageIslandLayout + goto_if_eq VAR_RESULT, TRUE, Route130_EventScript_SetMirageIslandLayout setflag FLAG_TEMP_11 setflag FLAG_TEMP_12 setflag FLAG_TEMP_13 diff --git a/data/maps/Route131/scripts.inc b/data/maps/Route131/scripts.inc index 846998bfe..17060c183 100644 --- a/data/maps/Route131/scripts.inc +++ b/data/maps/Route131/scripts.inc @@ -3,8 +3,7 @@ Route131_MapScripts:: .byte 0 Route131_OnTransition: - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_ge Route131_EventScript_CheckSetAbnormalWeather + call_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, Route131_EventScript_CheckSetAbnormalWeather call Route131_EventScript_SetLayout end diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc index 48c413b04..28fd38921 100644 --- a/data/maps/RustboroCity/scripts.inc +++ b/data/maps/RustboroCity/scripts.inc @@ -13,16 +13,13 @@ RustboroCity_MapScripts:: RustboroCity_OnTransition: setflag FLAG_VISITED_RUSTBORO_CITY call Common_EventScript_SetupRivalGfxId - compare VAR_RUSTBORO_CITY_STATE, 6 - call_if_eq RustboroCity_EventScript_HideMapNamePopup + call_if_eq VAR_RUSTBORO_CITY_STATE, 6, RustboroCity_EventScript_HideMapNamePopup getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_RUSTBORO_CITY_STATE, 6 - goto_if_eq RustboroCity_EventScript_PositionScientistForExit + goto_if_eq VAR_RUSTBORO_CITY_STATE, 6, RustboroCity_EventScript_PositionScientistForExit end RustboroCity_EventScript_PositionScientistForExit:: - compare VAR_TEMP_0, 11 - goto_if_eq RustboroCity_EventScript_PositionScientistLeftExit + goto_if_eq VAR_TEMP_0, 11, RustboroCity_EventScript_PositionScientistLeftExit setobjectxyperm LOCALID_SCIENTIST, 12, 15 end @@ -506,14 +503,10 @@ RustboroCity_EventScript_HelpGetGoodsTrigger3:: end RustboroCity_EventScript_EmployeeAskToGetGoods:: - compare VAR_TEMP_1, 0 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerUp1 - compare VAR_TEMP_1, 1 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerLeft1 - compare VAR_TEMP_1, 2 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerDown1 - compare VAR_TEMP_1, 3 - call_if_eq RustboroCity_EventScript_EmployeeApproachPlayerDown1 + call_if_eq VAR_TEMP_1, 0, RustboroCity_EventScript_EmployeeFacePlayerUp1 + call_if_eq VAR_TEMP_1, 1, RustboroCity_EventScript_EmployeeFacePlayerLeft1 + call_if_eq VAR_TEMP_1, 2, RustboroCity_EventScript_EmployeeFacePlayerDown1 + call_if_eq VAR_TEMP_1, 3, RustboroCity_EventScript_EmployeeApproachPlayerDown1 setflag FLAG_INTERACTED_WITH_DEVON_EMPLOYEE_GOODS_STOLEN setvar VAR_RUSTBORO_CITY_STATE, 3 copyobjectxytoperm LOCALID_DEVON_EMPLOYEE @@ -601,20 +594,14 @@ RustboroCity_EventScript_ReturnGoodsTrigger3:: end RustboroCity_EventScript_ReturnGoods:: - compare VAR_TEMP_1, 0 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerUp2 - compare VAR_TEMP_1, 1 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerLeft2 - compare VAR_TEMP_1, 2 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerDown2 - compare VAR_TEMP_1, 3 - call_if_eq RustboroCity_EventScript_EmployeeApproachPlayerDown2 - compare VAR_TEMP_1, 4 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerRight + call_if_eq VAR_TEMP_1, 0, RustboroCity_EventScript_EmployeeFacePlayerUp2 + call_if_eq VAR_TEMP_1, 1, RustboroCity_EventScript_EmployeeFacePlayerLeft2 + call_if_eq VAR_TEMP_1, 2, RustboroCity_EventScript_EmployeeFacePlayerDown2 + call_if_eq VAR_TEMP_1, 3, RustboroCity_EventScript_EmployeeApproachPlayerDown2 + call_if_eq VAR_TEMP_1, 4, RustboroCity_EventScript_EmployeeFacePlayerRight msgbox RustboroCity_Text_YouGotItThankYou, MSGBOX_DEFAULT giveitem ITEM_GREAT_BALL - compare VAR_RESULT, FALSE - call_if_eq RustboroCity_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, RustboroCity_EventScript_BagFull msgbox RustboroCity_Text_PleaseComeWithMe, MSGBOX_DEFAULT closemessage setflag FLAG_RETURNED_DEVON_GOODS @@ -699,10 +686,8 @@ RustboroCity_EventScript_Rival:: RustboroCity_EventScript_PlayRivalMusic:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq RustboroCity_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - goto_if_eq RustboroCity_EventScript_PlayBrendanMusic + goto_if_eq VAR_RESULT, MALE, RustboroCity_EventScript_PlayMayMusic + goto_if_eq VAR_RESULT, FEMALE, RustboroCity_EventScript_PlayBrendanMusic return RustboroCity_EventScript_PlayMayMusic:: @@ -843,10 +828,8 @@ RustboroCity_EventScript_RivalTrigger7:: RustboroCity_EventScript_RivalEncounter:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq RustboroCity_EventScript_MayEncounter - compare VAR_RESULT, FEMALE - goto_if_eq RustboroCity_EventScript_BrendanEncounter + goto_if_eq VAR_RESULT, MALE, RustboroCity_EventScript_MayEncounter + goto_if_eq VAR_RESULT, FEMALE, RustboroCity_EventScript_BrendanEncounter end RustboroCity_EventScript_MayEncounter:: @@ -866,8 +849,7 @@ RustboroCity_EventScript_MayEncounter:: setvar VAR_ROUTE104_STATE, 2 setvar VAR_0x8008, 0 msgbox RustboroCity_Text_MayPassedBrineyWantToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq RustboroCity_EventScript_BattleMay + goto_if_eq VAR_RESULT, YES, RustboroCity_EventScript_BattleMay msgbox RustboroCity_Text_MayOhHaventRaisedPokemonEnough, MSGBOX_DEFAULT call RustboroCity_EventScript_RestoreBgm releaseall @@ -876,8 +858,7 @@ RustboroCity_EventScript_MayEncounter:: RustboroCity_EventScript_MayAskToBattle:: setvar VAR_0x8008, 1 msgbox RustboroCity_Text_MayWantToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq RustboroCity_EventScript_BattleMay + goto_if_eq VAR_RESULT, YES, RustboroCity_EventScript_BattleMay msgbox RustboroCity_Text_MayOhHaventRaisedPokemonEnough, MSGBOX_DEFAULT releaseall end @@ -892,8 +873,7 @@ RustboroCity_EventScript_BattleMay:: RustboroCity_EventScript_MayBrineyHint:: msgbox RustboroCity_Text_MayMrBrineyHint, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq RustboroCity_EventScript_RestoreBgm + call_if_eq VAR_0x8008, 0, RustboroCity_EventScript_RestoreBgm releaseall end @@ -936,8 +916,7 @@ RustboroCity_EventScript_BrendanEncounter:: setvar VAR_RUSTBORO_CITY_STATE, 8 setvar VAR_ROUTE104_STATE, 2 msgbox RustboroCity_Text_BrendanPassedBrineyWantToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq RustboroCity_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, YES, RustboroCity_EventScript_BattleBrendan msgbox RustboroCity_Text_BrendanNoConfidenceInPokemon, MSGBOX_DEFAULT call RustboroCity_EventScript_RestoreBgm releaseall @@ -945,8 +924,7 @@ RustboroCity_EventScript_BrendanEncounter:: RustboroCity_EventScript_BrendanAskToBattle:: msgbox RustboroCity_Text_BrendanWantToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq RustboroCity_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, YES, RustboroCity_EventScript_BattleBrendan msgbox RustboroCity_Text_BrendanNoConfidenceInPokemon, MSGBOX_DEFAULT releaseall end @@ -961,8 +939,7 @@ RustboroCity_EventScript_BattleBrendan:: RustboroCity_EventScript_BrendanBrineyHint:: msgbox RustboroCity_Text_BrendanMrBrineyHint, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq RustboroCity_EventScript_RestoreBgm + call_if_eq VAR_0x8008, 0, RustboroCity_EventScript_RestoreBgm releaseall end diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index 1f2f1ea80..987828a29 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -5,8 +5,7 @@ RustboroCity_DevonCorp_2F_MapScripts:: .byte 0 RustboroCity_DevonCorp_2F_OnTransition: - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady end RustboroCity_DevonCorp_2F_EventScript_SetFossilReady:: @@ -16,8 +15,7 @@ RustboroCity_DevonCorp_2F_EventScript_SetFossilReady:: RustboroCity_DevonCorp_2F_EventScript_TalkToPokemonScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady msgbox RustboroCity_DevonCorp_2F_Text_DeviceForTalkingToPokemon, MSGBOX_DEFAULT release end @@ -25,8 +23,7 @@ RustboroCity_DevonCorp_2F_EventScript_TalkToPokemonScientist:: RustboroCity_DevonCorp_2F_EventScript_BallScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady goto_if_set FLAG_MET_DEVON_EMPLOYEE, RustboroCity_DevonCorp_2F_EventScript_DevelopedBalls msgbox RustboroCity_DevonCorp_2F_Text_DevelopingNewBalls, MSGBOX_DEFAULT release @@ -40,8 +37,7 @@ RustboroCity_DevonCorp_2F_EventScript_DevelopedBalls:: RustboroCity_DevonCorp_2F_EventScript_PokenavScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady goto_if_set FLAG_RECEIVED_POKENAV, RustboroCity_DevonCorp_2F_EventScript_HasPokenav msgbox RustboroCity_DevonCorp_2F_Text_IMadePokenav, MSGBOX_DEFAULT release @@ -55,8 +51,7 @@ RustboroCity_DevonCorp_2F_EventScript_HasPokenav:: RustboroCity_DevonCorp_2F_EventScript_PokemonDreamsScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady msgbox RustboroCity_DevonCorp_2F_Text_DeviceToVisualizePokemonDreams, MSGBOX_DEFAULT release end @@ -64,17 +59,13 @@ RustboroCity_DevonCorp_2F_EventScript_PokemonDreamsScientist:: RustboroCity_DevonCorp_2F_EventScript_FossilScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 2 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_FossilMonReady - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_StillRegenerating + goto_if_eq VAR_FOSSIL_RESURRECTION_STATE, 2, RustboroCity_DevonCorp_2F_EventScript_FossilMonReady + goto_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_StillRegenerating msgbox RustboroCity_DevonCorp_2F_Text_DevelopDeviceToResurrectFossils, MSGBOX_DEFAULT checkitem ITEM_ROOT_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil checkitem ITEM_CLAW_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil release end @@ -87,11 +78,9 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil:: applymovement LOCALID_FOSSIL_SCIENTIST, Common_Movement_Delay48 waitmovement 0 msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil checkitem ITEM_CLAW_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil end @@ -112,11 +101,9 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil:: applymovement LOCALID_FOSSIL_SCIENTIST, Common_Movement_Delay48 waitmovement 0 msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil checkitem ITEM_ROOT_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil end @@ -140,10 +127,8 @@ RustboroCity_DevonCorp_2F_EventScript_StillRegenerating:: end RustboroCity_DevonCorp_2F_EventScript_FossilMonReady:: - compare VAR_WHICH_FOSSIL_REVIVED, 1 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_LileepReady - compare VAR_WHICH_FOSSIL_REVIVED, 2 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_AnorithReady + goto_if_eq VAR_WHICH_FOSSIL_REVIVED, 1, RustboroCity_DevonCorp_2F_EventScript_LileepReady + goto_if_eq VAR_WHICH_FOSSIL_REVIVED, 2, RustboroCity_DevonCorp_2F_EventScript_AnorithReady end RustboroCity_DevonCorp_2F_EventScript_LileepReady:: @@ -161,18 +146,15 @@ RustboroCity_DevonCorp_2F_EventScript_AnorithReady:: RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep:: setvar VAR_TEMP_1, SPECIES_LILEEP givemon SPECIES_LILEEP, 20, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty - compare VAR_RESULT, 1 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC + goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty + goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC goto Common_EventScript_NoMoreRoomForPokemon end RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty:: call RustboroCity_DevonCorp_2F_EventScript_ReceivedLileepFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep @@ -181,8 +163,7 @@ RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty:: RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC:: call RustboroCity_DevonCorp_2F_EventScript_ReceivedLileepFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC call Common_EventScript_NameReceivedBoxMon goto RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC end @@ -210,18 +191,15 @@ RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep:: RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith:: setvar VAR_TEMP_1, SPECIES_ANORITH givemon SPECIES_ANORITH, 20, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty - compare VAR_RESULT, 1 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC + goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty + goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC goto Common_EventScript_NoMoreRoomForPokemon end RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty:: call RustboroCity_DevonCorp_2F_EventScript_ReceivedAnorithFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith @@ -230,8 +208,7 @@ RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty:: RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC:: call RustboroCity_DevonCorp_2F_EventScript_ReceivedAnorithFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC call Common_EventScript_NameReceivedBoxMon goto RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC end @@ -282,10 +259,8 @@ RustboroCity_DevonCorp_2F_EventScript_CancelFossilSelect:: RustboroCity_DevonCorp_2F_EventScript_MatchCallScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady - compare VAR_RUSTBORO_CITY_STATE, 6 - goto_if_ge RustboroCity_DevonCorp_2F_EventScript_WorkOnNext + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + goto_if_ge VAR_RUSTBORO_CITY_STATE, 6, RustboroCity_DevonCorp_2F_EventScript_WorkOnNext msgbox RustboroCity_DevonCorp_2F_Text_DevelopNewPokenavFeature, MSGBOX_DEFAULT release end diff --git a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc index d249cc51f..ebf9044c5 100644 --- a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc @@ -7,8 +7,7 @@ RustboroCity_DevonCorp_3F_MapScripts:: .byte 0 RustboroCity_DevonCorp_3F_OnTransition: - compare VAR_DEVON_CORP_3F_STATE, 0 - call_if_eq RustboroCity_DevonCorp_3F_EventScript_SetEmployeePos + call_if_eq VAR_DEVON_CORP_3F_STATE, 0, RustboroCity_DevonCorp_3F_EventScript_SetEmployeePos end RustboroCity_DevonCorp_3F_EventScript_SetEmployeePos:: @@ -164,8 +163,7 @@ RustboroCity_DevonCorp_3F_EventScript_MrStone:: RustboroCity_DevonCorp_3F_EventScript_GiveExpShare:: msgbox RustboroCity_DevonCorp_3F_Text_ThankYouForDeliveringLetter, MSGBOX_DEFAULT giveitem ITEM_EXP_SHARE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_EXP_SHARE msgbox RustboroCity_DevonCorp_3F_Text_ExplainExpShare, MSGBOX_DEFAULT closemessage diff --git a/data/maps/RustboroCity_Flat1_2F/scripts.inc b/data/maps/RustboroCity_Flat1_2F/scripts.inc index a9d24092f..8e972182c 100644 --- a/data/maps/RustboroCity_Flat1_2F/scripts.inc +++ b/data/maps/RustboroCity_Flat1_2F/scripts.inc @@ -7,36 +7,28 @@ RustboroCity_Flat1_2F_EventScript_WaldasDad:: lock faceplayer specialvar VAR_RESULT, TryBufferWaldaPhrase - compare VAR_RESULT, FALSE - goto_if_eq RustboroCity_Flat1_2F_EventScript_WaldasDadFirstPhrase - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_Flat1_2F_EventScript_WaldasDadNewPhrase + goto_if_eq VAR_RESULT, FALSE, RustboroCity_Flat1_2F_EventScript_WaldasDadFirstPhrase + goto_if_eq VAR_RESULT, TRUE, RustboroCity_Flat1_2F_EventScript_WaldasDadNewPhrase RustboroCity_Flat1_2F_EventScript_GivePhrase:: special DoWaldaNamingScreen waitstate - compare VAR_0x8004, 1 - goto_if_eq RustboroCity_Flat1_2F_EventScript_CancelGivePhrase - compare VAR_0x8004, 2 - goto_if_eq RustboroCity_Flat1_2F_EventScript_CancelGiveFirstPhrase + goto_if_eq VAR_0x8004, 1, RustboroCity_Flat1_2F_EventScript_CancelGivePhrase + goto_if_eq VAR_0x8004, 2, RustboroCity_Flat1_2F_EventScript_CancelGiveFirstPhrase specialvar VAR_RESULT, TryGetWallpaperWithWaldaPhrase - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_Flat1_2F_EventScript_WaldaLikesPhrase - compare VAR_RESULT, FALSE - goto_if_eq RustboroCity_Flat1_2F_EventScript_WaldaDoesntLikePhrase + goto_if_eq VAR_RESULT, TRUE, RustboroCity_Flat1_2F_EventScript_WaldaLikesPhrase + goto_if_eq VAR_RESULT, FALSE, RustboroCity_Flat1_2F_EventScript_WaldaDoesntLikePhrase end RustboroCity_Flat1_2F_EventScript_WaldasDadFirstPhrase:: msgbox RustboroCity_Flat1_2F_Text_HelloDoYouKnowFunnyPhrase, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_Flat1_2F_EventScript_DeclineGivePhrase + goto_if_eq VAR_RESULT, NO, RustboroCity_Flat1_2F_EventScript_DeclineGivePhrase msgbox RustboroCity_Flat1_2F_Text_WonderfulLetsHearSuggestion, MSGBOX_DEFAULT goto RustboroCity_Flat1_2F_EventScript_GivePhrase RustboroCity_Flat1_2F_EventScript_WaldasDadNewPhrase:: msgbox RustboroCity_Flat1_2F_Text_BeenSayingXDoYouKnowBetterPhrase, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_Flat1_2F_EventScript_DeclineGivePhrase + goto_if_eq VAR_RESULT, NO, RustboroCity_Flat1_2F_EventScript_DeclineGivePhrase msgbox RustboroCity_Flat1_2F_Text_WonderfulLetsHearSuggestion, MSGBOX_DEFAULT goto RustboroCity_Flat1_2F_EventScript_GivePhrase diff --git a/data/maps/RustboroCity_Flat2_2F/scripts.inc b/data/maps/RustboroCity_Flat2_2F/scripts.inc index 29edb7b58..97145ce8f 100644 --- a/data/maps/RustboroCity_Flat2_2F/scripts.inc +++ b/data/maps/RustboroCity_Flat2_2F/scripts.inc @@ -11,8 +11,7 @@ RustboroCity_Flat2_2F_EventScript_NinjaBoy:: goto_if_set FLAG_RECEIVED_PREMIER_BALL_RUSTBORO, RustboroCity_Flat2_2F_EventScript_GavePremierBall msgbox RustboroCity_Flat2_2F_Text_MyDaddyMadeThisYouCanHaveIt, MSGBOX_DEFAULT giveitem ITEM_PREMIER_BALL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_PREMIER_BALL_RUSTBORO release end diff --git a/data/maps/RustboroCity_Gym/scripts.inc b/data/maps/RustboroCity_Gym/scripts.inc index 11354fac0..e1596a973 100644 --- a/data/maps/RustboroCity_Gym/scripts.inc +++ b/data/maps/RustboroCity_Gym/scripts.inc @@ -4,8 +4,7 @@ RustboroCity_Gym_MapScripts:: RustboroCity_Gym_EventScript_Roxanne:: trainerbattle_single TRAINER_ROXANNE_1, RustboroCity_Gym_Text_RoxanneIntro, RustboroCity_Gym_Text_RoxanneDefeat, RustboroCity_Gym_EventScript_RoxanneDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_Gym_EventScript_RoxanneRematch + goto_if_eq VAR_RESULT, TRUE, RustboroCity_Gym_EventScript_RoxanneRematch goto_if_unset FLAG_RECEIVED_TM39, RustboroCity_Gym_EventScript_GiveRockTomb msgbox RustboroCity_Gym_Text_RoxannePostBattle, MSGBOX_DEFAULT release @@ -22,15 +21,13 @@ RustboroCity_Gym_EventScript_RoxanneDefeated:: addvar VAR_PETALBURG_GYM_STATE, 1 setvar VAR_0x8008, 1 call Common_EventScript_SetGymTrainers - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_eq Common_EventScript_ReadyPetalburgGymForBattle + call_if_eq VAR_PETALBURG_GYM_STATE, 6, Common_EventScript_ReadyPetalburgGymForBattle goto RustboroCity_Gym_EventScript_GiveRockTomb end RustboroCity_Gym_EventScript_GiveRockTomb:: giveitem ITEM_TM39 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM39 msgbox RustboroCity_Gym_Text_ExplainRockTomb, MSGBOX_DEFAULT release diff --git a/data/maps/RustboroCity_House1/scripts.inc b/data/maps/RustboroCity_House1/scripts.inc index 20e93506b..88a33786c 100644 --- a/data/maps/RustboroCity_House1/scripts.inc +++ b/data/maps/RustboroCity_House1/scripts.inc @@ -10,18 +10,15 @@ RustboroCity_House1_EventScript_Trader:: specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox RustboroCity_House1_Text_IllTradeIfYouWant, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_House1_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, RustboroCity_House1_EventScript_DeclineTrade special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq RustboroCity_House1_EventScript_DeclineTrade + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, RustboroCity_House1_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies copyvar VAR_0x800B, VAR_RESULT - compare VAR_RESULT, VAR_0x8009 - goto_if_ne RustboroCity_House1_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, RustboroCity_House1_EventScript_NotRequestedMon copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8005, VAR_0x800A special CreateInGameTradePokemon diff --git a/data/maps/RustboroCity_PokemonSchool/scripts.inc b/data/maps/RustboroCity_PokemonSchool/scripts.inc index fcc374ddc..8a409d49b 100644 --- a/data/maps/RustboroCity_PokemonSchool/scripts.inc +++ b/data/maps/RustboroCity_PokemonSchool/scripts.inc @@ -78,14 +78,11 @@ RustboroCity_PokemonSchool_EventScript_Teacher:: lock faceplayer goto_if_set FLAG_RECEIVED_QUICK_CLAW, RustboroCity_PokemonSchool_EventScript_GaveQuickClaw - compare VAR_FACING, DIR_EAST - call_if_eq RustboroCity_PokemonSchool_EventScript_TeacherCheckOnStudentsEast - compare VAR_FACING, DIR_WEST - call_if_eq RustboroCity_PokemonSchool_EventScript_TeacherCheckOnStudentsWest + call_if_eq VAR_FACING, DIR_EAST, RustboroCity_PokemonSchool_EventScript_TeacherCheckOnStudentsEast + call_if_eq VAR_FACING, DIR_WEST, RustboroCity_PokemonSchool_EventScript_TeacherCheckOnStudentsWest msgbox RustboroCity_PokemonSchool_Text_StudentsWhoDontStudyGetQuickClaw, MSGBOX_DEFAULT giveitem ITEM_QUICK_CLAW - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 diff --git a/data/maps/RusturfTunnel/scripts.inc b/data/maps/RusturfTunnel/scripts.inc index 97a158f22..e7eee5817 100644 --- a/data/maps/RusturfTunnel/scripts.inc +++ b/data/maps/RusturfTunnel/scripts.inc @@ -15,8 +15,7 @@ RusturfTunnel_OnFrame: .2byte 0 RusturfTunnel_OnTransition: - compare VAR_RUSTURF_TUNNEL_STATE, 2 - call_if_eq RusturfTunnel_EventScript_SetAquaGruntAndPeekoPos + call_if_eq VAR_RUSTURF_TUNNEL_STATE, 2, RusturfTunnel_EventScript_SetAquaGruntAndPeekoPos end RusturfTunnel_EventScript_SetAquaGruntAndPeekoPos:: @@ -56,36 +55,25 @@ RusturfTunnel_EventScript_AlreadySpokenTo:: RusturfTunnel_EventScript_ClearTunnelScene:: lockall - compare VAR_TEMP_1, 1 - call_if_eq RusturfTunnel_EventScript_FaceWandasBoyfriend1 - compare VAR_TEMP_1, 2 - call_if_eq RusturfTunnel_EventScript_FaceWandasBoyfriend2 - compare VAR_TEMP_1, 3 - call_if_eq RusturfTunnel_EventScript_FaceWandasBoyfriend3 + call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_FaceWandasBoyfriend1 + call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_FaceWandasBoyfriend2 + call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_FaceWandasBoyfriend3 call RusturfTunnel_EventScript_WandasBoyfriendNotice msgbox RusturfTunnel_Text_YouShatteredBoulderTakeHM, MSGBOX_DEFAULT - compare VAR_TEMP_1, 2 - call_if_eq RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer - compare VAR_TEMP_1, 3 - call_if_eq RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer + call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer + call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer giveitem ITEM_HM04 setflag FLAG_RECEIVED_HM04 msgbox RusturfTunnel_Text_ExplainStrength, MSGBOX_DEFAULT closemessage - compare VAR_TEMP_1, 1 - call_if_eq RusturfTunnel_EventScript_BoyfriendApproachWanda1 - compare VAR_TEMP_1, 2 - call_if_eq RusturfTunnel_EventScript_BoyfriendApproachWanda2 - compare VAR_TEMP_1, 3 - call_if_eq RusturfTunnel_EventScript_BoyfriendApproachWanda3 + call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_BoyfriendApproachWanda1 + call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_BoyfriendApproachWanda2 + call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_BoyfriendApproachWanda3 msgbox RusturfTunnel_Text_WandaReunion, MSGBOX_DEFAULT closemessage - compare VAR_TEMP_1, 1 - call_if_eq RusturfTunnel_EventScript_WandaAndBoyfriendExit1 - compare VAR_TEMP_1, 2 - call_if_eq RusturfTunnel_EventScript_WandaAndBoyfriendExit - compare VAR_TEMP_1, 3 - call_if_eq RusturfTunnel_EventScript_WandaAndBoyfriendExit + call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_WandaAndBoyfriendExit1 + call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_WandaAndBoyfriendExit + call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_WandaAndBoyfriendExit call RusturfTunnel_EventScript_SetRusturfTunnelOpen releaseall end diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc index c99d3ad03..b39b9a433 100644 --- a/data/maps/SSTidalCorridor/scripts.inc +++ b/data/maps/SSTidalCorridor/scripts.inc @@ -45,10 +45,8 @@ SSTidalRooms_EventScript_ArrivedInLilycove:: return SSTidalCorridor_EventScript_ReachedStepCount:: - compare VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_HalfwayToLilycove - compare VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_ArrivedInSlateport + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT, SSTidalCorridor_EventScript_HalfwayToLilycove + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT, SSTidalCorridor_EventScript_ArrivedInSlateport end SSTidalCorridor_EventScript_HalfwayToLilycove:: @@ -117,10 +115,8 @@ SSTidalCorridor_EventScript_Cabin4Sign:: SSTidalCorridor_EventScript_ExitSailor:: lock faceplayer - compare VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_LILYCOVE - goto_if_eq SSTidalCorridor_EventScript_ExitLilycove - compare VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_ExitSlateport + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_LILYCOVE, SSTidalCorridor_EventScript_ExitLilycove + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_SLATEPORT, SSTidalCorridor_EventScript_ExitSlateport msgbox SSTidalCorridor_Text_CanRestInCabin2, MSGBOX_DEFAULT release end @@ -149,10 +145,8 @@ SSTidalCorridor_EventScript_HideSnatchGiver:: SSTidalCorridor_EventScript_Porthole:: lockall - compare VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_LookThroughPorthole - compare VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_LookThroughPorthole + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT, SSTidalCorridor_EventScript_LookThroughPorthole + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT, SSTidalCorridor_EventScript_LookThroughPorthole msgbox SSTidalCorridor_Text_HorizonSpreadsBeyondPorthole, MSGBOX_DEFAULT releaseall end diff --git a/data/maps/SSTidalRooms/scripts.inc b/data/maps/SSTidalRooms/scripts.inc index c5cade489..c3aa8ff8a 100644 --- a/data/maps/SSTidalRooms/scripts.inc +++ b/data/maps/SSTidalRooms/scripts.inc @@ -7,8 +7,7 @@ SSTidalRooms_EventScript_SnatchGiver:: goto_if_set FLAG_RECEIVED_TM49, SSTidalRooms_EventScript_ExplainSnatch msgbox SSTidalRooms_Text_NotSuspiciousTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM49 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM49 msgbox SSTidalRooms_Text_ExplainSnatch, MSGBOX_DEFAULT release diff --git a/data/maps/SafariZone_South/scripts.inc b/data/maps/SafariZone_South/scripts.inc index c361d9f2e..6b4c774c2 100644 --- a/data/maps/SafariZone_South/scripts.inc +++ b/data/maps/SafariZone_South/scripts.inc @@ -21,8 +21,7 @@ SafariZone_South_EventScript_EnterSafariZone:: end SafariZone_South_OnTransition: - compare VAR_SAFARI_ZONE_STATE, 2 - call_if_eq SafariZone_South_EventScript_SetExitAttendantAside + call_if_eq VAR_SAFARI_ZONE_STATE, 2, SafariZone_South_EventScript_SetExitAttendantAside end SafariZone_South_EventScript_SetExitAttendantAside:: @@ -55,8 +54,7 @@ SafariZone_South_EventScript_ExitAttendant:: faceplayer goto_if_unset FLAG_GOOD_LUCK_SAFARI_ZONE, SafariZone_South_EventScript_GoodLuck msgbox SafariZone_South_Text_StillHaveTimeExit, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SafariZone_South_EventScript_ExitEarly + goto_if_eq VAR_RESULT, YES, SafariZone_South_EventScript_ExitEarly msgbox SafariZone_South_Text_EnjoyTheRestOfYourAdventure, MSGBOX_DEFAULT release end diff --git a/data/maps/SeafloorCavern_Entrance/scripts.inc b/data/maps/SeafloorCavern_Entrance/scripts.inc index a999c4a15..eec69e6f8 100644 --- a/data/maps/SeafloorCavern_Entrance/scripts.inc +++ b/data/maps/SeafloorCavern_Entrance/scripts.inc @@ -11,8 +11,7 @@ SeafloorCavern_Entrance_OnResume: SeafloorCavern_Entrance_EventScript_Grunt:: lockall - compare VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1 - goto_if_eq SeafloorCavern_Entrance_EventScript_GruntSpeechShort + goto_if_eq VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1, SeafloorCavern_Entrance_EventScript_GruntSpeechShort waitse playse SE_PIN applymovement LOCALID_GRUNT, Common_Movement_ExclamationMark @@ -20,12 +19,9 @@ SeafloorCavern_Entrance_EventScript_Grunt:: applymovement LOCALID_GRUNT, Common_Movement_Delay48 waitmovement 0 delay 20 - compare VAR_FACING, DIR_WEST - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest - compare VAR_FACING, DIR_EAST - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast - compare VAR_FACING, DIR_NORTH - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth + call_if_eq VAR_FACING, DIR_WEST, SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest + call_if_eq VAR_FACING, DIR_EAST, SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast + call_if_eq VAR_FACING, DIR_NORTH, SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth delay 30 setvar VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1 copyobjectxytoperm LOCALID_GRUNT @@ -37,12 +33,9 @@ SeafloorCavern_Entrance_EventScript_Grunt:: end SeafloorCavern_Entrance_EventScript_GruntSpeechShort:: - compare VAR_FACING, DIR_WEST - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest - compare VAR_FACING, DIR_EAST - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast - compare VAR_FACING, DIR_NORTH - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth + call_if_eq VAR_FACING, DIR_WEST, SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest + call_if_eq VAR_FACING, DIR_EAST, SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast + call_if_eq VAR_FACING, DIR_NORTH, SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth msgbox SeafloorCavern_Entrance_Text_HearMagmaNearMossdeepShort, MSGBOX_DEFAULT closemessage applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterUp diff --git a/data/maps/SealedChamber_InnerRoom/scripts.inc b/data/maps/SealedChamber_InnerRoom/scripts.inc index 7d240535c..036ab4fb8 100644 --- a/data/maps/SealedChamber_InnerRoom/scripts.inc +++ b/data/maps/SealedChamber_InnerRoom/scripts.inc @@ -6,8 +6,7 @@ SealedChamber_InnerRoom_EventScript_BrailleBackWall:: braillemsgbox SealedChamber_InnerRoom_Braille_FirstWailordLastRelicanth goto_if_set FLAG_REGI_DOORS_OPENED, SealedChamber_InnerRoom_EventScript_NoEffect specialvar VAR_RESULT, CheckRelicanthWailord - compare VAR_RESULT, FALSE - goto_if_eq SealedChamber_InnerRoom_EventScript_NoEffect + goto_if_eq VAR_RESULT, FALSE, SealedChamber_InnerRoom_EventScript_NoEffect fadeoutbgm 0 playse SE_TRUCK_MOVE special DoSealedChamberShakingEffect_Long diff --git a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc index 74f24c859..905a9a77a 100644 --- a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc @@ -21,25 +21,19 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert:: dotimebasedevents call_if_set FLAG_SYS_SHOAL_ITEM, ShoalCave_LowTideEntranceRoom_EventScript_ResetShoalItems checkitem ITEM_SHOAL_SALT, 4 - compare VAR_RESULT, FALSE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells + goto_if_eq VAR_RESULT, FALSE, ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells checkitem ITEM_SHOAL_SHELL, 4 - compare VAR_RESULT, FALSE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells + goto_if_eq VAR_RESULT, FALSE, ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells msgbox ShoalCave_LowTideEntranceRoom_Text_WouldYouLikeShellBell, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell + goto_if_eq VAR_RESULT, NO, ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell checkitemspace ITEM_SHELL_BELL - compare VAR_RESULT, FALSE - call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed - compare VAR_RESULT, 2 - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell + call_if_eq VAR_RESULT, FALSE, ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed + goto_if_eq VAR_RESULT, 2, ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell msgbox ShoalCave_LowTideEntranceRoom_Text_MakeShellBellRightAway, MSGBOX_DEFAULT removeitem ITEM_SHOAL_SALT, 4 removeitem ITEM_SHOAL_SHELL, 4 giveitem ITEM_SHELL_BELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox ShoalCave_LowTideEntranceRoom_Text_ExplainShellBell, MSGBOX_DEFAULT setflag FLAG_TEMP_2 release @@ -48,14 +42,12 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert:: @ If the bag is full, check if a slot will be freed when 4 Shoal Salt or Shells are given ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed:: checkitem ITEM_SHOAL_SALT, 5 - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells + goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells return ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells:: checkitem ITEM_SHOAL_SHELL, 5 - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed + goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed return ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed:: @@ -69,11 +61,9 @@ ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell:: ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells:: checkitem ITEM_SHOAL_SALT - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell + goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell checkitem ITEM_SHOAL_SHELL - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell + goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell msgbox ShoalCave_LowTideEntranceRoom_Text_AreYouPlanningOnGoingInThere, MSGBOX_DEFAULT release end diff --git a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc index 37b7beb04..17f6a7ca6 100644 --- a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc @@ -63,8 +63,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell1:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalShell giveitem ITEM_SHOAL_SHELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_1 @@ -80,8 +79,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell2:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalShell giveitem ITEM_SHOAL_SHELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_2 @@ -92,8 +90,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell3:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalShell giveitem ITEM_SHOAL_SHELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_3 @@ -104,8 +101,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell4:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalShell giveitem ITEM_SHOAL_SHELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_4 @@ -116,8 +112,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalSalt1:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalSalt giveitem ITEM_SHOAL_SALT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_1 @@ -133,8 +128,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalSalt2:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalSalt giveitem ITEM_SHOAL_SALT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_2 diff --git a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc index 15dcd326d..a06d46cc2 100644 --- a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc @@ -18,8 +18,7 @@ ShoalCave_LowTideLowerRoom_EventScript_ShoalSalt4:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SALT_4, ShoalCave_LowTideLowerRoom_EventScript_ReceivedShoalSalt giveitem ITEM_SHOAL_SALT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_4 @@ -37,8 +36,7 @@ ShoalCave_LowTideLowerRoom_EventScript_BlackBelt:: goto_if_set FLAG_RECEIVED_FOCUS_BAND, ShoalCave_LowTideLowerRoom_EventScript_ReceivedFocusBand msgbox ShoalCave_LowTideLowerRoom_Text_CanOvercomeColdWithFocus, MSGBOX_DEFAULT giveitem ITEM_FOCUS_BAND - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_FOCUS_BAND release end diff --git a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc index f1a5b030b..655711e9c 100644 --- a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc @@ -18,8 +18,7 @@ ShoalCave_LowTideStairsRoom_EventScript_ShoalSalt3:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_ReceivedShoalSalt giveitem ITEM_SHOAL_SALT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_3 diff --git a/data/maps/SkyPillar_1F/scripts.inc b/data/maps/SkyPillar_1F/scripts.inc index 3ef94b261..b521b541c 100644 --- a/data/maps/SkyPillar_1F/scripts.inc +++ b/data/maps/SkyPillar_1F/scripts.inc @@ -3,8 +3,7 @@ SkyPillar_1F_MapScripts:: .byte 0 SkyPillar_1F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_1F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_1F_EventScript_CleanFloor end SkyPillar_1F_EventScript_CleanFloor:: diff --git a/data/maps/SkyPillar_2F/scripts.inc b/data/maps/SkyPillar_2F/scripts.inc index ba2fe889b..bad2488f0 100644 --- a/data/maps/SkyPillar_2F/scripts.inc +++ b/data/maps/SkyPillar_2F/scripts.inc @@ -5,8 +5,7 @@ SkyPillar_2F_MapScripts:: .byte 0 SkyPillar_2F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_2F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_2F_EventScript_CleanFloor copyvar VAR_ICE_STEP_COUNT, 1 end diff --git a/data/maps/SkyPillar_3F/scripts.inc b/data/maps/SkyPillar_3F/scripts.inc index 681137df0..07ef3bb44 100644 --- a/data/maps/SkyPillar_3F/scripts.inc +++ b/data/maps/SkyPillar_3F/scripts.inc @@ -3,8 +3,7 @@ SkyPillar_3F_MapScripts:: .byte 0 SkyPillar_3F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_3F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_3F_EventScript_CleanFloor end SkyPillar_3F_EventScript_CleanFloor:: diff --git a/data/maps/SkyPillar_4F/scripts.inc b/data/maps/SkyPillar_4F/scripts.inc index b3ff931ad..9e8f1e80e 100644 --- a/data/maps/SkyPillar_4F/scripts.inc +++ b/data/maps/SkyPillar_4F/scripts.inc @@ -5,8 +5,7 @@ SkyPillar_4F_MapScripts:: .byte 0 SkyPillar_4F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_4F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_4F_EventScript_CleanFloor copyvar VAR_ICE_STEP_COUNT, 1 end diff --git a/data/maps/SkyPillar_5F/scripts.inc b/data/maps/SkyPillar_5F/scripts.inc index 12fc72f49..47d02fb61 100644 --- a/data/maps/SkyPillar_5F/scripts.inc +++ b/data/maps/SkyPillar_5F/scripts.inc @@ -3,8 +3,7 @@ SkyPillar_5F_MapScripts:: .byte 0 SkyPillar_5F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_5F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_5F_EventScript_CleanFloor return SkyPillar_5F_EventScript_CleanFloor:: diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc index 89e71a1ce..f25c82df6 100644 --- a/data/maps/SkyPillar_Outside/scripts.inc +++ b/data/maps/SkyPillar_Outside/scripts.inc @@ -7,10 +7,8 @@ SkyPillar_Outside_MapScripts:: .byte 0 SkyPillar_Outside_OnTransition: - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - call_if_eq SkyPillar_Outside_EventScript_HideMapNamePopup - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_ge SkyPillar_Outside_EventScript_CheckSetAbnormalWeather + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SkyPillar_Outside_EventScript_HideMapNamePopup + call_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, SkyPillar_Outside_EventScript_CheckSetAbnormalWeather end SkyPillar_Outside_EventScript_HideMapNamePopup:: diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index c59707e14..5c71bbe4b 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -12,16 +12,13 @@ SkyPillar_Top_OnResume: SkyPillar_Top_EventScript_TryRemoveRayquaza:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return SkyPillar_Top_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_Top_EventScript_SetCleanLayout - compare VAR_SKY_PILLAR_STATE, 2 - call_if_ge SkyPillar_Top_EventScript_TryShowRayquaza + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_Top_EventScript_SetCleanLayout + call_if_ge VAR_SKY_PILLAR_STATE, 2, SkyPillar_Top_EventScript_TryShowRayquaza end SkyPillar_Top_EventScript_SetCleanLayout:: @@ -57,12 +54,9 @@ SkyPillar_Top_EventScript_Rayquaza:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq SkyPillar_Top_EventScript_DefeatedRayquaza - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq SkyPillar_Top_EventScript_RanFromRayquaza - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq SkyPillar_Top_EventScript_RanFromRayquaza + goto_if_eq VAR_RESULT, B_OUTCOME_WON, SkyPillar_Top_EventScript_DefeatedRayquaza + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, SkyPillar_Top_EventScript_RanFromRayquaza + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, SkyPillar_Top_EventScript_RanFromRayquaza setflag FLAG_DEFEATED_RAYQUAZA releaseall end diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index 2e7ed6cbe..653f405c4 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -29,10 +29,8 @@ SlateportCity_MapScripts:: SlateportCity_OnTransition: setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 0 call SlateportCity_EventScript_EnterSlateport - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_MovePeopleForSternInterview - compare VAR_SLATEPORT_OUTSIDE_MUSEUM_STATE, 1 - call_if_eq SlateportCity_EventScript_SetReadyForScottScene + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_MovePeopleForSternInterview + call_if_eq VAR_SLATEPORT_OUTSIDE_MUSEUM_STATE, 1, SlateportCity_EventScript_SetReadyForScottScene end SlateportCity_EventScript_EnterSlateport:: @@ -61,8 +59,7 @@ SlateportCity_EventScript_MovePeopleForSternInterview:: SlateportCity_EventScript_SetReadyForScottScene:: setflag FLAG_HIDE_MAP_NAME_POPUP getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 30 - goto_if_eq SlateportCity_EventScript_MoveScottLeft + goto_if_eq VAR_0x8004, 30, SlateportCity_EventScript_MoveScottLeft setobjectxyperm LOCALID_SCOTT, 23, 27 setobjectmovementtype LOCALID_SCOTT, MOVEMENT_TYPE_FACE_RIGHT return @@ -167,11 +164,9 @@ SlateportCity_EventScript_EffortRibbonWoman:: bufferleadmonspeciesname STR_VAR_1 msgbox SlateportCity_Text_OhYourPokemon, MSGBOX_DEFAULT specialvar VAR_RESULT, LeadMonHasEffortRibbon - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_EventScript_MonHasEffortRibbon + call_if_eq VAR_RESULT, TRUE, SlateportCity_EventScript_MonHasEffortRibbon specialvar VAR_RESULT, Special_AreLeadMonEVsMaxedOut - compare VAR_RESULT, FALSE - call_if_eq SlateportCity_EventScript_MonEVsNotMaxed + call_if_eq VAR_RESULT, FALSE, SlateportCity_EventScript_MonEVsNotMaxed msgbox SlateportCity_Text_PleaseGiveItThisEffortRibbon, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_ITEM message SlateportCity_Text_ReceivedEffortRibbon @@ -194,8 +189,7 @@ SlateportCity_EventScript_MonHasEffortRibbon:: SlateportCity_EventScript_Cook:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_CookSternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_CookSternInterview msgbox SlateportCity_Text_SeaweedFullOfLife, MSGBOX_DEFAULT release end @@ -208,8 +202,7 @@ SlateportCity_EventScript_CookSternInterview:: SlateportCity_EventScript_OldWoman:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_OldWomanSternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_OldWomanSternInterview msgbox SlateportCity_Text_HowTownIsBornAndGrows, MSGBOX_DEFAULT release end @@ -222,8 +215,7 @@ SlateportCity_EventScript_OldWomanSternInterview:: SlateportCity_EventScript_Girl:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_GirlSternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_GirlSternInterview goto_if_set FLAG_RECEIVED_SECRET_POWER, SlateportCity_EventScript_GirlSecretBase msgbox SlateportCity_Text_SlateportWonderfulPlace, MSGBOX_DEFAULT release @@ -242,8 +234,7 @@ SlateportCity_EventScript_GirlSecretBase:: SlateportCity_EventScript_RichBoy:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_RichBoySternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_RichBoySternInterview msgbox SlateportCity_Text_GoingToCompeteInBattleTent, MSGBOX_DEFAULT release end @@ -254,8 +245,7 @@ SlateportCity_EventScript_RichBoySternInterview:: end SlateportCity_EventScript_FatMan:: - compare VAR_SLATEPORT_CITY_STATE, 1 - goto_if_eq SlateportCity_EventScript_FatManSternInterview + goto_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_FatManSternInterview msgbox SlateportCity_Text_BushedHikingFromMauville, MSGBOX_NPC end @@ -266,8 +256,7 @@ SlateportCity_EventScript_FatManSternInterview:: SlateportCity_EventScript_Man1:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_Man1SternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_Man1SternInterview msgbox SlateportCity_Text_EveryoneCallsHimCaptStern, MSGBOX_DEFAULT release end @@ -347,8 +336,7 @@ SlateportCity_EventScript_NameRatersHouseSign:: SlateportCity_EventScript_Maniac:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_ManiacSternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_ManiacSternInterview msgbox SlateportCity_Text_GetNameRaterToHelpYou, MSGBOX_DEFAULT release end @@ -760,8 +748,7 @@ SlateportCity_EventScript_BerryPowderClerk:: SlateportCity_EventScript_ReceivedPowderJar:: setvar VAR_0x8004, 1 specialvar VAR_RESULT, HasEnoughBerryPowder - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_EventScript_ExplainBerryPowder + goto_if_eq VAR_RESULT, FALSE, SlateportCity_EventScript_ExplainBerryPowder msgbox SlateportCity_Text_BroughtMeSomeBerryPowder, MSGBOX_DEFAULT special DisplayBerryPowderVendorMenu goto SlateportCity_EventScript_ChooseBerryPowderItem @@ -879,21 +866,17 @@ SlateportCity_EventScript_CancelPowderItemSelect:: SlateportCity_EventScript_TryBuyBerryPowderItem:: msgbox SlateportCity_Text_ExchangeBerryPowderForItem, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_EventScript_ChooseBerryPowderItem + goto_if_eq VAR_RESULT, NO, SlateportCity_EventScript_ChooseBerryPowderItem copyvar VAR_0x8004, VAR_0x8009 specialvar VAR_RESULT, HasEnoughBerryPowder - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_EventScript_NotEnoughBerryPowder + goto_if_eq VAR_RESULT, FALSE, SlateportCity_EventScript_NotEnoughBerryPowder giveitem VAR_0x8008 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_EventScript_NoRoomForBerryPowderItem + goto_if_eq VAR_RESULT, FALSE, SlateportCity_EventScript_NoRoomForBerryPowderItem copyvar VAR_0x8004, VAR_0x8009 special TakeBerryPowder special PrintPlayerBerryPowderAmount msgbox SlateportCity_Text_FineBerryPowderTradeSomethingElse, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_EventScript_ChooseBerryPowderItem + goto_if_eq VAR_RESULT, YES, SlateportCity_EventScript_ChooseBerryPowderItem msgbox SlateportCity_Text_WhenYouGetMoreBringItToMe, MSGBOX_DEFAULT special RemoveBerryPowderVendorMenu release diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc index 285c567ec..53514bb5e 100644 --- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc +++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc @@ -16,10 +16,8 @@ SlateportCity_BattleTentBattleRoom_OnTransition: SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale return SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 309b709d1..75156f68f 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -13,8 +13,7 @@ SlateportCity_BattleTentCorridor_OnWarp: SlateportCity_BattleTentCorridor_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 - compare VAR_0x8006, 1 - goto_if_ne SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth + goto_if_ne VAR_0x8006, 1, SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth setobjectxy LOCALID_ATTENDANT, 2, 2 turnobject LOCALID_ATTENDANT, DIR_SOUTH SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth:: @@ -26,14 +25,12 @@ SlateportCity_BattleTentCorridor_OnFrame: .2byte 0 SlateportCity_BattleTentCorridor_EventScript_EnterCorridor:: - compare VAR_0x8006, 1 - goto_if_eq SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle + goto_if_eq VAR_0x8006, 1, SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle setvar VAR_TEMP_0, 1 applymovement LOCALID_ATTENDANT, SlateportCity_BattleTentCorridor_Movement_AttendantEnter applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_BattleTentCorridor_Movement_PlayerEnter waitmovement 0 - compare VAR_0x8006, 2 - goto_if_eq SlateportCity_BattleTentCorridor_EventScript_ResumeChallenge + goto_if_eq VAR_0x8006, 2, SlateportCity_BattleTentCorridor_EventScript_ResumeChallenge slateporttent_generaterentalmons slateporttent_generateopponentmons msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_HoldMonsChooseFromSelection, MSGBOX_DEFAULT @@ -65,10 +62,8 @@ SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle:: special HealPlayerParty SlateportCity_BattleTentCorridor_EventScript_AskReadyForOpponent:: frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq SlateportCity_BattleTentCorridor_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq SlateportCity_BattleTentCorridor_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 1, SlateportCity_BattleTentCorridor_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, SlateportCity_BattleTentCorridor_EventScript_ReadyFor3rdOpponent multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, TRUE switch VAR_RESULT case 0, SlateportCity_BattleTentCorridor_EventScript_AskSwapMon @@ -103,8 +98,7 @@ SlateportCity_BattleTentCorridor_EventScript_SwapMons:: fadescreen FADE_TO_BLACK slateporttent_swapmons waitstate - compare VAR_RESULT, 1 - goto_if_eq SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom + goto_if_eq VAR_RESULT, 1, SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT goto SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc index 7ed9420b0..0d3fae875 100644 --- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc +++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc @@ -93,8 +93,7 @@ SlateportCity_BattleTentLobby_EventScript_Attendant:: lock faceplayer slateporttent_getprize - compare VAR_RESULT, ITEM_NONE - goto_if_ne SlateportCity_BattleTentLobby_EventScript_GivePrize + goto_if_ne VAR_RESULT, ITEM_NONE, SlateportCity_BattleTentLobby_EventScript_GivePrize special SavePlayerParty msgbox SlateportCity_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT SlateportCity_BattleTentLobby_EventScript_AskEnterChallenge:: @@ -127,8 +126,7 @@ SlateportCity_BattleTentLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_BattleTentLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, SlateportCity_BattleTentLobby_EventScript_CancelChallengeSaveFailed setvar VAR_0x8006, 0 SlateportCity_BattleTentLobby_EventScript_EnterChallenge:: msgbox SlateportCity_BattleTentLobby_Text_StepThisWay, MSGBOX_DEFAULT @@ -204,8 +202,7 @@ SlateportCity_BattleTentLobby_EventScript_TormentGiver:: goto_if_set FLAG_RECEIVED_TM41, SlateportCity_BattleTentLobby_EventScript_ReceivedTorment msgbox SlateportCity_BattleTentLobby_Text_CouldntFindMonForMe, MSGBOX_DEFAULT giveitem ITEM_TM41 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM41 msgbox SlateportCity_BattleTentLobby_Text_ExplainTorment, MSGBOX_DEFAULT release diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc index ff1315923..b2a71f2b7 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -11,8 +11,7 @@ SlateportCity_Harbor_MapScripts:: SlateportCity_Harbor_OnTransition: setescapewarp MAP_SLATEPORT_CITY, 28, 13 setvar VAR_TEMP_1, 0 - compare VAR_SLATEPORT_HARBOR_STATE, 1 - call_if_eq SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene + call_if_eq VAR_SLATEPORT_HARBOR_STATE, 1, SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene call_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_ShowSSTidal end @@ -71,14 +70,10 @@ SlateportCity_Harbor_EventScript_AquaEscapeScene:: setvar VAR_SLATEPORT_HARBOR_STATE, 2 setflag FLAG_MET_TEAM_AQUA_HARBOR setflag FLAG_HIDE_LILYCOVE_MOTEL_SCOTT - compare VAR_0x8008, 0 - call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer - compare VAR_0x8008, 3 - call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer + call_if_eq VAR_0x8008, 0, SlateportCity_Harbor_EventScript_SternApproachPlayer0 + call_if_eq VAR_0x8008, 1, SlateportCity_Harbor_EventScript_SternApproachPlayer1 + call_if_eq VAR_0x8008, 2, SlateportCity_Harbor_EventScript_SternApproachPlayer + call_if_eq VAR_0x8008, 3, SlateportCity_Harbor_EventScript_SternApproachPlayer msgbox SlateportCity_Harbor_Text_CaptSternWhyStealMySubmarine, MSGBOX_DEFAULT closemessage setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_1_BLOCKING_ENTRANCE @@ -206,8 +201,7 @@ SlateportCity_Harbor_EventScript_NoTicket:: SlateportCity_Harbor_EventScript_Lilycove:: msgbox SlateportCity_Harbor_Text_LilycoveItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination + goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseNewDestination setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_SLATEPORT call SlateportCity_Harbor_EventScript_BoardFerry warp MAP_SS_TIDAL_CORRIDOR, 1, 10 @@ -217,8 +211,7 @@ SlateportCity_Harbor_EventScript_Lilycove:: SlateportCity_Harbor_EventScript_BattleFrontier:: msgbox SlateportCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination + goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseNewDestination call SlateportCity_Harbor_EventScript_BoardFerry warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate @@ -238,10 +231,8 @@ SlateportCity_Harbor_EventScript_BoardFerry:: waitmovement 0 delay 30 hideobjectat VAR_LAST_TALKED, MAP_SLATEPORT_CITY_HARBOR - compare VAR_FACING, DIR_NORTH - call_if_eq SlateportCity_Harbor_EventScript_BoardFerryNorth - compare VAR_FACING, DIR_EAST - call_if_eq SlateportCity_Harbor_EventScript_BoardFerryEast + call_if_eq VAR_FACING, DIR_NORTH, SlateportCity_Harbor_EventScript_BoardFerryNorth + call_if_eq VAR_FACING, DIR_EAST, SlateportCity_Harbor_EventScript_BoardFerryEast delay 30 hideobjectat OBJ_EVENT_ID_PLAYER, 0 setvar VAR_0x8004, LOCALID_SS_TIDAL @@ -279,8 +270,7 @@ SlateportCity_Harbor_EventScript_Sailor:: setvar VAR_0x8004, 0 call_if_set FLAG_DEFEATED_KYOGRE, SlateportCity_Harbor_EventScript_CountDefeatedLegendary call_if_set FLAG_DEFEATED_GROUDON, SlateportCity_Harbor_EventScript_CountDefeatedLegendary - compare VAR_0x8004, 2 @ Defeated both - goto_if_eq SlateportCity_Harbor_EventScript_SailorNoAbnormalWeather + goto_if_eq VAR_0x8004, 2, SlateportCity_Harbor_EventScript_SailorNoAbnormalWeather @ Defeated both msgbox SlateportCity_Harbor_Text_AbnormalWeather, MSGBOX_DEFAULT release end @@ -304,8 +294,7 @@ SlateportCity_Harbor_EventScript_CaptStern:: goto_if_set FLAG_BADGE07_GET, SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment goto_if_set FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE, SlateportCity_Harbor_EventScript_NeedDive goto_if_set FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, SlateportCity_Harbor_EventScript_TeamAquaLeftNeedDive - compare VAR_SLATEPORT_HARBOR_STATE, 2 - goto_if_eq SlateportCity_Harbor_EventScript_WhyStealSubmarine + goto_if_eq VAR_SLATEPORT_HARBOR_STATE, 2, SlateportCity_Harbor_EventScript_WhyStealSubmarine msgbox SlateportCity_Harbor_Text_SameThugsTriedToRobAtMuseum, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection @@ -330,11 +319,9 @@ SlateportCity_Harbor_EventScript_NeedDive:: end SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment:: - compare VAR_TEMP_1, 1 - goto_if_eq SlateportCity_Harbor_EventScript_TradedScanner + goto_if_eq VAR_TEMP_1, 1, SlateportCity_Harbor_EventScript_TradedScanner checkitem ITEM_SCANNER - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_Harbor_EventScript_AskToTradeScanner + goto_if_eq VAR_RESULT, TRUE, SlateportCity_Harbor_EventScript_AskToTradeScanner goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_FerryFinished msgbox SlateportCity_Harbor_Text_WontBeLongBeforeWeFinishFerry, MSGBOX_DEFAULT release @@ -362,11 +349,9 @@ SlateportCity_Harbor_EventScript_ChooseScannerTrade:: SlateportCity_Harbor_EventScript_DeepSeaTooth:: msgbox SlateportCity_Harbor_Text_TradeForDeepSeaTooth, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_Harbor_EventScript_ChooseDifferentTrade + goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseDifferentTrade giveitem ITEM_DEEP_SEA_TOOTH - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull removeitem ITEM_SCANNER msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT setflag FLAG_EXCHANGED_SCANNER @@ -375,11 +360,9 @@ SlateportCity_Harbor_EventScript_DeepSeaTooth:: SlateportCity_Harbor_EventScript_DeepSeaScale:: msgbox SlateportCity_Harbor_Text_TradeForDeepSeaScale, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_Harbor_EventScript_ChooseDifferentTrade + goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseDifferentTrade giveitem ITEM_DEEP_SEA_SCALE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull removeitem ITEM_SCANNER msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT setflag FLAG_EXCHANGED_SCANNER diff --git a/data/maps/SlateportCity_NameRatersHouse/scripts.inc b/data/maps/SlateportCity_NameRatersHouse/scripts.inc index 3242050e7..34d788a6a 100644 --- a/data/maps/SlateportCity_NameRatersHouse/scripts.inc +++ b/data/maps/SlateportCity_NameRatersHouse/scripts.inc @@ -5,20 +5,16 @@ SlateportCity_NameRatersHouse_EventScript_NameRater:: lock faceplayer msgbox SlateportCity_NameRatersHouse_Text_PleasedToRateMonNickname, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate - compare VAR_RESULT, NO - goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate + goto_if_eq VAR_RESULT, YES, SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate + goto_if_eq VAR_RESULT, NO, SlateportCity_NameRatersHouse_EventScript_DeclineNameRate end SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate:: msgbox SlateportCity_NameRatersHouse_Text_CritiqueWhichMonNickname, MSGBOX_DEFAULT special ChoosePartyMon waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_ne SlateportCity_NameRatersHouse_EventScript_RateMonNickname - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate + goto_if_ne VAR_0x8004, PARTY_NOTHING_CHOSEN, SlateportCity_NameRatersHouse_EventScript_RateMonNickname + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, SlateportCity_NameRatersHouse_EventScript_DeclineNameRate end SlateportCity_NameRatersHouse_EventScript_DeclineNameRate:: @@ -28,21 +24,16 @@ SlateportCity_NameRatersHouse_EventScript_DeclineNameRate:: SlateportCity_NameRatersHouse_EventScript_RateMonNickname:: specialvar VAR_RESULT, ScriptGetPartyMonSpecies - compare VAR_RESULT, SPECIES_EGG - goto_if_eq SlateportCity_NameRatersHouse_EventScript_CantRateEgg + goto_if_eq VAR_RESULT, SPECIES_EGG, SlateportCity_NameRatersHouse_EventScript_CantRateEgg special BufferMonNickname special IsMonOTIDNotPlayers - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_NameRatersHouse_EventScript_PlayerNotMonsOT + goto_if_eq VAR_RESULT, TRUE, SlateportCity_NameRatersHouse_EventScript_PlayerNotMonsOT specialvar VAR_RESULT, MonOTNameNotPlayer special BufferMonNickname - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_NameRatersHouse_EventScript_PlayerNotMonsOT + goto_if_eq VAR_RESULT, TRUE, SlateportCity_NameRatersHouse_EventScript_PlayerNotMonsOT msgbox SlateportCity_NameRatersHouse_Text_FineNameSuggestBetterOne, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_NameRatersHouse_EventScript_ChangeNickname - compare VAR_RESULT, NO - goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate + goto_if_eq VAR_RESULT, YES, SlateportCity_NameRatersHouse_EventScript_ChangeNickname + goto_if_eq VAR_RESULT, NO, SlateportCity_NameRatersHouse_EventScript_DeclineNameRate end SlateportCity_NameRatersHouse_EventScript_CantRateEgg:: @@ -60,8 +51,7 @@ SlateportCity_NameRatersHouse_EventScript_ChangeNickname:: call Common_EventScript_NameReceivedPartyMon specialvar VAR_RESULT, TryPutNameRaterShowOnTheAir special BufferMonNickname - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_NameRatersHouse_EventScript_NewNameDifferent + goto_if_eq VAR_RESULT, TRUE, SlateportCity_NameRatersHouse_EventScript_NewNameDifferent msgbox SlateportCity_NameRatersHouse_Text_NameNoDifferentYetSuperior, MSGBOX_DEFAULT release end diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc index 901b05e2a..96892f948 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -24,8 +24,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight:: SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: showmoneybox 0, 0 msgbox SlateportCity_OceanicMuseum_1F_Text_WouldYouLikeToEnter, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee + goto_if_eq VAR_RESULT, YES, SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee closemessage hidemoneybox applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PushPlayerBackFromCounter @@ -35,8 +34,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee:: checkmoney 50 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney playse SE_SHOP removemoney 50 updatemoneybox @@ -154,19 +152,14 @@ SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGrunt:: waitmovement 0 msgbox SlateportCity_OceanicMuseum_1F_Text_RememberMeTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM46 - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NoRoomForThief + goto_if_eq VAR_RESULT, 0, SlateportCity_OceanicMuseum_1F_EventScript_NoRoomForThief setflag FLAG_RECEIVED_TM46 msgbox SlateportCity_OceanicMuseum_1F_Text_HopeINeverSeeYouAgain, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth - compare VAR_FACING, DIR_SOUTH - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitSouth - compare VAR_FACING, DIR_WEST - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast - compare VAR_FACING, DIR_EAST - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast + goto_if_eq VAR_FACING, DIR_NORTH, SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth + goto_if_eq VAR_FACING, DIR_SOUTH, SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitSouth + goto_if_eq VAR_FACING, DIR_WEST, SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast + goto_if_eq VAR_FACING, DIR_EAST, SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast end SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth:: diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc index b993c9fab..59131fd7e 100644 --- a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc @@ -21,22 +21,17 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: applymovement LOCALID_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_FirstGruntApproach applymovement LOCALID_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_SecondGruntApproach waitmovement 0 - compare VAR_FACING, DIR_SOUTH - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts - compare VAR_FACING, DIR_EAST - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts + call_if_eq VAR_FACING, DIR_SOUTH, SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts + call_if_eq VAR_FACING, DIR_EAST, SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts msgbox SlateportCity_OceanicMuseum_2F_Text_WellTakeThoseParts, MSGBOX_DEFAULT - compare VAR_FACING, DIR_EAST - call_if_ne SlateportCity_OceanicMuseum_2F_EventScript_SternFaceGrunts + call_if_ne VAR_FACING, DIR_EAST, SlateportCity_OceanicMuseum_2F_EventScript_SternFaceGrunts msgbox SlateportCity_OceanicMuseum_2F_Text_SternWhoAreYou, MSGBOX_DEFAULT msgbox SlateportCity_OceanicMuseum_2F_Text_WereTeamAqua, MSGBOX_DEFAULT closemessage applymovement LOCALID_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle waitmovement 0 - compare VAR_FACING, DIR_SOUTH - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntSouth - compare VAR_FACING, DIR_WEST - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntWest + call_if_eq VAR_FACING, DIR_SOUTH, SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntSouth + call_if_eq VAR_FACING, DIR_WEST, SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntWest trainerbattle_no_intro TRAINER_GRUNT_MUSEUM_1, SlateportCity_OceanicMuseum_2F_Text_Grunt1Defeat msgbox SlateportCity_OceanicMuseum_2F_Text_BossGoingToBeFurious, MSGBOX_DEFAULT closemessage @@ -86,8 +81,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: special HealPlayerParty removeobject LOCALID_CAPT_STERN setflag FLAG_HIDE_ROUTE_110_TEAM_AQUA - compare VAR_REGISTER_BIRCH_STATE, 0 - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch + call_if_eq VAR_REGISTER_BIRCH_STATE, 0, SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch setflag FLAG_DELIVERED_DEVON_GOODS clearflag FLAG_HIDE_ROUTE_116_DEVON_EMPLOYEE setflag FLAG_HIDE_RUSTBORO_CITY_DEVON_CORP_3F_EMPLOYEE diff --git a/data/maps/SlateportCity_PokemonFanClub/scripts.inc b/data/maps/SlateportCity_PokemonFanClub/scripts.inc index 4599548b5..b97e29a02 100644 --- a/data/maps/SlateportCity_PokemonFanClub/scripts.inc +++ b/data/maps/SlateportCity_PokemonFanClub/scripts.inc @@ -26,10 +26,8 @@ SlateportCity_PokemonFanClub_EventScript_ChairmanTryAssessPokemon:: call_if_set FLAG_RECEIVED_PINK_SCARF, SlateportCity_PokemonFanClub_EventScript_CountReceivedScarf call_if_set FLAG_RECEIVED_BLUE_SCARF, SlateportCity_PokemonFanClub_EventScript_CountReceivedScarf call_if_set FLAG_RECEIVED_RED_SCARF, SlateportCity_PokemonFanClub_EventScript_CountReceivedScarf - compare VAR_TEMP_2, CONTEST_CATEGORIES_COUNT - call_if_eq SlateportCity_PokemonFanClub_EventScript_ReceivedAllScarves - compare VAR_SLATEPORT_FAN_CLUB_STATE, 2 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoMoreScarves + call_if_eq VAR_TEMP_2, CONTEST_CATEGORIES_COUNT, SlateportCity_PokemonFanClub_EventScript_ReceivedAllScarves + goto_if_eq VAR_SLATEPORT_FAN_CLUB_STATE, 2, SlateportCity_PokemonFanClub_EventScript_NoMoreScarves msgbox SlateportCity_PokemonFanClub_Text_HowIsYourPokemonGrowing, MSGBOX_DEFAULT goto SlateportCity_PokemonFanClub_EventScript_ChairmanAssessLeadMon end @@ -73,8 +71,7 @@ SlateportCity_PokemonFanClub_EventScript_NoHighConditions:: SlateportCity_PokemonFanClub_EventScript_GiveRedScarf:: checkitemspace ITEM_RED_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_RED_SCARF giveitem ITEM_RED_SCARF @@ -84,8 +81,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveRedScarf:: SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf:: checkitemspace ITEM_BLUE_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_BLUE_SCARF giveitem ITEM_BLUE_SCARF @@ -95,8 +91,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf:: SlateportCity_PokemonFanClub_EventScript_GivePinkScarf:: checkitemspace ITEM_PINK_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_PINK_SCARF giveitem ITEM_PINK_SCARF @@ -106,8 +101,7 @@ SlateportCity_PokemonFanClub_EventScript_GivePinkScarf:: SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf:: checkitemspace ITEM_GREEN_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_GREEN_SCARF giveitem ITEM_GREEN_SCARF @@ -117,8 +111,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf:: SlateportCity_PokemonFanClub_EventScript_GiveYellowScarf:: checkitemspace ITEM_YELLOW_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_YELLOW_SCARF giveitem ITEM_YELLOW_SCARF @@ -133,8 +126,7 @@ SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf:: SlateportCity_PokemonFanClub_EventScript_CheckMonCool:: specialvar VAR_RESULT, CheckLeadMonCool - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonCool + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonCool return SlateportCity_PokemonFanClub_EventScript_SetMonCool:: @@ -143,8 +135,7 @@ SlateportCity_PokemonFanClub_EventScript_SetMonCool:: SlateportCity_PokemonFanClub_EventScript_CheckMonBeauty:: specialvar VAR_RESULT, CheckLeadMonBeauty - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonBeauty + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonBeauty return SlateportCity_PokemonFanClub_EventScript_SetMonBeauty:: @@ -153,8 +144,7 @@ SlateportCity_PokemonFanClub_EventScript_SetMonBeauty:: SlateportCity_PokemonFanClub_EventScript_CheckMonCute:: specialvar VAR_RESULT, CheckLeadMonCute - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonCute + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonCute return SlateportCity_PokemonFanClub_EventScript_SetMonCute:: @@ -163,8 +153,7 @@ SlateportCity_PokemonFanClub_EventScript_SetMonCute:: SlateportCity_PokemonFanClub_EventScript_CheckMonSmart:: specialvar VAR_RESULT, CheckLeadMonSmart - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonSmart + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonSmart return SlateportCity_PokemonFanClub_EventScript_SetMonSmart:: @@ -173,8 +162,7 @@ SlateportCity_PokemonFanClub_EventScript_SetMonSmart:: SlateportCity_PokemonFanClub_EventScript_CheckMonTough:: specialvar VAR_RESULT, CheckLeadMonTough - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonTough + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonTough return SlateportCity_PokemonFanClub_EventScript_SetMonTough:: @@ -204,8 +192,7 @@ SlateportCity_PokemonFanClub_EventScript_SootheBellWoman:: goto_if_set FLAG_RECEIVED_SOOTHE_BELL, SlateportCity_PokemonFanClub_EventScript_ReceivedSootheBell msgbox SlateportCity_PokemonFanClub_Text_ShowMePokemonThatLoveYou, MSGBOX_DEFAULT specialvar VAR_RESULT, GetLeadMonFriendshipScore - compare VAR_RESULT, 4 - goto_if_ge SlateportCity_PokemonFanClub_EventScript_GiveSootheBell + goto_if_ge VAR_RESULT, 4, SlateportCity_PokemonFanClub_EventScript_GiveSootheBell release end @@ -217,8 +204,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveSootheBell:: waitmovement 0 msgbox SlateportCity_PokemonFanClub_Text_PokemonAdoresYou, MSGBOX_DEFAULT giveitem ITEM_SOOTHE_BELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SOOTHE_BELL release end diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index 92a97ac4c..69f74880e 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -51,32 +51,20 @@ SootopolisCity_EventScript_LockGymDoor:: SootopolisCity_OnTransition: setflag FLAG_VISITED_SOOTOPOLIS_CITY - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - call_if_eq SootopolisCity_EventScript_HideMapNamePopup - compare VAR_SKY_PILLAR_STATE, 1 - call_if_eq SootopolisCity_EventScript_HideMapNamePopup + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_HideMapNamePopup + call_if_eq VAR_SKY_PILLAR_STATE, 1, SootopolisCity_EventScript_HideMapNamePopup call SootopolisCity_EventScript_SetWeather call SootopolisCity_EventScript_SetLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - call_if_eq SootopolisCity_EventScript_CheckSetEnterCaveOfOriginObjPos - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - call_if_eq SootopolisCity_EventScript_CheckSetEnterCaveOfOriginObjPos - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_eq SootopolisCity_EventScript_SetExitCaveOfOriginObjPos - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - call_if_eq SootopolisCity_EventScript_SetOutsideGymObjPos - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - call_if_eq SootopolisCity_EventScript_SetExpertBlockCaveEntrance + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_CheckSetEnterCaveOfOriginObjPos + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SootopolisCity_EventScript_CheckSetEnterCaveOfOriginObjPos + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_SetExitCaveOfOriginObjPos + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_SetOutsideGymObjPos + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_SetExpertBlockCaveEntrance end SootopolisCity_EventScript_HideMapNamePopup:: @@ -95,20 +83,13 @@ SootopolisCity_EventScript_SetBattleSpectators:: return SootopolisCity_EventScript_SetLayout:: - compare VAR_SOOTOPOLIS_CITY_STATE, 0 - goto_if_eq SootopolisCity_EventScript_SetNormalLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_SetNormalLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_eq SootopolisCity_EventScript_SetLegendariesLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - goto_if_eq SootopolisCity_EventScript_SetLegendariesLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - goto_if_eq SootopolisCity_EventScript_SetLegendariesLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - goto_if_eq SootopolisCity_EventScript_SetLegendariesLayout - compare VAR_SKY_PILLAR_STATE, 1 - goto_if_le SootopolisCity_EventScript_SetLegendariesLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 0, SootopolisCity_EventScript_SetNormalLayout + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_SetNormalLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_SetLegendariesLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_SetLegendariesLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SootopolisCity_EventScript_SetLegendariesLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_SetLegendariesLayout + goto_if_le VAR_SKY_PILLAR_STATE, 1, SootopolisCity_EventScript_SetLegendariesLayout return SootopolisCity_EventScript_SetNormalLayout:: @@ -119,16 +100,11 @@ SootopolisCity_EventScript_SetLegendariesLayout:: return SootopolisCity_EventScript_SetWeather:: - compare VAR_SOOTOPOLIS_CITY_STATE, 0 - goto_if_eq SootopolisCity_EventScript_SetNormalWeather - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_SetNormalWeather - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_eq SootopolisCity_EventScript_SetDownpour - compare VAR_SKY_PILLAR_STATE, 1 - goto_if_eq SootopolisCity_EventScript_SetDownpour - compare VAR_SKY_PILLAR_STATE, 1 - goto_if_le Common_EventScript_SetAbnormalWeather + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 0, SootopolisCity_EventScript_SetNormalWeather + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_SetNormalWeather + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_SetDownpour + goto_if_eq VAR_SKY_PILLAR_STATE, 1, SootopolisCity_EventScript_SetDownpour + goto_if_le VAR_SKY_PILLAR_STATE, 1, Common_EventScript_SetAbnormalWeather return SootopolisCity_EventScript_SetNormalWeather:: @@ -158,12 +134,9 @@ SootopolisCity_EventScript_SetOutsideGymObjPos:: setobjectxyperm LOCALID_STEVEN, 29, 33 setobjectxyperm LOCALID_MAXIE, 33, 35 setobjectxyperm LOCALID_ARCHIE, 34, 35 - compare VAR_SOOTOPOLIS_WALLACE_STATE, 0 - call_if_eq SootopolisCity_EventScript_SetWallaceMiddle - compare VAR_SOOTOPOLIS_WALLACE_STATE, 1 - call_if_eq SootopolisCity_EventScript_SetWallaceRight - compare VAR_SOOTOPOLIS_WALLACE_STATE, 2 - call_if_eq SootopolisCity_EventScript_SetWallaceLeft + call_if_eq VAR_SOOTOPOLIS_WALLACE_STATE, 0, SootopolisCity_EventScript_SetWallaceMiddle + call_if_eq VAR_SOOTOPOLIS_WALLACE_STATE, 1, SootopolisCity_EventScript_SetWallaceRight + call_if_eq VAR_SOOTOPOLIS_WALLACE_STATE, 2, SootopolisCity_EventScript_SetWallaceLeft return SootopolisCity_EventScript_SetWallaceMiddle:: @@ -190,10 +163,8 @@ SootopolisCity_OnWarp: .2byte 0 SootopolisCity_EventScript_PlayerFaceLegendaries:: - compare VAR_SKY_PILLAR_STATE, 1 - call_if_eq SootopolisCity_EventScript_PlayerFaceLegendaries1 - compare VAR_SKY_PILLAR_STATE, 2 - call_if_eq SootopolisCity_EventScript_PlayerFaceLegendaries2 + call_if_eq VAR_SKY_PILLAR_STATE, 1, SootopolisCity_EventScript_PlayerFaceLegendaries1 + call_if_eq VAR_SKY_PILLAR_STATE, 2, SootopolisCity_EventScript_PlayerFaceLegendaries2 end SootopolisCity_EventScript_PlayerFaceLegendaries1:: @@ -218,10 +189,8 @@ SootopolisCity_OnFrame: SootopolisCity_EventScript_StartLegendariesScene:: lockall special StorePlayerCoordsInVars - compare VAR_0x8004, 43 - goto_if_ne SootopolisCity_EventScript_LegendariesSceneFromDive - compare VAR_0x8005, 32 - goto_if_ne SootopolisCity_EventScript_LegendariesSceneFromDive + goto_if_ne VAR_0x8004, 43, SootopolisCity_EventScript_LegendariesSceneFromDive + goto_if_ne VAR_0x8005, 32, SootopolisCity_EventScript_LegendariesSceneFromDive goto SootopolisCity_EventScript_LegendariesSceneFromPokeCenter end @@ -509,10 +478,8 @@ SootopolisCity_Movement_GroudonIdle: SootopolisCity_EventScript_StartRayquazaScene:: lockall special StorePlayerCoordsInVars - compare VAR_0x8004, 43 - goto_if_ne SootopolisCity_EventScript_RayquazaSceneFromDive - compare VAR_0x8005, 32 - goto_if_ne SootopolisCity_EventScript_RayquazaSceneFromDive + goto_if_ne VAR_0x8004, 43, SootopolisCity_EventScript_RayquazaSceneFromDive + goto_if_ne VAR_0x8005, 32, SootopolisCity_EventScript_RayquazaSceneFromDive goto SootopolisCity_EventScript_RayquazaSceneFromPokeCenter end @@ -717,12 +684,9 @@ SootopolisCity_Movement_UnusedPanBack: SootopolisCity_EventScript_CaveOfOriginExpert:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_ExpertPostLegendaries - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_ExpertLegendaries - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - goto_if_ge SootopolisCity_EventScript_ExpertLeadToCave + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_ExpertPostLegendaries + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_ExpertLegendaries + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_ExpertLeadToCave msgbox SootopolisCity_Text_CaveOfOriginPleaseLeave, MSGBOX_DEFAULT release end @@ -745,12 +709,9 @@ SootopolisCity_EventScript_ExpertLegendaries:: SootopolisCity_EventScript_Kiri:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_le SootopolisCity_EventScript_KiriGiveBerry - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_KiriGiveBerry - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_KiriRayquaza + goto_if_le VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_KiriGiveBerry + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_KiriGiveBerry + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_KiriRayquaza msgbox SootopolisCity_Text_BigPokemonFighting, MSGBOX_DEFAULT closemessage applymovement LOCALID_KIRI, Common_Movement_FaceOriginalDirection @@ -774,37 +735,31 @@ SootopolisCity_EventScript_KiriGiveBerry:: addvar VAR_RESULT, NUM_KIRI_BERRIES_SKIPPED addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_SOOTOPOLIS_RECEIVED_BERRY msgbox SootopolisCity_Text_GiveYouThisBerryToo, MSGBOX_DEFAULT random 2 - compare VAR_RESULT, 0 - goto_if_eq SootopolisCity_EventScript_GiveFigyBerry - compare VAR_RESULT, 1 - goto_if_eq SootopolisCity_EventScript_GiveIapapaBerry + goto_if_eq VAR_RESULT, 0, SootopolisCity_EventScript_GiveFigyBerry + goto_if_eq VAR_RESULT, 1, SootopolisCity_EventScript_GiveIapapaBerry end SootopolisCity_EventScript_GiveFigyBerry:: giveitem ITEM_FIGY_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox SootopolisCity_Text_WhatKindOfWishInYourName, MSGBOX_DEFAULT release end SootopolisCity_EventScript_GiveIapapaBerry:: giveitem ITEM_IAPAPA_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox SootopolisCity_Text_WhatKindOfWishInYourName, MSGBOX_DEFAULT release end SootopolisCity_EventScript_KiriReceivedBerry:: msgbox SootopolisCity_Text_LikeSeasonBornIn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SootopolisCity_EventScript_KiriLikeSeasonBornIn + goto_if_eq VAR_RESULT, YES, SootopolisCity_EventScript_KiriLikeSeasonBornIn msgbox SootopolisCity_Text_OhDoesntMatter, MSGBOX_DEFAULT release end @@ -818,8 +773,7 @@ SootopolisCity_EventScript_Woman2:: lockall applymovement LOCALID_WOMAN_2, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_Woman2Rayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Woman2Rayquaza msgbox SootopolisCity_Text_WeatherWentWild, MSGBOX_DEFAULT closemessage applymovement LOCALID_WOMAN_2, Common_Movement_FaceOriginalDirection @@ -835,8 +789,7 @@ SootopolisCity_EventScript_Woman2Rayquaza:: SootopolisCity_EventScript_Man:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_ManPostLegendaries + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_ManPostLegendaries msgbox SootopolisCity_Text_NoOrdinaryTourist, MSGBOX_DEFAULT release end @@ -849,12 +802,9 @@ SootopolisCity_EventScript_ManPostLegendaries:: SootopolisCity_EventScript_Woman1:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_Woman1PostLegendaries - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_Woman1Rayquaza - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - goto_if_ge SootopolisCity_EventScript_Woman1Legendaries + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_Woman1PostLegendaries + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Woman1Rayquaza + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_Woman1Legendaries msgbox SootopolisCity_Text_SootopolisSkyBeautiful, MSGBOX_DEFAULT release end @@ -881,12 +831,9 @@ SootopolisCity_EventScript_NinjaBoy:: lockall applymovement LOCALID_NINJA_BOY, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_NinjaBoyRayquaza - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_NinjaBoyNormal - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_le SootopolisCity_EventScript_NinjaBoyNormal + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_NinjaBoyRayquaza + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_NinjaBoyNormal + goto_if_le VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_NinjaBoyNormal msgbox SootopolisCity_Text_ThisIsWicked, MSGBOX_DEFAULT closemessage applymovement LOCALID_NINJA_BOY, Common_Movement_FaceOriginalDirection @@ -908,13 +855,10 @@ SootopolisCity_EventScript_Boy1:: lockall applymovement LOCALID_BOY_1, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_Boy1Rayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Boy1Rayquaza goto_if_set FLAG_SYS_GAME_CLEAR, SootopolisCity_EventScript_Boy1GameClear - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_Boy1Normal - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_le SootopolisCity_EventScript_Boy1Normal + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_Boy1Normal + goto_if_le VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_Boy1Normal msgbox SootopolisCity_Text_GiantPokemonSuddenlyAppeared, MSGBOX_DEFAULT closemessage applymovement LOCALID_BOY_1, Common_Movement_FaceOriginalDirection @@ -954,12 +898,9 @@ SootopolisCity_EventScript_Steven:: applymovement LOCALID_STEVEN, Common_Movement_FacePlayer waitmovement 0 call_if_unset FLAG_STEVEN_GUIDES_TO_CAVE_OF_ORIGIN, SootopolisCity_EventScript_StevenLeadPlayerCaveOfOrigin - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - goto_if_eq SootopolisCity_EventScript_StevenHelpWallace - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - goto_if_eq SootopolisCity_EventScript_StevenHelpedWallace - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - goto_if_eq SootopolisCity_EventScript_StevenHelpedWallace + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_StevenHelpWallace + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SootopolisCity_EventScript_StevenHelpedWallace + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_StevenHelpedWallace goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, SootopolisCity_EventScript_StevenMaxieArchieLeft msgbox SootopolisCity_Text_SoThatsRayquaza, MSGBOX_DEFAULT releaseall @@ -983,10 +924,8 @@ SootopolisCity_EventScript_StevenHelpedWallace:: SootopolisCity_EventScript_StevenLeadPlayerCaveOfOrigin:: msgbox SootopolisCity_Text_InvolvedWithCrisisComeWithMe, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_WEST - call_if_eq SootopolisCity_EventScript_StartWalkToCaveOfOriginWest - compare VAR_FACING, DIR_NORTH - call_if_eq SootopolisCity_EventScript_StartWalkToCaveOfOriginNorth + call_if_eq VAR_FACING, DIR_WEST, SootopolisCity_EventScript_StartWalkToCaveOfOriginWest + call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_EventScript_StartWalkToCaveOfOriginNorth msgbox SootopolisCity_Text_DoesThisMakeYourFearPokemon, MSGBOX_DEFAULT closemessage applymovement LOCALID_STEVEN, SootopolisCity_Movement_StevenWalkToCaveOfOrigin @@ -1287,8 +1226,7 @@ SootopolisCity_EventScript_Boy2:: lockall applymovement LOCALID_BOY_2, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_Boy2Rayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Boy2Rayquaza msgbox SootopolisCity_Text_TwoPokemonArentAngry, MSGBOX_DEFAULT closemessage applymovement LOCALID_BOY_2, Common_Movement_FaceOriginalDirection @@ -1304,8 +1242,7 @@ SootopolisCity_EventScript_Boy2Rayquaza:: SootopolisCity_EventScript_BlackBelt:: lockall - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_BlackBeltRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_BlackBeltRayquaza msgbox SootopolisCity_Text_GoRedAndBlueMon, MSGBOX_DEFAULT closemessage applymovement LOCALID_BLACK_BELT, Common_Movement_FacePlayer @@ -1328,8 +1265,7 @@ SootopolisCity_EventScript_Girl:: lockall applymovement LOCALID_GIRL, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_GirlRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_GirlRayquaza msgbox SootopolisCity_Text_SootopolisWillBeWrecked, MSGBOX_DEFAULT closemessage applymovement LOCALID_GIRL, Common_Movement_FaceOriginalDirection @@ -1347,8 +1283,7 @@ SootopolisCity_EventScript_Maniac:: lockall applymovement LOCALID_MANIAC, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_ManiacRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_ManiacRayquaza msgbox SootopolisCity_Text_SeeingLegendWithOwnEyes, MSGBOX_DEFAULT closemessage applymovement LOCALID_MANIAC, Common_Movement_FaceOriginalDirection @@ -1364,8 +1299,7 @@ SootopolisCity_EventScript_ManiacRayquaza:: SootopolisCity_EventScript_Wallace:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - goto_if_eq SootopolisCity_EventScript_GoToSkyPillar + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_GoToSkyPillar goto_if_set FLAG_RECEIVED_HM07, SootopolisCity_EventScript_GoToGym goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, SootopolisCity_EventScript_GiveWaterfall msgbox SootopolisCity_Text_AquaMagmaDidntMeanHarm, MSGBOX_DEFAULT @@ -1378,12 +1312,9 @@ SootopolisCity_EventScript_GiveWaterfall:: setflag FLAG_RECEIVED_HM07 msgbox SootopolisCity_Text_ExplainWaterfallGoToGym, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq SootopolisCity_EventScript_WallaceMoveFromGym - compare VAR_FACING, DIR_EAST - call_if_eq SootopolisCity_EventScript_WallaceMoveFromGym - compare VAR_FACING, DIR_WEST - call_if_eq SootopolisCity_EventScript_WallaceMoveFromGymWest + call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_EventScript_WallaceMoveFromGym + call_if_eq VAR_FACING, DIR_EAST, SootopolisCity_EventScript_WallaceMoveFromGym + call_if_eq VAR_FACING, DIR_WEST, SootopolisCity_EventScript_WallaceMoveFromGymWest release end @@ -1423,8 +1354,7 @@ SootopolisCity_Movement_WallaceMoveFromGymWest: SootopolisCity_EventScript_Maxie:: lockall - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_MaxieRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_MaxieRayquaza msgbox SootopolisCity_Text_GroudonPleaseStop, MSGBOX_DEFAULT closemessage releaseall @@ -1439,8 +1369,7 @@ SootopolisCity_EventScript_MaxieRayquaza:: SootopolisCity_EventScript_Archie:: lockall - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_ArchieRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_ArchieRayquaza msgbox SootopolisCity_Text_KyogreCalmDown, MSGBOX_DEFAULT closemessage releaseall diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc index 4a21dcdcd..7f739935b 100644 --- a/data/maps/SootopolisCity_Gym_1F/scripts.inc +++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc @@ -19,12 +19,9 @@ SootopolisCity_Gym_1F_OnLoad: end SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles:: - compare VAR_ICE_STEP_COUNT, 8 - goto_if_lt SootopolisCity_Gym_1F_EventScript_StopCheckingStairs @ All stairs ice - compare VAR_ICE_STEP_COUNT, 28 - goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstStairs - compare VAR_ICE_STEP_COUNT, 67 - goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs + goto_if_lt VAR_ICE_STEP_COUNT, 8, SootopolisCity_Gym_1F_EventScript_StopCheckingStairs @ All stairs ice + goto_if_lt VAR_ICE_STEP_COUNT, 28, SootopolisCity_Gym_1F_EventScript_OpenFirstStairs + goto_if_lt VAR_ICE_STEP_COUNT, 67, SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs setmetatile 8, 4, METATILE_SootopolisGym_Stairs, FALSE setmetatile 8, 5, METATILE_SootopolisGym_Stairs, FALSE SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs:: @@ -85,8 +82,7 @@ SootopolisCity_Gym_1F_Movement_FallThroughIce: SootopolisCity_Gym_1F_EventScript_Juan:: trainerbattle_single TRAINER_JUAN_1, SootopolisCity_Gym_1F_Text_JuanIntro, SootopolisCity_Gym_1F_Text_JuanDefeat, SootopolisCity_Gym_1F_EventScript_JuanDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SootopolisCity_Gym_1F_EventScript_JuanRematch + goto_if_eq VAR_RESULT, TRUE, SootopolisCity_Gym_1F_EventScript_JuanRematch goto_if_unset FLAG_RECEIVED_TM03, SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2 goto_if_unset FLAG_BADGE06_GET, SootopolisCity_Gym_1F_EventScript_GoGetFortreeBadge msgbox SootopolisCity_Gym_1F_Text_JuanPostBattle, MSGBOX_DEFAULT @@ -121,16 +117,14 @@ SootopolisCity_Gym_1F_EventScript_JuanDefeated:: SootopolisCity_Gym_1F_EventScript_GiveWaterPulse:: giveitem ITEM_TM03 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM03 return SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2:: giveitem ITEM_TM03 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM03 release diff --git a/data/maps/SootopolisCity_House1/scripts.inc b/data/maps/SootopolisCity_House1/scripts.inc index 65df8587f..40f22a9c1 100644 --- a/data/maps/SootopolisCity_House1/scripts.inc +++ b/data/maps/SootopolisCity_House1/scripts.inc @@ -7,8 +7,7 @@ SootopolisCity_House1_EventScript_BrickBreakBlackBelt:: goto_if_set FLAG_RECEIVED_TM31, SootopolisCity_House1_EventScript_ReceivedBrickBreak msgbox SootopolisCity_House1_Text_DevelopedThisTM, MSGBOX_DEFAULT giveitem ITEM_TM31 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM31 msgbox SootopolisCity_House1_Text_ExplainBrickBreak, MSGBOX_DEFAULT release diff --git a/data/maps/SootopolisCity_House2/scripts.inc b/data/maps/SootopolisCity_House2/scripts.inc index a9c2ed255..68cf96a90 100644 --- a/data/maps/SootopolisCity_House2/scripts.inc +++ b/data/maps/SootopolisCity_House2/scripts.inc @@ -5,10 +5,8 @@ SootopolisCity_House2_EventScript_ExpertF:: lock faceplayer msgbox SootopolisCity_House2_Text_DidYouKnowAboutMtPyreOrbs, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq SootopolisCity_House2_EventScript_KnowAboutOrbs - compare VAR_RESULT, NO - call_if_eq SootopolisCity_House2_EventScript_DontKnowAboutOrbs + call_if_eq VAR_RESULT, YES, SootopolisCity_House2_EventScript_KnowAboutOrbs + call_if_eq VAR_RESULT, NO, SootopolisCity_House2_EventScript_DontKnowAboutOrbs release end diff --git a/data/maps/SootopolisCity_House3/scripts.inc b/data/maps/SootopolisCity_House3/scripts.inc index 02546968b..621738c4f 100644 --- a/data/maps/SootopolisCity_House3/scripts.inc +++ b/data/maps/SootopolisCity_House3/scripts.inc @@ -5,8 +5,7 @@ SootopolisCity_House3_EventScript_Woman:: lock faceplayer msgbox SootopolisCity_House3_Text_JuanHasManyFansDoYou, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SootopolisCity_House3_EventScript_HaveFans + goto_if_eq VAR_RESULT, YES, SootopolisCity_House3_EventScript_HaveFans msgbox SootopolisCity_House3_Text_LonesomeTryWorkingHarder, MSGBOX_DEFAULT release end diff --git a/data/maps/SootopolisCity_House6/scripts.inc b/data/maps/SootopolisCity_House6/scripts.inc index fd570fc68..35f7acc7b 100644 --- a/data/maps/SootopolisCity_House6/scripts.inc +++ b/data/maps/SootopolisCity_House6/scripts.inc @@ -6,12 +6,10 @@ SootopolisCity_House6_EventScript_Woman:: faceplayer goto_if_set FLAG_RECEIVED_WAILMER_DOLL, SootopolisCity_House6_EventScript_ReceivedWailmerDoll msgbox SootopolisCity_House6_Text_FirstGuestInWhileTakeDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - call_if_eq SootopolisCity_House6_EventScript_DeclineWailmerDoll + call_if_eq VAR_RESULT, NO, SootopolisCity_House6_EventScript_DeclineWailmerDoll msgbox SootopolisCity_House6_Text_TakeGoodCareOfIt, MSGBOX_DEFAULT givedecoration DECOR_WAILMER_DOLL - compare VAR_RESULT, FALSE - goto_if_eq SootopolisCity_House6_EventScript_NoRoomForWailmerDoll + goto_if_eq VAR_RESULT, FALSE, SootopolisCity_House6_EventScript_NoRoomForWailmerDoll setflag FLAG_RECEIVED_WAILMER_DOLL release end diff --git a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc index 5620bb3e4..52bdf3ace 100644 --- a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc +++ b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc @@ -9,15 +9,11 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SeedotBrother:: special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 - compare VAR_RESULT, PARTY_NOTHING_CHOSEN - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot + goto_if_eq VAR_RESULT, PARTY_NOTHING_CHOSEN, SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot special CompareSeedotSize - compare VAR_RESULT, 1 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_NotSeedot - compare VAR_RESULT, 2 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_SmallSeedot - compare VAR_RESULT, 3 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_BigSeedot + goto_if_eq VAR_RESULT, 1, SootopolisCity_LotadAndSeedotHouse_EventScript_NotSeedot + goto_if_eq VAR_RESULT, 2, SootopolisCity_LotadAndSeedotHouse_EventScript_SmallSeedot + goto_if_eq VAR_RESULT, 3, SootopolisCity_LotadAndSeedotHouse_EventScript_BigSeedot release end @@ -39,8 +35,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SmallSeedot:: SootopolisCity_LotadAndSeedotHouse_EventScript_BigSeedot:: msgbox SootopolisCity_LotadAndSeedotHouse_Text_GoshMightBeBiggerThanLotad, MSGBOX_DEFAULT giveitem ITEM_ELIXIR - compare VAR_RESULT, FALSE - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_NoRoomForElixir1 + goto_if_eq VAR_RESULT, FALSE, SootopolisCity_LotadAndSeedotHouse_EventScript_NoRoomForElixir1 closemessage release end @@ -58,15 +53,11 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_LotadBrother:: special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 - compare VAR_RESULT, PARTY_NOTHING_CHOSEN - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad + goto_if_eq VAR_RESULT, PARTY_NOTHING_CHOSEN, SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad special CompareLotadSize - compare VAR_RESULT, 1 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_NotLotad - compare VAR_RESULT, 2 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_SmallLotad - compare VAR_RESULT, 3 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_BigLotad + goto_if_eq VAR_RESULT, 1, SootopolisCity_LotadAndSeedotHouse_EventScript_NotLotad + goto_if_eq VAR_RESULT, 2, SootopolisCity_LotadAndSeedotHouse_EventScript_SmallLotad + goto_if_eq VAR_RESULT, 3, SootopolisCity_LotadAndSeedotHouse_EventScript_BigLotad release end @@ -88,8 +79,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SmallLotad:: SootopolisCity_LotadAndSeedotHouse_EventScript_BigLotad:: msgbox SootopolisCity_LotadAndSeedotHouse_Text_WowMightBeBiggerThanSeedot, MSGBOX_DEFAULT giveitem ITEM_ELIXIR - compare VAR_RESULT, FALSE - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_NoRoomForElixir2 + goto_if_eq VAR_RESULT, FALSE, SootopolisCity_LotadAndSeedotHouse_EventScript_NoRoomForElixir2 closemessage release end diff --git a/data/maps/SootopolisCity_Mart/scripts.inc b/data/maps/SootopolisCity_Mart/scripts.inc index 0975abd2b..3cade5fbc 100644 --- a/data/maps/SootopolisCity_Mart/scripts.inc +++ b/data/maps/SootopolisCity_Mart/scripts.inc @@ -29,8 +29,7 @@ SootopolisCity_Mart_Pokemart: SootopolisCity_Mart_EventScript_FatMan:: lock faceplayer - compare VAR_SKY_PILLAR_STATE, 2 - goto_if_ge SootopolisCity_Mart_EventScript_FatManNoLegendaries + goto_if_ge VAR_SKY_PILLAR_STATE, 2, SootopolisCity_Mart_EventScript_FatManNoLegendaries goto_if_unset FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_Mart_EventScript_FatManNoLegendaries msgbox SootopolisCity_Mart_Text_TooScaryOutside, MSGBOX_DEFAULT release @@ -44,8 +43,7 @@ SootopolisCity_Mart_EventScript_FatManNoLegendaries:: SootopolisCity_Mart_EventScript_Gentleman:: lock faceplayer - compare VAR_SKY_PILLAR_STATE, 2 - goto_if_ge SootopolisCity_Mart_EventScript_GentlemanNoLegendaries + goto_if_ge VAR_SKY_PILLAR_STATE, 2, SootopolisCity_Mart_EventScript_GentlemanNoLegendaries goto_if_unset FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_Mart_EventScript_GentlemanNoLegendaries msgbox SootopolisCity_Mart_Text_DidSomethingAwaken, MSGBOX_DEFAULT release diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc index 70dbc98aa..374adbfc6 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc @@ -7,10 +7,8 @@ SootopolisCity_MysteryEventsHouse_1F_MapScripts:: SootopolisCity_MysteryEventsHouse_1F_OnTransition: frontier_checkvisittrainer - compare VAR_RESULT, 0 - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout - compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0 - call_if_ne SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor + call_if_eq VAR_RESULT, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout + call_if_ne VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor end SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout:: @@ -40,12 +38,9 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle:: copyobjectxytoperm LOCALID_OLD_MAN applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 - compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1 - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment - compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2 - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment - compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3 - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleTiedComment + call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment + call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment + call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleTiedComment special LoadPlayerParty setvar VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0 releaseall @@ -76,10 +71,8 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_OldMan:: lock faceplayer frontier_checkvisittrainer - compare VAR_RESULT, 1 - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_InvalidVisitingTrainer - compare VAR_TEMP_1, 1 - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting + goto_if_eq VAR_RESULT, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_InvalidVisitingTrainer + goto_if_eq VAR_TEMP_1, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting msgbox SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles, MSGBOX_DEFAULT release end @@ -93,28 +86,21 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting:: special SavePlayerParty special BufferEReaderTrainerName msgbox SootopolisCity_MysteryEventsHouse_1F_Text_ChallengeVisitingTrainer, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle call SootopolisCity_MysteryEventsHouse_1F_EventScript_ChooseParty - compare VAR_RESULT, 0 - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle msgbox SootopolisCity_MysteryEventsHouse_1F_Text_SaveProgressBeforeBattle, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle special LoadPlayerParty call Common_EventScript_SaveGame - compare VAR_RESULT, FALSE - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, FALSE, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle special SavePlayerParty special ReducePlayerPartyToSelectedMons msgbox SootopolisCity_MysteryEventsHouse_1F_Text_HopeToSeeGoodMatch, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth - compare VAR_FACING, DIR_EAST - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast - compare VAR_FACING, DIR_WEST - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest + call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth + call_if_eq VAR_FACING, DIR_EAST, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast + call_if_eq VAR_FACING, DIR_WEST, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F, 3, 1 waitstate release diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc index 93f008925..533eb7cfa 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc @@ -22,12 +22,9 @@ SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleVisitingTrainer:: setvar VAR_0x8005, 0 special DoSpecialTrainerBattle waitstate - compare VAR_RESULT, B_OUTCOME_DREW - call_if_eq SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleTie - compare VAR_RESULT, B_OUTCOME_WON - call_if_eq SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleWon - compare VAR_RESULT, B_OUTCOME_LOST - call_if_eq SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleLost + call_if_eq VAR_RESULT, B_OUTCOME_DREW, SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleTie + call_if_eq VAR_RESULT, B_OUTCOME_WON, SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleWon + call_if_eq VAR_RESULT, B_OUTCOME_LOST, SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleLost closemessage special HealPlayerParty applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_B1F_Movement_PlayerExitBasement diff --git a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc index 9e017861b..e1e13b35c 100644 --- a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc @@ -20,8 +20,7 @@ SootopolisCity_PokemonCenter_1F_EventScript_Nurse:: SootopolisCity_PokemonCenter_1F_EventScript_Gentleman:: lock faceplayer - compare VAR_SKY_PILLAR_STATE, 2 - goto_if_ge SootopolisCity_PokemonCenter_1F_EventScript_GentlemanNoLegendaries + goto_if_ge VAR_SKY_PILLAR_STATE, 2, SootopolisCity_PokemonCenter_1F_EventScript_GentlemanNoLegendaries goto_if_unset FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_PokemonCenter_1F_EventScript_GentlemanNoLegendaries msgbox SootopolisCity_PokemonCenter_1F_Text_EveryoneTakenRefuge, MSGBOX_DEFAULT release @@ -35,8 +34,7 @@ SootopolisCity_PokemonCenter_1F_EventScript_GentlemanNoLegendaries:: SootopolisCity_PokemonCenter_1F_EventScript_Woman:: lock faceplayer - compare VAR_SKY_PILLAR_STATE, 2 - goto_if_ge SootopolisCity_PokemonCenter_1F_EventScript_WomanNoLegendaries + goto_if_ge VAR_SKY_PILLAR_STATE, 2, SootopolisCity_PokemonCenter_1F_EventScript_WomanNoLegendaries goto_if_unset FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_PokemonCenter_1F_EventScript_WomanNoLegendaries msgbox SootopolisCity_PokemonCenter_1F_Text_ArentPokemonOurFriends, MSGBOX_DEFAULT release diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc index e40c7819e..b393413fe 100644 --- a/data/maps/SouthernIsland_Exterior/scripts.inc +++ b/data/maps/SouthernIsland_Exterior/scripts.inc @@ -13,8 +13,7 @@ SouthernIsland_Exterior_EventScript_Sailor:: lock faceplayer msgbox EventTicket_Text_SouthernIslandSailBack, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SouthernIsland_Exterior_EventScript_AsYouLike + goto_if_eq VAR_RESULT, NO, SouthernIsland_Exterior_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index 4ce90e249..c46cefefc 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -11,16 +11,13 @@ SouthernIsland_Interior_OnResume: SouthernIsland_Interior_EventScript_TryRemoveLati:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_LATI return SouthernIsland_Interior_OnTransition: - compare VAR_ROAMER_POKEMON, 0 - call_if_eq SouthernIsland_Interior_EventScript_SetUpLatios - compare VAR_ROAMER_POKEMON, 0 - call_if_ne SouthernIsland_Interior_EventScript_SetUpLatias + call_if_eq VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetUpLatios + call_if_ne VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetUpLatias call SouthernIsland_Interior_EventScript_SetUpPlayerGfx end @@ -36,10 +33,8 @@ SouthernIsland_Interior_EventScript_SetUpLatias:: SouthernIsland_Interior_EventScript_SetUpPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq SouthernIsland_Interior_EventScript_SetBrendanGfx - compare VAR_RESULT, FEMALE - goto_if_eq SouthernIsland_Interior_EventScript_SetMayGfx + goto_if_eq VAR_RESULT, MALE, SouthernIsland_Interior_EventScript_SetBrendanGfx + goto_if_eq VAR_RESULT, FEMALE, SouthernIsland_Interior_EventScript_SetMayGfx end SouthernIsland_Interior_EventScript_SetBrendanGfx:: @@ -79,21 +74,16 @@ SouthernIsland_Interior_EventScript_Lati:: delay 50 special RemoveCameraObject setvar VAR_LAST_TALKED, LOCALID_LATI - compare VAR_ROAMER_POKEMON, 0 - call_if_eq SouthernIsland_Interior_EventScript_SetLatiosBattleVars - compare VAR_ROAMER_POKEMON, 0 - call_if_ne SouthernIsland_Interior_EventScript_SetLatiasBattleVars + call_if_eq VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetLatiosBattleVars + call_if_ne VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetLatiasBattleVars setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLatiBattle waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq SouthernIsland_Interior_EventScript_LatiDefeated - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati + goto_if_eq VAR_RESULT, B_OUTCOME_WON, SouthernIsland_Interior_EventScript_LatiDefeated + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, SouthernIsland_Interior_EventScript_RanFromLati + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, SouthernIsland_Interior_EventScript_RanFromLati setflag FLAG_CAUGHT_LATIAS_OR_LATIOS releaseall end diff --git a/data/maps/TerraCave_End/scripts.inc b/data/maps/TerraCave_End/scripts.inc index 0036f33b5..5f0051bec 100644 --- a/data/maps/TerraCave_End/scripts.inc +++ b/data/maps/TerraCave_End/scripts.inc @@ -11,8 +11,7 @@ TerraCave_End_OnResume: TerraCave_End_EventScript_TryRemoveGroudon:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_GROUDON return @@ -43,12 +42,9 @@ TerraCave_End_EventScript_Groudon:: clearflag FLAG_SYS_CTRL_OBJ_DELETE setvar VAR_TEMP_1, 0 specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq TerraCave_End_EventScript_DefeatedGroudon - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq TerraCave_End_EventScript_RanFromGroudon - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq TerraCave_End_EventScript_RanFromGroudon + goto_if_eq VAR_RESULT, B_OUTCOME_WON, TerraCave_End_EventScript_DefeatedGroudon + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, TerraCave_End_EventScript_RanFromGroudon + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, TerraCave_End_EventScript_RanFromGroudon setvar VAR_SHOULD_END_ABNORMAL_WEATHER, 1 setflag FLAG_DEFEATED_GROUDON releaseall diff --git a/data/maps/TrainerHill_Elevator/scripts.inc b/data/maps/TrainerHill_Elevator/scripts.inc index 05878fe85..bec1ffbff 100644 --- a/data/maps/TrainerHill_Elevator/scripts.inc +++ b/data/maps/TrainerHill_Elevator/scripts.inc @@ -26,8 +26,7 @@ TrainerHill_Elevator_EventScript_EnterElevator:: waitmovement 0 lockall msgbox TrainerHill_Elevator_Text_ReturnToReception, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq TrainerHill_Elevator_EventScript_ExitToRoof + goto_if_eq VAR_RESULT, NO, TrainerHill_Elevator_EventScript_ExitToRoof releaseall applymovement LOCALID_ATTENDANT, TrainerHill_Elevator_Movement_AttendantFaceDown waitmovement 0 diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc index 4c76ccb52..8989883e4 100644 --- a/data/maps/TrainerHill_Entrance/scripts.inc +++ b/data/maps/TrainerHill_Entrance/scripts.inc @@ -24,16 +24,14 @@ TrainerHill_Entrance_OnResume: trainerhill_resumetimer setvar VAR_TEMP_0, 0 trainerhill_getusingereader - compare VAR_RESULT, FALSE @ VAR_RESULT always FALSE here - goto_if_eq TrainerHill_Entrance_EventScript_TryFaceAttendant + goto_if_eq VAR_RESULT, FALSE, TrainerHill_Entrance_EventScript_TryFaceAttendant @ VAR_RESULT always FALSE here setobjectxy OBJ_EVENT_ID_PLAYER, 9, 6 applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant end TrainerHill_Entrance_EventScript_TryFaceAttendant:: trainerhill_getwon - compare VAR_RESULT, TRUE - goto_if_eq TrainerHill_Entrance_EventScript_PlayerDontFaceAttendant + goto_if_eq VAR_RESULT, TRUE, TrainerHill_Entrance_EventScript_PlayerDontFaceAttendant applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant end @@ -48,8 +46,7 @@ TrainerHill_Entrance_OnReturn: end TrainerHill_Entrance_OnLoad: - compare VAR_TEMP_D, 17 - call_if_eq TrainerHill_Entrance_EventScript_OpenCounterDoor + call_if_eq VAR_TEMP_D, 17, TrainerHill_Entrance_EventScript_OpenCounterDoor end TrainerHill_Entrance_EventScript_OpenCounterDoor:: @@ -115,8 +112,7 @@ TrainerHill_Entrance_EventScript_Attendant:: lock faceplayer trainerhill_inchallenge - compare VAR_RESULT, FALSE - goto_if_eq TrainerHill_Entrance_EventScript_ThanksForPlaying + goto_if_eq VAR_RESULT, FALSE, TrainerHill_Entrance_EventScript_ThanksForPlaying msgbox TrainerHill_Entrance_Text_HopeYouGiveItYourBest, MSGBOX_DEFAULT goto TrainerHill_Entrance_EventScript_AttendantEnd @@ -132,11 +128,9 @@ TrainerHill_Entrance_EventScript_EntryTrigger:: goto_if_unset FLAG_SYS_GAME_CLEAR, TrainerHill_Entrance_EventScript_Closed msgbox TrainerHill_Entrance_Text_WelcomeToTrainerHill, MSGBOX_DEFAULT trainerhill_getsaved - compare VAR_RESULT, FALSE - call_if_eq TrainerHill_Entrance_EventScript_SaveGame + call_if_eq VAR_RESULT, FALSE, TrainerHill_Entrance_EventScript_SaveGame trainerhill_allfloorsused - compare VAR_RESULT, TRUE - goto_if_eq TrainerHill_Entrance_EventScript_AllFloorsUsed + goto_if_eq VAR_RESULT, TRUE, TrainerHill_Entrance_EventScript_AllFloorsUsed msgbox TrainerHill_Entrance_Text_TrainersUpToFloorX, MSGBOX_DEFAULT goto TrainerHill_Entrance_EventScript_AskChallengeTrainers @@ -186,8 +180,7 @@ TrainerHill_Entrance_EventScript_SaveGame:: trainerhill_setsaved setvar VAR_TEMP_5, 1 call Common_EventScript_SaveGame - compare VAR_RESULT, FALSE - goto_if_eq TrainerHill_Entrance_EventScript_SaveFailed + goto_if_eq VAR_RESULT, FALSE, TrainerHill_Entrance_EventScript_SaveFailed trainerhill_setsaved return diff --git a/data/maps/Underwater_SealedChamber/scripts.inc b/data/maps/Underwater_SealedChamber/scripts.inc index f670cce0b..f4f8d8ccb 100644 --- a/data/maps/Underwater_SealedChamber/scripts.inc +++ b/data/maps/Underwater_SealedChamber/scripts.inc @@ -4,10 +4,8 @@ Underwater_SealedChamber_MapScripts:: Underwater_SealedChamber_OnDive: getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 12 - goto_if_ne Underwater_SealedChamber_EventScript_SurfaceRoute134 - compare VAR_0x8005, 44 - goto_if_ne Underwater_SealedChamber_EventScript_SurfaceRoute134 + goto_if_ne VAR_0x8004, 12, Underwater_SealedChamber_EventScript_SurfaceRoute134 + goto_if_ne VAR_0x8005, 44, Underwater_SealedChamber_EventScript_SurfaceRoute134 goto Underwater_SealedChamber_EventScript_SurfaceSealedChamber Underwater_SealedChamber_EventScript_SurfaceRoute134:: diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index badbe1849..29008b7c0 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -18,10 +18,8 @@ VerdanturfTown_BattleTentBattleRoom_OnTransition: VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale return VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: @@ -43,8 +41,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_ne VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge + goto_if_ne VAR_RESULT, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: tower_setopponent addobject LOCALID_OPPONENT @@ -84,10 +81,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge:: frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 1, VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, TRUE switch VAR_RESULT case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index 4f863f171..a78a6a78e 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc @@ -107,8 +107,7 @@ VerdanturfTown_BattleTentLobby_EventScript_Attendant:: lock faceplayer verdanturftent_getprize - compare VAR_RESULT, ITEM_NONE - goto_if_ne VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting + goto_if_ne VAR_RESULT, ITEM_NONE, VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting special SavePlayerParty msgbox VerdanturfTown_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT VerdanturfTown_BattleTentLobby_EventScript_AskEnterChallenge:: @@ -126,8 +125,7 @@ VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge:: setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES setvar VAR_RESULT, 2 frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT msgbox VerdanturfTown_BattleTentLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -135,8 +133,7 @@ VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge msgbox VerdanturfTown_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge @@ -154,8 +151,7 @@ VerdanturfTown_BattleTentLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE @@ -232,8 +228,7 @@ VerdanturfTown_BattleTentLobby_EventScript_AttractGiver:: goto_if_set FLAG_RECEIVED_TM45, VerdanturfTown_BattleTentLobby_EventScript_ReceivedAttract msgbox VerdanturfTown_BattleTentLobby_Text_AttractionRunsDeep, MSGBOX_DEFAULT giveitem ITEM_TM45 - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM45 msgbox VerdanturfTown_BattleTentLobby_Text_AttractionMutual, MSGBOX_DEFAULT release diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc index e07da7e60..4bce6b4c1 100644 --- a/data/maps/VictoryRoad_1F/scripts.inc +++ b/data/maps/VictoryRoad_1F/scripts.inc @@ -5,10 +5,8 @@ VictoryRoad_1F_MapScripts:: .byte 0 VictoryRoad_1F_OnTransition: - compare VAR_VICTORY_ROAD_1F_STATE, 1 - call_if_eq VictoryRoad_1F_EventScript_SetEntranceWallyPos1 - compare VAR_VICTORY_ROAD_1F_STATE, 2 - call_if_eq VictoryRoad_1F_EventScript_SetEntranceWallyPos2 + call_if_eq VAR_VICTORY_ROAD_1F_STATE, 1, VictoryRoad_1F_EventScript_SetEntranceWallyPos1 + call_if_eq VAR_VICTORY_ROAD_1F_STATE, 2, VictoryRoad_1F_EventScript_SetEntranceWallyPos2 end VictoryRoad_1F_EventScript_SetEntranceWallyPos1:: @@ -88,8 +86,7 @@ VictoryRoad_1F_EventScript_EntranceWally:: VictoryRoad_1F_EventScript_ExitWally:: trainerbattle_single TRAINER_WALLY_VR_2, VictoryRoad_1F_Text_WallyIntro, VictoryRoad_1F_Text_WallyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq VictoryRoad_1F_EventScript_RematchWally + goto_if_eq VAR_RESULT, TRUE, VictoryRoad_1F_EventScript_RematchWally msgbox VictoryRoad_1F_Text_WallyPostBattle, MSGBOX_AUTOCLOSE end diff --git a/data/scripts/abnormal_weather.inc b/data/scripts/abnormal_weather.inc index c38982da8..c5b03a970 100644 --- a/data/scripts/abnormal_weather.inc +++ b/data/scripts/abnormal_weather.inc @@ -172,8 +172,7 @@ AbnormalWeather_StartGroudonWeather:: AbnormalWeather_EventScript_EndEventAndCleanup_1:: lockall - compare VAR_ABNORMAL_WEATHER_LOCATION, MARINE_CAVE_LOCATIONS_START - goto_if_ge AbnormalWeather_EventScript_ShowRainEndedMessage + goto_if_ge VAR_ABNORMAL_WEATHER_LOCATION, MARINE_CAVE_LOCATIONS_START, AbnormalWeather_EventScript_ShowRainEndedMessage goto AbnormalWeather_EventScript_ShowSunEndedMessage end diff --git a/data/scripts/apprentice.inc b/data/scripts/apprentice.inc index 2a6772a5d..ea8345a9e 100644 --- a/data/scripts/apprentice.inc +++ b/data/scripts/apprentice.inc @@ -4,24 +4,17 @@ BattleFrontier_BattleTowerLobby_EventScript_Apprentice:: lock faceplayer apprentice_gavelvlmode - compare VAR_RESULT, FALSE - goto_if_eq Apprentice_EventScript_FirstMeeting + goto_if_eq VAR_RESULT, FALSE, Apprentice_EventScript_FirstMeeting apprentice_shouldcheckgone - compare VAR_0x8004, FALSE @ Always TRUE here - goto_if_eq Apprentice_EventScript_AskQuestion + goto_if_eq VAR_0x8004, FALSE, Apprentice_EventScript_AskQuestion @ VAR_0x8004 always TRUE here goto_if_set FLAG_DAILY_APPRENTICE_LEAVES, Apprentice_EventScript_Gone Apprentice_EventScript_AskQuestion: apprentice_getquestion - compare VAR_RESULT, APPRENTICE_QUESTION_WHICH_MON - goto_if_eq Apprentice_EventScript_UseWhichMon - compare VAR_RESULT, APPRENTICE_QUESTION_WHAT_ITEM - goto_if_eq Apprentice_EventScript_UseWhatHeldItem - compare VAR_RESULT, APPRENTICE_QUESTION_WHICH_MOVE - goto_if_eq Apprentice_EventScript_UseWhichMove - compare VAR_RESULT, APPRENTICE_QUESTION_WHICH_FIRST - goto_if_eq Apprentice_EventScript_PutWhichMonFirst - compare VAR_RESULT, APPRENTICE_QUESTION_WIN_SPEECH - goto_if_eq Apprentice_EventScript_PickWinSpeech + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WHICH_MON, Apprentice_EventScript_UseWhichMon + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WHAT_ITEM, Apprentice_EventScript_UseWhatHeldItem + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WHICH_MOVE, Apprentice_EventScript_UseWhichMove + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WHICH_FIRST, Apprentice_EventScript_PutWhichMonFirst + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WIN_SPEECH, Apprentice_EventScript_PickWinSpeech release releaseall end @@ -31,8 +24,7 @@ Apprentice_EventScript_FirstMeeting: apprentice_msg FALSE, APPRENTICE_MSG_PLEASE_TEACH Apprentice_EventScript_WhichLvlMode: apprentice_menu APPRENTICE_ASK_YES_NO - compare VAR_RESULT, 1 - goto_if_eq Apprentice_EventScript_RejectTeach + goto_if_eq VAR_RESULT, 1, Apprentice_EventScript_RejectTeach apprentice_msg FALSE, APPRENTICE_MSG_WHICH_LVL_MODE apprentice_menu APPRENTICE_ASK_WHICH_LEVEL apprentice_setlvlmode VAR_RESULT @@ -59,16 +51,13 @@ Apprentice_EventScript_UseWhichMon: apprentice_msg FALSE, APPRENTICE_MSG_WHICH_MON apprentice_menu APPRENTICE_ASK_2SPECIES copyvar VAR_0x8005, VAR_RESULT - compare VAR_0x8005, 0 - call_if_eq Apprentice_EventScript_ChoseFirstMon - compare VAR_0x8005, 1 - call_if_eq Apprentice_EventScript_ChoseSecondMon + call_if_eq VAR_0x8005, 0, Apprentice_EventScript_ChoseFirstMon + call_if_eq VAR_0x8005, 1, Apprentice_EventScript_ChoseSecondMon apprentice_getnumpartymons apprentice_setpartymon VAR_RESULT apprentice_answeredquestion apprentice_getnumpartymons - compare VAR_RESULT, MULTI_PARTY_SIZE - call_if_eq Apprentice_EventScript_LastMonSelected + call_if_eq VAR_RESULT, MULTI_PARTY_SIZE, Apprentice_EventScript_LastMonSelected apprentice_buff 0, VAR_0x8007 apprentice_freequestion apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MON @@ -101,11 +90,9 @@ Apprentice_EventScript_ChooseHoldItem: fadescreen FADE_TO_BLACK setvar VAR_RESULT, 0 apprentice_openbag - compare VAR_RESULT, FALSE - goto_if_eq Apprentice_EventScript_ConfirmHoldNothing + goto_if_eq VAR_RESULT, FALSE, Apprentice_EventScript_ConfirmHoldNothing apprentice_trysetitem - compare VAR_RESULT, FALSE - goto_if_eq Apprentice_EventScript_AlreadySuggestedItem + goto_if_eq VAR_RESULT, FALSE, Apprentice_EventScript_AlreadySuggestedItem apprentice_buff 0, APPRENTICE_BUFF_ITEM apprentice_msg TRUE, APPRENTICE_MSG_THANKS_HELD_ITEM apprentice_answeredquestion @@ -123,8 +110,7 @@ Apprentice_EventScript_ConfirmHoldNothing: apprentice_msg FALSE, APPRENTICE_MSG_HOLD_NOTHING apprentice_menu APPRENTICE_ASK_GIVE apprentice_freequestion - compare VAR_RESULT, 0 - goto_if_eq Apprentice_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, 0, Apprentice_EventScript_ChooseHoldItem Apprentice_EventScript_HoldNothing: apprentice_msg TRUE, APPRENTICE_MSG_THANKS_NO_HELD_ITEM apprentice_answeredquestion @@ -145,8 +131,7 @@ Apprentice_EventScript_AlreadySuggestedItem: apprentice_msg FALSE, APPRENTICE_MSG_ITEM_ALREADY_SUGGESTED apprentice_menu APPRENTICE_ASK_GIVE apprentice_freequestion - compare VAR_RESULT, 0 - goto_if_eq Apprentice_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, 0, Apprentice_EventScript_ChooseHoldItem goto Apprentice_EventScript_HoldNothing end @@ -158,10 +143,8 @@ Apprentice_EventScript_UseWhichMove: apprentice_msg FALSE, APPRENTICE_MSG_WHICH_MOVE apprentice_menu APPRENTICE_ASK_MOVES copyvar VAR_0x8005, VAR_RESULT - compare VAR_0x8005, 0 - call_if_eq Apprentice_EventScript_ChoseMove1 - compare VAR_0x8005, 1 - call_if_eq Apprentice_EventScript_ChoseMove2 + call_if_eq VAR_0x8005, 0, Apprentice_EventScript_ChoseMove1 + call_if_eq VAR_0x8005, 1, Apprentice_EventScript_ChoseMove2 apprentice_setmove apprentice_answeredquestion apprentice_buff 0, VAR_0x8007 @@ -225,16 +208,14 @@ Apprentice_EventScript_SetHideFlags: Apprentice_EventScript_LeaveNorth: apprentice_shouldleave - compare VAR_0x8004, FALSE @ Always TRUE here - goto_if_eq Apprentice_EventScript_DontMove + goto_if_eq VAR_0x8004, FALSE, Apprentice_EventScript_DontMove @ VAR_0x8004 always TRUE here applymovement LOCALID_APPRENTICE, Apprentice_Movement_LeaveNorth waitmovement 0 end Apprentice_EventScript_Leave: apprentice_shouldleave - compare VAR_0x8004, FALSE @ Always TRUE here - goto_if_eq Apprentice_EventScript_DontMove + goto_if_eq VAR_0x8004, FALSE, Apprentice_EventScript_DontMove @ VAR_0x8004 always TRUE here applymovement LOCALID_APPRENTICE, Apprentice_Movement_Leave waitmovement 0 end diff --git a/data/scripts/battle_pike.inc b/data/scripts/battle_pike.inc index e11f99762..8ca7f5b1a 100644 --- a/data/scripts/battle_pike.inc +++ b/data/scripts/battle_pike.inc @@ -50,14 +50,10 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_InitRoomObjects:: setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_LINK_RECEPTIONIST setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_LINK_RECEPTIONIST pike_getroomtype - compare VAR_RESULT, PIKE_ROOM_STATUS - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom - compare VAR_RESULT, PIKE_ROOM_HARD_BATTLE - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom - compare VAR_RESULT, PIKE_ROOM_DOUBLE_BATTLE - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom - compare VAR_RESULT, PIKE_ROOM_BRAIN - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects + goto_if_eq VAR_RESULT, PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom + goto_if_eq VAR_RESULT, PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom + goto_if_eq VAR_RESULT, PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom + goto_if_eq VAR_RESULT, PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects hideobjectat LOCALID_OBJ_1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL setvar VAR_TEMP_4, 1 turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH @@ -154,10 +150,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack:: BattleFrontier_BattlePikeRoomNormal_EventScript_Exit:: pike_ispartyfullhealth - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing - compare VAR_RESULT, TRUE - call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_DisableHealing + call_if_ne VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_EnableHealing pike_get PIKE_DATA_WIN_STREAK addvar VAR_RESULT, 1 pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT @@ -165,10 +159,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_Exit:: addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT pike_isfinalroom - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom - compare VAR_RESULT, FALSE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom + call_if_eq VAR_RESULT, FALSE, BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom waitstate end @@ -197,10 +189,8 @@ BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom:: BattleFrontier_BattlePikeRoomWildMons_EventScript_Exit:: pike_exitwildmonroom pike_ispartyfullhealth - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing - compare VAR_RESULT, TRUE - call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_DisableHealing + call_if_ne VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_EnableHealing pike_get PIKE_DATA_WIN_STREAK addvar VAR_RESULT, 1 pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT @@ -208,10 +198,8 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_Exit:: addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT pike_isfinalroom - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom - compare VAR_RESULT, FALSE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom + call_if_eq VAR_RESULT, FALSE, BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom waitstate end @@ -237,10 +225,8 @@ BattleFrontier_BattlePike_EventScript_Retire:: BattleFrontier_BattlePikeRoom_OnResume: setorcopyvar VAR_0x8006, VAR_RESULT @ Save VAR_RESULT from being overwritten frontier_get FRONTIER_DATA_CHALLENGE_STATUS - compare VAR_RESULT, CHALLENGE_STATUS_PAUSED - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume - compare VAR_RESULT, CHALLENGE_STATUS_SAVING - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume + goto_if_eq VAR_RESULT, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume + goto_if_eq VAR_RESULT, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume call BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume:: setorcopyvar VAR_RESULT, VAR_0x8006 diff --git a/data/scripts/berry_blender.inc b/data/scripts/berry_blender.inc index 71f3a1276..f860ef066 100644 --- a/data/scripts/berry_blender.inc +++ b/data/scripts/berry_blender.inc @@ -249,8 +249,7 @@ BerryBlender_EventScript_BerryBlender1:: applymovement LOCALID_EXPERT_M, BerryBlender_Movement_BlendLeaderWalkInPlace waitmovement 0 msgbox BerryBlender_Text_WantToMakePokeblocks, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryUseBerryBlender1 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryUseBerryBlender1 goto BerryBlender_EventScript_DeclineBlender1 end @@ -280,8 +279,7 @@ BerryBlender_EventScript_Blender1GiveSpareBerry: BerryBlender_EventScript_UseBerryBlender1: msgbox BerryBlender_Text_KnowHowToMakePokeblocks, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_StartBlender1 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_StartBlender1 goto BerryBlender_EventScript_ExplainBlending1 end @@ -297,14 +295,11 @@ BerryBlender_EventScript_ExplainBlending1: BerryBlender_EventScript_TryUseBerryBlender1: checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender1NoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender1NoCase specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_Blender1CaseFull + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_Blender1CaseFull specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender1NoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender1NoBerries msgbox BerryBlender_Text_Excellent, MSGBOX_DEFAULT goto BerryBlender_EventScript_UseBerryBlender1 end @@ -334,8 +329,7 @@ BerryBlender_EventScript_BerryBlender2:: applymovement LOCALID_MAN, BerryBlender_Movement_BlendLeaderWalkInPlace waitmovement 0 msgbox BerryBlender_Text_WantToBlendPokeblocksWithUs, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryUseBerryBlender2 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryUseBerryBlender2 goto BerryBlender_EventScript_DeclineBlender2 end @@ -351,8 +345,7 @@ BerryBlender_EventScript_Blender2NoBerries: BerryBlender_EventScript_UseBerryBlender2: msgbox BerryBlender_Text_KnowHowToMakePokeblocks2, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_StartBlender2 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_StartBlender2 goto BerryBlender_EventScript_ExplainBlending2 end @@ -368,17 +361,13 @@ BerryBlender_EventScript_ExplainBlending2: BerryBlender_EventScript_TryUseBerryBlender2: specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender2NoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender2NoBerries checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender2NoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender2NoCase msgbox BerryBlender_Text_Okay, MSGBOX_DEFAULT specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_ne BerryBlender_EventScript_UseBerryBlender2 - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_Blender2CaseFull + goto_if_ne VAR_RESULT, 65535, BerryBlender_EventScript_UseBerryBlender2 + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_Blender2CaseFull end BerryBlender_EventScript_Blender2CaseFull: @@ -400,8 +389,7 @@ BerryBlender_EventScript_BerryBlender3:: applymovement VAR_0x8008, BerryBlender_Movement_BlendLeaderWalkInPlace waitmovement 0 msgbox BerryBlender_Text_LookGoodAtBlendingJoinUs, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryUseBlender3 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryUseBlender3 goto BerryBlender_EventScript_DeclineBlender3 end @@ -417,8 +405,7 @@ BerryBlender_EventScript_Blender3NoBerries: BerryBlender_EventScript_UseBerryBlender3: msgbox BerryBlender_Text_KnowHowToMakePokeblocks3, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_StartBlender3 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_StartBlender3 goto BerryBlender_EventScript_ExplainBlending3 end @@ -434,17 +421,13 @@ BerryBlender_EventScript_ExplainBlending3: BerryBlender_EventScript_TryUseBlender3: specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender3NoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender3NoBerries checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender3NoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender3NoCase msgbox BerryBlender_Text_OhDear, MSGBOX_DEFAULT specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_ne BerryBlender_EventScript_UseBerryBlender3 - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_Blender3CaseFull + goto_if_ne VAR_RESULT, 65535, BerryBlender_EventScript_UseBerryBlender3 + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_Blender3CaseFull end BerryBlender_EventScript_Blender3CaseFull: @@ -461,8 +444,7 @@ BerryBlender_EventScript_BlendMasterPresent: lockall setvar NUM_OPPONENTS, 1 msgbox BerryBlender_Text_SeeMyMasteryInAction, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryBlendWithBlendMaster + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryBlendWithBlendMaster msgbox BerryBlender_Text_TooBusyNowIsee, MSGBOX_DEFAULT releaseall end @@ -474,22 +456,17 @@ BerryBlender_EventScript_BlendMasterNoBerries: BerryBlender_EventScript_TryBlendWithBlendMaster: checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_BlendMasterNoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_BlendMasterNoCase specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_BlendMasterNoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_BlendMasterNoBerries specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_ne BerryBlender_EventScript_BlendWithBlendMaster - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_BlendMasterCaseFull + goto_if_ne VAR_RESULT, 65535, BerryBlender_EventScript_BlendWithBlendMaster + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_BlendMasterCaseFull end BerryBlender_EventScript_BlendWithBlendMaster: msgbox BerryBlender_Text_BlendMasterKnowHowToMakePokeblocks, MSGBOX_YESNO - compare VAR_RESULT, NO - call_if_eq BerryBlender_EventScript_BlendMasterExplainBlending + call_if_eq VAR_RESULT, NO, BerryBlender_EventScript_BlendMasterExplainBlending msgbox BerryBlender_Text_BlendMasterLetsBerryBlender, MSGBOX_DEFAULT goto BerryBlender_EventScript_DoBerryBlending end @@ -530,10 +507,8 @@ BerryBlender_EventScript_ExpertMCheckGiveBerry: faceplayer msgbox BerryBlender_Text_LoveMakingPokeblocks, MSGBOX_DEFAULT specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, TRUE - goto_if_eq BerryBlender_EventScript_ExpertMPlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_ExpertMNoBerries + goto_if_eq VAR_RESULT, TRUE, BerryBlender_EventScript_ExpertMPlayerHasBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_ExpertMNoBerries end BerryBlender_EventScript_ExpertMPlayerHasBerries: @@ -543,11 +518,9 @@ BerryBlender_EventScript_ExpertMPlayerHasBerries: BerryBlender_EventScript_ExpertMNoBerries: checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_ExpertMNoSpareBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_ExpertMNoSpareBerries specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_ExpertMNoSpareBerries + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_ExpertMNoSpareBerries dotimebasedevents goto_if_set FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY, BerryBlender_EventScript_ExpertMNoSpareBerries goto BerryBlender_EventScript_ExpertMGiveBerry @@ -573,24 +546,18 @@ BerryBlender_Movement_BlendLeaderWalkInPlace: BerryBlender_EventScript_BerryBlenderLink:: lockall specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_LinkBlenderNoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_LinkBlenderNoBerries checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_LinkBlenderNoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_LinkBlenderNoCase specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_ne BerryBlender_EventScript_LinkBlenderSaveGame - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_LinkBlenderCaseFull + goto_if_ne VAR_RESULT, 65535, BerryBlender_EventScript_LinkBlenderSaveGame + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_LinkBlenderCaseFull end BerryBlender_EventScript_LinkBlenderSaveGame: msgbox BerryBlender_Text_SaveGameBeforeBerryBlenderLink, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryDoLinkBlender - compare VAR_RESULT, NO - goto_if_eq BerryBlender_EventScript_CancelLinkBlender + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryDoLinkBlender + goto_if_eq VAR_RESULT, NO, BerryBlender_EventScript_CancelLinkBlender end BerryBlender_EventScript_LinkBlenderNoBerries: @@ -600,25 +567,18 @@ BerryBlender_EventScript_LinkBlenderNoBerries: BerryBlender_EventScript_TryDoLinkBlender: call Common_EventScript_SaveGame - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_CancelLinkBlender + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_CancelLinkBlender specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, TRUE - goto_if_eq BerryBlender_EventScript_StartDecideLinkLeader + goto_if_eq VAR_RESULT, TRUE, BerryBlender_EventScript_StartDecideLinkLeader message BerryBlender_Text_SearchingForFriends waitmessage special TryBerryBlenderLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BerryBlender_EventScript_SpawnLinkPartners - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq BerryBlender_EventScript_CloseLinkNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq BerryBlender_EventScript_CloseLinkDifferentSelections - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BerryBlender_EventScript_CloseLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq BerryBlender_EventScript_LinkError + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BerryBlender_EventScript_SpawnLinkPartners + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, BerryBlender_EventScript_CloseLinkNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, BerryBlender_EventScript_CloseLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_FAILED, BerryBlender_EventScript_CloseLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, BerryBlender_EventScript_LinkError end BerryBlender_EventScript_TwoPlayerLink: @@ -721,23 +681,17 @@ BerryBlender_EventScript_DecideLinkLeader: BerryBlender_EventScript_TryLeadGroup: call BerryBlender_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BerryBlender_EventScript_LinkLeaderDecided - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BerryBlender_EventScript_DecideLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq BerryBlender_EventScript_TryLeadGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BerryBlender_EventScript_LinkLeaderDecided + goto_if_eq VAR_RESULT, LINKUP_FAILED, BerryBlender_EventScript_DecideLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, BerryBlender_EventScript_TryLeadGroup release end BerryBlender_EventScript_TryJoinGroup: call BerryBlender_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BerryBlender_EventScript_LinkLeaderDecided - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BerryBlender_EventScript_DecideLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq BerryBlender_EventScript_TryJoinGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BerryBlender_EventScript_LinkLeaderDecided + goto_if_eq VAR_RESULT, LINKUP_FAILED, BerryBlender_EventScript_DecideLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, BerryBlender_EventScript_TryJoinGroup release end diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc index a1f743681..8ad300df5 100644 --- a/data/scripts/berry_tree.inc +++ b/data/scripts/berry_tree.inc @@ -22,8 +22,7 @@ BerryTree_EventScript_CheckSoil:: lock faceplayer specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, TRUE - goto_if_eq BerryTree_EventScript_WantToPlant + goto_if_eq VAR_RESULT, TRUE, BerryTree_EventScript_WantToPlant message BerryTree_Text_ItsSoftLoamySoil waitmessage waitbuttonpress @@ -32,10 +31,8 @@ BerryTree_EventScript_CheckSoil:: BerryTree_EventScript_WantToPlant:: msgbox BerryTree_Text_WantToPlant, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryTree_EventScript_ChooseBerryToPlant - compare VAR_RESULT, NO - goto_if_eq BerryTree_EventScript_CancelPlanting + goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_ChooseBerryToPlant + goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_CancelPlanting end BerryTree_EventScript_ChooseBerryToPlant:: @@ -43,8 +40,7 @@ BerryTree_EventScript_ChooseBerryToPlant:: closemessage special Bag_ChooseBerry waitstate - compare VAR_ITEM_ID, 0 - goto_if_eq BerryTree_EventScript_CancelPlanting + goto_if_eq VAR_ITEM_ID, 0, BerryTree_EventScript_CancelPlanting removeitem VAR_ITEM_ID call BerryTree_EventScript_PlantBerry @@ -88,10 +84,8 @@ BerryTree_EventScript_CheckBerryStage4:: @ VAR_0x8005 here is the number of times watered @ Buffered by ObjectEventInteractionGetBerryTreeData BerryTree_EventScript_GetCareAdverb:: - compare VAR_0x8005, 0 - goto_if_eq BerryTree_EventScript_SetAdverbPoor - compare VAR_0x8005, 4 - goto_if_eq BerryTree_EventScript_SetAdverbGreat + goto_if_eq VAR_0x8005, 0, BerryTree_EventScript_SetAdverbPoor + goto_if_eq VAR_0x8005, 4, BerryTree_EventScript_SetAdverbGreat bufferstring STR_VAR_2, BerryTree_Text_CareAdverbGood return @@ -110,15 +104,12 @@ BerryTree_EventScript_CheckBerryFullyGrown:: faceplayer special ObjectEventInteractionGetBerryCountString msgbox BerryTree_Text_WantToPick, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryTree_EventScript_PickBerry - compare VAR_RESULT, NO - goto_if_eq BerryTree_EventScript_CancelPickingBerry + goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_PickBerry + goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_CancelPickingBerry BerryTree_EventScript_PickBerry:: special ObjectEventInteractionPickBerryTree - compare VAR_0x8004, 0 - goto_if_eq BerryTree_EventScript_BerryPocketFull + goto_if_eq VAR_0x8004, 0, BerryTree_EventScript_BerryPocketFull special IncrementDailyPickedBerries special ObjectEventInteractionRemoveBerryTree message BerryTree_Text_PickedTheBerry @@ -155,14 +146,11 @@ BerryTree_EventScript_ItemUsePlantBerry:: BerryTree_EventScript_WantToWater:: checkitem ITEM_WAILMER_PAIL - compare VAR_RESULT, FALSE - goto_if_eq BerryTree_EventScript_DontWater + goto_if_eq VAR_RESULT, FALSE, BerryTree_EventScript_DontWater special ObjectEventInteractionGetBerryName msgbox BerryTree_Text_WantToWater, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryTree_EventScript_WaterBerry - compare VAR_RESULT, NO - goto_if_eq BerryTree_EventScript_DontWater + goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_WaterBerry + goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_DontWater BerryTree_EventScript_DontWater:: releaseall diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index fa4d67da7..0ab93c403 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -4,11 +4,9 @@ CableClub_OnTransition: CableClub_EventScript_HideOrShowMysteryGiftMan:: specialvar VAR_RESULT, ShouldDistributeEonTicket - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_ShowMysteryGiftMan + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_ShowMysteryGiftMan specialvar VAR_RESULT, ValidateSavedWonderCard - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_HideMysteryGiftMan + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_HideMysteryGiftMan goto CableClub_EventScript_ShowMysteryGiftMan end @@ -22,8 +20,7 @@ CableClub_EventScript_HideMysteryGiftMan:: CableClub_EventScript_MysteryGiftMan:: specialvar VAR_RESULT, ShouldDistributeEonTicket - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_DistributeEonTicket + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_DistributeEonTicket goto CableClub_EventScript_TryWonderCardScript end @@ -35,8 +32,7 @@ CableClub_EventScript_MysteryGiftThankYou:: CableClub_EventScript_DistributeEonTicket:: checkitem ITEM_EON_TICKET - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_TryWonderCardScript + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_TryWonderCardScript goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_TryWonderCardScript msgbox MysteryGift_Text_TheresATicketForYou, MSGBOX_DEFAULT giveitem ITEM_EON_TICKET @@ -64,29 +60,20 @@ CableClub_OnWarp: .2byte 0 CableClub_EventScript_CheckTurnAttendant:: - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_DontTurnAttendant + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_DontTurnAttendant turnobject VAR_0x8007, DIR_WEST CableClub_EventScript_DontTurnAttendant:: end CableClub_OnLoad: - compare VAR_CABLE_CLUB_STATE, USING_SINGLE_BATTLE - goto_if_eq CableClub_EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_DOUBLE_BATTLE - goto_if_eq CableClub_EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_MULTI_BATTLE - goto_if_eq CableClub_EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_TRADE_CENTER - goto_if_eq CableClub_EventScript_OnLoadFromTradeCenter - compare VAR_CABLE_CLUB_STATE, USING_RECORD_CORNER - goto_if_eq CableClub_EventScript_OnLoadFromRecordCorner - compare VAR_CABLE_CLUB_STATE, USING_UNION_ROOM - goto_if_eq CableClub_EventScript_OnLoadFromUnionRoom - compare VAR_CABLE_CLUB_STATE, USING_BERRY_CRUSH - goto_if_eq CableClub_EventScript_OnLoadFromBerryCrush - compare VAR_CABLE_CLUB_STATE, USING_MINIGAME - goto_if_eq CableClub_EventScript_OnLoadFromGameCorner + goto_if_eq VAR_CABLE_CLUB_STATE, USING_SINGLE_BATTLE, CableClub_EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_DOUBLE_BATTLE, CableClub_EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_MULTI_BATTLE, CableClub_EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_TRADE_CENTER, CableClub_EventScript_OnLoadFromTradeCenter + goto_if_eq VAR_CABLE_CLUB_STATE, USING_RECORD_CORNER, CableClub_EventScript_OnLoadFromRecordCorner + goto_if_eq VAR_CABLE_CLUB_STATE, USING_UNION_ROOM, CableClub_EventScript_OnLoadFromUnionRoom + goto_if_eq VAR_CABLE_CLUB_STATE, USING_BERRY_CRUSH, CableClub_EventScript_OnLoadFromBerryCrush + goto_if_eq VAR_CABLE_CLUB_STATE, USING_MINIGAME, CableClub_EventScript_OnLoadFromGameCorner end CableClub_EventScript_OnLoadFromColosseum:: @@ -148,8 +135,7 @@ CableClub_EventScript_ExitMinigameRoom:: CableClub_EventScript_CloseLinkAndExitLinkRoom:: special CloseLink setvar VAR_CABLE_CLUB_STATE, 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement VAR_0x8007, Movement_AttendantFaceLeft waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom @@ -171,8 +157,7 @@ CableClub_EventScript_ExitTradeCenter:: CableClub_EventScript_PlayerExitTradeCenter:: special CloseLink setvar VAR_CABLE_CLUB_STATE, 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft @@ -195,8 +180,7 @@ CableClub_EventScript_PlayerExitRecordCorner:: setvar VAR_CABLE_CLUB_STATE, 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom waitmovement 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_ExitRecordCornerRet + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_ExitRecordCornerRet applymovement VAR_0x8007, Movement_AttendantFaceDown waitmovement 0 CableClub_EventScript_ExitRecordCornerRet:: @@ -214,8 +198,7 @@ CableClub_EventScript_ExitUnionRoom:: CableClub_EventScript_PlayerExitUnionRoom:: setvar VAR_CABLE_CLUB_STATE, 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft @@ -323,8 +306,7 @@ CableClub_EventScript_SingleBattleMode:: CableClub_EventScript_DoubleBattleMode:: special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne CableClub_EventScript_NeedTwoMonsForDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, CableClub_EventScript_NeedTwoMonsForDoubleBattle setvar VAR_0x8004, USING_DOUBLE_BATTLE goto CableClub_EventScript_TryEnterColosseum end @@ -341,24 +323,17 @@ CableClub_EventScript_MultiBattleMode:: CableClub_EventScript_TryEnterColosseum:: call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message gText_PleaseWaitForLink waitmessage special TryBattleLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterColosseum - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterColosseum + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError end CableClub_EventScript_EnterColosseum:: @@ -385,8 +360,7 @@ CableClub_EventScript_EnterColosseum:: closedoor 9, 1 waitdooranim release - compare VAR_0x8004, USING_MULTI_BATTLE - goto_if_eq CableClub_EventScript_WarpTo4PColosseum + goto_if_eq VAR_0x8004, USING_MULTI_BATTLE, CableClub_EventScript_WarpTo4PColosseum special SetCableClubWarp warp MAP_BATTLE_COLOSSEUM_2P, 6, 8 special DoCableClubWarp @@ -441,31 +415,21 @@ CableClub_EventScript_ConfirmNumberAndRestart:: CableClub_EventScript_TradeCenter:: copyvar VAR_0x8007, VAR_LAST_TALKED call CableClub_EventScript_CheckPartyTradeRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message gText_PleaseWaitForLink waitmessage special TryTradeLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterTradeCenter - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError - compare VAR_RESULT, LINKUP_PLAYER_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkPlayerNotReady - compare VAR_RESULT, LINKUP_PARTNER_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkOtherTrainerNotReady + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterTradeCenter + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_PLAYER_NOT_READY, CableClub_EventScript_AbortLinkPlayerNotReady + goto_if_eq VAR_RESULT, LINKUP_PARTNER_NOT_READY, CableClub_EventScript_AbortLinkOtherTrainerNotReady end CableClub_EventScript_EnterTradeCenter:: @@ -498,11 +462,9 @@ CableClub_EventScript_EnterTradeCenter:: CableClub_EventScript_CheckPartyTradeRequirements:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, 2 - goto_if_lt CableClub_EventScript_NeedTwoMonsToTrade + goto_if_lt VAR_RESULT, 2, CableClub_EventScript_NeedTwoMonsToTrade specialvar VAR_RESULT, DoesPartyHaveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_CantTradeEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_CantTradeEnigmaBerry setvar VAR_RESULT, 1 return @@ -519,28 +481,20 @@ CableClub_EventScript_CantTradeEnigmaBerry:: CableClub_EventScript_RecordCorner:: copyvar VAR_0x8007, VAR_LAST_TALKED call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message gText_PleaseWaitForLink waitmessage special TryRecordMixLinkup waitstate special ValidateMixingGameLanguage waitstate - compare VAR_RESULT, LINKUP_FOREIGN_GAME - goto_if_eq CableClub_EventScript_AbortLinkForeignGame - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterRecordCorner - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_FOREIGN_GAME, CableClub_EventScript_AbortLinkForeignGame + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterRecordCorner + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError end CableClub_EventScript_EnterRecordCorner:: @@ -724,8 +678,7 @@ EventScript_BattleColosseum_4P_PlayerSpot0:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 0 special ColosseumPlayerSpotTriggered waitstate @@ -735,8 +688,7 @@ EventScript_BattleColosseum_4P_PlayerSpot1:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 1 special ColosseumPlayerSpotTriggered waitstate @@ -746,8 +698,7 @@ EventScript_BattleColosseum_4P_PlayerSpot2:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 2 special ColosseumPlayerSpotTriggered waitstate @@ -757,8 +708,7 @@ EventScript_BattleColosseum_4P_PlayerSpot3:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 3 special ColosseumPlayerSpotTriggered waitstate @@ -798,32 +748,28 @@ EventScript_RecordCenter_Spot0:: setvar VAR_0x8005, 0 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end EventScript_RecordCenter_Spot1:: setvar VAR_0x8005, 1 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end EventScript_RecordCenter_Spot2:: setvar VAR_0x8005, 2 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end EventScript_RecordCenter_Spot3:: setvar VAR_0x8005, 3 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end RecordCorner_EventScript_ReceivedGiftItem:: @@ -868,8 +814,7 @@ TradeCenter_EventScript_Attendant:: end RecordCorner_EventScript_Attendant:: - compare VAR_TEMP_0, 0 - goto_if_ne RecordCorner_EventScript_AlreadyMixed + goto_if_ne VAR_TEMP_0, 0, RecordCorner_EventScript_AlreadyMixed special Script_FacePlayer message RecordCorner_Text_TakeSeatAndWait waitmessage @@ -889,8 +834,7 @@ RecordCorner_EventScript_AlreadyMixed:: EventScript_ConfirmLeaveCableClubRoom:: msgbox Text_TerminateLinkConfirmation, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_TerminateLink + goto_if_eq VAR_RESULT, YES, EventScript_TerminateLink erasebox 0, 0, 29, 19 releaseall end @@ -913,12 +857,10 @@ CableClub_EventScript_UnionRoomAttendant:: setvar VAR_FRONTIER_FACILITY, FACILITY_UNION_ROOM goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AbortLinkPlayerHasBadEgg + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_AbortLinkPlayerHasBadEgg copyvar VAR_0x8007, VAR_LAST_TALKED specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_UnionRoomAdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_UnionRoomAdapterNotConnected message CableClub_Text_WelcomeUnionRoomEnter waitmessage goto CableClub_EventScript_UnionRoomSelect @@ -941,11 +883,9 @@ CableClub_EventScript_UnionRoomInfo:: CableClub_EventScript_EnterUnionRoom:: call CableClub_EventScript_CheckPartyUnionRoomRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink msgbox CableClub_Text_EnjoyUnionRoom, MSGBOX_DEFAULT closemessage special HealPlayerParty @@ -976,11 +916,9 @@ CableClub_EventScript_EnterUnionRoom:: CableClub_EventScript_CheckPartyUnionRoomRequirements:: specialvar VAR_RESULT, CountPartyNonEggMons - compare VAR_RESULT, 2 - goto_if_lt CableClub_EventScript_NeedTwoMonsForUnionRoom + goto_if_lt VAR_RESULT, 2, CableClub_EventScript_NeedTwoMonsForUnionRoom specialvar VAR_RESULT, DoesPartyHaveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_NoEnigmaBerryInUnionRoom + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_NoEnigmaBerryInUnionRoom setvar VAR_RESULT, 1 return @@ -1004,8 +942,7 @@ CableClub_EventScript_WirelessClubAttendant:: faceplayer goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements msgbox CableClub_Text_AskAboutLinking, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_DontAskAboutLinking + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_DontAskAboutLinking msgbox CableClub_Text_ExplainWirelessClub, MSGBOX_DEFAULT release return @@ -1021,11 +958,9 @@ CableClub_EventScript_DirectCornerAttendant:: setvar VAR_FRONTIER_FACILITY, FACILITY_MULTI_OR_EREADER @ Set preemptively for multi battles, ignored otherwise goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AbortLinkPlayerHasBadEgg + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_AbortLinkPlayerHasBadEgg specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_WelcomeToCableClub + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_WelcomeToCableClub message CableClub_Text_WelcomeWhichDirectCornerRoom waitmessage delay 28 @@ -1034,8 +969,7 @@ CableClub_EventScript_DirectCornerAttendant:: CableClub_EventScript_DirectCornerSelectService:: checkitem ITEM_POWDER_JAR - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_DirectCornerNoBerry + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_DirectCornerNoBerry goto_if_set FLAG_VISITED_MAUVILLE_CITY, CableClub_EventScript_DirectCornerSelectAllServices multichoice 0, 0, MULTI_WIRELESS_NO_RECORD, FALSE switch VAR_RESULT @@ -1079,11 +1013,9 @@ CableClub_EventScript_DirectCornerHasRecordMix:: CableClub_EventScript_WirelessTrade:: msgbox CableClub_Text_TradePokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink call CableClub_EventScript_CheckPartyTradeRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink setvar VAR_0x8004, LINK_GROUP_TRADE goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -1108,8 +1040,7 @@ CableClub_EventScript_WirelessSingleBattle:: CableClub_EventScript_WirelessDoubleBattle:: special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne CableClub_EventScript_TwoMonsNeededForWirelessDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, CableClub_EventScript_TwoMonsNeededForWirelessDoubleBattle setvar VAR_0x8004, LINK_GROUP_DOUBLE_BATTLE goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -1131,19 +1062,16 @@ CableClub_EventScript_WirelessBattleInfo:: CableClub_EventScript_WirelessRecordMix:: msgbox CableClub_Text_AccessRecordCorner, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink setvar VAR_0x8004, LINK_GROUP_RECORD_CORNER goto CableClub_EventScript_SaveAndChooseLinkLeader end CableClub_EventScript_WirelessBerryCrush:: msgbox CableClub_Text_UseBerryCrush, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink special HasAtLeastOneBerry - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_NeedBerryForBerryCrush + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_NeedBerryForBerryCrush setvar VAR_0x8004, LINK_GROUP_BERRY_CRUSH goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -1155,8 +1083,7 @@ CableClub_EventScript_NeedBerryForBerryCrush:: CableClub_EventScript_SaveAndChooseLinkLeader:: call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink switch VAR_0x8004 case LINK_GROUP_TRADE, CableClub_EventScript_ChooseLinkLeaderFrom2 case LINK_GROUP_SINGLE_BATTLE, CableClub_EventScript_ChooseLinkLeaderFrom2 @@ -1179,23 +1106,17 @@ CableClub_EventScript_ChooseLinkLeaderFrom2:: CableClub_EventScript_TryLeadGroup2Players:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryLeadGroup2Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom2 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryLeadGroup2Players release return CableClub_EventScript_TryJoinGroup2Players:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryJoinGroup2Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom2 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryJoinGroup2Players release return @@ -1212,23 +1133,17 @@ CableClub_EventScript_ChooseLinkLeaderFrom4:: CableClub_EventScript_TryLeadGroup4Players:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryLeadGroup4Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom4 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryLeadGroup4Players release return CableClub_EventScript_TryJoinGroup4Players:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryJoinGroup4Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom4 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryJoinGroup4Players release return @@ -1245,23 +1160,17 @@ CableClub_EventScript_ChooseLinkLeader:: CableClub_EventScript_TryLeadGroupXPlayers:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryLeadGroupXPlayers + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryLeadGroupXPlayers release return CableClub_EventScript_TryJoinGroupXPlayers:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryJoinGroupXPlayers + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryJoinGroupXPlayers release return @@ -1305,8 +1214,7 @@ EventScript_WirelessBoxResults:: lockall goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_NotReadyYet specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_AdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_AdapterNotConnected fadescreen FADE_TO_BLACK special ShowWirelessCommunicationScreen waitstate @@ -1387,8 +1295,7 @@ MossdeepCity_GameCorner_1F_EventScript_OldMan2:: message MossdeepCity_GameCorner_1F_Text_WelcomeCanYouWait waitmessage specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected delay 60 message MossdeepCity_GameCorner_1F_Text_PlayWhichGame waitmessage @@ -1403,18 +1310,15 @@ MossdeepCity_GameCorner_1F_EventScript_OldMan2:: MossdeepCity_GameCorner_1F_EventScript_PlayPokemonJump:: setvar VAR_0x8005, 0 special IsPokemonJumpSpeciesInParty - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon msgbox MossdeepCity_GameCorner_1F_Text_EnterWhichPokemon, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK setvar VAR_0x8005, 0 special ChooseMonForWirelessMinigame waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_ge VAR_0x8004, PARTY_SIZE, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_eq VAR_RESULT, 0, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame setvar VAR_0x8004, LINK_GROUP_POKEMON_JUMP goto MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader end @@ -1422,18 +1326,15 @@ MossdeepCity_GameCorner_1F_EventScript_PlayPokemonJump:: MossdeepCity_GameCorner_1F_EventScript_PlayDodrioBerryPicking:: setvar VAR_0x8005, 1 special IsDodrioInParty - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon msgbox MossdeepCity_GameCorner_1F_Text_EnterWhichPokemon, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK setvar VAR_0x8005, 1 special ChooseMonForWirelessMinigame waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_ge VAR_0x8004, PARTY_SIZE, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_eq VAR_RESULT, 0, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame setvar VAR_0x8004, LINK_GROUP_BERRY_PICKING goto MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader end @@ -1451,23 +1352,17 @@ MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader:: MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader release return MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup release return @@ -1499,12 +1394,9 @@ MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected:: MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon:: msgbox MossdeepCity_GameCorner_1F_Text_ExplainRequiredMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame - compare VAR_0x8005, 0 - call_if_eq MossdeepCity_GameCorner_1F_EventScript_ExplainPokemonJumpRequirements - compare VAR_0x8005, 1 - call_if_eq MossdeepCity_GameCorner_1F_EventScript_ExplainDodrioBerryPickingRequirements + goto_if_eq VAR_RESULT, NO, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + call_if_eq VAR_0x8005, 0, MossdeepCity_GameCorner_1F_EventScript_ExplainPokemonJumpRequirements + call_if_eq VAR_0x8005, 1, MossdeepCity_GameCorner_1F_EventScript_ExplainDodrioBerryPickingRequirements goto MossdeepCity_GameCorner_1F_EventScript_AbortMinigame end diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc index 5ff2abe0c..04c62a6de 100644 --- a/data/scripts/contest_hall.inc +++ b/data/scripts/contest_hall.inc @@ -18,8 +18,7 @@ LilycoveCity_ContestLobby_EventScript_SpeakToContestReceptionist:: lock faceplayer - compare VAR_CONTEST_PRIZE_PICKUP, 0 - goto_if_ne LilycoveCity_ContestLobby_EventScript_PickUpPrize + goto_if_ne VAR_CONTEST_PRIZE_PICKUP, 0, LilycoveCity_ContestLobby_EventScript_PickUpPrize call_if_set FLAG_RECEIVED_POKEBLOCK_CASE, LilycoveCity_ContestLobby_EventScript_ReceptionWelcome call_if_unset FLAG_RECEIVED_POKEBLOCK_CASE, LilycoveCity_ContestLobby_EventScript_GivePokeblockCase goto LilycoveCity_ContestLobby_EventScript_AskEnterContest @@ -44,8 +43,7 @@ LilycoveCity_ContestLobby_EventScript_PickUpPrize:: LilycoveCity_ContestLobby_EventScript_GiveLuxuryBallAtCounter:: giveitem ITEM_LUXURY_BALL - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_ContestLobby_EventScript_NoRoomForLuxuryBallAtCounter + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_ContestLobby_EventScript_NoRoomForLuxuryBallAtCounter setvar VAR_CONTEST_PRIZE_PICKUP, 0 closemessage release @@ -103,19 +101,13 @@ LilycoveCity_ContestLobby_EventScript_CancelEnterContest:: LilycoveCity_ContestLobby_EventScript_ChooseContestMon:: msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon1, MSGBOX_DEFAULT choosecontestmon - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelEnterContest + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, LilycoveCity_ContestLobby_EventScript_CancelEnterContest special TryEnterContestMon - compare VAR_RESULT, CANT_ENTER_CONTEST - goto_if_eq LilycoveCity_ContestLobby_EventScript_CantEnterLowRank - compare VAR_RESULT, CAN_ENTER_CONTEST_EQUAL_RANK - goto_if_eq LilycoveCity_ContestLobby_EventScript_EnterMon - compare VAR_RESULT, CAN_ENTER_CONTEST_HIGH_RANK - goto_if_eq LilycoveCity_ContestLobby_EventScript_ConfirmEntryAlreadyWon - compare VAR_RESULT, CANT_ENTER_CONTEST_EGG - goto_if_eq LilycoveCity_ContestLobby_EventScript_CantEnterEgg - compare VAR_RESULT, CANT_ENTER_CONTEST_FAINTED - goto_if_eq LilycoveCity_ContestLobby_EventScript_CantEnterFainted + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST, LilycoveCity_ContestLobby_EventScript_CantEnterLowRank + goto_if_eq VAR_RESULT, CAN_ENTER_CONTEST_EQUAL_RANK, LilycoveCity_ContestLobby_EventScript_EnterMon + goto_if_eq VAR_RESULT, CAN_ENTER_CONTEST_HIGH_RANK, LilycoveCity_ContestLobby_EventScript_ConfirmEntryAlreadyWon + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST_EGG, LilycoveCity_ContestLobby_EventScript_CantEnterEgg + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST_FAINTED, LilycoveCity_ContestLobby_EventScript_CantEnterFainted end LilycoveCity_ContestLobby_EventScript_ChooseContestRank:: @@ -293,8 +285,7 @@ ContestHall_EventScript_ContestGettingStarted:: return ContestHall_EventScript_GettingStarted:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_GettingStartedLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_GettingStartedLink lockall msgbox ContestHall_Text_GettingStartedParticipantsAsFollows, MSGBOX_DEFAULT releaseall @@ -302,8 +293,7 @@ ContestHall_EventScript_GettingStarted:: ContestHall_EventScript_GettingStartedLink:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_GettingStartedWireless + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_GettingStartedWireless messageautoscroll ContestHall_Text_GettingStartedParticipantsAsFollowsLink waitmessage return @@ -326,16 +316,14 @@ ContestHall_EventScript_ShowContestMons:: call ContestHall_EventScript_TryWaitForLink call ContestHall_EventScript_TryWaitForLink addvar VAR_0x8006, 1 - compare VAR_0x8006, CONTESTANT_COUNT - goto_if_ne ContestHall_EventScript_ShowContestMons + goto_if_ne VAR_0x8006, CONTESTANT_COUNT, ContestHall_EventScript_ShowContestMons call ContestHall_EventScript_AudienceVote setvar VAR_TEMP_1, 6 return ContestHall_EventScript_TryWaitForLink:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_WaitForLink + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_WaitForLink return ContestHall_EventScript_WaitForLink:: @@ -344,14 +332,10 @@ ContestHall_EventScript_WaitForLink:: return ContestHall_EventScript_ContestantWalkToCenter:: - compare VAR_0x8006, 0 - goto_if_eq ContestHall_EventScript_Player1WalkToCenter - compare VAR_0x8006, 1 - goto_if_eq ContestHall_EventScript_Player2WalkToCenter - compare VAR_0x8006, 2 - goto_if_eq ContestHall_EventScript_Player3WalkToCenter - compare VAR_0x8006, 3 - goto_if_eq ContestHall_EventScript_Player4WalkToCenter + goto_if_eq VAR_0x8006, 0, ContestHall_EventScript_Player1WalkToCenter + goto_if_eq VAR_0x8006, 1, ContestHall_EventScript_Player2WalkToCenter + goto_if_eq VAR_0x8006, 2, ContestHall_EventScript_Player3WalkToCenter + goto_if_eq VAR_0x8006, 3, ContestHall_EventScript_Player4WalkToCenter return ContestHall_EventScript_Player1WalkToCenter:: @@ -413,8 +397,7 @@ ContestHall_EventScript_ShowContestMonPic:: return ContestHall_EventScript_EntryXTrainersMon:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_EntryXTrainersMonLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_EntryXTrainersMonLink message ContestHall_Text_EntryXTrainersMon waitmessage return @@ -441,15 +424,13 @@ ContestHall_EventScript_AudienceVote:: return ContestHall_EventScript_AudienceWillVote:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_AudienceWillVoteLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_AudienceWillVoteLink msgbox ContestHall_Text_SeenContestantsAudienceWillVote, MSGBOX_DEFAULT return ContestHall_EventScript_AudienceWillVoteLink:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_AudienceWillVoteWireless + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_AudienceWillVoteWireless messageautoscroll ContestHall_Text_SeenContestantsAudienceWillVote waitmessage return @@ -467,8 +448,7 @@ ContestHall_EventScript_AudienceWillVoteWireless:: return ContestHall_EventScript_VotingUnderWay:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_VotingUnderWayLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_VotingUnderWayLink message ContestHall_Text_VotingUnderWay return @@ -510,16 +490,11 @@ ContestHall_EventScript_AudienceReactToContestant:: @ and are set to 9 if they havent displayed a heart yet, and 1 if they have ContestHall_EventScript_AudienceHeartEmotes:: special GetContestMonCondition - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL - call_if_eq ContestHall_EventScript_GetNumberOfHeartsNormal - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_SUPER - call_if_eq ContestHall_EventScript_GetNumberOfHeartsSuper - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_HYPER - call_if_eq ContestHall_EventScript_GetNumberOfHeartsHyper - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_MASTER - call_if_eq ContestHall_EventScript_GetNumberOfHeartsMaster - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - call_if_eq ContestHall_EventScript_GetNumberOfHeartsLink + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL, ContestHall_EventScript_GetNumberOfHeartsNormal + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_SUPER, ContestHall_EventScript_GetNumberOfHeartsSuper + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_HYPER, ContestHall_EventScript_GetNumberOfHeartsHyper + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_MASTER, ContestHall_EventScript_GetNumberOfHeartsMaster + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_GetNumberOfHeartsLink setvar VAR_TEMP_1, 9 setvar VAR_TEMP_2, 9 setvar VAR_TEMP_3, 9 @@ -528,8 +503,7 @@ ContestHall_EventScript_AudienceHeartEmotes:: setvar VAR_TEMP_6, 9 setvar VAR_TEMP_7, 9 setvar VAR_TEMP_8, 9 - compare VAR_TEMP_0, 0 - call_if_gt ContestHall_EventScript_DisplayHearts + call_if_gt VAR_TEMP_0, 0, ContestHall_EventScript_DisplayHearts setvar VAR_TEMP_1, 0 setvar VAR_TEMP_2, 0 setvar VAR_TEMP_3, 0 @@ -543,124 +517,75 @@ ContestHall_EventScript_AudienceHeartEmotes:: ContestHall_EventScript_DisplayHearts:: setvar VAR_RESULT, 8 special GenerateContestRand - compare VAR_RESULT, 0 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember1 - compare VAR_RESULT, 1 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember2 - compare VAR_RESULT, 2 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember3 - compare VAR_RESULT, 3 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember4 - compare VAR_RESULT, 4 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember5 - compare VAR_RESULT, 5 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember6 - compare VAR_RESULT, 6 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember7 - compare VAR_RESULT, 7 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember8 - compare VAR_TEMP_0, 0 @ Still more hearts to display - goto_if_gt ContestHall_EventScript_DisplayHearts + call_if_eq VAR_RESULT, 0, ContestHall_EventScript_TryDisplayHeartAudienceMember1 + call_if_eq VAR_RESULT, 1, ContestHall_EventScript_TryDisplayHeartAudienceMember2 + call_if_eq VAR_RESULT, 2, ContestHall_EventScript_TryDisplayHeartAudienceMember3 + call_if_eq VAR_RESULT, 3, ContestHall_EventScript_TryDisplayHeartAudienceMember4 + call_if_eq VAR_RESULT, 4, ContestHall_EventScript_TryDisplayHeartAudienceMember5 + call_if_eq VAR_RESULT, 5, ContestHall_EventScript_TryDisplayHeartAudienceMember6 + call_if_eq VAR_RESULT, 6, ContestHall_EventScript_TryDisplayHeartAudienceMember7 + call_if_eq VAR_RESULT, 7, ContestHall_EventScript_TryDisplayHeartAudienceMember8 + goto_if_gt VAR_TEMP_0, 0, ContestHall_EventScript_DisplayHearts @ Still more hearts to display waitmovement 0 return ContestHall_EventScript_GetNumberOfHeartsNormal:: - compare VAR_0x8004, 80 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 70 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 60 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 50 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 40 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 30 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 20 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 10 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 80, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 70, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 60, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 50, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 40, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 30, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 20, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 10, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return ContestHall_EventScript_GetNumberOfHeartsSuper:: - compare VAR_0x8004, 230 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 210 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 190 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 170 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 150 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 130 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 110 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 90 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 230, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 210, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 190, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 170, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 150, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 130, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 110, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 90, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return ContestHall_EventScript_GetNumberOfHeartsHyper:: - compare VAR_0x8004, 380 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 350 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 320 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 290 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 260 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 230 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 200 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 170 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 380, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 350, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 320, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 290, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 260, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 230, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 200, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 170, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return ContestHall_EventScript_GetNumberOfHeartsMaster:: - compare VAR_0x8004, 600 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 560 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 520 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 480 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 440 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 400 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 360 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 320 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 600, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 560, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 520, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 480, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 440, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 400, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 360, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 320, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return ContestHall_EventScript_GetNumberOfHeartsLink:: - compare VAR_0x8004, 600 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 550 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 500 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 450 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 400 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 300 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 200 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 100 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 600, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 550, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 500, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 450, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 400, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 300, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 200, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 100, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return @@ -697,8 +622,7 @@ ContestHall_EventScript_Set8Hearts:: return ContestHall_EventScript_TryDisplayHeartAudienceMember1:: - compare VAR_TEMP_1, 1 - goto_if_eq ContestHall_EventScript_AudienceMember1AlreadyEmoted + goto_if_eq VAR_TEMP_1, 1, ContestHall_EventScript_AudienceMember1AlreadyEmoted applymovement LOCALID_AUDIENCE_1, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -710,8 +634,7 @@ ContestHall_EventScript_AudienceMember1AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember2:: - compare VAR_TEMP_2, 1 - goto_if_eq ContestHall_EventScript_AudienceMember2AlreadyEmoted + goto_if_eq VAR_TEMP_2, 1, ContestHall_EventScript_AudienceMember2AlreadyEmoted applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -723,8 +646,7 @@ ContestHall_EventScript_AudienceMember2AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember3:: - compare VAR_TEMP_3, 1 - goto_if_eq ContestHall_EventScript_AudienceMember3AlreadyEmoted + goto_if_eq VAR_TEMP_3, 1, ContestHall_EventScript_AudienceMember3AlreadyEmoted applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -736,8 +658,7 @@ ContestHall_EventScript_AudienceMember3AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember4:: - compare VAR_TEMP_4, 1 - goto_if_eq ContestHall_EventScript_Audience4MemberAlreadyEmoted + goto_if_eq VAR_TEMP_4, 1, ContestHall_EventScript_Audience4MemberAlreadyEmoted applymovement LOCALID_AUDIENCE_4, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -749,8 +670,7 @@ ContestHall_EventScript_Audience4MemberAlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember5:: - compare VAR_TEMP_5, 1 - goto_if_eq ContestHall_EventScript_AudienceMember5AlreadyEmoted + goto_if_eq VAR_TEMP_5, 1, ContestHall_EventScript_AudienceMember5AlreadyEmoted applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -762,8 +682,7 @@ ContestHall_EventScript_AudienceMember5AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember6:: - compare VAR_TEMP_6, 1 - goto_if_eq ContestHall_EventScript_AudienceMember6AlreadyEmoted + goto_if_eq VAR_TEMP_6, 1, ContestHall_EventScript_AudienceMember6AlreadyEmoted applymovement LOCALID_AUDIENCE_6, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -775,8 +694,7 @@ ContestHall_EventScript_AudienceMember6AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember7:: - compare VAR_TEMP_7, 1 - goto_if_eq ContestHall_EventScript_AudienceMember7AlreadyEmoted + goto_if_eq VAR_TEMP_7, 1, ContestHall_EventScript_AudienceMember7AlreadyEmoted applymovement LOCALID_AUDIENCE_7, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -788,8 +706,7 @@ ContestHall_EventScript_AudienceMember7AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember8:: - compare VAR_TEMP_8, 1 - goto_if_eq ContestHall_EventScript_AudienceMember8AlreadyEmoted + goto_if_eq VAR_TEMP_8, 1, ContestHall_EventScript_AudienceMember8AlreadyEmoted applymovement LOCALID_ARTIST, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -870,15 +787,13 @@ ContestHall_EventScript_DoContestAppeals:: return ContestHall_EventScript_LetsAppeal:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_LetsAppealLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_LetsAppealLink msgbox ContestHall_Text_VotingCompleteLetsAppeal, MSGBOX_DEFAULT return ContestHall_EventScript_LetsAppealLink:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_LetsAppealWireless + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_LetsAppealWireless messageautoscroll ContestHall_Text_VotingCompleteLetsAppeal waitmessage return @@ -920,8 +835,7 @@ ContestHall_EventScript_ContestResults:: return ContestHall_EventScript_ThatsItForJudging:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_ThatsItForJudgingLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_ThatsItForJudgingLink msgbox ContestHall_Text_ThatsItForJudging, MSGBOX_DEFAULT return @@ -933,8 +847,7 @@ ContestHall_EventScript_ThatsItForJudgingLink:: return ContestHall_EventScript_ThankYouForAppeals:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_ThankYouForAppealsLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_ThankYouForAppealsLink msgbox ContestHall_Text_ThankYouForAppeals, MSGBOX_DEFAULT return @@ -946,8 +859,7 @@ ContestHall_EventScript_ThankYouForAppealsLink:: return ContestHall_EventScript_JudgeLooksReady:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_JudgeLooksReadyLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_JudgeLooksReadyLink msgbox ContestHall_Text_JudgeLooksReady, MSGBOX_DEFAULT return @@ -959,8 +871,7 @@ ContestHall_EventScript_JudgeLooksReadyLink:: return ContestHall_EventScript_WeWillDeclareWinner:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_WeWillDeclareWinnerLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_WeWillDeclareWinnerLink msgbox ContestHall_Text_WeWillNowDeclareWinner, MSGBOX_DEFAULT return @@ -1010,8 +921,7 @@ ContestHall_EventScript_CongratulateWinner:: return ContestHall_EventScript_CongratsWinner:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_CongratsWinnerLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_CongratsWinnerLink msgbox ContestHall_Text_CongratsTrainerXandMon, MSGBOX_DEFAULT return @@ -1023,8 +933,7 @@ ContestHall_EventScript_CongratsWinnerLink:: ContestHall_EventScript_AudienceLookAround:: addvar VAR_TEMP_1, 1 lockall - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL - call_if_gt ContestHall_EventScript_VObjectAudienceLookAround + call_if_gt VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL, ContestHall_EventScript_VObjectAudienceLookAround applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_AudienceMemberLookRight applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_AudienceMemberLookDown applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_AudienceMemberLookRight @@ -1033,8 +942,7 @@ ContestHall_EventScript_AudienceLookAround:: applymovement LOCALID_AUDIENCE_7, ContestHall_Movement_AudienceMemberLookDown applymovement LOCALID_AUDIENCE_1, ContestHall_Movement_AudienceMemberLookUp applymovement LOCALID_AUDIENCE_4, ContestHall_Movement_AudienceMemberLookLeft - compare VAR_TEMP_1, 4 - goto_if_ne ContestHall_EventScript_AudienceLookAround + goto_if_ne VAR_TEMP_1, 4, ContestHall_EventScript_AudienceLookAround delay 30 return @@ -1108,8 +1016,7 @@ ContestHall_EventScript_VObjectAudienceLookAround:: return ContestHall_EventScript_GiveWinnerPrize:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_EndLinkContest + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_EndLinkContest call ContestHall_EventScript_CheckShouldSkipPrize goto_if_set FLAG_TEMP_2, ContestHall_EventScript_SkipPrize lockall @@ -1122,8 +1029,7 @@ ContestHall_EventScript_GiveWinnerPrize:: call ContestHall_EventScript_AudienceLookAround delay 30 special ShouldReadyContestArtist - compare VAR_0x8004, TRUE - goto_if_eq ContestHall_EventScript_SetReadyForContestArtist + goto_if_eq VAR_0x8004, TRUE, ContestHall_EventScript_SetReadyForContestArtist return ContestHall_EventScript_SkipPrize:: @@ -1132,25 +1038,21 @@ ContestHall_EventScript_SkipPrize:: releaseall delay 90 special ShouldReadyContestArtist - compare VAR_0x8004, TRUE - goto_if_eq ContestHall_EventScript_SetReadyForContestArtist + goto_if_eq VAR_0x8004, TRUE, ContestHall_EventScript_SetReadyForContestArtist return ContestHall_EventScript_CheckShouldSkipPrize:: specialvar VAR_RESULT, HasMonWonThisContestBefore - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_CheckPlayerWon + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_CheckPlayerWon return ContestHall_EventScript_CheckPlayerWon:: special GetContestWinnerId - compare VAR_0x8005, 3 - goto_if_eq ContestHall_EventScript_CheckRankIsMaster + goto_if_eq VAR_0x8005, 3, ContestHall_EventScript_CheckRankIsMaster return ContestHall_EventScript_CheckRankIsMaster:: - compare VAR_CONTEST_RANK, CONTEST_RANK_MASTER - goto_if_eq ContestHall_EventScript_DontSkipPrize + goto_if_eq VAR_CONTEST_RANK, CONTEST_RANK_MASTER, ContestHall_EventScript_DontSkipPrize setflag FLAG_TEMP_2 return @@ -1171,8 +1073,7 @@ ContestHall_EventScript_EndLinkContest:: special GetContestPlayerId special GetContestWinnerId special ShouldReadyContestArtist - compare VAR_0x8004, TRUE - goto_if_eq ContestHall_EventScript_SetReadyForLinkContestArtist + goto_if_eq VAR_0x8004, TRUE, ContestHall_EventScript_SetReadyForLinkContestArtist closemessage return @@ -1223,21 +1124,17 @@ ContestHall_EventScript_Player4ApproachForPrize:: @ In NPC Contests, the player is always entry 4 (id number 3) ContestHall_EventScript_GivePrizeIfWinner:: special GetContestWinnerId - compare VAR_0x8005, 3 - goto_if_eq ContestHall_EventScript_GiveContestPrizes + goto_if_eq VAR_0x8005, 3, ContestHall_EventScript_GiveContestPrizes lockall msgbox ContestHall_Text_CongratsPleaseCompeteAgain, MSGBOX_DEFAULT releaseall return ContestHall_EventScript_GiveContestPrizes:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_SUPER - call_if_eq ContestHall_EventScript_SetSketchFlag + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_SUPER, ContestHall_EventScript_SetSketchFlag specialvar VAR_RESULT, HasMonWonThisContestBefore - compare VAR_RESULT, FALSE - goto_if_eq ContestHall_EventScript_ReceiveContestRibbon - compare VAR_CONTEST_RANK, CONTEST_RANK_MASTER - goto_if_eq ContestHall_EventScript_GiveLuxuryBall + goto_if_eq VAR_RESULT, FALSE, ContestHall_EventScript_ReceiveContestRibbon + goto_if_eq VAR_CONTEST_RANK, CONTEST_RANK_MASTER, ContestHall_EventScript_GiveLuxuryBall lockall msgbox ContestHall_Text_CongratsPleaseCompeteAgain, MSGBOX_DEFAULT releaseall @@ -1253,8 +1150,7 @@ ContestHall_EventScript_NoRoomForLuxuryBall:: ContestHall_EventScript_GiveLuxuryBall:: giveitem ITEM_LUXURY_BALL - compare VAR_RESULT, FALSE - goto_if_eq ContestHall_EventScript_NoRoomForLuxuryBall + goto_if_eq VAR_RESULT, FALSE, ContestHall_EventScript_NoRoomForLuxuryBall lockall msgbox ContestHall_Text_CongratsPleaseCompeteAgain, MSGBOX_DEFAULT releaseall @@ -1460,8 +1356,7 @@ ContestHall_Movement_Player2ApproachForPrize: @ IsContestWithRSPlayer has no side effect, so this is nop ContestHall_EventScript_CheckIfContestWithRSPlayer:: specialvar VAR_RESULT, IsContestWithRSPlayer - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_RetRSPlayer + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_RetRSPlayer return ContestHall_EventScript_RetRSPlayer:: @@ -1469,8 +1364,7 @@ ContestHall_EventScript_RetRSPlayer:: LilycoveCity_ContestLobby_EventScript_DelayIfContestWithRSPlayer:: specialvar VAR_RESULT, IsContestWithRSPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_DelayForRSPlayer + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_DelayForRSPlayer return LilycoveCity_ContestLobby_EventScript_DelayForRSPlayer:: diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index ba61fb004..cb053f2c4 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -5,23 +5,18 @@ Route117_EventScript_DaycareMan:: faceplayer special GetDaycareMonNicknames specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_EGG_WAITING - goto_if_eq Route117_EventScript_DaycareEggWaiting - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_EventScript_CheckOnOneMon - compare VAR_RESULT, DAYCARE_TWO_MONS - goto_if_eq Route117_EventScript_CheckOnTwoMons + goto_if_eq VAR_RESULT, DAYCARE_EGG_WAITING, Route117_EventScript_DaycareEggWaiting + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_EventScript_CheckOnOneMon + goto_if_eq VAR_RESULT, DAYCARE_TWO_MONS, Route117_EventScript_CheckOnTwoMons msgbox Route117_Text_SeeWifeIfYoudLikeMeToRaiseMon, MSGBOX_DEFAULT release end Route117_EventScript_DaycareEggWaiting:: msgbox Route117_Text_DoYouWantEgg, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_EventScript_DaycareAcceptEgg + goto_if_eq VAR_RESULT, YES, Route117_EventScript_DaycareAcceptEgg msgbox Route117_Text_IWillKeepDoYouWantIt, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_EventScript_DaycareAcceptEgg + goto_if_eq VAR_RESULT, YES, Route117_EventScript_DaycareAcceptEgg msgbox Route117_Text_IllKeepIt, MSGBOX_DEFAULT clearflag FLAG_PENDING_DAYCARE_EGG special RejectEggFromDayCare @@ -30,8 +25,7 @@ Route117_EventScript_DaycareEggWaiting:: Route117_EventScript_DaycareAcceptEgg:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, PARTY_SIZE - goto_if_ne Route117_EventScript_DaycareReceiveEgg + goto_if_ne VAR_RESULT, PARTY_SIZE, Route117_EventScript_DaycareReceiveEgg msgbox Route117_Text_YouHaveNoRoomForIt, MSGBOX_DEFAULT release end @@ -49,8 +43,7 @@ Route117_EventScript_DaycareReceiveEgg:: Route117_EventScript_CheckMonReceivedMail:: specialvar VAR_RESULT, CheckDaycareMonReceivedMail - compare VAR_RESULT, 1 - call_if_eq Route117_EventScript_MonReceivedMail + call_if_eq VAR_RESULT, 1, Route117_EventScript_MonReceivedMail return Route117_EventScript_MonReceivedMail:: @@ -83,35 +76,27 @@ Route117_PokemonDayCare_EventScript_DaycareWoman:: lock faceplayer specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_EGG_WAITING - goto_if_eq Route117_PokemonDayCare_EventScript_EggWaiting - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_PokemonDayCare_EventScript_OneMonInDaycare - compare VAR_RESULT, DAYCARE_TWO_MONS - goto_if_eq Route117_PokemonDayCare_EventScript_TwoMonsInDaycare + goto_if_eq VAR_RESULT, DAYCARE_EGG_WAITING, Route117_PokemonDayCare_EventScript_EggWaiting + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_OneMonInDaycare + goto_if_eq VAR_RESULT, DAYCARE_TWO_MONS, Route117_PokemonDayCare_EventScript_TwoMonsInDaycare msgbox Route117_PokemonDayCare_Text_WouldYouLikeUsToRaiseAMon, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_GiveMonToRaise msgbox Route117_PokemonDayCare_Text_FineThenComeAgain, MSGBOX_DEFAULT release end Route117_PokemonDayCare_EventScript_GiveMonToRaise:: specialvar VAR_RESULT, CountPartyNonEggMons - compare VAR_RESULT, 1 - goto_if_eq Route117_PokemonDayCare_EventScript_OnlyOneMon + goto_if_eq VAR_RESULT, 1, Route117_PokemonDayCare_EventScript_OnlyOneMon specialvar VAR_RESULT, CountPartyAliveNonEggMons - compare VAR_RESULT, 2 - goto_if_eq Route117_PokemonDayCare_EventScript_OnlyTwoAliveMons + goto_if_eq VAR_RESULT, 2, Route117_PokemonDayCare_EventScript_OnlyTwoAliveMons msgbox Route117_PokemonDayCare_Text_WhichMonShouldWeRaise, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK special ChooseSendDaycareMon waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, Route117_PokemonDayCare_EventScript_ComeAgain specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot - compare VAR_RESULT, 0 - goto_if_eq Route117_PokemonDayCare_EventScript_OnlyOneAliveMon + goto_if_eq VAR_RESULT, 0, Route117_PokemonDayCare_EventScript_OnlyOneAliveMon specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies waitse playmoncry VAR_0x8005, CRY_MODE_NORMAL @@ -120,8 +105,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise:: special StoreSelectedPokemonInDaycare incrementgamestat GAME_STAT_USED_DAYCARE specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_PokemonDayCare_EventScript_CanRaiseOneMore + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_CanRaiseOneMore release end @@ -132,8 +116,7 @@ Route117_PokemonDayCare_EventScript_ComeAgain:: Route117_PokemonDayCare_EventScript_CanRaiseOneMore:: msgbox Route117_PokemonDayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_GiveMonToRaise goto Route117_PokemonDayCare_EventScript_ComeAgain end @@ -163,8 +146,7 @@ Route117_PokemonDayCare_EventScript_YourMonHasGrownXLevels:: Route117_PokemonDayCare_EventScript_DisplayLevelsGained:: specialvar VAR_RESULT, GetNumLevelsGainedFromDaycare - compare VAR_RESULT, 0 - call_if_ne Route117_PokemonDayCare_EventScript_YourMonHasGrownXLevels + call_if_ne VAR_RESULT, 0, Route117_PokemonDayCare_EventScript_YourMonHasGrownXLevels return Route117_PokemonDayCare_EventScript_OneMonInDaycare:: @@ -172,42 +154,35 @@ Route117_PokemonDayCare_EventScript_OneMonInDaycare:: setvar VAR_0x8004, 0 call Route117_PokemonDayCare_EventScript_DisplayLevelsGained msgbox Route117_PokemonDayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_GiveMonToRaise msgbox Route117_PokemonDayCare_Text_TakeYourMonBack, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_TryRetrieveMon goto Route117_PokemonDayCare_EventScript_ComeAgain end Route117_PokemonDayCare_EventScript_TryRetrieveMon:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, PARTY_SIZE - goto_if_eq Route117_PokemonDayCare_EventScript_NoRoom + goto_if_eq VAR_RESULT, PARTY_SIZE, Route117_PokemonDayCare_EventScript_NoRoom specialvar VAR_RESULT, GetDaycareState setvar VAR_0x8004, 0 - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_PokemonDayCare_EventScript_CostPrompt + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_CostPrompt special ShowDaycareLevelMenu waitstate copyvar VAR_0x8004, VAR_RESULT - compare VAR_RESULT, DAYCARE_EXITED_LEVEL_MENU - goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain + goto_if_eq VAR_RESULT, DAYCARE_EXITED_LEVEL_MENU, Route117_PokemonDayCare_EventScript_ComeAgain goto Route117_PokemonDayCare_EventScript_CostPrompt end Route117_PokemonDayCare_EventScript_CostPrompt:: special GetDaycareCost msgbox Route117_PokemonDayCare_Text_ItWillCostX, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_CheckEnoughMoney + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_CheckEnoughMoney goto Route117_PokemonDayCare_EventScript_ComeAgain end Route117_PokemonDayCare_EventScript_CheckEnoughMoney:: specialvar VAR_RESULT, IsEnoughForCostInVar0x8005 - compare VAR_RESULT, 1 - goto_if_eq Route117_PokemonDayCare_EventScript_RetrieveMon + goto_if_eq VAR_RESULT, 1, Route117_PokemonDayCare_EventScript_RetrieveMon msgbox Route117_PokemonDayCare_Text_NotEnoughMoney, MSGBOX_DEFAULT release end @@ -224,15 +199,13 @@ Route117_PokemonDayCare_EventScript_RetrieveMon:: msgbox Route117_PokemonDayCare_Text_TookBackMon, MSGBOX_DEFAULT waitmoncry specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_PokemonDayCare_EventScript_AskRetrieveOtherMon + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_AskRetrieveOtherMon goto Route117_PokemonDayCare_EventScript_ComeAgain end Route117_PokemonDayCare_EventScript_AskRetrieveOtherMon:: msgbox Route117_PokemonDayCare_Text_TakeOtherOneBackToo, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_TryRetrieveMon goto Route117_PokemonDayCare_EventScript_ComeAgain end @@ -274,8 +247,7 @@ Route117_PokemonDayCare_EventScript_TwoMonsInDaycare:: setvar VAR_0x8004, 1 call Route117_PokemonDayCare_EventScript_DisplayLevelsGained msgbox Route117_PokemonDayCare_Text_TakeYourMonBack, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_TryRetrieveMon msgbox Route117_PokemonDayCare_Text_ComeAgain, MSGBOX_DEFAULT release end @@ -284,8 +256,7 @@ Route117_PokemonDayCare_EventScript_TwoMonsInDaycare:: Route117_PokemonDayCare_EventScript_UnusedRetrieveMon:: special ShowDaycareLevelMenu waitstate - compare VAR_RESULT, 2 - goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain + goto_if_eq VAR_RESULT, 2, Route117_PokemonDayCare_EventScript_ComeAgain copyvar VAR_0x8004, VAR_RESULT specialvar VAR_RESULT, TakePokemonFromDaycare msgbox Route117_PokemonDayCare_Text_HeresYourMon, MSGBOX_DEFAULT diff --git a/data/scripts/field_move_scripts.inc b/data/scripts/field_move_scripts.inc index 39a04ae1a..3e99fc08e 100644 --- a/data/scripts/field_move_scripts.inc +++ b/data/scripts/field_move_scripts.inc @@ -3,14 +3,12 @@ EventScript_CutTree:: lockall goto_if_unset FLAG_BADGE01_GET, EventScript_CheckTreeCantCut checkpartymove MOVE_CUT - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CheckTreeCantCut + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CheckTreeCantCut setfieldeffectargument 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT buffermovename STR_VAR_2, MOVE_CUT msgbox Text_WantToCut, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CancelCut + goto_if_eq VAR_RESULT, NO, EventScript_CancelCut msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_CUT_ON_TREE @@ -64,14 +62,12 @@ EventScript_RockSmash:: lockall goto_if_unset FLAG_BADGE03_GET, EventScript_CantSmashRock checkpartymove MOVE_ROCK_SMASH - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantSmashRock + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSmashRock setfieldeffectargument 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT buffermovename STR_VAR_2, MOVE_ROCK_SMASH msgbox Text_WantToSmash, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CancelSmash + goto_if_eq VAR_RESULT, NO, EventScript_CancelSmash msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_ROCK_SMASH @@ -92,11 +88,9 @@ EventScript_SmashRock:: waitmovement 0 removeobject VAR_LAST_TALKED specialvar VAR_RESULT, TryUpdateRusturfTunnelState - compare VAR_RESULT, TRUE - goto_if_eq EventScript_EndSmash + goto_if_eq VAR_RESULT, TRUE, EventScript_EndSmash special RockSmashWildEncounter - compare VAR_RESULT, FALSE - goto_if_eq EventScript_EndSmash + goto_if_eq VAR_RESULT, FALSE, EventScript_EndSmash waitstate releaseall end @@ -132,12 +126,10 @@ EventScript_StrengthBoulder:: goto_if_unset FLAG_BADGE04_GET, EventScript_CantStrength goto_if_set FLAG_SYS_USE_STRENGTH, EventScript_CheckActivatedBoulder checkpartymove MOVE_STRENGTH - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantStrength + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantStrength setfieldeffectargument 0, VAR_RESULT msgbox Text_WantToStrength, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CancelStrength + goto_if_eq VAR_RESULT, NO, EventScript_CancelStrength closemessage dofieldeffect FLDEFF_USE_STRENGTH waitstate @@ -193,13 +185,11 @@ Text_StrengthActivated: EventScript_UseWaterfall:: lockall checkpartymove MOVE_WATERFALL - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantWaterfall + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantWaterfall bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT msgbox Text_WantToWaterfall, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndWaterfall + goto_if_eq VAR_RESULT, NO, EventScript_EndWaterfall msgbox Text_MonUsedWaterfall, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_WATERFALL goto EventScript_EndWaterfall @@ -228,14 +218,12 @@ Text_MonUsedWaterfall: EventScript_UseDive:: lockall checkpartymove MOVE_DIVE - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantDive + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantDive bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToDive, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndDive + goto_if_eq VAR_RESULT, NO, EventScript_EndDive msgbox Text_MonUsedDive, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_DIVE goto EventScript_EndDive @@ -253,14 +241,12 @@ EventScript_EndDive:: EventScript_UseDiveUnderwater:: lockall checkpartymove MOVE_DIVE - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantSurface + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSurface bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToSurface, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndSurface + goto_if_eq VAR_RESULT, NO, EventScript_EndSurface msgbox Text_MonUsedDive, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_DIVE goto EventScript_EndSurface diff --git a/data/scripts/field_poison.inc b/data/scripts/field_poison.inc index a4f9b90b6..ddda34eba 100644 --- a/data/scripts/field_poison.inc +++ b/data/scripts/field_poison.inc @@ -2,10 +2,8 @@ EventScript_FieldPoison:: lockall special TryFieldPoisonWhiteOut waitstate - compare VAR_RESULT, FLDPSN_WHITEOUT - goto_if_eq EventScript_FieldWhiteOut - compare VAR_RESULT, FLDPSN_FRONTIER_WHITEOUT - goto_if_eq EventScript_FrontierFieldWhiteOut + goto_if_eq VAR_RESULT, FLDPSN_WHITEOUT, EventScript_FieldWhiteOut + goto_if_eq VAR_RESULT, FLDPSN_FRONTIER_WHITEOUT, EventScript_FrontierFieldWhiteOut releaseall end @@ -30,16 +28,12 @@ EventScript_FrontierFieldWhiteOut:: waitmessage waitbuttonpress pike_inchallenge - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePike_EventScript_Retire + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePike_EventScript_Retire pyramid_inchallenge - compare VAR_RESULT, 1 @ On Pyramid floor - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, 2 @ On Pyramid peak - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost @ On Pyramid floor + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost @ On Pyramid peak trainerhill_inchallenge - compare VAR_RESULT, TRUE - goto_if_eq TrainerHill_1F_EventScript_Lost + goto_if_eq VAR_RESULT, TRUE, TrainerHill_1F_EventScript_Lost special Script_FadeOutMapMusic waitstate fadescreen FADE_TO_BLACK diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc index 68be27a02..e3dbdfd66 100644 --- a/data/scripts/gabby_and_ty.inc +++ b/data/scripts/gabby_and_ty.inc @@ -199,12 +199,9 @@ GabbyAndTy_EventScript_TyBattle6:: GabbyAndTy_EventScript_FirstInterview:: special GabbyAndTyBeforeInterview special GetGabbyAndTyLocalIds - compare VAR_FACING, DIR_NORTH - call_if_eq GabbyAndTy_EventScript_FacePlayerNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq GabbyAndTy_EventScript_FacePlayerSouth - compare VAR_FACING, DIR_EAST - call_if_eq GabbyAndTy_EventScript_FacePlayerEast + 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 msgbox GabbyAndTy_Text_WhoAreYouInterview, MSGBOX_YESNO goto GabbyAndTy_EventScript_Interview @@ -230,16 +227,12 @@ GabbyAndTy_EventScript_FacePlayerEast:: GabbyAndTy_EventScript_RequestInterview:: special GabbyAndTyBeforeInterview special GetGabbyAndTyLocalIds - compare VAR_FACING, DIR_NORTH - call_if_eq GabbyAndTy_EventScript_FacePlayerNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq GabbyAndTy_EventScript_FacePlayerSouth - compare VAR_FACING, DIR_EAST - call_if_eq GabbyAndTy_EventScript_FacePlayerEast + 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 specialvar VAR_RESULT, GabbyAndTyGetLastQuote - compare VAR_RESULT, 0 - goto_if_eq GabbyAndTy_EventScript_DidntInterviewLastTime + goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DidntInterviewLastTime msgbox GabbyAndTy_Text_QuoteFromLastInterview, MSGBOX_DEFAULT specialvar VAR_RESULT, GabbyAndTyGetLastBattleTrivia switch VAR_RESULT @@ -293,15 +286,13 @@ GabbyAndTy_EventScript_RequestInterviewLostAMon:: end GabbyAndTy_EventScript_Interview:: - compare VAR_RESULT, NO - goto_if_eq GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut + goto_if_eq VAR_RESULT, NO, GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut msgbox GabbyAndTy_Text_DescribeYourFeelings, MSGBOX_DEFAULT setvar VAR_0x8004, EASY_CHAT_TYPE_GABBY_AND_TY call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut + goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut msgbox GabbyAndTy_Text_PerfectWellBeSeeingYou, MSGBOX_DEFAULT special GabbyAndTyAfterInterview setflag FLAG_TEMP_1 diff --git a/data/scripts/gift_altering_cave.inc b/data/scripts/gift_altering_cave.inc index 8761b5fa4..f86432ce2 100644 --- a/data/scripts/gift_altering_cave.inc +++ b/data/scripts/gift_altering_cave.inc @@ -1,8 +1,7 @@ MysteryGiftScript_AlteringCave:: setvaddress MysteryGiftScript_AlteringCave addvar VAR_ALTERING_CAVE_WILD_SET, 1 - compare VAR_ALTERING_CAVE_WILD_SET, 10 - vgoto_if_ne MysteryGiftScript_AlteringCave_ + vgoto_if_ne VAR_ALTERING_CAVE_WILD_SET, 10, MysteryGiftScript_AlteringCave_ setvar VAR_ALTERING_CAVE_WILD_SET, 0 MysteryGiftScript_AlteringCave_: lock diff --git a/data/scripts/gift_aurora_ticket.inc b/data/scripts/gift_aurora_ticket.inc index 760bea939..0cadf804a 100644 --- a/data/scripts/gift_aurora_ticket.inc +++ b/data/scripts/gift_aurora_ticket.inc @@ -5,14 +5,12 @@ MysteryGiftScript_AuroraTicket:: vgoto_if_set FLAG_RECEIVED_AURORA_TICKET, AuroraTicket_Obtained vgoto_if_set FLAG_BATTLED_DEOXYS, AuroraTicket_Obtained checkitem ITEM_AURORA_TICKET - compare VAR_RESULT, TRUE - vgoto_if_eq AuroraTicket_Obtained + vgoto_if_eq VAR_RESULT, TRUE, AuroraTicket_Obtained vmessage sText_AuroraTicketForYou waitmessage waitbuttonpress checkitemspace ITEM_AURORA_TICKET - compare VAR_RESULT, FALSE - vgoto_if_eq AuroraTicket_NoBagSpace + vgoto_if_eq VAR_RESULT, FALSE, AuroraTicket_NoBagSpace giveitem ITEM_AURORA_TICKET setflag FLAG_ENABLE_SHIP_BIRTH_ISLAND setflag FLAG_RECEIVED_AURORA_TICKET diff --git a/data/scripts/gift_battle_card.inc b/data/scripts/gift_battle_card.inc index 80b4ba26e..95e55e1b9 100644 --- a/data/scripts/gift_battle_card.inc +++ b/data/scripts/gift_battle_card.inc @@ -3,8 +3,7 @@ MysteryGiftScript_BattleCard:: vgoto_if_set FLAG_MYSTERY_GIFT_DONE, MysteryGiftScript_BattleCardInfo setorcopyvar VAR_RESULT, GET_CARD_BATTLES_WON specialvar VAR_0x8008, GetMysteryGiftCardStat - compare VAR_0x8008, REQUIRED_CARD_BATTLES - vgoto_if_ne MysteryGiftScript_BattleCardInfo + vgoto_if_ne VAR_0x8008, REQUIRED_CARD_BATTLES, MysteryGiftScript_BattleCardInfo lock faceplayer vmessage sText_MysteryGiftBattleCountCard_WonPrize diff --git a/data/scripts/gift_mystic_ticket.inc b/data/scripts/gift_mystic_ticket.inc index 1a28dd4ce..3ed8aa6bc 100644 --- a/data/scripts/gift_mystic_ticket.inc +++ b/data/scripts/gift_mystic_ticket.inc @@ -6,14 +6,12 @@ MysteryGiftScript_MysticTicket:: vgoto_if_set FLAG_CAUGHT_LUGIA, MysticTicket_Obtained vgoto_if_set FLAG_CAUGHT_HO_OH, MysticTicket_Obtained checkitem ITEM_MYSTIC_TICKET - compare VAR_RESULT, TRUE - vgoto_if_eq MysticTicket_Obtained + vgoto_if_eq VAR_RESULT, TRUE, MysticTicket_Obtained vmessage sText_MysticTicketForYou waitmessage waitbuttonpress checkitemspace ITEM_MYSTIC_TICKET - compare VAR_RESULT, FALSE - vgoto_if_eq MysticTicket_NoBagSpace + vgoto_if_eq VAR_RESULT, FALSE, MysticTicket_NoBagSpace giveitem ITEM_MYSTIC_TICKET setflag FLAG_ENABLE_SHIP_NAVEL_ROCK setflag FLAG_RECEIVED_MYSTIC_TICKET diff --git a/data/scripts/gift_old_sea_map.inc b/data/scripts/gift_old_sea_map.inc index b0f258807..06435492e 100644 --- a/data/scripts/gift_old_sea_map.inc +++ b/data/scripts/gift_old_sea_map.inc @@ -5,14 +5,12 @@ MysteryGiftScript_OldSeaMap:: vgoto_if_set FLAG_RECEIVED_OLD_SEA_MAP, OldSeaMap_Obtained vgoto_if_set FLAG_CAUGHT_MEW, OldSeaMap_Obtained checkitem ITEM_OLD_SEA_MAP - compare VAR_RESULT, TRUE - vgoto_if_eq OldSeaMap_Obtained + vgoto_if_eq VAR_RESULT, TRUE, OldSeaMap_Obtained vmessage sText_MysteryGiftOldSeaMapForYou waitmessage waitbuttonpress checkitemspace ITEM_OLD_SEA_MAP - compare VAR_RESULT, FALSE - vgoto_if_eq OldSeaMap_NoBagSpace + vgoto_if_eq VAR_RESULT, FALSE, OldSeaMap_NoBagSpace giveitem ITEM_OLD_SEA_MAP setflag FLAG_ENABLE_SHIP_FARAWAY_ISLAND setflag FLAG_RECEIVED_OLD_SEA_MAP diff --git a/data/scripts/gift_pichu.inc b/data/scripts/gift_pichu.inc index e62fc4536..d2cd381b5 100644 --- a/data/scripts/gift_pichu.inc +++ b/data/scripts/gift_pichu.inc @@ -5,8 +5,7 @@ MysteryGiftScript_SurfPichu:: SurfPichu_GiveIfPossible: specialvar VAR_GIFT_PICHU_SLOT, CalculatePlayerPartyCount - compare VAR_GIFT_PICHU_SLOT, PARTY_SIZE - vgoto_if_eq SurfPichu_FullParty + vgoto_if_eq VAR_GIFT_PICHU_SLOT, PARTY_SIZE, SurfPichu_FullParty setflag FLAG_MYSTERY_GIFT_DONE vcall SurfPichu_GiveEgg lock @@ -32,16 +31,11 @@ SurfPichu_GiveEgg: giveegg SPECIES_PICHU setmoneventlegal VAR_GIFT_PICHU_SLOT setmonmetlocation VAR_GIFT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER - compare VAR_GIFT_PICHU_SLOT, 1 - vgoto_if_eq SurfPichu_Slot1 - compare VAR_GIFT_PICHU_SLOT, 2 - vgoto_if_eq SurfPichu_Slot2 - compare VAR_GIFT_PICHU_SLOT, 3 - vgoto_if_eq SurfPichu_Slot3 - compare VAR_GIFT_PICHU_SLOT, 4 - vgoto_if_eq SurfPichu_Slot4 - compare VAR_GIFT_PICHU_SLOT, 5 - vgoto_if_eq SurfPichu_Slot5 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 1, SurfPichu_Slot1 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 2, SurfPichu_Slot2 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 3, SurfPichu_Slot3 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 4, SurfPichu_Slot4 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 5, SurfPichu_Slot5 return SurfPichu_Slot1: diff --git a/data/scripts/gift_trainer.inc b/data/scripts/gift_trainer.inc index 2dbc86d53..b92780905 100644 --- a/data/scripts/gift_trainer.inc +++ b/data/scripts/gift_trainer.inc @@ -1,8 +1,7 @@ MysteryGiftScript_VisitingTrainer:: setvaddress MysteryGiftScript_VisitingTrainer special ValidateEReaderTrainer - compare VAR_RESULT, 0 - vgoto_if_eq MysteryGiftScript_VisitingTrainerArrived + vgoto_if_eq VAR_RESULT, 0, MysteryGiftScript_VisitingTrainerArrived lock faceplayer vmessage sText_MysteryGiftVisitingTrainerInstructions diff --git a/data/scripts/hall_of_fame.inc b/data/scripts/hall_of_fame.inc index 9b730de31..fc082870f 100644 --- a/data/scripts/hall_of_fame.inc +++ b/data/scripts/hall_of_fame.inc @@ -2,8 +2,7 @@ EverGrandeCity_HallOfFame_EventScript_SetGameClearFlags:: special SetChampionSaveWarp setflag FLAG_IS_CHAMPION call EverGrandeCity_HallOfFame_EventScript_ResetDefeatedEventLegendaries - compare VAR_FOSSIL_MANIAC_STATE, 0 - call_if_eq EverGrandeCity_HallOfFame_EventScript_SetDesertUnderpassCommentReady + call_if_eq VAR_FOSSIL_MANIAC_STATE, 0, EverGrandeCity_HallOfFame_EventScript_SetDesertUnderpassCommentReady clearflag FLAG_HIDE_LILYCOVE_MOTEL_GAME_DESIGNERS call EverGrandeCity_HallOfFame_EventScript_ResetEliteFour setflag FLAG_HIDE_SLATEPORT_CITY_STERNS_SHIPYARD_MR_BRINEY @@ -22,8 +21,7 @@ EverGrandeCity_HallOfFame_EventScript_SetGameClearFlags:: call_if_unset FLAG_RECEIVED_BELDUM, EverGrandeCity_HallOfFame_EventScript_ShowStevensHouseBeldum setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 0 - call_if_eq EverGrandeCity_HallOfFame_EventScript_ReadyDexUpgradeEvent + call_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 0, EverGrandeCity_HallOfFame_EventScript_ReadyDexUpgradeEvent return EverGrandeCity_HallOfFame_EventScript_ResetDefeatedEventLegendaries:: diff --git a/data/scripts/interview.inc b/data/scripts/interview.inc index 90fceb9d1..e102bf889 100644 --- a/data/scripts/interview.inc +++ b/data/scripts/interview.inc @@ -8,14 +8,11 @@ Interview_EventScript_EndInterview:: SlateportCity_PokemonFanClub_EventScript_ReporterNoNickname:: setvar VAR_0x8005, TVSHOW_FAN_CLUB_LETTER special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_AlreadyInterviewed2 + goto_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_AlreadyInterviewed2 copyvar VAR_0x8009, VAR_0x8006 msgbox SlateportCity_PokemonFanClub_Text_InterviewRequest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_PokemonFanClub_EventScript_AcceptInterview2 - compare VAR_RESULT, NO - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview2 + goto_if_eq VAR_RESULT, YES, SlateportCity_PokemonFanClub_EventScript_AcceptInterview2 + goto_if_eq VAR_RESULT, NO, SlateportCity_PokemonFanClub_EventScript_DeclineInterview2 end SlateportCity_PokemonFanClub_EventScript_AcceptInterview2:: @@ -26,10 +23,8 @@ SlateportCity_PokemonFanClub_EventScript_AcceptInterview2:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_SubmitResponse2 - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview2 + goto_if_eq VAR_RESULT, 1, SlateportCity_PokemonFanClub_EventScript_SubmitResponse2 + goto_if_eq VAR_RESULT, 0, SlateportCity_PokemonFanClub_EventScript_DeclineInterview2 end SlateportCity_PokemonFanClub_EventScript_DeclineInterview2:: @@ -53,24 +48,19 @@ SlateportCity_OceanicMuseum_1F_EventScript_Reporter:: faceplayer setvar VAR_0x8005, TVSHOW_RECENT_HAPPENINGS special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_AlreadyInterviewed + goto_if_eq VAR_RESULT, TRUE, SlateportCity_OceanicMuseum_1F_EventScript_AlreadyInterviewed copyvar VAR_0x8009, VAR_0x8006 goto_if_set FLAG_OCEANIC_MUSEUM_MET_REPORTER, SlateportCity_OceanicMuseum_1F_EventScript_RequestInterviewShort setflag FLAG_OCEANIC_MUSEUM_MET_REPORTER msgbox SlateportCity_OceanicMuseum_1F_Text_InterviewRequest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview end SlateportCity_OceanicMuseum_1F_EventScript_RequestInterviewShort:: msgbox SlateportCity_OceanicMuseum_1F_Text_InterviewRequestShort, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview end SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview:: @@ -81,10 +71,8 @@ SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_SubmitResponse - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 1, SlateportCity_OceanicMuseum_1F_EventScript_SubmitResponse + goto_if_eq VAR_RESULT, 0, SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview end SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview:: @@ -107,18 +95,14 @@ SlateportCity_PokemonFanClub_EventScript_Reporter:: lock faceplayer specialvar VAR_RESULT, IsLeadMonNicknamedOrNotEnglish - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_ReporterNoNickname + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_ReporterNoNickname setvar VAR_0x8005, TVSHOW_PKMN_FAN_CLUB_OPINIONS special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_AlreadyInterviewed + goto_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_AlreadyInterviewed copyvar VAR_0x8009, VAR_0x8006 msgbox SlateportCity_PokemonFanClub_Text_InterviewRequestHasName, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_PokemonFanClub_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, SlateportCity_PokemonFanClub_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, SlateportCity_PokemonFanClub_EventScript_DeclineInterview end SlateportCity_PokemonFanClub_EventScript_AcceptInterview:: @@ -153,15 +137,13 @@ SlateportCity_PokemonFanClub_EventScript_ContinueInterview:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 0, SlateportCity_PokemonFanClub_EventScript_DeclineInterview msgbox SlateportCity_PokemonFanClub_Text_WhatDoPokemonMeanToYou, MSGBOX_DEFAULT setvar VAR_0x8006, 1 call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 0, SlateportCity_PokemonFanClub_EventScript_DeclineInterview msgbox SlateportCity_PokemonFanClub_Text_ThatsAllForInterview, MSGBOX_DEFAULT copyvar VAR_0x8007, VAR_0x800A setvar VAR_0x8005, TVSHOW_PKMN_FAN_CLUB_OPINIONS @@ -184,14 +166,11 @@ LilycoveCity_ContestLobby_EventScript_Reporter:: goto_if_set FLAG_TEMP_2, LilycoveCity_ContestLobby_EventScript_AlreadyInterviewed setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_AlreadyInterviewed + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_AlreadyInterviewed copyvar VAR_0x8009, VAR_0x8006 msgbox LilycoveCity_ContestLobby_Text_InterviewRequest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_ContestLobby_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, LilycoveCity_ContestLobby_EventScript_DeclineInterview end LilycoveCity_ContestLobby_EventScript_AcceptInterview:: @@ -202,10 +181,8 @@ LilycoveCity_ContestLobby_EventScript_AcceptInterview:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_ContestLobby_EventScript_SubmitResponse - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_ContestLobby_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 1, LilycoveCity_ContestLobby_EventScript_SubmitResponse + goto_if_eq VAR_RESULT, 0, LilycoveCity_ContestLobby_EventScript_DeclineInterview end LilycoveCity_ContestLobby_EventScript_DeclineInterview:: @@ -223,8 +200,7 @@ LilycoveCity_ContestLobby_EventScript_SubmitResponse:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_ContestLobby_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 0, LilycoveCity_ContestLobby_EventScript_DeclineInterview msgbox LilycoveCity_ContestLobby_Text_ThatsAllForInterview, MSGBOX_DEFAULT setflag FLAG_TEMP_2 setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE @@ -237,12 +213,10 @@ LilycoveCity_ContestLobby_EventScript_AlreadyInterviewed:: end LilycoveCity_ContestLobby_EventScript_TryShowContestReporter:: - compare VAR_CONTEST_HALL_STATE, 2 - goto_if_ne LilycoveCity_ContestLobby_EventScript_DontShowContestReporter + goto_if_ne VAR_CONTEST_HALL_STATE, 2, LilycoveCity_ContestLobby_EventScript_DontShowContestReporter setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_DontShowContestReporter + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_DontShowContestReporter switch VAR_CONTEST_TYPE case 0, LilycoveCity_ContestLobby_EventScript_DontShowContestReporter case 2, LilycoveCity_ContestLobby_EventScript_ShowContestReporter @@ -265,14 +239,11 @@ BattleFrontier_BattleTowerLobby_EventScript_Reporter:: goto_if_set FLAG_TEMP_2, BattleFrontier_BattleTowerLobby_EventScript_AlreadyInterviewed setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AlreadyInterviewed + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_AlreadyInterviewed copyvar VAR_0x8009, VAR_0x8006 msgbox BattleFrontier_BattleTowerLobby_Text_InterviewRequest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, BattleFrontier_BattleTowerLobby_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, BattleFrontier_BattleTowerLobby_EventScript_DeclineInterview end BattleFrontier_BattleTowerLobby_EventScript_AcceptInterview:: @@ -280,20 +251,16 @@ BattleFrontier_BattleTowerLobby_EventScript_AcceptInterview:: waitmessage multichoice 20, 8, MULTI_SATISFACTION, TRUE copyvar VAR_0x8008, VAR_RESULT - compare VAR_RESULT, 0 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_Satisfied - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_Dissatisfied + call_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_Satisfied + call_if_eq VAR_RESULT, 1, BattleFrontier_BattleTowerLobby_EventScript_Dissatisfied msgbox BattleFrontier_BattleTowerLobby_Text_DescribeYourBattle, MSGBOX_DEFAULT setvar VAR_0x8004, EASY_CHAT_TYPE_BATTLE_TOWER_INTERVIEW copyvar VAR_0x8005, VAR_0x8009 call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_SubmitResponse - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelInterview + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleTowerLobby_EventScript_SubmitResponse + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelInterview end BattleFrontier_BattleTowerLobby_EventScript_DeclineInterview:: @@ -310,8 +277,7 @@ BattleFrontier_BattleTowerLobby_EventScript_Dissatisfied:: return BattleFrontier_BattleTowerLobby_EventScript_SubmitResponse:: - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelInterview + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelInterview msgbox BattleFrontier_BattleTowerLobby_Text_ThatsGreatLine, MSGBOX_DEFAULT setflag FLAG_TEMP_2 copyvar VAR_0x8004, VAR_0x8008 @@ -330,12 +296,10 @@ BattleFrontier_BattleTowerLobby_EventScript_AlreadyInterviewed:: end BattleFrontier_BattleTowerLobby_EventScript_ShowOrHideReporter:: - compare VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_HideReporter + goto_if_eq VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0, BattleFrontier_BattleTowerLobby_EventScript_HideReporter setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_HideReporter + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_HideReporter clearflag FLAG_HIDE_BATTLE_TOWER_REPORTER return @@ -347,8 +311,7 @@ BattleFrontier_BattleTowerLobby_EventScript_HideReporter:: EventScript_ContestLiveInterview:: setvar VAR_0x8005, TVSHOW_CONTEST_LIVE_UPDATES special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq EventScript_ContestLiveInterviewEnd + goto_if_eq VAR_RESULT, TRUE, EventScript_ContestLiveInterviewEnd setvar VAR_0x8005, TVSHOW_CONTEST_LIVE_UPDATES special InterviewAfter return diff --git a/data/scripts/kecleon.inc b/data/scripts/kecleon.inc index 355e9ad4a..f51dc2fbd 100644 --- a/data/scripts/kecleon.inc +++ b/data/scripts/kecleon.inc @@ -49,16 +49,14 @@ Route119_EventScript_Kecleon2:: EventScript_Kecleon:: checkitem ITEM_DEVON_SCOPE - compare VAR_RESULT, TRUE - goto_if_eq EventScript_AskUseDevonScope + goto_if_eq VAR_RESULT, TRUE, EventScript_AskUseDevonScope msgbox Kecleon_Text_SomethingUnseeable, MSGBOX_DEFAULT release end EventScript_AskUseDevonScope:: msgbox Kecleon_Text_WantToUseDevonScope, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_BattleKecleon + goto_if_eq VAR_RESULT, YES, EventScript_BattleKecleon release end @@ -78,12 +76,9 @@ EventScript_BattleKecleon:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq EventScript_RemoveKecleon - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq EventScript_RemoveKecleon - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq EventScript_RemoveKecleon + goto_if_eq VAR_RESULT, B_OUTCOME_WON, EventScript_RemoveKecleon + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, EventScript_RemoveKecleon + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, EventScript_RemoveKecleon release end diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index c6192b772..5519de979 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -14,12 +14,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_FavorLady:: faceplayer msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheFavorLady, MSGBOX_DEFAULT specialvar VAR_RESULT, GetFavorLadyState - compare VAR_RESULT, LILYCOVE_LADY_STATE_READY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady - compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted - compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_READY, LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED, LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE, LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize end LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted:: @@ -31,20 +28,16 @@ LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady:: special BufferFavorLadyRequest msgbox LilycoveCity_PokemonCenter_1F_Text_ObsessedWithThing, MSGBOX_DEFAULT specialvar VAR_RESULT, HasAnotherPlayerGivenFavorLadyItem - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_RequestItem - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_RequestItem + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem end LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem:: special BufferFavorLadyItemName special BufferFavorLadyPlayerName specialvar VAR_RESULT, DidFavorLadyLikeItem - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing end LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing:: @@ -59,10 +52,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing:: LilycoveCity_PokemonCenter_1F_EventScript_RequestItem:: msgbox LilycoveCity_PokemonCenter_1F_Text_WillYouShareThing, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor end LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor:: @@ -80,26 +71,20 @@ LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem:: setvar VAR_RESULT, 0 special Script_FavorLadyOpenBagMenu waitstate - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem:: msgbox LilycoveCity_PokemonCenter_1F_Text_NotWillingToShare, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem end LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem:: specialvar VAR_RESULT, Script_DoesFavorLadyLikeItem - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem end LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem:: @@ -110,10 +95,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem:: LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem:: specialvar VAR_RESULT, IsFavorLadyThresholdMet - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LovedFavorItem + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_LovedFavorItem end LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem:: @@ -133,10 +116,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize:: specialvar VAR_0x8004, FavorLadyGetPrize msgbox LilycoveCity_PokemonCenter_1F_Text_IllGiveYouThisInReturn, MSGBOX_DEFAULT giveitem VAR_0x8004 - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReceivedFavorPrize + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_ReceivedFavorPrize end LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize:: @@ -154,30 +135,22 @@ LilycoveCity_PokemonCenter_1F_EventScript_QuizLady:: faceplayer msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheQuizLady, MSGBOX_DEFAULT specialvar VAR_RESULT, GetQuizLadyState - compare VAR_RESULT, LILYCOVE_LADY_STATE_READY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz - compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz - compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_READY, LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED, LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE, LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize end LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz:: specialvar VAR_RESULT, GetQuizAuthor - compare VAR_RESULT, QUIZ_AUTHOR_PLAYER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz - compare VAR_RESULT, QUIZ_AUTHOR_OTHER_PLAYER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerQuizReady - compare VAR_RESULT, QUIZ_AUTHOR_LADY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady + goto_if_eq VAR_RESULT, QUIZ_AUTHOR_PLAYER, LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz + goto_if_eq VAR_RESULT, QUIZ_AUTHOR_OTHER_PLAYER, LilycoveCity_PokemonCenter_1F_EventScript_PlayerQuizReady + goto_if_eq VAR_RESULT, QUIZ_AUTHOR_LADY, LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady end LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz:: specialvar VAR_RESULT, IsQuizLadyWaitingForChallenger - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz end LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz:: @@ -198,10 +171,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady:: LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz:: setvar VAR_0x8004, 0 msgbox LilycoveCity_PokemonCenter_1F_Text_TakeQuizChallenge, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz end LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz:: @@ -211,16 +182,12 @@ LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz:: LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz:: special ClearQuizLadyPlayerAnswer - compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion - compare VAR_0x8004, EASY_CHAT_TYPE_QUIZ_ANSWER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer + goto_if_eq VAR_0x8004, 0, LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion + goto_if_eq VAR_0x8004, EASY_CHAT_TYPE_QUIZ_ANSWER, LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState:: - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse end LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion:: @@ -237,10 +204,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer:: LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz:: msgbox LilycoveCity_PokemonCenter_1F_Text_YoureGoingToQuit, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz end LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz:: @@ -252,10 +217,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse:: special SetQuizLadyState_Complete msgbox LilycoveCity_PokemonCenter_1F_Text_WaitForAnswer, MSGBOX_DEFAULT specialvar VAR_RESULT, IsQuizAnswerCorrect - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse end LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse:: @@ -280,10 +243,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse:: @ VAR_RESULT is essentially ignored, both jumps are identical LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize:: specialvar VAR_RESULT, BufferQuizAuthorNameAndCheckIfLady - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1 - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize0 + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1 + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_GivePrize0 end LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1:: @@ -301,8 +262,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_GivePrize:: special BufferQuizPrizeItem special SetQuizLadyState_Complete giveitem VAR_0x8005 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize goto LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz end @@ -314,10 +274,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize:: LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz:: msgbox LilycoveCity_PokemonCenter_1F_Text_MakeYourOwnQuiz, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz end LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz:: @@ -333,18 +291,14 @@ LilycoveCity_PokemonCenter_1F_EventScript_PickPrize:: setvar VAR_RESULT, 0 special Script_QuizLadyOpenBagMenu waitstate - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize:: msgbox LilycoveCity_PokemonCenter_1F_Text_QuitChoosingPrize, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PickPrize + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_PickPrize end LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz:: @@ -356,17 +310,14 @@ LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion:: fadescreen FADE_TO_BLACK special QuizLadySetCustomQuestion waitstate - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion goto LilycoveCity_PokemonCenter_1F_EventScript_FinishMakingQuiz end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion:: msgbox LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizQuestion, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion end LilycoveCity_PokemonCenter_1F_EventScript_FinishMakingQuiz:: @@ -382,19 +333,15 @@ LilycoveCity_PokemonCenter_1F_EventScript_ContestLady:: faceplayer msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheContestLady, MSGBOX_DEFAULT specialvar VAR_RESULT, HasPlayerGivenContestLadyPokeblock - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock end @ Redundant with above script, VAR_RESULT will always be FALSE here LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock:: specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock end LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock:: @@ -406,13 +353,10 @@ LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock:: special Script_BufferContestLadyCategoryAndMonName msgbox LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality, MSGBOX_DEFAULT checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock end LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock:: @@ -424,18 +368,14 @@ LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock:: fadescreen FADE_TO_BLACK special OpenPokeblockCaseForContestLady waitstate - compare VAR_RESULT, 0xFFFF - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock - compare VAR_RESULT, 0xFFFF - goto_if_ne LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock + goto_if_eq VAR_RESULT, 0xFFFF, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock + goto_if_ne VAR_RESULT, 0xFFFF, LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock:: msgbox LilycoveCity_PokemonCenter_1F_Text_ICantHaveOnePokeblock, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock end LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock:: @@ -457,8 +397,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock:: playmoncry VAR_0x8005, CRY_MODE_NORMAL delay 120 waitmoncry - compare VAR_0x8004, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock + goto_if_eq VAR_0x8004, 1, LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock goto LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock end @@ -471,10 +410,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock:: applymovement LOCALID_LILYCOVE_LADY, LilycoveCity_PokemonCenter_1F_Movement_LadyFacePlayer waitmovement 0 delay 60 - compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock - compare VAR_0x8004, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock + goto_if_eq VAR_0x8004, 0, LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock + goto_if_eq VAR_0x8004, 1, LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock end LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock:: @@ -490,8 +427,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock:: LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow:: specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AirContestLadyShow + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_AirContestLadyShow release end @@ -536,16 +472,11 @@ LilycoveCity_PokemonCenter_1F_EventScript_ContestLadyMon:: specialvar VAR_RESULT, GetContestLadyCategory special Script_BufferContestLadyCategoryAndMonName special GetContestLadyMonSpecies - compare VAR_RESULT, CONTEST_CATEGORY_COOL - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon - compare VAR_RESULT, CONTEST_CATEGORY_BEAUTY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Skitty - compare VAR_RESULT, CONTEST_CATEGORY_CUTE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Poochyena - compare VAR_RESULT, CONTEST_CATEGORY_SMART - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Kecleon - compare VAR_RESULT, CONTEST_CATEGORY_TOUGH - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Pikachu + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_COOL, LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_BEAUTY, LilycoveCity_PokemonCenter_1F_EventScript_Skitty + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_CUTE, LilycoveCity_PokemonCenter_1F_EventScript_Poochyena + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_SMART, LilycoveCity_PokemonCenter_1F_EventScript_Kecleon + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_TOUGH, LilycoveCity_PokemonCenter_1F_EventScript_Pikachu end LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon:: diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc index b34f84e8e..e1fa3d179 100644 --- a/data/scripts/mauville_man.inc +++ b/data/scripts/mauville_man.inc @@ -13,10 +13,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_Bard:: lock faceplayer msgbox MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToHearMySong, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PlaySong - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong + goto_if_eq VAR_RESULT, YES, MauvilleCity_PokemonCenter_1F_EventScript_PlaySong + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong end MauvilleCity_PokemonCenter_1F_EventScript_PlaySong:: @@ -24,8 +22,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_PlaySong:: special PlayBardSong delay 60 special HasBardSongBeenChanged - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_WishICouldPlaySongForOthers, MSGBOX_DEFAULT release end @@ -37,10 +34,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong:: MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics:: msgbox MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToWriteSomeLyrics, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics + goto_if_eq VAR_RESULT, YES, MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics end MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics:: @@ -48,15 +43,13 @@ MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics + goto_if_eq VAR_RESULT, 0, MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_LetMeSingItForYou, MSGBOX_DEFAULT setvar VAR_0x8004, 1 special PlayBardSong delay 60 msgbox MauvilleCity_PokemonCenter_1F_Text_ThatHowYouWantedSongToGo, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics special SaveBardSongLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_IllSingThisSongForAWhile, MSGBOX_DEFAULT release @@ -74,16 +67,14 @@ MauvilleCity_PokemonCenter_1F_EventScript_Hipster:: setflag FLAG_SYS_HIPSTER_MEET msgbox MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening, MSGBOX_DEFAULT special GetHipsterSpokenFlag - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord msgbox MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou, MSGBOX_DEFAULT release end MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord:: special HipsterTryTeachWord - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TeachWord + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_TeachWord msgbox MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach, MSGBOX_DEFAULT release end @@ -158,11 +149,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_Trader:: lock faceplayer msgbox MauvilleCity_PokemonCenter_1F_Text_WantToTradeDecor, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineTrade special GetTraderTradedFlag - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded message MauvilleCity_PokemonCenter_1F_Text_PickADecorItem waitmessage goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive @@ -181,16 +170,12 @@ MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded:: MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive:: special TraderMenuGetDecoration waitstate - compare VAR_0x8004, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelPickDecor - compare VAR_0x8004, 0xFFFF - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_InvalidDecor + goto_if_eq VAR_0x8004, 0, MauvilleCity_PokemonCenter_1F_EventScript_CancelPickDecor + goto_if_eq VAR_0x8004, 0xFFFF, MauvilleCity_PokemonCenter_1F_EventScript_InvalidDecor msgbox MauvilleCity_PokemonCenter_1F_Text_OnceBelongedToPlayerDoYouWantIt, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDifferentDecor + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_PickDifferentDecor special DoesPlayerHaveNoDecorations - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive end @@ -220,16 +205,12 @@ MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive:: msgbox MauvilleCity_PokemonCenter_1F_Text_PickTheDecorToTrade, MSGBOX_DEFAULT special TraderShowDecorationMenu waitstate - compare VAR_0x8006, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelGiveDecor - compare VAR_0x8006, 0xFFFF - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DecorInUse + goto_if_eq VAR_0x8006, 0, MauvilleCity_PokemonCenter_1F_EventScript_CancelGiveDecor + goto_if_eq VAR_0x8006, 0xFFFF, MauvilleCity_PokemonCenter_1F_EventScript_DecorInUse special IsDecorationCategoryFull - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_NoRoomForDecor + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_NoRoomForDecor msgbox MauvilleCity_PokemonCenter_1F_Text_SoWellTradeTheseDecor, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive special TraderDoDecorationTrade msgbox MauvilleCity_PokemonCenter_1F_Text_SendDecorToYourPC, MSGBOX_DEFAULT release @@ -816,24 +797,20 @@ MauvilleCity_PokemonCenter_1F_EventScript_Storyteller:: setvar VAR_0x800A, 0 setvar VAR_0x800B, 0 msgbox MauvilleCity_PokemonCenter_1F_Text_WillYouHearMyTale, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller specialvar VAR_RESULT, StorytellerGetFreeStorySlot - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales + goto_if_eq VAR_RESULT, 0, MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales message MauvilleCity_PokemonCenter_1F_Text_WhichTaleToTell waitmessage special StorytellerStoryListMenu waitstate - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection + goto_if_eq VAR_RESULT, 0, MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection setvar VAR_0x8008, 1 special Script_StorytellerDisplayStory waitmessage waitbuttonpress specialvar VAR_RESULT, StorytellerUpdateStat - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales + goto_if_eq VAR_RESULT, 0, MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales goto MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection:: @@ -843,19 +820,16 @@ MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection:: MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_CouldThereBeOtherLegends, MSGBOX_DEFAULT specialvar VAR_RESULT, HasStorytellerAlreadyRecorded - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_StorytellerEnd + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_StorytellerEnd goto MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_IKnowNoTales, MSGBOX_DEFAULT MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouAnyLegendaryTales, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller specialvar VAR_RESULT, Script_StorytellerInitializeRandomStat - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale + goto_if_eq VAR_RESULT, 1, MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale msgbox MauvilleCity_PokemonCenter_1F_Text_NotWorthyOfLegend, MSGBOX_DEFAULT release end @@ -902,26 +876,20 @@ MauvilleCity_PokemonCenter_1F_EventScript_Giddy:: lock faceplayer msgbox MauvilleCity_PokemonCenter_1F_Text_HearMyStory, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineGiddy + goto_if_eq VAR_RESULT, YES, MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineGiddy end MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale:: special GiddyShouldTellAnotherTale - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales end MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale:: special GiddyShouldTellAnotherTale - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales end MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale:: @@ -936,10 +904,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale:: special ShowFieldMessageStringVar4 waitmessage yesnobox 20, 8 - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale + goto_if_eq VAR_RESULT, YES, MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale end MauvilleCity_PokemonCenter_1F_EventScript_DeclineGiddy:: diff --git a/data/scripts/move_tutors.inc b/data/scripts/move_tutors.inc index cc952749d..4155969a0 100644 --- a/data/scripts/move_tutors.inc +++ b/data/scripts/move_tutors.inc @@ -3,16 +3,13 @@ SlateportCity_PokemonFanClub_EventScript_SwaggerTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_SWAGGER, MoveTutor_EventScript_SwaggerTaught msgbox MoveTutor_Text_SwaggerTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SwaggerDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SwaggerDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SwaggerDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SwaggerDeclined msgbox MoveTutor_Text_SwaggerWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_SWAGGER call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_SwaggerDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_SwaggerDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_SWAGGER goto MoveTutor_EventScript_SwaggerTaught end @@ -32,16 +29,13 @@ MauvilleCity_EventScript_RolloutTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_ROLLOUT, MoveTutor_EventScript_RolloutTaught msgbox MoveTutor_Text_RolloutTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_RolloutDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_RolloutDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_RolloutDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_RolloutDeclined msgbox MoveTutor_Text_RolloutWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_ROLLOUT call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_RolloutDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_RolloutDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_ROLLOUT goto MoveTutor_EventScript_RolloutTaught end @@ -61,16 +55,13 @@ VerdanturfTown_PokemonCenter_1F_EventScript_FuryCutterTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_FURY_CUTTER, MoveTutor_EventScript_FuryCutterTaught msgbox MoveTutor_Text_FuryCutterTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_FuryCutterDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_FuryCutterDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_FuryCutterDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_FuryCutterDeclined msgbox MoveTutor_Text_FuryCutterWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_FURY_CUTTER call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_FuryCutterDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_FuryCutterDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_FURY_CUTTER goto MoveTutor_EventScript_FuryCutterTaught end @@ -90,16 +81,13 @@ LavaridgeTown_House_EventScript_MimicTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_MIMIC, MoveTutor_EventScript_MimicTaught msgbox MoveTutor_MimicTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_MimicDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_MimicDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_MimicDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_MimicDeclined msgbox MoveTutor_Text_MimicWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_MIMIC call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_MimicDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_MimicDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_MIMIC goto MoveTutor_EventScript_MimicTaught end @@ -119,16 +107,13 @@ FallarborTown_Mart_EventScript_MetronomeTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_METRONOME, MoveTutor_EventScript_MetronomeTaught msgbox MoveTutor_Text_MetronomeTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_MetronomeDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_MetronomeDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_MetronomeDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_MetronomeDeclined msgbox MoveTutor_Text_MetronomeWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_METRONOME call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_MetronomeDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_MetronomeDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_METRONOME goto MoveTutor_EventScript_MetronomeTaught end @@ -148,16 +133,13 @@ FortreeCity_House2_EventScript_SleepTalkTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_SLEEP_TALK, MoveTutor_EventScript_SleepTalkTaught msgbox MoveTutor_Text_SleepTalkTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SleepTalkDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SleepTalkDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SleepTalkDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SleepTalkDeclined msgbox MoveTutor_Text_SleepTalkWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_SLEEP_TALK call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_SleepTalkDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_SleepTalkDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_SLEEP_TALK goto MoveTutor_EventScript_SleepTalkTaught end @@ -177,16 +159,13 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_SubstituteTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_SUBSTITUTE, MoveTutor_EventScript_SubstituteTaught msgbox MoveTutor_Text_SubstituteTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SubstituteDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SubstituteDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SubstituteDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SubstituteDeclined msgbox MoveTutor_Text_SubstituteWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_SUBSTITUTE call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_SubstituteDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_SubstituteDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_SUBSTITUTE goto MoveTutor_EventScript_SubstituteTaught end @@ -206,16 +185,13 @@ MossdeepCity_EventScript_DynamicPunchTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_DYNAMICPUNCH, MoveTutor_EventScript_DynamicPunchTaught msgbox MoveTutor_Text_DynamicPunchTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_DynamicPunchDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_DynamicPunchDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_DynamicPunchDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_DynamicPunchDeclined msgbox MoveTutor_Text_DynamicPunchWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_DYNAMIC_PUNCH call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_DynamicPunchDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_DynamicPunchDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_DYNAMICPUNCH goto MoveTutor_EventScript_DynamicPunchTaught end @@ -235,16 +211,13 @@ SootopolisCity_PokemonCenter_1F_EventScript_DoubleEdgeTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_DOUBLE_EDGE, MoveTutor_EventScript_DoubleEdgeTaught msgbox MoveTutor_Text_DoubleEdgeTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_DoubleEdgeDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_DoubleEdgeDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_DoubleEdgeDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_DoubleEdgeDeclined msgbox MoveTutor_Text_DoubleEdgeWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_DOUBLE_EDGE call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_DoubleEdgeDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_DoubleEdgeDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_DOUBLE_EDGE goto MoveTutor_EventScript_DoubleEdgeTaught end @@ -264,16 +237,13 @@ PacifidlogTown_PokemonCenter_1F_EventScript_ExplosionTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_EXPLOSION, MoveTutor_EventScript_ExplosionTaught msgbox MoveTutor_Text_ExplosionTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_ExplosionDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_ExplosionDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_ExplosionDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_ExplosionDeclined msgbox MoveTutor_Text_ExplosionWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_EXPLOSION call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_ExplosionDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_ExplosionDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_EXPLOSION goto MoveTutor_EventScript_ExplosionTaught end diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc index 8fa6a68a7..e982858e7 100644 --- a/data/scripts/obtain_item.inc +++ b/data/scripts/obtain_item.inc @@ -11,10 +11,8 @@ EventScript_ObtainItemMessage:: bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT checkitemtype ITEMID call EventScript_BufferPocketNameAndTryFanfare - compare VAR_0x8007, TRUE - call_if_eq EventScript_ObtainedItem - compare VAR_0x8007, FALSE - call_if_eq EventScript_NoRoomForItem + call_if_eq VAR_0x8007, TRUE, EventScript_ObtainedItem + call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForItem return EventScript_BufferPocketNameAndTryFanfare:: @@ -28,32 +26,27 @@ EventScript_BufferPocketNameAndTryFanfare:: EventScript_BufferItemsPocket:: bufferstdstring STR_VAR_3, STDSTRING_ITEMS - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_BufferKeyItemsPocket:: bufferstdstring STR_VAR_3, STDSTRING_KEYITEMS - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_BufferPokeballsPocket:: bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_BufferTMHMsPocket:: bufferstdstring STR_VAR_3, STDSTRING_TMHMS - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedTMHM + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedTMHM return EventScript_BufferBerriesPocket:: bufferstdstring STR_VAR_3, STDSTRING_BERRIES - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_ObtainedItem:: @@ -83,10 +76,8 @@ Std_ObtainDecoration:: EventScript_ObtainDecorationMessage:: bufferdecorationname STR_VAR_2, ITEMID - compare VAR_0x8007, TRUE - call_if_eq EventScript_ObtainedDecor - compare VAR_0x8007, FALSE - call_if_eq EventScript_NoRoomForDecor + call_if_eq VAR_0x8007, TRUE, EventScript_ObtainedDecor + call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForDecor return EventScript_ObtainedDecor:: @@ -112,10 +103,8 @@ Std_FindItem:: bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT checkitemtype ITEMID call EventScript_BufferPocketNameAndTryFanfare - compare VAR_0x8007, TRUE - call_if_eq EventScript_PickUpItem - compare VAR_0x8007, FALSE - call_if_eq EventScript_NoRoomToPickUpItem + call_if_eq VAR_0x8007, TRUE, EventScript_PickUpItem + call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomToPickUpItem release return @@ -124,16 +113,13 @@ EventScript_PickUpItem:: additem VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, BufferTMHMMoveName copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, TRUE - call_if_eq EventScript_FoundTMHM - compare VAR_0x8008, FALSE - call_if_eq EventScript_FoundItem + call_if_eq VAR_0x8008, TRUE, EventScript_FoundTMHM + call_if_eq VAR_0x8008, FALSE, EventScript_FoundItem waitfanfare waitmessage bufferitemnameplural STR_VAR_2, VAR_0x8004, VAR_0x8005 pyramid_inchallenge - compare VAR_RESULT, TRUE - goto_if_eq EventScript_PutBattlePyramidItemInBag + goto_if_eq VAR_RESULT, TRUE, EventScript_PutBattlePyramidItemInBag msgbox gText_PutItemInPocket, MSGBOX_DEFAULT return @@ -164,20 +150,16 @@ EventScript_HiddenItemScript:: bufferitemnameplural STR_VAR_2, VAR_0x8005, 1 checkitemtype VAR_0x8005 call EventScript_BufferPocketNameAndTryFanfare - compare VAR_0x8007, TRUE - goto_if_eq EventScript_PickUpHiddenItem - compare VAR_0x8007, FALSE - goto_if_eq EventScript_NoRoomForHiddenItem + goto_if_eq VAR_0x8007, TRUE, EventScript_PickUpHiddenItem + goto_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForHiddenItem end EventScript_PickUpHiddenItem:: copyvar VAR_0x8008, VAR_0x8004 copyvar VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, BufferTMHMMoveName - compare VAR_RESULT, TRUE - goto_if_eq EventScript_FoundHiddenTMHM - compare VAR_RESULT, FALSE - goto_if_eq EventScript_FoundHiddenItem + goto_if_eq VAR_RESULT, TRUE, EventScript_FoundHiddenTMHM + goto_if_eq VAR_RESULT, FALSE, EventScript_FoundHiddenItem end EventScript_FoundHiddenTMHM:: diff --git a/data/scripts/pc_transfer.inc b/data/scripts/pc_transfer.inc index da92ef1d5..1204bece3 100644 --- a/data/scripts/pc_transfer.inc +++ b/data/scripts/pc_transfer.inc @@ -22,8 +22,7 @@ Common_EventScript_TransferredToPC:: EventScript_TransferredSomeonesPC:: specialvar VAR_RESULT, ShouldShowBoxWasFullMessage - compare VAR_RESULT, TRUE - goto_if_eq EventScript_SomeonesPCBoxFull + goto_if_eq VAR_RESULT, TRUE, EventScript_SomeonesPCBoxFull msgbox gText_PkmnTransferredSomeonesPC, MSGBOX_DEFAULT return @@ -35,8 +34,7 @@ EventScript_SomeonesPCBoxFull:: EventScript_TransferredLanettesPC:: specialvar VAR_RESULT, ShouldShowBoxWasFullMessage - compare VAR_RESULT, TRUE - goto_if_eq EventScript_LanettesPCBoxFull + goto_if_eq VAR_RESULT, TRUE, EventScript_LanettesPCBoxFull msgbox gText_PkmnTransferredLanettesPC, MSGBOX_DEFAULT return diff --git a/data/scripts/pkmn_center_nurse.inc b/data/scripts/pkmn_center_nurse.inc index 310f4d304..64ccdfa77 100644 --- a/data/scripts/pkmn_center_nurse.inc +++ b/data/scripts/pkmn_center_nurse.inc @@ -3,13 +3,10 @@ Common_EventScript_PkmnCenterNurse:: faceplayer setvar VAR_0x8004, 0 specialvar VAR_RESULT, CountPlayerTrainerStars - compare VAR_RESULT, 4 - goto_if_eq EventScript_PkmnCenterNurse_GoldCard + goto_if_eq VAR_RESULT, 4, EventScript_PkmnCenterNurse_GoldCard msgbox gText_WouldYouLikeToRestYourPkmn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_PkmnCenterNurse_HealPkmn - compare VAR_RESULT, NO - goto_if_eq EventScript_PkmnCenterNurse_Goodbye + goto_if_eq VAR_RESULT, YES, EventScript_PkmnCenterNurse_HealPkmn + goto_if_eq VAR_RESULT, NO, EventScript_PkmnCenterNurse_Goodbye end EventScript_PkmnCenterNurse_Goodbye:: @@ -19,10 +16,8 @@ EventScript_PkmnCenterNurse_Goodbye:: @ VAR_0x8004 is 1 when player has Gold Card; jumps are identical EventScript_PkmnCenterNurse_HealPkmn:: incrementgamestat GAME_STAT_USED_POKECENTER - compare VAR_0x8004, 0 - call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn - compare VAR_0x8004, 1 - call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn2 + call_if_eq VAR_0x8004, 0, EventScript_PkmnCenterNurse_IllTakeYourPkmn + call_if_eq VAR_0x8004, 1, EventScript_PkmnCenterNurse_IllTakeYourPkmn2 waitmessage call EventScript_PkmnCenterNurse_TakeAndHealPkmn goto_if_unset FLAG_POKERUS_EXPLAINED, EventScript_PkmnCenterNurse_CheckPokerus @@ -49,20 +44,16 @@ EventScript_PkmnCenterNurse_TakeAndHealPkmn:: EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom:: specialvar VAR_RESULT, PlayerNotAtTrainerHillEntrance - compare VAR_RESULT, 0 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn + goto_if_eq VAR_RESULT, 0, EventScript_PkmnCenterNurse_ReturnPkmn specialvar VAR_RESULT, BufferUnionRoomPlayerName copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, 0 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn - compare VAR_0x8008, 1 - goto_if_eq EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom + goto_if_eq VAR_0x8008, 0, EventScript_PkmnCenterNurse_ReturnPkmn + goto_if_eq VAR_0x8008, 1, EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom end @ VAR_0x8004 is 1 when player has Gold Card EventScript_PkmnCenterNurse_ReturnPkmn:: - compare VAR_0x8004, 1 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn2 + goto_if_eq VAR_0x8004, 1, EventScript_PkmnCenterNurse_ReturnPkmn2 message gText_RestoredPkmnToFullHealth waitmessage applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow @@ -91,10 +82,8 @@ EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom:: EventScript_PkmnCenterNurse_CheckPokerus:: specialvar VAR_RESULT, IsPokerusInParty - compare VAR_RESULT, TRUE - goto_if_eq EventScript_PkmnCenterNurse_ExplainPokerus - compare VAR_RESULT, FALSE - goto_if_eq EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom + goto_if_eq VAR_RESULT, TRUE, EventScript_PkmnCenterNurse_ExplainPokerus + goto_if_eq VAR_RESULT, FALSE, EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom end EventScript_PkmnCenterNurse_ExplainPokerus:: @@ -112,15 +101,13 @@ EventScript_PkmnCenterNurse_GoldCard:: applymovement VAR_0x800B, Common_Movement_Delay48 waitmovement 0 msgbox gText_NoticesGoldCard, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn + goto_if_eq VAR_RESULT, YES, EventScript_PkmnCenterNurse_GoldCardHealPkmn message gText_WeHopeToSeeYouAgain2 return EventScript_PkmnCenterNurse_AskForUsual:: msgbox gText_YouWantTheUsual, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn + goto_if_eq VAR_RESULT, YES, EventScript_PkmnCenterNurse_GoldCardHealPkmn message gText_WeHopeToSeeYouAgain2 return diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index e2e985a7a..caa4e6955 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -11,10 +11,8 @@ PlayersHouse_1F_EventScript_EnterHouseMovingIn:: msgbox PlayersHouse_1F_Text_IsntItNiceInHere, MSGBOX_DEFAULT applymovement VAR_0x8004, Common_Movement_FacePlayer waitmovement 0 - compare VAR_0x8005, MALE - call_if_eq PlayersHouse_1F_EventScript_MomFacePlayerMovingInMale - compare VAR_0x8005, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomFacePlayerMovingInFemale + call_if_eq VAR_0x8005, MALE, PlayersHouse_1F_EventScript_MomFacePlayerMovingInMale + call_if_eq VAR_0x8005, FEMALE, PlayersHouse_1F_EventScript_MomFacePlayerMovingInFemale msgbox PlayersHouse_1F_Text_MoversPokemonGoSetClock, MSGBOX_DEFAULT closemessage setvar VAR_LITTLEROOT_INTRO_STATE, 4 @@ -69,10 +67,8 @@ PlayersHouse_2F_EventScript_WallClock:: setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_1 setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_2 checkplayergender - compare VAR_RESULT, MALE - call_if_eq PlayersHouse_2F_EventScript_MomComesUpstairsMale - compare VAR_RESULT, FEMALE - call_if_eq PlayersHouse_2F_EventScript_MomComesUpstairsFemale + call_if_eq VAR_RESULT, MALE, PlayersHouse_2F_EventScript_MomComesUpstairsMale + call_if_eq VAR_RESULT, FEMALE, PlayersHouse_2F_EventScript_MomComesUpstairsFemale playse SE_EXIT removeobject VAR_0x8008 releaseall @@ -310,16 +306,12 @@ PlayersHouse_1F_Movement_MomReturnToSeatFemale: PlayersHouse_1F_EventScript_Mom:: lock faceplayer - compare VAR_LITTLEROOT_HOUSES_STATE_MAY, 4 - goto_if_eq PlayersHouse_1F_EventScript_DontPushYourselfTooHard - compare VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 4 - goto_if_eq PlayersHouse_1F_EventScript_DontPushYourselfTooHard + goto_if_eq VAR_LITTLEROOT_HOUSES_STATE_MAY, 4, PlayersHouse_1F_EventScript_DontPushYourselfTooHard + goto_if_eq VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 4, PlayersHouse_1F_EventScript_DontPushYourselfTooHard goto_if_set FLAG_HAS_MATCH_CALL, PlayersHouse_1F_EventScript_TryRegisterMom goto_if_set FLAG_RESCUED_BIRCH, PlayersHouse_1F_EventScript_MomHealsParty - compare VAR_TEMP_1, 1 - goto_if_eq PlayersHouse_1F_EventScript_SeeYouHoney - compare VAR_LITTLEROOT_INTRO_STATE, 7 - goto_if_eq PlayersHouse_1F_EventScript_DidYouMeetProfBirch + goto_if_eq VAR_TEMP_1, 1, PlayersHouse_1F_EventScript_SeeYouHoney + goto_if_eq VAR_LITTLEROOT_INTRO_STATE, 7, PlayersHouse_1F_EventScript_DidYouMeetProfBirch msgbox PlayersHouse_1F_Text_IsntItNiceInHere, MSGBOX_DEFAULT release end @@ -351,8 +343,7 @@ PlayersHouse_1F_EventScript_TryGiveAmuletCoin:: goto_if_set FLAG_RECEIVED_AMULET_COIN, PlayersHouse_1F_EventScript_MomHealsParty msgbox PlayersHouse_1F_Text_GotDadsBadgeHeresSomethingFromMom, MSGBOX_DEFAULT giveitem ITEM_AMULET_COIN - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox PlayersHouse_1F_Text_DontPushYourselfTooHard, MSGBOX_DEFAULT setflag FLAG_RECEIVED_AMULET_COIN release @@ -432,14 +423,10 @@ PlayersHouse_1F_Movement_MovePlayerAwayFromDoor: PlayersHouse_1F_EventScript_GetSSTicketAndSeeLatiTV:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq PlayersHouse_1F_EventScript_SetUpObjectEventVarsMale - compare VAR_RESULT, FEMALE - call_if_eq PlayersHouse_1F_EventScript_SetUpObjectEventVarsFemale - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_PlayerEnterRoomMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_PlayerEnterRoomFemale + call_if_eq VAR_RESULT, MALE, PlayersHouse_1F_EventScript_SetUpObjectEventVarsMale + call_if_eq VAR_RESULT, FEMALE, PlayersHouse_1F_EventScript_SetUpObjectEventVarsFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_PlayerEnterRoomMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_PlayerEnterRoomFemale applymovement VAR_0x8009, Common_Movement_FacePlayer waitmovement 0 playse SE_PIN @@ -448,58 +435,44 @@ PlayersHouse_1F_EventScript_GetSSTicketAndSeeLatiTV:: applymovement VAR_0x8009, Common_Movement_Delay48 waitmovement 0 delay 20 - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_DadApproachPlayerMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_DadApproachPlayerFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_DadApproachPlayerMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_DadApproachPlayerFemale msgbox PlayersHouse_1F_Text_TicketFromBrineyCameForYou, MSGBOX_DEFAULT giveitem ITEM_SS_TICKET msgbox PlayersHouse_1F_Text_PortsInSlateportLilycove, MSGBOX_DEFAULT closemessage delay 20 - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachDadMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachDadFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_MomApproachDadMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_MomApproachDadFemale msgbox PlayersHouse_1F_Text_BetterGetBackToGym, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_DadExitsMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_DadExitsFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_DadExitsMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_DadExitsFemale playse SE_DOOR removeobject VAR_0x8009 setflag FLAG_RECEIVED_SS_TICKET delay 30 - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_MomApproachPlayerMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_MomApproachPlayerFemale delay 20 msgbox PlayersHouse_1F_Text_DadShouldStayLonger, MSGBOX_DEFAULT closemessage setflag FLAG_SYS_TV_LATIAS_LATIOS special TurnOnTVScreen delay 60 - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastFemale msgbox PlayersHouse_1F_Text_IsThatABreakingStory, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_PlayerApproachTVForLatiMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_PlayerApproachTVForLatiFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_PlayerApproachTVForLatiMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_PlayerApproachTVForLatiFemale msgbox PlayersHouse_1F_Text_LatiEmergencyNewsFlash, MSGBOX_DEFAULT closemessage clearflag FLAG_SYS_TV_LATIAS_LATIOS setflag FLAG_LATIOS_OR_LATIAS_ROAMING special TurnOffTVScreen - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVFemale msgbox PlayersHouse_1F_Text_WhatColorDidTheySay, MSGBOX_DEFAULT multichoice 22, 8, MULTI_TV_LATI, TRUE copyvar VAR_0x8004, VAR_RESULT diff --git a/data/scripts/prof_birch.inc b/data/scripts/prof_birch.inc index 97a967138..38a5dfec3 100644 --- a/data/scripts/prof_birch.inc +++ b/data/scripts/prof_birch.inc @@ -1,23 +1,14 @@ ProfBirch_EventScript_UpdateLocation:: - compare VAR_PETALBURG_GYM_STATE, 0 - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_PETALBURG_GYM_STATE, 0, Common_EventScript_NopReturn goto_if_set FLAG_SYS_GAME_CLEAR, ProfBirch_EventScript_MoveToLab - compare VAR_BIRCH_STATE, 0 - call_if_eq ProfBirch_EventScript_MoveToLab - compare VAR_BIRCH_STATE, 1 - call_if_eq ProfBirch_EventScript_MoveToLab - compare VAR_BIRCH_STATE, 2 - call_if_eq ProfBirch_EventScript_MoveToRoute101 - compare VAR_BIRCH_STATE, 3 - call_if_eq ProfBirch_EventScript_MoveToRoute101 - compare VAR_BIRCH_STATE, 4 - call_if_eq ProfBirch_EventScript_MoveToRoute103 - compare VAR_BIRCH_STATE, 5 - call_if_eq ProfBirch_EventScript_MoveToRoute103 - compare VAR_BIRCH_STATE, 6 - call_if_eq ProfBirch_EventScript_MoveToLab - compare VAR_BIRCH_STATE, 7 - call_if_eq ProfBirch_EventScript_MoveToLab + call_if_eq VAR_BIRCH_STATE, 0, ProfBirch_EventScript_MoveToLab + call_if_eq VAR_BIRCH_STATE, 1, ProfBirch_EventScript_MoveToLab + call_if_eq VAR_BIRCH_STATE, 2, ProfBirch_EventScript_MoveToRoute101 + call_if_eq VAR_BIRCH_STATE, 3, ProfBirch_EventScript_MoveToRoute101 + call_if_eq VAR_BIRCH_STATE, 4, ProfBirch_EventScript_MoveToRoute103 + call_if_eq VAR_BIRCH_STATE, 5, ProfBirch_EventScript_MoveToRoute103 + call_if_eq VAR_BIRCH_STATE, 6, ProfBirch_EventScript_MoveToLab + call_if_eq VAR_BIRCH_STATE, 7, ProfBirch_EventScript_MoveToLab return ProfBirch_EventScript_MoveToLab:: @@ -49,8 +40,7 @@ ProfBirch_EventScript_RatePokedexOrRegister:: ProfBirch_EventScript_AskRatePokedex:: msgbox gBirchDexRatingText_AreYouCurious, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq ProfBirch_EventScript_DeclineRating + goto_if_eq VAR_RESULT, NO, ProfBirch_EventScript_DeclineRating call ProfBirch_EventScript_RatePokedex release end @@ -77,8 +67,7 @@ ProfBirch_EventScript_RatePokedex:: buffernumberstring STR_VAR_2, VAR_0x8009 @ Num Hoenn caught msgbox gBirchDexRatingText_SoYouveSeenAndCaught, MSGBOX_DEFAULT call ProfBirch_EventScript_ShowRatingMessage - compare VAR_0x800A, 0 - goto_if_eq Common_EventScript_NopReturn @ National dex not enabled + goto_if_eq VAR_0x800A, 0, Common_EventScript_NopReturn @ National dex not enabled setvar VAR_0x8004, 1 specialvar VAR_RESULT, ScriptGetPokedexInfo copyvar VAR_0x8008, VAR_0x8005 diff --git a/data/scripts/profile_man.inc b/data/scripts/profile_man.inc index 2c5b16122..4acf049bd 100644 --- a/data/scripts/profile_man.inc +++ b/data/scripts/profile_man.inc @@ -28,10 +28,8 @@ ProfileMan_EventScript_CreateProfile:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq ProfileMan_EventScript_CancelShowProfile - compare VAR_RESULT, 1 - goto_if_eq ProfileMan_EventScript_ShowProfile + goto_if_eq VAR_RESULT, 0, ProfileMan_EventScript_CancelShowProfile + goto_if_eq VAR_RESULT, 1, ProfileMan_EventScript_ShowProfile end ProfileMan_EventScript_CancelShowProfile:: @@ -80,10 +78,8 @@ ProfileMan_EventScript_CreateNewProfile:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq ProfileMan_EventScript_CancelShowProfile - compare VAR_RESULT, 1 - goto_if_eq ProfileMan_EventScript_ShowProfile + goto_if_eq VAR_RESULT, 0, ProfileMan_EventScript_CancelShowProfile + goto_if_eq VAR_RESULT, 1, ProfileMan_EventScript_ShowProfile end ProfileMan_EventScript_DeclineNewProfile:: diff --git a/data/scripts/questionnaire.inc b/data/scripts/questionnaire.inc index 62e149bb7..849b25a46 100644 --- a/data/scripts/questionnaire.inc +++ b/data/scripts/questionnaire.inc @@ -1,21 +1,16 @@ EventScript_Questionnaire:: lockall msgbox Questionnaire_Text_FillOut, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Questionnaire_EventScript_Release + goto_if_eq VAR_RESULT, NO, Questionnaire_EventScript_Release setvar VAR_0x8004, EASY_CHAT_TYPE_QUESTIONNAIRE call Common_ShowEasyChatScreen lock faceplayer specialvar VAR_0x8008, GetMartEmployeeObjectEventId - compare VAR_0x8004, 1 - goto_if_eq Questionnaire_EventScript_PlayerInputMysteryEventPhrase - compare VAR_0x8004, 2 - goto_if_eq Questionnaire_EventScript_PlayerInputMysteryGiftPhrase - compare VAR_RESULT, 0 - goto_if_eq Questionnaire_EventScript_Release - compare VAR_RESULT, 1 - goto_if_eq Questionnaire_EventScript_ThankYou + goto_if_eq VAR_0x8004, 1, Questionnaire_EventScript_PlayerInputMysteryEventPhrase + goto_if_eq VAR_0x8004, 2, Questionnaire_EventScript_PlayerInputMysteryGiftPhrase + goto_if_eq VAR_RESULT, 0, Questionnaire_EventScript_Release + goto_if_eq VAR_RESULT, 1, Questionnaire_EventScript_ThankYou end Questionnaire_EventScript_PlayerInputMysteryEventPhrase:: diff --git a/data/scripts/record_mix.inc b/data/scripts/record_mix.inc index d1ad84d3a..109fde2a8 100644 --- a/data/scripts/record_mix.inc +++ b/data/scripts/record_mix.inc @@ -3,10 +3,8 @@ EventScript_MixRecordsPrompt:: lock faceplayer msgbox Text_WouldYouLikeToMixRecords, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_MixRecords - compare VAR_RESULT, NO - goto_if_eq EventScript_EndMixRecords + goto_if_eq VAR_RESULT, YES, EventScript_MixRecords + goto_if_eq VAR_RESULT, NO, EventScript_EndMixRecords goto EventScript_EndMixRecords EventScript_MixRecords:: diff --git a/data/scripts/rival_graphics.inc b/data/scripts/rival_graphics.inc index a0fb15f0e..26a5c8fbc 100644 --- a/data/scripts/rival_graphics.inc +++ b/data/scripts/rival_graphics.inc @@ -1,9 +1,7 @@ Common_EventScript_SetupRivalGfxId:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EventScript_SetupRivalGfxIdFemale - compare VAR_RESULT, FEMALE - goto_if_eq EventScript_SetupRivalGfxIdMale + goto_if_eq VAR_RESULT, MALE, EventScript_SetupRivalGfxIdFemale + goto_if_eq VAR_RESULT, FEMALE, EventScript_SetupRivalGfxIdMale end EventScript_SetupRivalGfxIdFemale:: @@ -16,10 +14,8 @@ EventScript_SetupRivalGfxIdMale:: Common_EventScript_SetupRivalOnBikeGfxId:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EventScript_SetupRivalOnBikeGfxIdFemale - compare VAR_RESULT, FEMALE - goto_if_eq EventScript_SetupRivalOnBikeGfxIdMale + goto_if_eq VAR_RESULT, MALE, EventScript_SetupRivalOnBikeGfxIdFemale + goto_if_eq VAR_RESULT, FEMALE, EventScript_SetupRivalOnBikeGfxIdMale end EventScript_SetupRivalOnBikeGfxIdFemale:: @@ -33,10 +29,8 @@ EventScript_SetupRivalOnBikeGfxIdMale:: @ Unused Common_EventScript_SetupRivalGfxIdSameGender:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EventScript_SetupRivalGfxIdMale2 - compare VAR_RESULT, FEMALE - goto_if_eq EventScript_SetupRivalGfxIdFemale2 + goto_if_eq VAR_RESULT, MALE, EventScript_SetupRivalGfxIdMale2 + goto_if_eq VAR_RESULT, FEMALE, EventScript_SetupRivalGfxIdFemale2 end EventScript_SetupRivalGfxIdMale2:: diff --git a/data/scripts/roulette.inc b/data/scripts/roulette.inc index 96f5809d7..7163a449a 100644 --- a/data/scripts/roulette.inc +++ b/data/scripts/roulette.inc @@ -1,23 +1,19 @@ Roulette_EventScript_Table1:: checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 0 getpokenewsactive POKENEWS_GAME_CORNER - compare VAR_RESULT, FALSE - goto_if_eq Roulette_EventScript_Play + goto_if_eq VAR_RESULT, FALSE, Roulette_EventScript_Play addvar VAR_0x8004, ROULETTE_SPECIAL_RATE goto Roulette_EventScript_Play end Roulette_EventScript_Table2:: checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 1 getpokenewsactive POKENEWS_GAME_CORNER - compare VAR_RESULT, FALSE - goto_if_eq Roulette_EventScript_Play + goto_if_eq VAR_RESULT, FALSE, Roulette_EventScript_Play addvar VAR_0x8004, ROULETTE_SPECIAL_RATE goto Roulette_EventScript_Play end diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index 3b7d85a67..eb6a90abd 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -14,8 +14,7 @@ SafariZone_EventScript_Exit:: SafariZone_EventScript_RetirePrompt:: lockall msgbox SafariZone_Text_WouldYouLikeToExit, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SafariZone_EventScript_Retire + goto_if_eq VAR_RESULT, YES, SafariZone_EventScript_Retire releaseall end @@ -43,11 +42,9 @@ SafariZone_EventScript_OutOfBalls:: EventScript_PokeBlockFeeder:: lockall special GetPokeblockFeederInFront - compare VAR_RESULT, 0xFFFF - goto_if_ne SafariZone_EventScript_PokeblockPresent + goto_if_ne VAR_RESULT, 0xFFFF, SafariZone_EventScript_PokeblockPresent msgbox SafariZone_Text_PlacePokeblockOnFeeder, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SafariZone_EventScript_ChoosePokeblock + goto_if_eq VAR_RESULT, YES, SafariZone_EventScript_ChoosePokeblock releaseall end @@ -55,8 +52,7 @@ SafariZone_EventScript_ChoosePokeblock:: fadescreen FADE_TO_BLACK special OpenPokeblockCaseOnFeeder waitstate - compare VAR_RESULT, 0xFFFF - goto_if_ne SafariZone_EventScript_PokeblockPlaced + goto_if_ne VAR_RESULT, 0xFFFF, SafariZone_EventScript_PokeblockPlaced end SafariZone_EventScript_PokeblockPlaced:: diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index f024f0901..d21bb9aab 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -27,33 +27,24 @@ SecretBase_Text_DiscoveredSmallEntrance: SecretBase_EventScript_CheckEntrance:: special GetSecretBaseTypeInFrontOfPlayer special CheckPlayerHasSecretBase - compare VAR_RESULT, TRUE - goto_if_eq SecretBase_EventScript_AlreadyHasSecretBase + goto_if_eq VAR_RESULT, TRUE, SecretBase_EventScript_AlreadyHasSecretBase checkpartymove MOVE_SECRET_POWER setfieldeffectargument 0, VAR_RESULT buffermovename STR_VAR_2, MOVE_SECRET_POWER - compare VAR_0x8007, SECRET_BASE_RED_CAVE - goto_if_eq SecretBase_EventScript_Cave - compare VAR_0x8007, SECRET_BASE_BROWN_CAVE - goto_if_eq SecretBase_EventScript_Cave - compare VAR_0x8007, SECRET_BASE_BLUE_CAVE - goto_if_eq SecretBase_EventScript_Cave - compare VAR_0x8007, SECRET_BASE_YELLOW_CAVE - goto_if_eq SecretBase_EventScript_Cave - compare VAR_0x8007, SECRET_BASE_TREE - goto_if_eq SecretBase_EventScript_Tree - compare VAR_0x8007, SECRET_BASE_SHRUB - goto_if_eq SecretBase_EventScript_Shrub + goto_if_eq VAR_0x8007, SECRET_BASE_RED_CAVE, SecretBase_EventScript_Cave + goto_if_eq VAR_0x8007, SECRET_BASE_BROWN_CAVE, SecretBase_EventScript_Cave + goto_if_eq VAR_0x8007, SECRET_BASE_BLUE_CAVE, SecretBase_EventScript_Cave + goto_if_eq VAR_0x8007, SECRET_BASE_YELLOW_CAVE, SecretBase_EventScript_Cave + goto_if_eq VAR_0x8007, SECRET_BASE_TREE, SecretBase_EventScript_Tree + goto_if_eq VAR_0x8007, SECRET_BASE_SHRUB, SecretBase_EventScript_Shrub end SecretBase_EventScript_Cave:: lockall - compare VAR_RESULT, PARTY_SIZE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_CaveNoSecretPower bufferpartymonnick STR_VAR_1, VAR_RESULT msgbox SecretBase_Text_IndentUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_SECRET_POWER_CAVE @@ -80,12 +71,10 @@ SecretBase_EventScript_CaveEnter:: SecretBase_EventScript_Tree:: lockall - compare VAR_RESULT, PARTY_SIZE - goto_if_eq SecretBase_EventScript_TreeNoSecretPower + goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_TreeNoSecretPower bufferpartymonnick STR_VAR_1, VAR_RESULT msgbox SecretBase_Text_TreeUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_SECRET_POWER_TREE @@ -112,12 +101,10 @@ SecretBase_EventScript_TreeEnter:: SecretBase_EventScript_Shrub:: lockall - compare VAR_RESULT, PARTY_SIZE - goto_if_eq SecretBase_EventScript_ShrubNoSecretPower + goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_ShrubNoSecretPower bufferpartymonnick STR_VAR_1, VAR_RESULT msgbox SecretBase_Text_ClumpUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_SECRET_POWER_SHRUB @@ -161,8 +148,7 @@ SecretBase_EventScript_FirstEntrance:: waitmovement 0 setvar VAR_INIT_SECRET_BASE, 1 msgbox SecretBase_Text_WantToMakeYourSecretBaseHere, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SecretBase_EventScript_SetAsBase + goto_if_eq VAR_RESULT, YES, SecretBase_EventScript_SetAsBase closemessage playse SE_EXIT special ClearAndLeaveSecretBase @@ -185,8 +171,7 @@ SecretBase_EventScript_Enter:: setvar VAR_INIT_SECRET_BASE, 1 playse SE_EXIT special IsCurSecretBaseOwnedByAnotherPlayer - compare VAR_RESULT, FALSE - goto_if_eq SecretBase_EventScript_EnterPlayersBase + goto_if_eq VAR_RESULT, FALSE, SecretBase_EventScript_EnterPlayersBase clearflag FLAG_DECORATION_0 special EnterSecretBase setvar VAR_SECRET_BASE_INITIALIZED, 0 @@ -202,59 +187,43 @@ SecretBase_EventScript_EnterPlayersBase:: SecretBase_EventScript_AlreadyHasSecretBase:: checkpartymove MOVE_SECRET_POWER - compare VAR_RESULT, PARTY_SIZE - goto_if_eq SecretBase_EventScript_NoSecretPower + goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_NoSecretPower setfieldeffectargument 0, VAR_RESULT setorcopyvar VAR_0x8004, VAR_RESULT lockall special GetSecretBaseNearbyMapName msgbox SecretBase_Text_WouldYouLikeToMoveBases, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance msgbox SecretBase_Text_AllDecorationsWillBeReturned, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance fadescreenswapbuffers FADE_TO_BLACK special MoveOutOfSecretBaseFromOutside closemessage fadescreenswapbuffers FADE_FROM_BLACK msgbox SecretBase_Text_MovingCompletedUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance bufferpartymonnick STR_VAR_1, VAR_0x8004 buffermovename STR_VAR_2, MOVE_SECRET_POWER msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage closemessage - compare VAR_0x8007, SECRET_BASE_RED_CAVE - goto_if_eq SecretBase_EventScript_CaveUseSecretPower - compare VAR_0x8007, SECRET_BASE_BROWN_CAVE - goto_if_eq SecretBase_EventScript_CaveUseSecretPower - compare VAR_0x8007, SECRET_BASE_BLUE_CAVE - goto_if_eq SecretBase_EventScript_CaveUseSecretPower - compare VAR_0x8007, SECRET_BASE_YELLOW_CAVE - goto_if_eq SecretBase_EventScript_CaveUseSecretPower - compare VAR_0x8007, SECRET_BASE_TREE - goto_if_eq SecretBase_EventScript_TreeUseSecretPower - compare VAR_0x8007, SECRET_BASE_SHRUB - goto_if_eq SecretBase_EventScript_ShrubUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_RED_CAVE, SecretBase_EventScript_CaveUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_BROWN_CAVE, SecretBase_EventScript_CaveUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_BLUE_CAVE, SecretBase_EventScript_CaveUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_YELLOW_CAVE, SecretBase_EventScript_CaveUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_TREE, SecretBase_EventScript_TreeUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_SHRUB, SecretBase_EventScript_ShrubUseSecretPower releaseall end SecretBase_EventScript_NoSecretPower:: lockall - compare VAR_0x8007, SECRET_BASE_RED_CAVE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower - compare VAR_0x8007, SECRET_BASE_BROWN_CAVE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower - compare VAR_0x8007, SECRET_BASE_BLUE_CAVE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower - compare VAR_0x8007, SECRET_BASE_YELLOW_CAVE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower - compare VAR_0x8007, SECRET_BASE_TREE - goto_if_eq SecretBase_EventScript_TreeNoSecretPower - compare VAR_0x8007, SECRET_BASE_SHRUB - goto_if_eq SecretBase_EventScript_ShrubNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_RED_CAVE, SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_BROWN_CAVE, SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_BLUE_CAVE, SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_YELLOW_CAVE, SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_TREE, SecretBase_EventScript_TreeNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_SHRUB, SecretBase_EventScript_ShrubNoSecretPower end SecretBase_EventScript_CancelOnEntrance:: @@ -302,11 +271,9 @@ SecretBase_EventScript_PutAwayDecoration:: SecretBase_EventScript_PutAwayDecorationLoop:: special PutAwayDecorationIteration - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_PutAwayDecorationEnd + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_PutAwayDecorationEnd addvar VAR_0x8004, 1 - compare VAR_0x8005, 0 - goto_if_eq SecretBase_EventScript_PutAwayDecorationLoop + goto_if_eq VAR_0x8005, 0, SecretBase_EventScript_PutAwayDecorationLoop removeobject VAR_0x8006 setflag VAR_0x8005 @ UB: VAR_0x8005 is set to a flag by PutAwayDecorationIteration, but ScrCmd_setflag doesn't use VarGet goto SecretBase_EventScript_PutAwayDecorationLoop @@ -317,26 +284,16 @@ SecretBase_EventScript_PutAwayDecorationEnd:: SecretBase_EventScript_RecordMixTrainer:: special GetSecretBaseOwnerAndState - compare VAR_0x8004, 0 - goto_if_eq SecretBase_EventScript_Trainer0 - compare VAR_0x8004, 1 - goto_if_eq SecretBase_EventScript_Trainer1 - compare VAR_0x8004, 2 - goto_if_eq SecretBase_EventScript_Trainer2 - compare VAR_0x8004, 3 - goto_if_eq SecretBase_EventScript_Trainer3 - compare VAR_0x8004, 4 - goto_if_eq SecretBase_EventScript_Trainer4 - compare VAR_0x8004, 5 - goto_if_eq SecretBase_EventScript_Trainer5 - compare VAR_0x8004, 6 - goto_if_eq SecretBase_EventScript_Trainer6 - compare VAR_0x8004, 7 - goto_if_eq SecretBase_EventScript_Trainer7 - compare VAR_0x8004, 8 - goto_if_eq SecretBase_EventScript_Trainer8 - compare VAR_0x8004, 9 - goto_if_eq SecretBase_EventScript_Trainer9 + goto_if_eq VAR_0x8004, 0, SecretBase_EventScript_Trainer0 + goto_if_eq VAR_0x8004, 1, SecretBase_EventScript_Trainer1 + goto_if_eq VAR_0x8004, 2, SecretBase_EventScript_Trainer2 + goto_if_eq VAR_0x8004, 3, SecretBase_EventScript_Trainer3 + goto_if_eq VAR_0x8004, 4, SecretBase_EventScript_Trainer4 + goto_if_eq VAR_0x8004, 5, SecretBase_EventScript_Trainer5 + goto_if_eq VAR_0x8004, 6, SecretBase_EventScript_Trainer6 + goto_if_eq VAR_0x8004, 7, SecretBase_EventScript_Trainer7 + goto_if_eq VAR_0x8004, 8, SecretBase_EventScript_Trainer8 + goto_if_eq VAR_0x8004, 9, SecretBase_EventScript_Trainer9 end @ VAR_RESULT is initially set by GetSecretBaseOwnerAndState @@ -344,16 +301,13 @@ SecretBase_EventScript_Trainer0:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer0PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer0PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer0PostBattle msgbox SecretBase_Text_Trainer0Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer0DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer0DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer0DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer0DeclineBattle msgbox SecretBase_Text_Trainer0AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -381,16 +335,13 @@ SecretBase_EventScript_Trainer1:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer1PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer1PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer1PostBattle msgbox SecretBase_Text_Trainer1Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer1DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer1DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer1DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer1DeclineBattle msgbox SecretBase_Text_Trainer1AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -418,16 +369,13 @@ SecretBase_EventScript_Trainer2:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer2PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer2PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer2PostBattle msgbox SecretBase_Text_Trainer2Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer2DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer2DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer2DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer2DeclineBattle msgbox SecretBase_Text_Trainer2AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -455,16 +403,13 @@ SecretBase_EventScript_Trainer3:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer3PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer3PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer3PostBattle msgbox SecretBase_Text_Trainer3Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer3DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer3DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer3DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer3DeclineBattle msgbox SecretBase_Text_Trainer3AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -492,16 +437,13 @@ SecretBase_EventScript_Trainer4:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer4PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer4PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer4PostBattle msgbox SecretBase_Text_Trainer4Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer4DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer4DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer4DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer4DeclineBattle msgbox SecretBase_Text_Trainer4AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -529,16 +471,13 @@ SecretBase_EventScript_Trainer5:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer5PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer5PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer5PostBattle msgbox SecretBase_Text_Trainer5Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer5DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer5DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer5DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer5DeclineBattle msgbox SecretBase_Text_Trainer5AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -566,16 +505,13 @@ SecretBase_EventScript_Trainer6:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer6PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer6PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer6PostBattle msgbox SecretBase_Text_Trainer6Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer6DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer6DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer6DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer6DeclineBattle msgbox SecretBase_Text_Trainer6AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -603,16 +539,13 @@ SecretBase_EventScript_Trainer7:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer7PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer7PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer7PostBattle msgbox SecretBase_Text_Trainer7Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer7DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer7DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer7DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer7DeclineBattle msgbox SecretBase_Text_Trainer7AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -640,16 +573,13 @@ SecretBase_EventScript_Trainer8:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer8PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer8PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer8PostBattle msgbox SecretBase_Text_Trainer8Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer8DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer8DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer8DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer8DeclineBattle msgbox SecretBase_Text_Trainer8AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -677,16 +607,13 @@ SecretBase_EventScript_Trainer9:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer9PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer9PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer9PostBattle msgbox SecretBase_Text_Trainer9Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer9DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer9DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer9DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer9DeclineBattle msgbox SecretBase_Text_Trainer9AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -715,12 +642,9 @@ SecretBase_EventScript_BattleTrainer:: setvar VAR_0x8005, 0 special DoSpecialTrainerBattle waitstate - compare VAR_RESULT, B_OUTCOME_DREW - call_if_eq SecretBase_EventScript_DrewSecretBaseBattle - compare VAR_RESULT, B_OUTCOME_WON - call_if_eq SecretBase_EventScript_WonSecretBaseBattle - compare VAR_RESULT, B_OUTCOME_LOST - call_if_eq SecretBase_EventScript_LostSecretBaseBattle + call_if_eq VAR_RESULT, B_OUTCOME_DREW, SecretBase_EventScript_DrewSecretBaseBattle + call_if_eq VAR_RESULT, B_OUTCOME_WON, SecretBase_EventScript_WonSecretBaseBattle + call_if_eq VAR_RESULT, B_OUTCOME_LOST, SecretBase_EventScript_LostSecretBaseBattle special HealPlayerParty release end diff --git a/data/scripts/secret_power_tm.inc b/data/scripts/secret_power_tm.inc index 41c21e100..11a5d5b66 100644 --- a/data/scripts/secret_power_tm.inc +++ b/data/scripts/secret_power_tm.inc @@ -37,26 +37,21 @@ Route111_EventScript_SecretPowerMan:: lock faceplayer msgbox Route111_Text_MakingRoomUseTMToMakeYourOwn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route111_EventScript_GiveSecretPower + goto_if_eq VAR_RESULT, YES, Route111_EventScript_GiveSecretPower msgbox Route111_Text_DontWantThis, MSGBOX_DEFAULT release end Route111_EventScript_GiveSecretPower:: giveitem ITEM_TM43 - compare VAR_RESULT, FALSE - goto_if_eq Route111_EventScript_NoRoomForSecretPower + goto_if_eq VAR_RESULT, FALSE, Route111_EventScript_NoRoomForSecretPower msgbox Route111_Text_ExplainSecretPower, MSGBOX_DEFAULT closemessage setflag FLAG_RECEIVED_SECRET_POWER clearflag FLAG_HIDE_SLATEPORT_CITY_TM_SALESMAN - compare VAR_FACING, DIR_WEST - call_if_eq Route111_EventScript_SecretPowerManExit - compare VAR_FACING, DIR_EAST - call_if_eq Route111_EventScript_SecretPowerManExit - compare VAR_FACING, DIR_NORTH - call_if_eq Route111_EventScript_SecretPowerManExitNorth + call_if_eq VAR_FACING, DIR_WEST, Route111_EventScript_SecretPowerManExit + call_if_eq VAR_FACING, DIR_EAST, Route111_EventScript_SecretPowerManExit + call_if_eq VAR_FACING, DIR_NORTH, Route111_EventScript_SecretPowerManExitNorth removeobject VAR_LAST_TALKED release end diff --git a/data/scripts/shared_secret_base.inc b/data/scripts/shared_secret_base.inc index aca7fc81a..576e93921 100644 --- a/data/scripts/shared_secret_base.inc +++ b/data/scripts/shared_secret_base.inc @@ -68,8 +68,7 @@ SecretBase_EventScript_PCMainMenuWithoutRegister:: SecretBase_EventScript_PCPackUp:: msgbox SecretBase_Text_AllDecorationsWillBeReturned, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_PCShowMainMenu + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_PCShowMainMenu closemessage special MoveOutOfSecretBase releaseall @@ -114,14 +113,11 @@ SecretBase_EventScript_ShowRegisterMenu:: SecretBase_EventScript_PCRegister:: special GetCurSecretBaseRegistrationValidity - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_AlreadyRegistered - compare VAR_RESULT, 2 - goto_if_eq SecretBase_EventScript_CantRegisterTooManyBases + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_AlreadyRegistered + goto_if_eq VAR_RESULT, 2, SecretBase_EventScript_CantRegisterTooManyBases special CopyCurSecretBaseOwnerName_StrVar1 msgbox SecretBase_Text_WantToRegisterSecretBase, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_PCRegisterMenu + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_PCRegisterMenu msgbox SecretBase_Text_RegistrationCompleted, MSGBOX_SIGN special ToggleCurSecretBaseRegistry special DoSecretBasePCTurnOffEffect @@ -130,8 +126,7 @@ SecretBase_EventScript_PCRegister:: SecretBase_EventScript_AlreadyRegistered:: msgbox SecretBase_Text_AlreadyRegisteredDelete, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_PCRegisterMenu + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_PCRegisterMenu msgbox SecretBase_Text_DataUnregistered, MSGBOX_SIGN special ToggleCurSecretBaseRegistry special DoSecretBasePCTurnOffEffect @@ -184,14 +179,10 @@ SecretBase_EventScript_SandOrnament:: SecretBase_EventScript_ShieldOrToyTV:: special InteractWithShieldOrTVDecoration - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_BattleTowerShield - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_ToyTV - compare VAR_RESULT, 2 - goto_if_eq SecretBase_EventScript_SeedotTV - compare VAR_RESULT, 3 - goto_if_eq SecretBase_EventScript_SkittyTV + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_BattleTowerShield + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_ToyTV + goto_if_eq VAR_RESULT, 2, SecretBase_EventScript_SeedotTV + goto_if_eq VAR_RESULT, 3, SecretBase_EventScript_SkittyTV end SecretBase_EventScript_BattleTowerShield:: diff --git a/data/scripts/surf.inc b/data/scripts/surf.inc index c2bc35d5a..edb116f99 100644 --- a/data/scripts/surf.inc +++ b/data/scripts/surf.inc @@ -1,13 +1,11 @@ EventScript_UseSurf:: checkpartymove MOVE_SURF - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_EndUseSurf + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_EndUseSurf bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT lockall msgbox gText_WantToUseSurf, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_ReleaseUseSurf + goto_if_eq VAR_RESULT, NO, EventScript_ReleaseUseSurf msgbox gText_PlayerUsedSurf, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_SURF EventScript_ReleaseUseSurf:: diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc index 38cf63281..bbbcaf3ba 100644 --- a/data/scripts/trainer_battle.inc +++ b/data/scripts/trainer_battle.inc @@ -13,8 +13,7 @@ EventScript_TryDoNormalTrainerBattle:: applymovement VAR_LAST_TALKED, Movement_RevealTrainer waitmovement 0 specialvar VAR_RESULT, GetTrainerFlag - compare VAR_RESULT, FALSE - goto_if_ne EventScript_NoNormalTrainerBattle + goto_if_ne VAR_RESULT, FALSE, EventScript_NoNormalTrainerBattle special PlayTrainerEncounterMusic special SetTrainerFacingDirection goto EventScript_ShowTrainerIntroMsg @@ -27,11 +26,9 @@ EventScript_TryDoDoubleTrainerBattle:: faceplayer call EventScript_RevealTrainer specialvar VAR_RESULT, GetTrainerFlag - compare VAR_RESULT, FALSE - goto_if_ne EventScript_NoDoubleTrainerBattle + goto_if_ne VAR_RESULT, FALSE, EventScript_NoDoubleTrainerBattle special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne EventScript_NotEnoughMonsForDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, EventScript_NotEnoughMonsForDoubleBattle special PlayTrainerEncounterMusic special SetTrainerFacingDirection goto EventScript_ShowTrainerIntroMsg @@ -56,8 +53,7 @@ EventScript_DoNoIntroTrainerBattle:: EventScript_TryDoRematchBattle:: call EventScript_RevealTrainer specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, FALSE - goto_if_eq EventScript_NoRematchTrainerBattle + goto_if_eq VAR_RESULT, FALSE, EventScript_NoRematchTrainerBattle special PlayTrainerEncounterMusic special SetTrainerFacingDirection special ShowTrainerIntroSpeech @@ -73,11 +69,9 @@ EventScript_NoRematchTrainerBattle:: EventScript_TryDoDoubleRematchBattle:: specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, FALSE - goto_if_eq EventScript_NoDoubleRematchTrainerBattle + goto_if_eq VAR_RESULT, FALSE, EventScript_NoDoubleRematchTrainerBattle special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne EventScript_NotEnoughMonsForDoubleRematchBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, EventScript_NotEnoughMonsForDoubleRematchBattle special PlayTrainerEncounterMusic special SetTrainerFacingDirection special ShowTrainerIntroSpeech @@ -112,24 +106,18 @@ EventScript_ShowTrainerIntroMsg:: waitmessage waitbuttonpress special TryPrepareSecondApproachingTrainer - compare VAR_RESULT, TRUE - goto_if_eq EventScript_TrainerApproach + goto_if_eq VAR_RESULT, TRUE, EventScript_TrainerApproach goto EventScript_DoTrainerBattle EventScript_DoTrainerBattle:: dotrainerbattle @ Below battle mode check only needed in FRLG specialvar VAR_RESULT, GetTrainerBattleMode - compare VAR_RESULT, TRAINER_BATTLE_SINGLE - goto_if_eq EventScript_EndTrainerBattle - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT - goto_if_eq EventScript_EndTrainerBattle - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC - goto_if_eq EventScript_EndTrainerBattle - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE - goto_if_eq EventScript_EndTrainerBattle - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC - goto_if_eq EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_SINGLE, EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT, EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC, EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE, EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC, EventScript_EndTrainerBattle EventScript_EndTrainerBattle:: gotobeatenscript releaseall diff --git a/data/scripts/trainer_hill.inc b/data/scripts/trainer_hill.inc index 8804b71b0..b7f815351 100644 --- a/data/scripts/trainer_hill.inc +++ b/data/scripts/trainer_hill.inc @@ -2,12 +2,9 @@ TrainerHill_OnResume: setvar VAR_TEMP_2, 0 trainerhill_resumetimer frontier_get FRONTIER_DATA_BATTLE_OUTCOME - compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq TrainerHill_1F_EventScript_Lost - compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq TrainerHill_1F_EventScript_Lost - compare VAR_RESULT, B_OUTCOME_FORFEITED - goto_if_eq TrainerHill_1F_EventScript_Lost + goto_if_eq VAR_RESULT, B_OUTCOME_LOST, TrainerHill_1F_EventScript_Lost + goto_if_eq VAR_RESULT, B_OUTCOME_DREW, TrainerHill_1F_EventScript_Lost + goto_if_eq VAR_RESULT, B_OUTCOME_FORFEITED, TrainerHill_1F_EventScript_Lost end TrainerHill_OnWarp: @@ -35,8 +32,7 @@ EventScript_TrainerHillTimer:: TrainerHill_1F_EventScript_DummyWarpToEntranceCounter:: setvar VAR_TEMP_2, 1 trainerhill_getusingereader - compare VAR_RESULT, TRUE @ VAR_RESULT always FALSE here - goto_if_eq TrainerHill_1F_EventScript_WarpSilentToEntranceCounter + goto_if_eq VAR_RESULT, TRUE, TrainerHill_1F_EventScript_WarpSilentToEntranceCounter @ VAR_RESULT always FALSE here end @ Never reached diff --git a/data/scripts/trainer_script.inc b/data/scripts/trainer_script.inc index 5c6303082..c0998aef8 100644 --- a/data/scripts/trainer_script.inc +++ b/data/scripts/trainer_script.inc @@ -12,8 +12,7 @@ Std_RegisteredInMatchCall:: EventScript_TryGetTrainerScript:: special ShouldTryGetTrainerScript - compare VAR_RESULT, TRUE - goto_if_eq EventScript_GotoTrainerScript + goto_if_eq VAR_RESULT, TRUE, EventScript_GotoTrainerScript releaseall end diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc index f8832a3ab..a5a093226 100644 --- a/data/scripts/tv.inc +++ b/data/scripts/tv.inc @@ -3,29 +3,23 @@ EventScript_TV:: incrementgamestat GAME_STAT_WATCHED_TV special ResetTVShowState specialvar VAR_RESULT, CheckForPlayersHouseNews - compare VAR_RESULT, PLAYERS_HOUSE_TV_MOVIE - goto_if_eq EventScript_PlayersHouseMovie - compare VAR_RESULT, PLAYERS_HOUSE_TV_LATI - goto_if_eq EventScript_PlayersHouseLatiNewsFlash + goto_if_eq VAR_RESULT, PLAYERS_HOUSE_TV_MOVIE, EventScript_PlayersHouseMovie + goto_if_eq VAR_RESULT, PLAYERS_HOUSE_TV_LATI, EventScript_PlayersHouseLatiNewsFlash goto_if_unset FLAG_SYS_TV_START, EventScript_MomDadMightLikeThis1 goto_if_set FLAG_SYS_TV_WATCH, EventScript_MomDadMightLikeThis1 specialvar VAR_RESULT, IsGabbyAndTyShowOnTheAir - compare VAR_RESULT, TRUE - goto_if_eq EventScript_DoInSearchOfTrainers + goto_if_eq VAR_RESULT, TRUE, EventScript_DoInSearchOfTrainers goto EventScript_TryDoPokeNews end EventScript_TryDoTVShow:: specialvar VAR_0x8004, GetRandomActiveShowIdx - compare VAR_0x8004, 255 - goto_if_eq EventScript_MomDadMightLikeThis2 + goto_if_eq VAR_0x8004, 255, EventScript_MomDadMightLikeThis2 specialvar VAR_RESULT, GetNextActiveShowIfMassOutbreak - compare VAR_RESULT, 255 - goto_if_eq EventScript_MomDadMightLikeThis2 + goto_if_eq VAR_RESULT, 255, EventScript_MomDadMightLikeThis2 copyvar VAR_0x8004, VAR_RESULT specialvar VAR_RESULT, GetSelectedTVShow - compare VAR_RESULT, 0 - goto_if_ne EventScript_DoTVShow + goto_if_ne VAR_RESULT, 0, EventScript_DoTVShow end EventScript_MomDadMightLikeThis1:: @@ -58,8 +52,7 @@ EventScript_DoTVShow:: special DoTVShow waitmessage waitbuttonpress - compare VAR_RESULT, TRUE - goto_if_ne EventScript_DoTVShow + goto_if_ne VAR_RESULT, TRUE, EventScript_DoTVShow goto EventScript_TurnOffTV end @@ -77,8 +70,7 @@ EventScript_MomDadMightLikeThis2:: EventScript_TryDoPokeNews:: special DoPokeNews - compare VAR_RESULT, FALSE - goto_if_eq EventScript_TryDoTVShow + goto_if_eq VAR_RESULT, FALSE, EventScript_TryDoTVShow waitmessage waitbuttonpress goto EventScript_TurnOffTV @@ -88,7 +80,6 @@ EventScript_DoInSearchOfTrainers:: special DoTVShowInSearchOfTrainers waitmessage waitbuttonpress - compare VAR_RESULT, 0 - goto_if_eq EventScript_DoInSearchOfTrainers + goto_if_eq VAR_RESULT, 0, EventScript_DoInSearchOfTrainers goto EventScript_TurnOffTV end |