diff options
| author | GriffinR <griffin.g.richards@gmail.com> | 2021-11-22 19:10:49 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-22 19:10:49 -0500 |
| commit | e0fae879da1b773bf90fca145e047ccdb7613938 (patch) | |
| tree | b1be0ec73e33fccf2fe2deac44d62aa10ae391e4 /data/maps | |
| parent | 5cb875b6cb798cf890e156f54a150ff90735ddab (diff) | |
| parent | 42a83ee50e3364f3f7361dacb3d3616053f4c5bf (diff) | |
Merge pull request #1558 from GriffinRichards/update-macros
Update event macro comments
Diffstat (limited to 'data/maps')
271 files changed, 3302 insertions, 5511 deletions
diff --git a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc index 99dfa7bd8..7c59fec96 100644 --- a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc +++ b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc @@ -5,9 +5,8 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide:: lock faceplayer goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus - checkitem ITEM_SCANNER, 1 - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner + checkitem ITEM_SCANNER + 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 dd70c9dd3..19f103362 100644 --- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc @@ -4,7 +4,7 @@ AbandonedShip_Corridors_B1F_MapScripts:: .byte 0 AbandonedShip_Corridors_B1F_OnResume: - setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 255, 5, 4 + setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 5, 4 end AbandonedShip_Corridors_B1F_OnLoad: @@ -13,11 +13,11 @@ AbandonedShip_Corridors_B1F_OnLoad: end AbandonedShip_Corridors_B1F_EventScript_LockStorageRoom:: - setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Locked, 1 + setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Locked, TRUE return AbandonedShip_Corridors_B1F_EventScript_UnlockStorageRoom:: - setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, 1 + setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, TRUE return AbandonedShip_Corridors_B1F_EventScript_TuberM:: @@ -27,9 +27,8 @@ AbandonedShip_Corridors_B1F_EventScript_TuberM:: AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor:: lockall goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_DoorIsUnlocked - checkitem ITEM_STORAGE_KEY, 1 - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked + checkitem ITEM_STORAGE_KEY + 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 4ec63a7e1..dade6a516 100644 --- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc @@ -4,7 +4,7 @@ AbandonedShip_HiddenFloorCorridors_MapScripts:: .byte 0 AbandonedShip_HiddenFloorCorridors_OnResume: - setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 255, 5, 4 + setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 5, 4 end AbandonedShip_HiddenFloorCorridors_OnLoad: @@ -19,43 +19,42 @@ AbandonedShip_HiddenFloorCorridors_OnLoad: end AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom1:: - setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, 1 + setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, TRUE return AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom2:: - setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, 1 + setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, TRUE return AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom4:: - setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Unlocked, 0 + setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Unlocked, FALSE return AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom6:: - setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Unlocked, 0 + setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Unlocked, FALSE return AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom1:: - setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, 1 + setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, TRUE return AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom2:: - setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, 1 + setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, TRUE return AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom4:: - setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Locked, 0 + setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Locked, FALSE return AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom6:: - setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Locked, 0 + setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Locked, FALSE return AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door:: lockall goto_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen - checkitem ITEM_ROOM_1_KEY, 1 - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked + checkitem ITEM_ROOM_1_KEY + 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 @@ -68,9 +67,8 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door:: lockall goto_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen - checkitem ITEM_ROOM_2_KEY, 1 - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked + checkitem ITEM_ROOM_2_KEY + 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 @@ -83,9 +81,8 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door:: lockall goto_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen - checkitem ITEM_ROOM_4_KEY, 1 - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked + checkitem ITEM_ROOM_4_KEY + 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 @@ -98,9 +95,8 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room6Door:: lockall goto_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen - checkitem ITEM_ROOM_6_KEY, 1 - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked + checkitem ITEM_ROOM_6_KEY + 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/AbandonedShip_Rooms_B1F/scripts.inc b/data/maps/AbandonedShip_Rooms_B1F/scripts.inc index a716972ff..484f15ba1 100644 --- a/data/maps/AbandonedShip_Rooms_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Rooms_B1F/scripts.inc @@ -3,7 +3,7 @@ AbandonedShip_Rooms_B1F_MapScripts:: .byte 0 AbandonedShip_Rooms_B1F_OnResume: - setdivewarp MAP_ABANDONED_SHIP_UNDERWATER2, 255, 17, 4 + setdivewarp MAP_ABANDONED_SHIP_UNDERWATER2, 17, 4 end AbandonedShip_Rooms_B1F_EventScript_FatMan:: diff --git a/data/maps/AbandonedShip_Underwater1/scripts.inc b/data/maps/AbandonedShip_Underwater1/scripts.inc index 9b3528b77..0f47704d1 100644 --- a/data/maps/AbandonedShip_Underwater1/scripts.inc +++ b/data/maps/AbandonedShip_Underwater1/scripts.inc @@ -3,6 +3,6 @@ AbandonedShip_Underwater1_MapScripts:: .byte 0 AbandonedShip_Underwater1_OnResume: - setdivewarp MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS, 255, 0, 10 + setdivewarp MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS, 0, 10 end diff --git a/data/maps/AbandonedShip_Underwater2/scripts.inc b/data/maps/AbandonedShip_Underwater2/scripts.inc index bb139bd51..6258b50c1 100644 --- a/data/maps/AbandonedShip_Underwater2/scripts.inc +++ b/data/maps/AbandonedShip_Underwater2/scripts.inc @@ -3,6 +3,6 @@ AbandonedShip_Underwater2_MapScripts:: .byte 0 AbandonedShip_Underwater2_OnResume: - setdivewarp MAP_ABANDONED_SHIP_ROOMS_B1F, 255, 13, 7 + setdivewarp MAP_ABANDONED_SHIP_ROOMS_B1F, 13, 7 end diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index f2e242bbd..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 @@ -29,12 +28,12 @@ AncientTomb_OnLoad: end AncientTomb_EventScript_HideRegiEntrance:: - setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE return AncientTomb_EventScript_CaveEntranceMiddle:: @@ -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 adea508ae..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 @@ -110,7 +107,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DeclareOpponentWinner:: msgbox BattleFrontier_BattleArenaBattleRoom_Text_WinnerIsOpponent, MSGBOX_DEFAULT BattleFrontier_BattleArenaBattleRoom_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST - warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 255, 7, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 7, 8 waitstate BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedOpponent:: @@ -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 @@ -210,7 +199,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_ContinueChallenge:: BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon:: delay 60 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON - warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 255, 7, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 7, 8 waitstate BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor2ndOpponent:: @@ -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_BattleArenaCorridor/scripts.inc b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc index 1752b9342..708681956 100644 --- a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc @@ -22,7 +22,7 @@ BattleFrontier_BattleArenaCorridor_EventScript_WalkToBattleRoom:: applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleArenaCorridor_Movement_PlayerEnterDoor waitmovement 0 setvar VAR_0x8006, 0 - warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM, 255, 7, 5 + warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM, 7, 5 waitstate end diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index 12b600f69..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,19 +157,16 @@ 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 - warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR, 255, 9, 13 + 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 end diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index 76088f54d..406ab46ae 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 @@ -130,13 +118,13 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_WarpToLobbyLost:: goto BattleFrontier_BattleDomeBattleRoom_EventScript_WarpToLobby BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWon:: - frontier_gettrainername 1 + frontier_gettrainername STR_VAR_2 message BattleFrontier_BattleDomeBattleRoom_Text_TrainerIsWinner waitmessage return BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWonDraw:: - frontier_gettrainername 0 + frontier_gettrainername STR_VAR_1 message BattleFrontier_BattleDomeBattleRoom_Text_RefereesDecidedWinnerTrainer waitmessage return @@ -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 @@ -164,7 +150,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent:: switch VAR_RESULT case DOME_ROUNDS_COUNT, BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney setvar VAR_0x8006, 1 - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 255, 5, 3 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 5, 3 waitstate BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney:: @@ -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,90 +490,86 @@ 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:: return BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound2Audience:: - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1, 3, DIR_SOUTH + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0 + createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0 + createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0 + createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 0 + createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1 + createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1 + createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1 + createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2 + createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1 return BattleFrontier_BattleDomeBattleRoom_EventScript_AddSemifinalAudience:: - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_2, 7, 9, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LASS, 10, 12, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_GENTLEMAN, 15, 2, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 16, 3, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_2, 17, 4, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 20, 9, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 23, 13, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_HEX_MANIAC, 28, 5, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MART_EMPLOYEE, 30, 6, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2, 3, DIR_SOUTH + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0 + createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0 + createvobject OBJ_EVENT_GFX_WOMAN_2, 7, 9, 0 + createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0 + createvobject OBJ_EVENT_GFX_LASS, 10, 12, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0 + createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 0 + createvobject OBJ_EVENT_GFX_GENTLEMAN, 15, 2, 1 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 16, 3, 1 + createvobject OBJ_EVENT_GFX_WOMAN_2, 17, 4, 1 + createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1 + createvobject OBJ_EVENT_GFX_EXPERT_F, 20, 9, 1 + createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 23, 13, 1 + createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1 + createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2 + createvobject OBJ_EVENT_GFX_HEX_MANIAC, 28, 5, 2 + createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1 + createvobject OBJ_EVENT_GFX_MART_EMPLOYEE, 30, 6, 2 + createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2 return BattleFrontier_BattleDomeBattleRoom_EventScript_AddFinalAudience:: - createvobject OBJ_EVENT_GFX_NINJA_BOY, 0, 2, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 2, 15, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_5, 3, 5, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 5, 7, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_2, 7, 9, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_3, 8, 10, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LASS, 10, 12, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 12, 14, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_HIKER, 14, 12, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_GENTLEMAN, 15, 2, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 16, 3, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_2, 17, 4, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_3, 18, 6, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 20, 9, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_2, 21, 10, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 23, 13, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_GENTLEMAN, 24, 14, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_FAT_MAN, 27, 3, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_HEX_MANIAC, 28, 5, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MART_EMPLOYEE, 30, 6, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2, 3, DIR_SOUTH + createvobject OBJ_EVENT_GFX_NINJA_BOY, 0, 2, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0 + createvobject OBJ_EVENT_GFX_BEAUTY, 2, 15, 0 + createvobject OBJ_EVENT_GFX_MAN_5, 3, 5, 0 + createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 5, 7, 0 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0 + createvobject OBJ_EVENT_GFX_WOMAN_2, 7, 9, 0 + createvobject OBJ_EVENT_GFX_WOMAN_3, 8, 10, 0 + createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0 + createvobject OBJ_EVENT_GFX_LASS, 10, 12, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0 + createvobject OBJ_EVENT_GFX_BEAUTY, 12, 14, 0 + createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 2 + createvobject OBJ_EVENT_GFX_HIKER, 14, 12, 2 + createvobject OBJ_EVENT_GFX_GENTLEMAN, 15, 2, 1 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 16, 3, 1 + createvobject OBJ_EVENT_GFX_WOMAN_2, 17, 4, 1 + createvobject OBJ_EVENT_GFX_WOMAN_3, 18, 6, 1 + createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1 + createvobject OBJ_EVENT_GFX_EXPERT_F, 20, 9, 1 + createvobject OBJ_EVENT_GFX_MAN_2, 21, 10, 1 + createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 23, 13, 1 + createvobject OBJ_EVENT_GFX_GENTLEMAN, 24, 14, 1 + createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1 + createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2 + createvobject OBJ_EVENT_GFX_FAT_MAN, 27, 3, 2 + createvobject OBJ_EVENT_GFX_HEX_MANIAC, 28, 5, 2 + createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1 + createvobject OBJ_EVENT_GFX_MART_EMPLOYEE, 30, 6, 2 + createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2 return BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisible: @@ -883,14 +854,13 @@ 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 - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 255, 5, 11 + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 5, 11 waitstate end BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles:: - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 255, 17, 11 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 17, 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 32f3c82ba..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 @@ -40,7 +39,7 @@ BattleFrontier_BattleDomeCorridor_EventScript_WalkToBattleRoomLvOpen:: BattleFrontier_BattleDomeCorridor_EventScript_WarpToPreBattleRoom:: waitmovement 0 setvar VAR_0x8006, 0 - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 255, 5, 7 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 5, 7 waitstate end diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index 04df6f38c..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 @@ -202,16 +193,14 @@ BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge:: closemessage call BattleFrontier_BattleDomeLobby_EventScript_WalkToDoor special HealPlayerParty - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR, 255, 23, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR, 23, 6 setvar VAR_TEMP_0, 0 waitstate 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 ca441cf1f..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 @@ -163,7 +160,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_ContinueChallenge:: waitmovement 0 closedoor 5, 1 waitdooranim - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM, 255, 9, 5 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM, 9, 5 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc index 24f5ebe10..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 @@ -119,7 +112,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum:: switch VAR_RESULT case 7, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon setvar VAR_0x8006, 1 - warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 255, 8, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 8, 8 waitstate BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON @@ -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,14 +230,13 @@ 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 - warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 255, 4, 8 + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 4, 8 waitstate end BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles:: - warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 255, 14, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 14, 8 waitstate end diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc index 3b1139294..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,21 +161,18 @@ 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 - warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 255, 8, 13 + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 8, 13 setvar VAR_TEMP_0, 0 waitstate end @@ -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 ce3cb357c..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,12 +46,10 @@ 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, 255, 6, 11 + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 6, 11 waitstate end @@ -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 13015dd3e..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,14 +398,13 @@ 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 - warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 255, 5, 7 + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles + warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 5, 7 waitstate end BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles:: - warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 255, 19, 7 + warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 19, 7 waitstate end diff --git a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc index 011170bae..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 @@ -53,7 +47,7 @@ BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom:: closedoor 10, 3 waitdooranim BattleFrontier_BattlePalaceCorridor_EventScript_WarpToBattleRoom:: - warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM, 255, 7, 4 + warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM, 7, 4 waitstate end diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index a51fa48fd..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,22 +175,20 @@ 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 msgbox BattleFrontier_BattlePalaceLobby_Text_FollowMe, MSGBOX_DEFAULT closemessage call BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor - warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR, 255, 8, 13 + warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR, 8, 13 setvar VAR_TEMP_0, 0 waitstate 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_BattlePikeCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc index 44539747b..fe2c6ed00 100644 --- a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc @@ -25,7 +25,7 @@ BattleFrontier_BattlePikeCorridor_EventScript_EnterCorridor:: waitmovement 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 99 call BattleFrontier_BattlePike_EventScript_CloseCurtain - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 255, 6, 10 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 6, 10 waitstate end diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index ecbbafef2..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 @@ -159,7 +155,7 @@ BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge:: call BattleFrontier_BattlePikeLobby_EventScript_WalkToCorridor special HealPlayerParty call BattleFrontier_BattlePike_EventScript_CloseCurtain - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR, 255, 6, 7 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR, 6, 7 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc index 15ebbeb3f..e0246ed57 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc @@ -18,7 +18,7 @@ BattleFrontier_BattlePikeRoomFinal_EventScript_EnterRoom:: msgbox BattleFrontier_BattlePikeRoomFinal_Text_CongratsThisWayPlease, MSGBOX_DEFAULT closemessage releaseall - warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc index 5bd04bfb4..9d060214d 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc @@ -44,7 +44,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterSingleBattleRoom:: case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_WonSingleBattle BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST - warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6 waitstate end @@ -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 @@ -608,46 +592,46 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_StatusMon:: end BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesMostlyClosed:: - setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage1_Tile0, 1 - setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage1_Tile1, 1 - setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage1_Tile2, 1 - setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage1_Tile3, 1 - setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage1_Tile4, 1 - setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage1_Tile5, 0 - setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage1_Tile6, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage1_Tile0, TRUE + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage1_Tile1, TRUE + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage1_Tile2, TRUE + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage1_Tile3, TRUE + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage1_Tile4, TRUE + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage1_Tile5, FALSE + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage1_Tile6, TRUE special DrawWholeMapView return BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesLittleClosed:: - setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage2_Tile0, 1 - setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage2_Tile1, 1 - setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage2_Tile2, 1 - setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage2_Tile3, 1 - setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage2_Tile4, 1 - setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage2_Tile5, 0 - setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage2_Tile6, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage2_Tile0, TRUE + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage2_Tile1, TRUE + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage2_Tile2, TRUE + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage2_Tile3, TRUE + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage2_Tile4, TRUE + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage2_Tile5, FALSE + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage2_Tile6, TRUE special DrawWholeMapView return BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesOpen:: - setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage3_Tile0, 1 - setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage3_Tile1, 1 - setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage3_Tile2, 1 - setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage3_Tile3, 1 - setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage3_Tile4, 1 - setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage3_Tile5, 0 - setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage3_Tile6, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage3_Tile0, TRUE + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage3_Tile1, TRUE + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage3_Tile2, TRUE + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage3_Tile3, TRUE + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage3_Tile4, TRUE + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage3_Tile5, FALSE + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage3_Tile6, TRUE special DrawWholeMapView return BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesClosed:: - setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage0_Tile0, 1 - setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage0_Tile1, 1 - setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage0_Tile2, 1 - setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage0_Tile3, 1 - setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage0_Tile4, 1 - setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage0_Tile5, 0 - setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage0_Tile6, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage0_Tile0, TRUE + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage0_Tile1, TRUE + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage0_Tile2, TRUE + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage0_Tile3, TRUE + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage0_Tile4, TRUE + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage0_Tile5, FALSE + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage0_Tile6, TRUE special DrawWholeMapView return diff --git a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc index ee9e548f6..19926b967 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc @@ -16,7 +16,7 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_SetInWildMonRoom:: BattleFrontier_BattlePikeRoomWildMons_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST - warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6 waitstate end @@ -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 37737554f..e95ca9dce 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc @@ -28,7 +28,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_GetChallengeStatus:: end BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpToLobby:: - warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6 waitstate end @@ -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 8993418ee..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:: @@ -70,7 +63,7 @@ BattleFrontier_BattlePyramid_EventScript_WarpToLobby:: pyramid_updatelight 0, PYRAMID_LIGHT_SET_RADIUS pyramid_clearhelditems special HealPlayerParty - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 7, 13 waitstate end @@ -97,17 +90,16 @@ 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 - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 255, 1, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 1, 1 waitstate end BattlePyramid_WarpToTop:: - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP, 255, 17, 17 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP, 17, 17 waitstate end @@ -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 c93deee3e..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 @@ -173,7 +168,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_EnterChallenge:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_RESULT, 0 special HealPlayerParty - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 255, 1, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 1, 1 setvar VAR_TEMP_0, 0 waitstate end @@ -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 0c1db1eea..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 @@ -93,7 +86,7 @@ BattleFrontier_BattlePyramidTop_EventScript_Attendant:: closemessage BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 7, 13 waitstate end @@ -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 c909239be..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,29 +409,26 @@ 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 - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 6, 6 + 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 BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyDoubles:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 10, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 10, 6 waitstate end BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 14, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 14, 6 waitstate end BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis:: tower_closelink - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 18, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 18, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc index c09c897e9..d0f3d487a 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc @@ -6,15 +6,14 @@ BattleFrontier_BattleTowerCorridor_MapScripts:: .byte 0 BattleFrontier_BattleTowerCorridor_OnLoad: - compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor - setmetatile 12, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, 0 - setmetatile 12, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, 0 + 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 BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor:: - setmetatile 15, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, 0 - setmetatile 15, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, 0 + setmetatile 15, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, FALSE + setmetatile 15, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, FALSE end BattleFrontier_BattleTowerCorridor_OnFrame: @@ -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 @@ -37,7 +35,7 @@ BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor:: BattleFrontier_BattleTowerCorridor_EventScript_WarpToBattleRoom:: setvar VAR_TEMP_0, 0 - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 255, 4, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 4, 8 waitstate end diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc index 0021b9e84..06f4ff0a7 100644 --- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc @@ -26,34 +26,30 @@ 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:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR, 255, 8, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR, 8, 1 waitstate return BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoomMulti:: goto_if_unset FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER, BattleFrontier_BattleTowerElevator_EventScript_WarpToPartnerRoom - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 255, 7, 2 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 7, 2 waitstate return BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridorMulti:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 255, 7, 2 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 7, 2 waitstate return BattleFrontier_BattleTowerElevator_EventScript_WarpToPartnerRoom:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 255, 10, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 10, 1 waitstate return diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index ab2a62043..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,19 +587,17 @@ 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, 255, 1, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 1, 6 setvar VAR_TEMP_0, 0 waitstate end 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,41 +649,33 @@ 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:: - bufferstdstring 0, STDSTRING_SINGLE + bufferstdstring STR_VAR_1, STDSTRING_SINGLE return BattleFrontier_BattleTowerLobby_EventScript_BufferTextDouble:: - bufferstdstring 0, STDSTRING_DOUBLE + bufferstdstring STR_VAR_1, STDSTRING_DOUBLE return BattleFrontier_BattleTowerLobby_EventScript_BufferTextMulti:: - bufferstdstring 0, STDSTRING_MULTI + bufferstdstring STR_VAR_1, STDSTRING_MULTI return BattleFrontier_BattleTowerLobby_EventScript_BufferTextLinkMulti:: - bufferstdstring 0, STDSTRING_MULTI_LINK + bufferstdstring STR_VAR_1, STDSTRING_MULTI_LINK 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 70922d473..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,29 +92,25 @@ 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:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 255, 4, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 4, 8 waitstate return BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToMultiBattleRoom:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 255, 4, 5 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 4, 5 waitstate return @ Unnecessary duplicate of the above BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToLinkMultiBattleRoom:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 255, 4, 5 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 4, 5 waitstate return diff --git a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc index 06038b43c..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 @@ -108,7 +107,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_EnterElevator:: call BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_MoveToElevator closedoor 10, 1 waitdooranim - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 255, 1, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 1, 6 waitstate releaseall end @@ -183,13 +182,11 @@ 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, 255, 10, 3 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 10, 3 waitstate release end diff --git a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc index 360b8162c..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 @@ -56,17 +48,15 @@ BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor:: end BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveItem:: - checkitemspace VAR_0x8009, 1 - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_BagFull + checkitemspace VAR_0x8009 + 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 0455d577c..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, 255 - goto_if_ne BattleFrontier_Lounge1_EventScript_ShowMonToBreeder - compare VAR_0x8004, 255 - 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 d98a9f64e..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 @@ -61,43 +49,43 @@ BattleFrontier_Lounge2_EventScript_FacilityNews:: return BattleFrontier_Lounge2_EventScript_BufferSingle:: - bufferstdstring 0, STDSTRING_SINGLE + bufferstdstring STR_VAR_1, STDSTRING_SINGLE return BattleFrontier_Lounge2_EventScript_BufferDouble:: - bufferstdstring 0, STDSTRING_DOUBLE + bufferstdstring STR_VAR_1, STDSTRING_DOUBLE return BattleFrontier_Lounge2_EventScript_BufferMulti:: - bufferstdstring 0, STDSTRING_MULTI + bufferstdstring STR_VAR_1, STDSTRING_MULTI return BattleFrontier_Lounge2_EventScript_BufferMultiLink:: - bufferstdstring 0, STDSTRING_MULTI_LINK + bufferstdstring STR_VAR_1, STDSTRING_MULTI_LINK return BattleFrontier_Lounge2_EventScript_BufferBattleDome:: - bufferstdstring 0, STDSTRING_BATTLE_DOME + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_DOME return BattleFrontier_Lounge2_EventScript_BufferBattleFactory:: - bufferstdstring 0, STDSTRING_BATTLE_FACTORY + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_FACTORY return BattleFrontier_Lounge2_EventScript_BufferBattlePalace:: - bufferstdstring 0, STDSTRING_BATTLE_PALACE + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_PALACE return BattleFrontier_Lounge2_EventScript_BufferBattleArena:: - bufferstdstring 0, STDSTRING_BATTLE_ARENA + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_ARENA return BattleFrontier_Lounge2_EventScript_BufferBattlePike:: - bufferstdstring 0, STDSTRING_BATTLE_PIKE + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_PIKE return BattleFrontier_Lounge2_EventScript_BufferBattlePyramid:: - bufferstdstring 0, STDSTRING_BATTLE_PYRAMID + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_PYRAMID return BattleFrontier_Lounge2_EventScript_Maniac1:: diff --git a/data/maps/BattleFrontier_Lounge3/scripts.inc b/data/maps/BattleFrontier_Lounge3/scripts.inc index c0a941738..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 @@ -144,17 +134,17 @@ BattleFrontier_Lounge3_EventScript_LostChallenge:: end BattleFrontier_Lounge3_EventScript_RewardBet5:: - buffernumberstring 0, (BET_AMOUNT_5 * 2) + buffernumberstring STR_VAR_1, (BET_AMOUNT_5 * 2) setvar VAR_0x8004, (BET_AMOUNT_5 * 2) return BattleFrontier_Lounge3_EventScript_RewardBet10:: - buffernumberstring 0, (BET_AMOUNT_10 * 2) + buffernumberstring STR_VAR_1, (BET_AMOUNT_10 * 2) setvar VAR_0x8004, (BET_AMOUNT_10 * 2) return BattleFrontier_Lounge3_EventScript_RewardBet15:: - buffernumberstring 0, (BET_AMOUNT_15 * 2) + buffernumberstring STR_VAR_1, (BET_AMOUNT_15 * 2) setvar VAR_0x8004, (BET_AMOUNT_15 * 2) return diff --git a/data/maps/BattleFrontier_Lounge5/scripts.inc b/data/maps/BattleFrontier_Lounge5/scripts.inc index 61ac0cb9e..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, 255 - 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 f88c69324..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, 255 - 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 @@ -38,7 +35,7 @@ BattleFrontier_Lounge6_EventScript_DeclineTrade:: end BattleFrontier_Lounge6_EventScript_NotRequestedMon:: - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox BattleFrontier_Lounge6_Text_DontTradeForAnythingButMon, MSGBOX_DEFAULT release end diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc index 287844470..c52df3caf 100644 --- a/data/maps/BattleFrontier_Lounge7/scripts.inc +++ b/data/maps/BattleFrontier_Lounge7/scripts.inc @@ -249,14 +249,12 @@ BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection:: copyvar VAR_0x8004, VAR_TEMP_D copyvar VAR_0x8005, VAR_TEMP_E special BufferBattleFrontierTutorMoveName - buffernumberstring 1, VAR_0x8008 + 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 d359ee89a..5ca5cb9fb 100644 --- a/data/maps/BattleFrontier_OutsideWest/scripts.inc +++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc @@ -20,9 +20,8 @@ BattleFrontier_OutsideWest_EventScript_FerryAttendant:: lock faceplayer msgbox BattleFrontier_OutsideWest_Text_MayISeeYourTicket, MSGBOX_DEFAULT - checkitem ITEM_SS_TICKET, 1 - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_OutsideWest_EventScript_NoSSTicket + checkitem ITEM_SS_TICKET + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_OutsideWest_EventScript_NoSSTicket message BattleFrontier_OutsideWest_Text_WhereWouldYouLikeToGo waitmessage goto BattleFrontier_OutsideWest_EventScript_ChooseFerryDestination @@ -44,22 +43,20 @@ 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, 255, 8, 11 + warp MAP_SLATEPORT_CITY_HARBOR, 8, 11 waitstate release end 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, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end @@ -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 edb4bdf41..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,47 +144,40 @@ 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 BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints:: - buffernumberstring 0, 4 + buffernumberstring STR_VAR_1, 4 setvar VAR_0x8004, 4 goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints:: - buffernumberstring 0, 3 + buffernumberstring STR_VAR_1, 3 setvar VAR_0x8004, 3 goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints:: - buffernumberstring 0, 2 + buffernumberstring STR_VAR_1, 2 setvar VAR_0x8004, 2 goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end BattleFrontier_ScottsHouse_EventScript_Give1BattlePoint:: - buffernumberstring 0, 1 + buffernumberstring STR_VAR_1, 1 setvar VAR_0x8004, 1 goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints 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 06c5b08e9..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 @@ -18,7 +17,7 @@ BirthIsland_Harbor_EventScript_Sailor:: hideobjectat LOCALID_SAILOR, MAP_BIRTH_ISLAND_HARBOR setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepartIsland - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end diff --git a/data/maps/CaveOfOrigin_Entrance/scripts.inc b/data/maps/CaveOfOrigin_Entrance/scripts.inc index 091246ae0..40ca7a654 100644 --- a/data/maps/CaveOfOrigin_Entrance/scripts.inc +++ b/data/maps/CaveOfOrigin_Entrance/scripts.inc @@ -3,6 +3,6 @@ CaveOfOrigin_Entrance_MapScripts:: .byte 0 CaveOfOrigin_Entrance_OnResume: - setescapewarp MAP_SOOTOPOLIS_CITY, 255, 31, 17 + setescapewarp MAP_SOOTOPOLIS_CITY, 31, 17 end diff --git a/data/maps/ContestHall/scripts.inc b/data/maps/ContestHall/scripts.inc index 535e28b78..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 @@ -418,36 +410,34 @@ ContestHall_EventScript_SetExitWarp:: return ContestHall_EventScript_SetExitWarpNormalContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4 waitstate end ContestHall_EventScript_SetExitWarpSuperContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4 waitstate end ContestHall_EventScript_SetExitWarpHyperContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4 waitstate end ContestHall_EventScript_SetExitWarpMasterContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4 waitstate end ContestHall_EventScript_SetExitWarpLinkContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 15, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 15, 4 waitstate end 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 443915d7e..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 @@ -20,12 +19,12 @@ DesertRuins_OnLoad: end DesertRuins_EventScript_HideRegiEntrance:: - setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE return DesertRuins_OnTransition: @@ -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 281648aeb..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:: @@ -128,8 +123,8 @@ DewfordTown_EventScript_FishingNotSoGood:: DewfordTown_EventScript_SailToPetalburg:: call EventScript_BackupMrBrineyLocation - setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 - setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0 applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat waitmovement 0 removeobject LOCALID_BRINEY_DEWFORD @@ -151,8 +146,8 @@ DewfordTown_EventScript_SailToPetalburg:: setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN hideobjectat LOCALID_BOAT_DEWFORD, MAP_DEWFORD_TOWN setvar VAR_BOARD_BRINEY_BOAT_STATE, 2 - resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN - warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 255, 5, 4 + resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN + warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 5, 4 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 waitstate release @@ -160,8 +155,8 @@ DewfordTown_EventScript_SailToPetalburg:: DewfordTown_EventScript_SailToSlateport:: call EventScript_BackupMrBrineyLocation - setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 - setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1 + setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1 applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat waitmovement 0 removeobject LOCALID_BRINEY_DEWFORD @@ -178,7 +173,7 @@ DewfordTown_EventScript_SailToSlateport:: waitmovement 0 setobjectxyperm LOCALID_BRINEY_R109, 21, 26 addobject LOCALID_BRINEY_R109 - setobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0 + setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0 applymovement LOCALID_BRINEY_R109, DewfordTown_Movement_BrineyExitBoat waitmovement 0 clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY @@ -190,8 +185,8 @@ DewfordTown_EventScript_SailToSlateport:: call_if_set FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_LandedSlateport closemessage copyvar VAR_BRINEY_LOCATION, VAR_0x8008 - resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN - resetobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109 + resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN + resetobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109 copyobjectxytoperm LOCALID_BRINEY_R109 release end @@ -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 d2b51766a..81474af72 100644 --- a/data/maps/DewfordTown_Gym/scripts.inc +++ b/data/maps/DewfordTown_Gym/scripts.inc @@ -3,77 +3,66 @@ DewfordTown_Gym_MapScripts:: .byte 0 DewfordTown_Gym_OnTransition: - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel end -DewfordTown_Gym_EventScript_SetFlashRadius:: +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_SetFlashRadius7 - compare VAR_0x8000, 1 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius6 - compare VAR_0x8000, 2 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius5 - compare VAR_0x8000, 3 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius4 - compare VAR_0x8000, 4 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius3 - compare VAR_0x8000, 5 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius2 - goto DewfordTown_Gym_EventScript_SetFlashRadius1 + 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:: - setflashradius 0 + setflashlevel 0 return -DewfordTown_Gym_EventScript_SetFlashRadius1:: - setflashradius 1 +@ Brightest +DewfordTown_Gym_EventScript_SetFlashLevel1:: + setflashlevel 1 return -DewfordTown_Gym_EventScript_SetFlashRadius2:: - setflashradius 2 +DewfordTown_Gym_EventScript_SetFlashLevel2:: + setflashlevel 2 return -DewfordTown_Gym_EventScript_SetFlashRadius3:: - setflashradius 3 +DewfordTown_Gym_EventScript_SetFlashLevel3:: + setflashlevel 3 return -DewfordTown_Gym_EventScript_SetFlashRadius4:: - setflashradius 4 +DewfordTown_Gym_EventScript_SetFlashLevel4:: + setflashlevel 4 return -DewfordTown_Gym_EventScript_SetFlashRadius5:: - setflashradius 5 +DewfordTown_Gym_EventScript_SetFlashLevel5:: + setflashlevel 5 return -DewfordTown_Gym_EventScript_SetFlashRadius6:: - setflashradius 6 +DewfordTown_Gym_EventScript_SetFlashLevel6:: + setflashlevel 6 return -DewfordTown_Gym_EventScript_SetFlashRadius7:: - setflashradius 7 +@ Darkest +DewfordTown_Gym_EventScript_SetFlashLevel7:: + setflashlevel 7 return 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 @@ -82,43 +71,43 @@ DewfordTown_Gym_EventScript_NoLightChange:: DewfordTown_Gym_EventScript_AnimateFlash1Trainer:: playse SE_SWITCH animateflash 6 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash2Trainers:: playse SE_SWITCH animateflash 5 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash3Trainers:: playse SE_SWITCH animateflash 4 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash4Trainers:: playse SE_SWITCH animateflash 3 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash5Trainers:: playse SE_SWITCH animateflash 2 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash6Trainers:: playse SE_SWITCH animateflash 1 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlashFullBrightness:: playse SE_SWITCH animateflash 0 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_CountTrainersDefeated:: @@ -146,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 @@ -162,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 @@ -182,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 6b9281ae6..103942280 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -50,24 +50,20 @@ EverGrandeCity_ChampionsRoom_EventScript_Wallace:: EverGrandeCity_ChampionsRoom_EventScript_Defeated:: playse SE_DOOR - setmetatile 6, 1, METATILE_EliteFour_OpenDoorChampion_Frame, 0 - setmetatile 6, 2, METATILE_EliteFour_OpenDoorChampion_Opening, 0 + setmetatile 6, 1, METATILE_EliteFour_OpenDoorChampion_Frame, FALSE + setmetatile 6, 2, METATILE_EliteFour_OpenDoorChampion_Opening, FALSE special DrawWholeMapView msgbox EverGrandeCity_ChampionsRoom_Text_PostBattleSpeech, MSGBOX_DEFAULT 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,16 +128,14 @@ 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 waitmovement 0 setflag FLAG_HIDE_PETALBURG_GYM_GREETER - warp MAP_EVER_GRANDE_CITY_HALL_OF_FAME, 255, 7, 16 + warp MAP_EVER_GRANDE_CITY_HALL_OF_FAME, 7, 16 waitstate releaseall end 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 3f51ba393..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 @@ -71,7 +68,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST special LoadPlayerParty - warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 6, 6 waitstate FallarborTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: @@ -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 @@ -142,13 +137,12 @@ FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: delay 60 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON special LoadPlayerParty - warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 6, 6 waitstate @ 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_BattleTentCorridor/scripts.inc b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc index 077cdfe79..023dc919f 100644 --- a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc +++ b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc @@ -22,7 +22,7 @@ FallarborTown_BattleTentCorridor_EventScript_EnterCorridor:: closedoor 2, 1 waitdooranim setvar VAR_0x8006, 0 - warp MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM, 255, 4, 4 + warp MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM, 4, 4 waitstate releaseall end diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc index 6a2c8713f..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,15 +150,14 @@ 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 msgbox FallarborTown_BattleTentLobby_Text_GuideYouToBattleTent, MSGBOX_DEFAULT closemessage call FallarborTown_BattleTentLobby_EventScript_WalkToDoor - warp MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR, 255, 2, 7 + warp MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR, 2, 7 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/FallarborTown_CozmosHouse/scripts.inc b/data/maps/FallarborTown_CozmosHouse/scripts.inc index 43a9dca7f..61f297e69 100644 --- a/data/maps/FallarborTown_CozmosHouse/scripts.inc +++ b/data/maps/FallarborTown_CozmosHouse/scripts.inc @@ -5,9 +5,8 @@ FallarborTown_CozmosHouse_EventScript_ProfCozmo:: lock faceplayer goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_GaveMeteorite - checkitem ITEM_METEORITE, 1 - compare VAR_RESULT, TRUE - goto_if_eq FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite + checkitem ITEM_METEORITE + 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 1bd54b4b8..f17754328 100644 --- a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc +++ b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc @@ -14,9 +14,8 @@ FallarborTown_MoveRelearnersHouse_EventScript_MoveRelearner:: end FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove:: - checkitem ITEM_HEART_SCALE, 1 - compare VAR_RESULT, FALSE - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + checkitem ITEM_HEART_SCALE + 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, 255 - 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 15deb95e6..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 @@ -33,7 +32,7 @@ FarawayIsland_Entrance_EventScript_Sailor:: hideobjectat LOCALID_SAILOR, MAP_FARAWAY_ISLAND_ENTRANCE setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepartIsland - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end 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 6371d5b0c..f1694aaa8 100644 --- a/data/maps/FortreeCity/scripts.inc +++ b/data/maps/FortreeCity/scripts.inc @@ -55,17 +55,15 @@ FortreeCity_EventScript_GymSign:: FortreeCity_EventScript_Kecleon:: lock faceplayer - checkitem ITEM_DEVON_SCOPE, 1 - compare VAR_RESULT, TRUE - goto_if_eq FortreeCity_EventScript_AskUseDevonScope + checkitem ITEM_DEVON_SCOPE + 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 e25334ee9..a072f5610 100644 --- a/data/maps/FortreeCity_House1/scripts.inc +++ b/data/maps/FortreeCity_House1/scripts.inc @@ -10,24 +10,21 @@ 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, 255 - 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 special DoInGameTradeScene waitstate - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox FortreeCity_House1_Text_MonYouTakeCare, MSGBOX_DEFAULT setflag FLAG_FORTREE_NPC_TRADE_COMPLETED release @@ -39,7 +36,7 @@ FortreeCity_House1_EventScript_DeclineTrade:: end FortreeCity_House1_EventScript_NotRequestedMon:: - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox FortreeCity_House1_Text_ThisIsntAMon, MSGBOX_DEFAULT release end 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_B1F/scripts.inc b/data/maps/GraniteCave_B1F/scripts.inc index f1b52ce66..24519aef6 100644 --- a/data/maps/GraniteCave_B1F/scripts.inc +++ b/data/maps/GraniteCave_B1F/scripts.inc @@ -6,6 +6,6 @@ GraniteCave_B1F_MapScripts:: GraniteCave_B1F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_GRANITE_CAVE_B2F, 255, 0, 0 + setholewarp MAP_GRANITE_CAVE_B2F 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 3068b1184..c59d5a97b 100644 --- a/data/maps/InsideOfTruck/scripts.inc +++ b/data/maps/InsideOfTruck/scripts.inc @@ -4,9 +4,9 @@ InsideOfTruck_MapScripts:: .byte 0 InsideOfTruck_OnLoad: - setmetatile 4, 1, METATILE_InsideOfTruck_ExitLight_Top, 0 - setmetatile 4, 2, METATILE_InsideOfTruck_ExitLight_Mid, 0 - setmetatile 4, 3, METATILE_InsideOfTruck_ExitLight_Bottom, 0 + setmetatile 4, 1, METATILE_InsideOfTruck_ExitLight_Top, FALSE + setmetatile 4, 2, METATILE_InsideOfTruck_ExitLight_Mid, FALSE + setmetatile 4, 3, METATILE_InsideOfTruck_ExitLight_Bottom, FALSE end InsideOfTruck_OnResume: @@ -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:: @@ -32,7 +30,7 @@ InsideOfTruck_EventScript_SetIntroFlagsMale:: setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_SIBLING setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL setvar VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 1 - setdynamicwarp MAP_LITTLEROOT_TOWN, 255, 3, 10 + setdynamicwarp MAP_LITTLEROOT_TOWN, 3, 10 releaseall end @@ -45,7 +43,7 @@ InsideOfTruck_EventScript_SetIntroFlagsFemale:: setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_SIBLING setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL setvar VAR_LITTLEROOT_HOUSES_STATE_MAY, 1 - setdynamicwarp MAP_LITTLEROOT_TOWN, 255, 12, 10 + setdynamicwarp MAP_LITTLEROOT_TOWN, 12, 10 releaseall end diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc index d660aadf0..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 @@ -20,12 +19,12 @@ IslandCave_OnLoad: end IslandCave_EventScript_HideRegiEntrance:: - setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE return IslandCave_OnTransition: @@ -39,12 +38,12 @@ IslandCave_EventScript_ShowRegice:: return IslandCave_EventScript_OpenRegiEntrance:: - setmetatile 7, 19, METATILE_Cave_SealedChamberEntrance_TopLeft, 1 - setmetatile 8, 19, METATILE_Cave_SealedChamberEntrance_TopMid, 1 - setmetatile 9, 19, METATILE_Cave_SealedChamberEntrance_TopRight, 1 - setmetatile 7, 20, METATILE_Cave_SealedChamberEntrance_BottomLeft, 1 - setmetatile 8, 20, METATILE_Cave_SealedChamberEntrance_BottomMid, 0 - setmetatile 9, 20, METATILE_Cave_SealedChamberEntrance_BottomRight, 1 + setmetatile 7, 19, METATILE_Cave_SealedChamberEntrance_TopLeft, TRUE + setmetatile 8, 19, METATILE_Cave_SealedChamberEntrance_TopMid, TRUE + setmetatile 9, 19, METATILE_Cave_SealedChamberEntrance_TopRight, TRUE + setmetatile 7, 20, METATILE_Cave_SealedChamberEntrance_BottomLeft, TRUE + setmetatile 8, 20, METATILE_Cave_SealedChamberEntrance_BottomMid, FALSE + setmetatile 9, 20, METATILE_Cave_SealedChamberEntrance_BottomRight, TRUE special DrawWholeMapView playse SE_BANG setflag FLAG_SYS_BRAILLE_REGICE_COMPLETED @@ -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 754ee00cf..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, 1 - compare VAR_RESULT, TRUE - goto_if_eq JaggedPass_EventScript_SetReadyToOpenHideout + checkitem ITEM_MAGMA_EMBLEM + 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,13 +30,12 @@ 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:: - setmetatile 16, 17, METATILE_Lavaridge_RockWall, 1 - setmetatile 16, 18, METATILE_Lavaridge_RockWall, 1 + setmetatile 16, 17, METATILE_Lavaridge_RockWall, TRUE + setmetatile 16, 18, METATILE_Lavaridge_RockWall, TRUE end JaggedPass_EventScript_OpenMagmaHideout:: @@ -59,8 +55,8 @@ JaggedPass_EventScript_OpenMagmaHideout:: special ShakeCamera waitstate playse SE_EFFECTIVE - setmetatile 16, 17, METATILE_Lavaridge_CaveEntrance_Top, 1 - setmetatile 16, 18, METATILE_Lavaridge_CaveEntrance_Bottom, 0 + setmetatile 16, 17, METATILE_Lavaridge_CaveEntrance_Top, TRUE + setmetatile 16, 18, METATILE_Lavaridge_CaveEntrance_Bottom, FALSE special DrawWholeMapView delay 30 setvar VAR_JAGGED_PASS_STATE, 2 @@ -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 eb3f140a8..094592d64 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -19,18 +19,18 @@ LilycoveCity_OnLoad: end LilycoveCity_EventScript_SetWailmerMetatiles:: - setmetatile 76, 12, METATILE_Lilycove_Wailmer0, 1 - setmetatile 77, 12, METATILE_Lilycove_Wailmer1, 1 - setmetatile 76, 13, METATILE_Lilycove_Wailmer2, 1 - setmetatile 77, 13, METATILE_Lilycove_Wailmer3, 1 - setmetatile 76, 14, METATILE_Lilycove_Wailmer0_Alt, 1 - setmetatile 77, 14, METATILE_Lilycove_Wailmer1_Alt, 1 - setmetatile 76, 15, METATILE_Lilycove_Wailmer2, 1 - setmetatile 77, 15, METATILE_Lilycove_Wailmer3, 1 - setmetatile 77, 16, METATILE_Lilycove_Wailmer0_Alt, 1 - setmetatile 78, 16, METATILE_Lilycove_Wailmer1_Alt, 1 - setmetatile 77, 17, METATILE_Lilycove_Wailmer2, 1 - setmetatile 78, 17, METATILE_Lilycove_Wailmer3, 1 + setmetatile 76, 12, METATILE_Lilycove_Wailmer0, TRUE + setmetatile 77, 12, METATILE_Lilycove_Wailmer1, TRUE + setmetatile 76, 13, METATILE_Lilycove_Wailmer2, TRUE + setmetatile 77, 13, METATILE_Lilycove_Wailmer3, TRUE + setmetatile 76, 14, METATILE_Lilycove_Wailmer0_Alt, TRUE + setmetatile 77, 14, METATILE_Lilycove_Wailmer1_Alt, TRUE + setmetatile 76, 15, METATILE_Lilycove_Wailmer2, TRUE + setmetatile 77, 15, METATILE_Lilycove_Wailmer3, TRUE + setmetatile 77, 16, METATILE_Lilycove_Wailmer0_Alt, TRUE + setmetatile 78, 16, METATILE_Lilycove_Wailmer1_Alt, TRUE + setmetatile 77, 17, METATILE_Lilycove_Wailmer2, TRUE + setmetatile 78, 17, METATILE_Lilycove_Wailmer3, TRUE return LilycoveCity_EventScript_BerryGentleman:: @@ -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 7bfa1419a..fa884a096 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -17,9 +17,8 @@ LilycoveCity_ContestLobby_OnTransition: end LilycoveCity_ContestLobby_EventScript_TryShowBlendMaster:: - getpricereduction POKENEWS_BLENDMASTER - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_ShowBlendMaster + getpokenewsactive POKENEWS_BLENDMASTER + 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 @@ -384,31 +374,31 @@ LilycoveCity_ContestLobby_EventScript_WarpToContestHall:: return LilycoveCity_ContestLobby_EventScript_WarpToCoolContestHall:: - setwarp MAP_CONTEST_HALL_COOL, 255, 7, 5 + setwarp MAP_CONTEST_HALL_COOL, 7, 5 special DoContestHallWarp waitstate return LilycoveCity_ContestLobby_EventScript_WarpToBeautyContestHall:: - setwarp MAP_CONTEST_HALL_BEAUTY, 255, 7, 5 + setwarp MAP_CONTEST_HALL_BEAUTY, 7, 5 special DoContestHallWarp waitstate return LilycoveCity_ContestLobby_EventScript_WarpToCuteContestHall:: - setwarp MAP_CONTEST_HALL_CUTE, 255, 7, 5 + setwarp MAP_CONTEST_HALL_CUTE, 7, 5 special DoContestHallWarp waitstate return LilycoveCity_ContestLobby_EventScript_WarpToSmartContestHall:: - setwarp MAP_CONTEST_HALL_SMART, 255, 7, 5 + setwarp MAP_CONTEST_HALL_SMART, 7, 5 special DoContestHallWarp waitstate return LilycoveCity_ContestLobby_EventScript_WarpToToughContestHall:: - setwarp MAP_CONTEST_HALL_TOUGH, 255, 7, 5 + setwarp MAP_CONTEST_HALL_TOUGH, 7, 5 special DoContestHallWarp waitstate return @@ -418,14 +408,14 @@ LilycoveCity_ContestLobby_EventScript_LeadToContestHall:: applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistApproachCounter waitmovement 0 playse SE_BRIDGE_WALK - setmetatile 12, 2, METATILE_Contest_WallShadow, 1 - setmetatile 12, 3, METATILE_Contest_FloorShadow, 1 + setmetatile 12, 2, METATILE_Contest_WallShadow, TRUE + setmetatile 12, 3, METATILE_Contest_FloorShadow, TRUE special DrawWholeMapView applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistExitCounter waitmovement 0 playse SE_BRIDGE_WALK - setmetatile 12, 2, METATILE_Contest_CounterFlap_Top, 1 - setmetatile 12, 3, METATILE_Contest_CounterFlap_Bottom, 1 + setmetatile 12, 2, METATILE_Contest_CounterFlap_Top, TRUE + setmetatile 12, 3, METATILE_Contest_CounterFlap_Bottom, TRUE special DrawWholeMapView delay 20 applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistFacePlayer @@ -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, 255 - 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 @@ -836,7 +807,7 @@ LilycoveCity_ContestLobby_EventScript_CancelLinkTransmissionError:: LilycoveCity_ContestLobby_EventScript_StartLinkContest:: special GetContestPlayerId addvar VAR_0x8004, 1 - buffernumberstring 1, VAR_0x8004 + buffernumberstring STR_VAR_2, VAR_0x8004 messageautoscroll LilycoveCity_ContestLobby_Text_YourMonIsEntryNumX waitmessage subvar VAR_0x8004, 1 @@ -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 @@ -939,14 +899,14 @@ LilycoveCity_ContestLobby_EventScript_LeadToLinkContestHall:: applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistApproachCounter waitmovement 0 playse SE_BRIDGE_WALK - setmetatile 17, 2, METATILE_Contest_WallShadow, 1 - setmetatile 17, 3, METATILE_Contest_FloorShadow, 1 + setmetatile 17, 2, METATILE_Contest_WallShadow, TRUE + setmetatile 17, 3, METATILE_Contest_FloorShadow, TRUE special DrawWholeMapView applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistExitCounter waitmovement 0 playse SE_BRIDGE_WALK - setmetatile 17, 2, METATILE_Contest_CounterFlap_Top, 1 - setmetatile 17, 3, METATILE_Contest_CounterFlap_Bottom, 1 + setmetatile 17, 2, METATILE_Contest_CounterFlap_Top, TRUE + setmetatile 17, 3, METATILE_Contest_CounterFlap_Bottom, TRUE special DrawWholeMapView delay 20 applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistFacePlayer 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 b6ad2e4e6..d7d152408 100644 --- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc @@ -59,9 +59,8 @@ LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_1F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 255, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 2, 1 + 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 @@ -69,9 +68,8 @@ LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_2F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 255, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 2, 1 + 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 @@ -79,9 +77,8 @@ LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_3F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 255, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 2, 1 + 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 @@ -89,9 +86,8 @@ LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_4F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 255, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 2, 1 + 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 @@ -99,9 +95,8 @@ LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_5thFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_5F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 255, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 2, 1 + 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 e91ca7745..8c67ee149 100644 --- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc @@ -3,11 +3,9 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts:: .byte 0 LilycoveCity_DepartmentStoreRooftop_OnTransition: - getpricereduction POKENEWS_LILYCOVE - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_HideSaleWoman + getpokenewsactive POKENEWS_LILYCOVE + 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:: @@ -51,9 +49,8 @@ LilycoveCity_DepartmentStoreRooftop_PokemartDecor_ClearOutSale: LilycoveCity_DepartmentStoreRooftop_EventScript_Man:: lock faceplayer - getpricereduction POKENEWS_LILYCOVE - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale + getpokenewsactive POKENEWS_LILYCOVE + call_if_eq VAR_RESULT, TRUE, LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale msgbox LilycoveCity_DepartmentStoreRooftop_Text_SetDatesForClearOutSales, MSGBOX_DEFAULT release end @@ -71,7 +68,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_VendingMachine:: lockall message LilycoveCity_DepartmentStoreRooftop_Text_WhichDrinkWouldYouLike waitmessage - showmoneybox 0, 0, 0 + showmoneybox 0, 0 goto LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseDrink end @@ -102,78 +99,66 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_Lemonade:: end LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater:: - checkmoney 200, 0 + checkmoney 200 return LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop:: - checkmoney 300, 0 + checkmoney 300 return LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade:: - checkmoney 350, 0 + checkmoney 350 return LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater:: - removemoney 200, 0 + removemoney 200 return LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop:: - removemoney 300, 0 + removemoney 300 return LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade:: - removemoney 350, 0 + removemoney 350 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 - checkitemspace VAR_TEMP_0, 1 - 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 - updatemoneybox 0, 0 - bufferitemname 0, VAR_TEMP_0 + 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 + 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 msgbox LilycoveCity_DepartmentStoreRooftop_Text_CanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 - bufferitemname 1, VAR_TEMP_0 - bufferstdstring 2, STDSTRING_ITEMS + bufferitemname STR_VAR_2, VAR_TEMP_0 + 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 - checkitemspace VAR_TEMP_0, 1 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink + goto_if_ne VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink + checkitemspace VAR_TEMP_0 + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 - bufferitemname 1, VAR_TEMP_0 - bufferstdstring 2, STDSTRING_ITEMS + bufferitemname STR_VAR_2, VAR_TEMP_0 + 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 - checkitemspace VAR_TEMP_0, 1 - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink + goto_if_ne VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink + checkitemspace VAR_TEMP_0 + goto_if_eq VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 - bufferitemname 1, VAR_TEMP_0 - bufferstdstring 2, STDSTRING_ITEMS + bufferitemname STR_VAR_2, VAR_TEMP_0 + bufferstdstring STR_VAR_3, STDSTRING_ITEMS msgbox gText_PutItemInPocket, MSGBOX_DEFAULT goto LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink end diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc index fb82ba47a..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 - bufferitemname 0, 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_0x8006, 0, LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPartyMon + call_if_eq VAR_0x8006, 1, LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPCMon + bufferitemname STR_VAR_1, VAR_0x8005 + 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 216a6ff03..63010dc4c 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -8,7 +8,7 @@ LilycoveCity_Harbor_MapScripts:: .byte 0 LilycoveCity_Harbor_OnTransition: - setescapewarp MAP_LILYCOVE_CITY, 255, 12, 33 + setescapewarp MAP_LILYCOVE_CITY, 12, 33 end LilycoveCity_Harbor_EventScript_FerryAttendant:: @@ -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 @@ -64,49 +57,47 @@ LilycoveCity_Harbor_EventScript_FerryRegularLocationSelect:: LilycoveCity_Harbor_EventScript_GoToSouthernIsland:: call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_SOUTHERN_ISLAND_EXTERIOR, 255, 13, 22 + warp MAP_SOUTHERN_ISLAND_EXTERIOR, 13, 22 waitstate release end LilycoveCity_Harbor_EventScript_GoToNavelRock:: call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_NAVEL_ROCK_HARBOR, 255, 8, 4 + warp MAP_NAVEL_ROCK_HARBOR, 8, 4 waitstate release end LilycoveCity_Harbor_EventScript_GoToBirthIsland:: call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_BIRTH_ISLAND_HARBOR, 255, 8, 4 + warp MAP_BIRTH_ISLAND_HARBOR, 8, 4 waitstate release end LilycoveCity_Harbor_EventScript_GoToFarawayIsland:: call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38 + warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38 waitstate release end 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, 255, 1, 10 + warp MAP_SS_TIDAL_CORRIDOR, 1, 10 waitstate release end 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, 255, 19, 67 + warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate release end @@ -114,9 +105,8 @@ LilycoveCity_Harbor_EventScript_GoToBattleFrontier:: LilycoveCity_Harbor_EventScript_GetEonTicketState:: setvar VAR_TEMP_E, 0 goto_if_unset FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, Common_EventScript_NopReturn - checkitem ITEM_EON_TICKET, 1 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + checkitem ITEM_EON_TICKET + 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 @@ -125,9 +115,8 @@ LilycoveCity_Harbor_EventScript_GetEonTicketState:: LilycoveCity_Harbor_EventScript_GetAuroraTicketState:: setvar VAR_TEMP_D, 0 goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, Common_EventScript_NopReturn - checkitem ITEM_AURORA_TICKET, 1 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + checkitem ITEM_AURORA_TICKET + 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 @@ -136,9 +125,8 @@ LilycoveCity_Harbor_EventScript_GetAuroraTicketState:: 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, 1 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + checkitem ITEM_OLD_SEA_MAP + 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 @@ -147,9 +135,8 @@ LilycoveCity_Harbor_EventScript_GetOldSeaMapState:: LilycoveCity_Harbor_EventScript_GetMysticTicketState:: setvar VAR_TEMP_9, 0 goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, Common_EventScript_NopReturn - checkitem ITEM_MYSTIC_TICKET, 1 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + checkitem ITEM_MYSTIC_TICKET + 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:: @@ -223,7 +202,7 @@ LilycoveCity_Harbor_EventScript_EonTicketFirstTime:: LilycoveCity_Harbor_EventScript_GoToSouthernIslandFirstTime:: closemessage call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor - warp MAP_SOUTHERN_ISLAND_EXTERIOR, 255, 13, 22 + warp MAP_SOUTHERN_ISLAND_EXTERIOR, 13, 22 waitstate release end @@ -240,7 +219,7 @@ LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime:: LilycoveCity_Harbor_EventScript_GoToBirthIslandFirstTime:: closemessage call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor - warp MAP_BIRTH_ISLAND_HARBOR, 255, 8, 4 + warp MAP_BIRTH_ISLAND_HARBOR, 8, 4 waitstate release end @@ -259,29 +238,21 @@ 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, 255, 13, 38 + warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38 waitstate release end @@ -289,7 +260,7 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime:: LilycoveCity_Harbor_EventScript_GoToFarawayIslandFirstTime:: closemessage call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor - warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38 + warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38 waitstate release end @@ -306,7 +277,7 @@ LilycoveCity_Harbor_EventScript_MysticTicketFirstTime:: LilycoveCity_Harbor_EventScript_GoToNavelRockFirstTime:: closemessage call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor - warp MAP_NAVEL_ROCK_HARBOR, 255, 8, 4 + warp MAP_NAVEL_ROCK_HARBOR, 8, 4 waitstate release end @@ -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,11 +364,10 @@ 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, 255, 1, 10 + warp MAP_SS_TIDAL_CORRIDOR, 1, 10 waitstate release end @@ -407,10 +375,9 @@ 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, 255, 19, 67 + warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate release end @@ -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 e5d855633..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:: @@ -52,7 +48,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorNorth:: lockall applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorNorth waitmovement 0 - warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 255, 11, 8 + warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8 waitstate end @@ -60,7 +56,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorWest:: lockall applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorWest waitmovement 0 - warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 255, 11, 8 + warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8 waitstate end @@ -68,7 +64,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorEast:: lockall applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorEast waitmovement 0 - warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 255, 11, 8 + warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8 waitstate end diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc index 929bba3e1..9212ca67d 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc @@ -30,32 +30,32 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_CheckToughPainting:: end LilycoveCity_LilycoveMuseum_2F_EventScript_SetCoolPainting:: - setmetatile 10, 6, METATILE_LilycoveMuseum_Painting2_Left, 1 - setmetatile 11, 6, METATILE_LilycoveMuseum_Painting2_Right, 1 + setmetatile 10, 6, METATILE_LilycoveMuseum_Painting2_Left, TRUE + setmetatile 11, 6, METATILE_LilycoveMuseum_Painting2_Right, TRUE goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckBeautyPainting end LilycoveCity_LilycoveMuseum_2F_EventScript_SetBeautyPainting:: - setmetatile 18, 6, METATILE_LilycoveMuseum_Painting1_Left, 1 - setmetatile 19, 6, METATILE_LilycoveMuseum_Painting1_Right, 1 + setmetatile 18, 6, METATILE_LilycoveMuseum_Painting1_Left, TRUE + setmetatile 19, 6, METATILE_LilycoveMuseum_Painting1_Right, TRUE goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckCutePainting end LilycoveCity_LilycoveMuseum_2F_EventScript_SetCutePainting:: - setmetatile 14, 10, METATILE_LilycoveMuseum_Painting3_Left, 1 - setmetatile 15, 10, METATILE_LilycoveMuseum_Painting3_Right, 1 + setmetatile 14, 10, METATILE_LilycoveMuseum_Painting3_Left, TRUE + setmetatile 15, 10, METATILE_LilycoveMuseum_Painting3_Right, TRUE goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckSmartPainting end LilycoveCity_LilycoveMuseum_2F_EventScript_SetSmartPainting:: - setmetatile 6, 10, METATILE_LilycoveMuseum_Painting0_Left, 1 - setmetatile 7, 10, METATILE_LilycoveMuseum_Painting0_Right, 1 + setmetatile 6, 10, METATILE_LilycoveMuseum_Painting0_Left, TRUE + setmetatile 7, 10, METATILE_LilycoveMuseum_Painting0_Right, TRUE goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckToughPainting end LilycoveCity_LilycoveMuseum_2F_EventScript_SetToughPainting:: - setmetatile 2, 6, METATILE_LilycoveMuseum_Painting4_Left, 1 - setmetatile 3, 6, METATILE_LilycoveMuseum_Painting4_Right, 1 + setmetatile 2, 6, METATILE_LilycoveMuseum_Painting4_Left, TRUE + setmetatile 3, 6, METATILE_LilycoveMuseum_Painting4_Right, TRUE end LilycoveCity_LilycoveMuseum_2F_OnFrame: @@ -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 ff340c9f3..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, 255 - 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 1936b5ad8..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:: @@ -129,7 +118,7 @@ LittlerootTown_EventScript_StepOffTruckMale:: setvar VAR_0x8005, 8 call LittlerootTown_EventScript_GoInsideWithMom setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_TRUCK - warpsilent MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F, 255, 8, 8 + warpsilent MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F, 8, 8 waitstate releaseall end @@ -140,7 +129,7 @@ LittlerootTown_EventScript_StepOffTruckFemale:: setvar VAR_0x8005, 8 call LittlerootTown_EventScript_GoInsideWithMom setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_TRUCK - warpsilent MAP_LITTLEROOT_TOWN_MAYS_HOUSE_1F, 255, 2, 8 + warpsilent MAP_LITTLEROOT_TOWN_MAYS_HOUSE_1F, 2, 8 waitstate releaseall end @@ -230,7 +219,7 @@ LittlerootTown_EventScript_BeginDexUpgradeScene:: clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCH delay 20 clearflag FLAG_HIDE_MAP_NAME_POPUP - warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 255, 6, 5 + warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5 waitstate releaseall end @@ -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 2e4ff739d..cce8cd59b 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -9,33 +9,28 @@ 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 LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes:: - setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 - setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 + setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, TRUE + setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, TRUE return 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:: - setmetatile 3, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 + setmetatile 3, 7, METATILE_BrendansMaysHouse_BookOnTable, TRUE 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:: @@ -70,7 +65,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_GoUpstairsToSetClock:: applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs applymovement LOCALID_MOM, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs waitmovement 0 - warp MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 255, 7, 1 + warp MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 7, 1 waitstate releaseall end @@ -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 5fcec1951..b4c4775c3 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -9,33 +9,28 @@ 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 LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes:: - setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 - setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 + setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, TRUE + setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, TRUE return 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:: - setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 + setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, TRUE 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:: @@ -69,7 +64,7 @@ LittlerootTown_MaysHouse_1F_EventScript_GoUpstairsToSetClock:: applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs applymovement LOCALID_MOM, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs waitmovement 0 - warp MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 255, 1, 1 + warp MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 1, 1 waitstate releaseall end @@ -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 0a828c426..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 @@ -117,16 +113,14 @@ LittlerootTown_ProfessorBirchsLab_OnFrame: @ This is just where the game tells you its yours and lets you nickname it LittlerootTown_ProfessorBirchsLab_EventScript_GiveStarterEvent:: lockall - bufferleadmonspeciesname 0 + bufferleadmonspeciesname STR_VAR_1 message LittlerootTown_ProfessorBirchsLab_Text_LikeYouToHavePokemon waitmessage 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 @@ -357,13 +338,11 @@ LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime:: end LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil:: - bufferspeciesname 0, SPECIES_CYNDAQUIL + 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 @@ -402,13 +379,11 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil:: end LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile:: - bufferspeciesname 0, SPECIES_TOTODILE + 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 @@ -447,13 +420,11 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile:: end LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita:: - bufferspeciesname 0, SPECIES_CHIKORITA + 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/MarineCave_Entrance/scripts.inc b/data/maps/MarineCave_Entrance/scripts.inc index a075d2c30..172a19d26 100644 --- a/data/maps/MarineCave_Entrance/scripts.inc +++ b/data/maps/MarineCave_Entrance/scripts.inc @@ -3,6 +3,6 @@ MarineCave_Entrance_MapScripts:: .byte 0 MarineCave_Entrance_OnResume: - setdivewarp MAP_UNDERWATER_MARINE_CAVE, 255, 9, 6 + setdivewarp MAP_UNDERWATER_MARINE_CAVE, 9, 6 end 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 45efbe8f3..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, 1 - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchAcroForMach - checkitem ITEM_MACH_BIKE, 1 - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchMachForAcro + checkitem ITEM_ACRO_BIKE + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_BikeShop_EventScript_SwitchAcroForMach + checkitem ITEM_MACH_BIKE + 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 896dfa680..b7c8603a3 100644 --- a/data/maps/MauvilleCity_GameCorner/scripts.inc +++ b/data/maps/MauvilleCity_GameCorner/scripts.inc @@ -16,12 +16,11 @@ MauvilleCity_GameCorner_EventScript_CoinsClerk:: lock faceplayer msgbox MauvilleCity_GameCorner_Text_ThisIsMauvilleGameCorner, MSGBOX_DEFAULT - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NeedCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NeedCoinCase message MauvilleCity_GameCorner_Text_WereYouLookingForCoins waitmessage - showmoneybox 0, 0, 0 + showmoneybox 0, 0 showcoinsbox 1, 6 goto MauvilleCity_GameCorner_EventScript_ChooseCoinsDefault50 @@ -44,14 +43,12 @@ 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 - checkmoney COINS_PRICE_50, 0 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1 - 50), MauvilleCity_GameCorner_EventScript_NoRoomForCoins + checkmoney COINS_PRICE_50 + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NotEnoughMoney addcoins 50 - removemoney COINS_PRICE_50, 0 - updatemoneybox 0, 0 + removemoney COINS_PRICE_50 + updatemoneybox updatecoinsbox 1, 6 playse SE_SHOP msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT @@ -62,14 +59,12 @@ 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 - checkmoney COINS_PRICE_500, 0 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1 - 500), MauvilleCity_GameCorner_EventScript_NoRoomForCoins + checkmoney COINS_PRICE_500 + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NotEnoughMoney addcoins 500 - removemoney COINS_PRICE_500, 0 - updatemoneybox 0, 0 + removemoney COINS_PRICE_500 + updatemoneybox updatecoinsbox 1, 6 playse SE_SHOP msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT @@ -108,9 +103,8 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerDolls:: lock faceplayer msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage release end @@ -138,23 +132,22 @@ MauvilleCity_GameCorner_EventScript_ChooseDollPrize:: MauvilleCity_GameCorner_EventScript_TreeckoDoll:: setvar VAR_TEMP_1, 1 - bufferdecorationname 0, DECOR_TREECKO_DOLL + bufferdecorationname STR_VAR_1, DECOR_TREECKO_DOLL goto MauvilleCity_GameCorner_EventScript_ConfirmDollPrize MauvilleCity_GameCorner_EventScript_TorchicDoll:: setvar VAR_TEMP_1, 2 - bufferdecorationname 0, DECOR_TORCHIC_DOLL + bufferdecorationname STR_VAR_1, DECOR_TORCHIC_DOLL goto MauvilleCity_GameCorner_EventScript_ConfirmDollPrize MauvilleCity_GameCorner_EventScript_MudkipDoll:: setvar VAR_TEMP_1, 3 - bufferdecorationname 0, DECOR_MUDKIP_DOLL + bufferdecorationname STR_VAR_1, DECOR_MUDKIP_DOLL goto MauvilleCity_GameCorner_EventScript_ConfirmDollPrize 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 - bufferdecorationname 1, DECOR_TREECKO_DOLL + 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 - bufferdecorationname 1, DECOR_TORCHIC_DOLL + 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 - bufferdecorationname 1, DECOR_MUDKIP_DOLL + 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 @@ -229,9 +216,8 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerTMs:: lock faceplayer msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage release end @@ -261,39 +247,38 @@ MauvilleCity_GameCorner_EventScript_ChooseTMPrize:: MauvilleCity_GameCorner_EventScript_TM32:: setvar VAR_TEMP_1, 1 - bufferitemname 0, ITEM_TM32 + bufferitemname STR_VAR_1, ITEM_TM32 setvar VAR_0x8004, ITEM_TM32 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize MauvilleCity_GameCorner_EventScript_TM29:: setvar VAR_TEMP_1, 2 - bufferitemname 0, ITEM_TM29 + bufferitemname STR_VAR_1, ITEM_TM29 setvar VAR_0x8004, ITEM_TM29 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize MauvilleCity_GameCorner_EventScript_TM35:: setvar VAR_TEMP_1, 3 - bufferitemname 0, ITEM_TM35 + bufferitemname STR_VAR_1, ITEM_TM35 setvar VAR_0x8004, ITEM_TM35 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize MauvilleCity_GameCorner_EventScript_TM24:: setvar VAR_TEMP_1, 4 - bufferitemname 0, ITEM_TM24 + bufferitemname STR_VAR_1, ITEM_TM24 setvar VAR_0x8004, ITEM_TM24 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize MauvilleCity_GameCorner_EventScript_TM13:: setvar VAR_TEMP_1, 5 - bufferitemname 0, ITEM_TM13 + bufferitemname STR_VAR_1, ITEM_TM13 setvar VAR_0x8004, ITEM_TM13 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize 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 - checkitemspace ITEM_TM32, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_lt VAR_TEMP_2, TM32_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + checkitemspace ITEM_TM32 + 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 - checkitemspace ITEM_TM29, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_lt VAR_TEMP_2, TM29_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + checkitemspace ITEM_TM29 + 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 - checkitemspace ITEM_TM35, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_lt VAR_TEMP_2, TM35_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + checkitemspace ITEM_TM35 + 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 - checkitemspace ITEM_TM24, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_lt VAR_TEMP_2, TM24_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + checkitemspace ITEM_TM24 + 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 - checkitemspace ITEM_TM13, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_lt VAR_TEMP_2, TM13_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + checkitemspace ITEM_TM13 + 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 @@ -415,10 +389,9 @@ MauvilleCity_GameCorner_EventScript_Girl:: end MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll:: - bufferdecorationname 1, DECOR_TREECKO_DOLL + 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 @@ -426,10 +399,9 @@ MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll:: end MauvilleCity_GameCorner_EventScript_GiveTorchicDoll:: - bufferdecorationname 1, DECOR_TORCHIC_DOLL + 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 @@ -437,10 +409,9 @@ MauvilleCity_GameCorner_EventScript_GiveTorchicDoll:: end MauvilleCity_GameCorner_EventScript_GiveMudkipDoll:: - bufferdecorationname 1, DECOR_MUDKIP_DOLL + 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 @@ -466,9 +437,8 @@ MauvilleCity_GameCorner_EventScript_ReceivedStarterDoll:: MauvilleCity_GameCorner_EventScript_PokefanM:: lock faceplayer - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_GameCorner_EventScript_TryGive20Coins + checkitem ITEM_COIN_CASE + 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 @@ -534,9 +503,8 @@ MauvilleCity_GameCorner_EventScript_Woman:: MauvilleCity_GameCorner_EventScript_SlotMachine0:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -545,9 +513,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine0:: MauvilleCity_GameCorner_EventScript_SlotMachine1:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 1 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -556,9 +523,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine1:: MauvilleCity_GameCorner_EventScript_SlotMachine2:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 2 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -567,9 +533,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine2:: MauvilleCity_GameCorner_EventScript_SlotMachine3:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 3 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -578,9 +543,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine3:: MauvilleCity_GameCorner_EventScript_SlotMachine4:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 4 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -589,9 +553,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine4:: MauvilleCity_GameCorner_EventScript_SlotMachine5:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 5 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -600,9 +563,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine5:: MauvilleCity_GameCorner_EventScript_SlotMachine6:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 6 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -611,9 +573,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine6:: MauvilleCity_GameCorner_EventScript_SlotMachine7:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 7 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -622,9 +583,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine7:: MauvilleCity_GameCorner_EventScript_SlotMachine8:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 8 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -633,9 +593,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine8:: MauvilleCity_GameCorner_EventScript_SlotMachine9:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 9 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -644,9 +603,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine9:: MauvilleCity_GameCorner_EventScript_SlotMachine10:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 10 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -655,9 +613,8 @@ MauvilleCity_GameCorner_EventScript_SlotMachine10:: MauvilleCity_GameCorner_EventScript_SlotMachine11:: lockall - checkitem ITEM_COIN_CASE, 1 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + checkitem ITEM_COIN_CASE + 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 3c09ecfa2..de924d7d9 100644 --- a/data/maps/MauvilleCity_Gym/scripts.inc +++ b/data/maps/MauvilleCity_Gym/scripts.inc @@ -17,32 +17,32 @@ MauvilleCity_Gym_EventScript_UpdateBarriers:: end MauvilleCity_Gym_EventScript_SetAltBarriers:: - setmetatile 3, 11, METATILE_MauvilleGym_RedBeamV1_On, 1 - setmetatile 3, 12, METATILE_MauvilleGym_RedBeamV2_On, 1 - setmetatile 3, 13, METATILE_MauvilleGym_PoleTop_On, 1 - setmetatile 4, 10, METATILE_MauvilleGym_RedBeamH1_On, 0 - setmetatile 5, 10, METATILE_MauvilleGym_RedBeamH2_On, 0 - setmetatile 4, 11, METATILE_MauvilleGym_RedBeamH3_On, 1 - setmetatile 5, 11, METATILE_MauvilleGym_RedBeamH4_On, 1 - setmetatile 7, 10, METATILE_MauvilleGym_RedBeamH1_On, 0 - setmetatile 8, 10, METATILE_MauvilleGym_RedBeamH2_On, 0 - setmetatile 7, 11, METATILE_MauvilleGym_RedBeamH3_On, 1 - setmetatile 8, 11, METATILE_MauvilleGym_RedBeamH4_On, 1 - setmetatile 4, 13, METATILE_MauvilleGym_GreenBeamH1_Off, 0 - setmetatile 5, 13, METATILE_MauvilleGym_GreenBeamH2_Off, 0 - setmetatile 4, 14, METATILE_MauvilleGym_GreenBeamH3_Off, 0 - setmetatile 5, 14, METATILE_MauvilleGym_GreenBeamH4_Off, 0 - setmetatile 1, 10, METATILE_MauvilleGym_GreenBeamH1_Off, 0 - setmetatile 2, 10, METATILE_MauvilleGym_GreenBeamH2_Off, 0 - setmetatile 1, 11, METATILE_MauvilleGym_GreenBeamH3_Off, 0 - setmetatile 2, 11, METATILE_MauvilleGym_GreenBeamH4_Off, 0 - setmetatile 6, 8, METATILE_MauvilleGym_PoleBottom_On, 1 - setmetatile 6, 9, METATILE_MauvilleGym_FloorTile, 0 - setmetatile 6, 10, METATILE_MauvilleGym_PoleTop_Off, 0 - setmetatile 4, 6, METATILE_MauvilleGym_GreenBeamH1_Off, 0 - setmetatile 5, 6, METATILE_MauvilleGym_GreenBeamH2_Off, 0 - setmetatile 4, 7, METATILE_MauvilleGym_GreenBeamH3_Off, 0 - setmetatile 5, 7, METATILE_MauvilleGym_GreenBeamH4_Off, 0 + setmetatile 3, 11, METATILE_MauvilleGym_RedBeamV1_On, TRUE + setmetatile 3, 12, METATILE_MauvilleGym_RedBeamV2_On, TRUE + setmetatile 3, 13, METATILE_MauvilleGym_PoleTop_On, TRUE + setmetatile 4, 10, METATILE_MauvilleGym_RedBeamH1_On, FALSE + setmetatile 5, 10, METATILE_MauvilleGym_RedBeamH2_On, FALSE + setmetatile 4, 11, METATILE_MauvilleGym_RedBeamH3_On, TRUE + setmetatile 5, 11, METATILE_MauvilleGym_RedBeamH4_On, TRUE + setmetatile 7, 10, METATILE_MauvilleGym_RedBeamH1_On, FALSE + setmetatile 8, 10, METATILE_MauvilleGym_RedBeamH2_On, FALSE + setmetatile 7, 11, METATILE_MauvilleGym_RedBeamH3_On, TRUE + setmetatile 8, 11, METATILE_MauvilleGym_RedBeamH4_On, TRUE + setmetatile 4, 13, METATILE_MauvilleGym_GreenBeamH1_Off, FALSE + setmetatile 5, 13, METATILE_MauvilleGym_GreenBeamH2_Off, FALSE + setmetatile 4, 14, METATILE_MauvilleGym_GreenBeamH3_Off, FALSE + setmetatile 5, 14, METATILE_MauvilleGym_GreenBeamH4_Off, FALSE + setmetatile 1, 10, METATILE_MauvilleGym_GreenBeamH1_Off, FALSE + setmetatile 2, 10, METATILE_MauvilleGym_GreenBeamH2_Off, FALSE + setmetatile 1, 11, METATILE_MauvilleGym_GreenBeamH3_Off, FALSE + setmetatile 2, 11, METATILE_MauvilleGym_GreenBeamH4_Off, FALSE + setmetatile 6, 8, METATILE_MauvilleGym_PoleBottom_On, TRUE + setmetatile 6, 9, METATILE_MauvilleGym_FloorTile, FALSE + setmetatile 6, 10, METATILE_MauvilleGym_PoleTop_Off, FALSE + setmetatile 4, 6, METATILE_MauvilleGym_GreenBeamH1_Off, FALSE + setmetatile 5, 6, METATILE_MauvilleGym_GreenBeamH2_Off, FALSE + setmetatile 4, 7, METATILE_MauvilleGym_GreenBeamH3_Off, FALSE + setmetatile 5, 7, METATILE_MauvilleGym_GreenBeamH4_Off, FALSE end MauvilleCity_Gym_EventScript_Switch1Pressed:: @@ -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 178b79f9b..193e0c04c 100644 --- a/data/maps/MauvilleCity_House2/scripts.inc +++ b/data/maps/MauvilleCity_House2/scripts.inc @@ -6,9 +6,8 @@ MauvilleCity_House2_EventScript_Woman:: faceplayer goto_if_set FLAG_RECEIVED_COIN_CASE, MauvilleCity_House2_EventScript_ReceivedCoinCase msgbox MauvilleCity_House2_Text_BuyHarborMailAtSlateport, MSGBOX_DEFAULT - checkitem ITEM_HARBOR_MAIL, 1 - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_House2_EventScript_AskToTradeForHarborMail + checkitem ITEM_HARBOR_MAIL + 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_1R/scripts.inc b/data/maps/MeteorFalls_1F_1R/scripts.inc index 23ae9728d..b81f5de26 100644 --- a/data/maps/MeteorFalls_1F_1R/scripts.inc +++ b/data/maps/MeteorFalls_1F_1R/scripts.inc @@ -13,10 +13,10 @@ MeteorFalls_1F_1R_OnLoad: end MeteorFalls_1F_1R_EventScript_OpenStevensCave:: - setmetatile 4, 1, METATILE_MeteorFalls_CaveEntrance_Top, 1 - setmetatile 3, 2, METATILE_MeteorFalls_CaveEntrance_Left, 1 - setmetatile 4, 2, METATILE_MeteorFalls_CaveEntrance_Bottom, 0 - setmetatile 5, 2, METATILE_MeteorFalls_CaveEntrance_Right, 1 + setmetatile 4, 1, METATILE_MeteorFalls_CaveEntrance_Top, TRUE + setmetatile 3, 2, METATILE_MeteorFalls_CaveEntrance_Left, TRUE + setmetatile 4, 2, METATILE_MeteorFalls_CaveEntrance_Bottom, FALSE + setmetatile 5, 2, METATILE_MeteorFalls_CaveEntrance_Right, TRUE return MeteorFalls_1F_1R_EventScript_MagmaStealsMeteoriteScene:: 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_2F/scripts.inc b/data/maps/MirageTower_2F/scripts.inc index 3d53359d4..39d2be7f4 100644 --- a/data/maps/MirageTower_2F/scripts.inc +++ b/data/maps/MirageTower_2F/scripts.inc @@ -6,6 +6,6 @@ MirageTower_2F_MapScripts:: MirageTower_2F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_MIRAGE_TOWER_1F, 255, 0, 0 + setholewarp MAP_MIRAGE_TOWER_1F end diff --git a/data/maps/MirageTower_3F/scripts.inc b/data/maps/MirageTower_3F/scripts.inc index 02b086400..1b2f04aee 100644 --- a/data/maps/MirageTower_3F/scripts.inc +++ b/data/maps/MirageTower_3F/scripts.inc @@ -6,6 +6,6 @@ MirageTower_3F_MapScripts:: MirageTower_3F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_MIRAGE_TOWER_2F, 255, 0, 0 + setholewarp MAP_MIRAGE_TOWER_2F end diff --git a/data/maps/MirageTower_4F/scripts.inc b/data/maps/MirageTower_4F/scripts.inc index 2c96710d1..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 @@ -57,7 +55,7 @@ MirageTower_4F_EventScript_CollapseMirageTower:: waitstate setvar VAR_MIRAGE_TOWER_STATE, 1 clearflag FLAG_LANDMARK_MIRAGE_TOWER - warp MAP_ROUTE111, 255, 19, 59 + warp MAP_ROUTE111, 19, 59 waitstate release end 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 22c2e17ab..b47011d68 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -26,33 +26,32 @@ MossdeepCity_Gym_EventScript_CheckSwitch4:: @ All the below set metatile scripts are leftover from RS and are functionally unused MossdeepCity_Gym_EventScript_SetSwitch1Metatiles:: - setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_CheckSwitch2 end MossdeepCity_Gym_EventScript_SetSwitch2Metatiles:: - setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_CheckSwitch3 end MossdeepCity_Gym_EventScript_SetSwitch3Metatiles:: - setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0 - setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE + setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_CheckSwitch4 end MossdeepCity_Gym_EventScript_SetSwitch4Metatiles:: - setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0 - setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE + setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE end 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 @@ -119,8 +116,8 @@ MossdeepCity_Gym_EventScript_Switch1:: setflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -134,8 +131,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch1:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, 0 - setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, 1 + setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE + setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -145,8 +142,8 @@ MossdeepCity_Gym_EventScript_Switch2:: setflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -154,8 +151,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch2:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, 0 - setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, 1 + setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, FALSE + setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -165,8 +162,8 @@ MossdeepCity_Gym_EventScript_Switch3:: setflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0 - setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE + setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -174,8 +171,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch3:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, 1 + setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -185,8 +182,8 @@ MossdeepCity_Gym_EventScript_Switch4:: setflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0 - setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE + setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -194,14 +191,14 @@ MossdeepCity_Gym_EventScript_ClearSwitch4:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, 1 + setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end MossdeepCity_Gym_EventScript_WarpToEntrance:: lockall - warpmossdeepgym MAP_MOSSDEEP_CITY_GYM, 255, 7, 30 + warpmossdeepgym MAP_MOSSDEEP_CITY_GYM, 7, 30 waitstate releaseall end diff --git a/data/maps/MossdeepCity_House1/scripts.inc b/data/maps/MossdeepCity_House1/scripts.inc index 99224a795..433defa66 100644 --- a/data/maps/MossdeepCity_House1/scripts.inc +++ b/data/maps/MossdeepCity_House1/scripts.inc @@ -4,11 +4,10 @@ MossdeepCity_House1_MapScripts:: MossdeepCity_House1_EventScript_BlackBelt:: lock faceplayer - bufferleadmonspeciesname 0 + 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 b44b343a6..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,26 +43,22 @@ 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:: - setmetatile 2, 5, METATILE_Facility_DataPad, 1 + setmetatile 2, 5, METATILE_Facility_DataPad, TRUE return 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 0, 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 + buffernumberstring STR_VAR_1, VAR_RESULT + 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 @@ -84,11 +76,9 @@ MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumber:: MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma:: dotimebasedevents specialvar VAR_RESULT, GetWeekCount - buffernumberstring 0, 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 + buffernumberstring STR_VAR_1, VAR_RESULT + 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 044979c12..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,13 +46,12 @@ 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 waitmovement 0 - warp MAP_MOSSDEEP_CITY_SPACE_CENTER_1F, 255, 13, 1 + warp MAP_MOSSDEEP_CITY_SPACE_CENTER_1F, 13, 1 waitstate releaseall end @@ -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 22b26f392..aac12ec2a 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -12,12 +12,11 @@ MossdeepCity_StevensHouse_OnLoad: end MossdeepCity_StevensHouse_EventScript_HideStevensNote:: - setmetatile 6, 4, METATILE_GenericBuilding_TableEdge, 1 + setmetatile 6, 4, METATILE_GenericBuilding_TableEdge, TRUE 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 @@ -121,13 +115,13 @@ MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC:: end MossdeepCity_StevensHouse_EventScript_ReceivedBeldumFanfare:: - bufferspeciesname 1, SPECIES_BELDUM + bufferspeciesname STR_VAR_2, SPECIES_BELDUM removeobject LOCALID_BELDUM_BALL playfanfare MUS_OBTAIN_ITEM message MossdeepCity_StevensHouse_Text_ObtainedBeldum waitmessage waitfanfare - bufferspeciesname 0, SPECIES_BELDUM + bufferspeciesname STR_VAR_1, SPECIES_BELDUM return MossdeepCity_StevensHouse_EventScript_ReceivedBeldum:: diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index 320e2dc19..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 @@ -107,20 +103,16 @@ MtChimney_EventScript_ArchieExitNorth:: MtChimney_EventScript_LavaCookieLady:: lock faceplayer - showmoneybox 0, 0, 0 + showmoneybox 0, 0 msgbox MtChimney_Text_LavaCookiesJust200, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MtChimney_EventScript_DeclineLavaCookie - checkmoney 200, 0 - compare VAR_RESULT, FALSE - goto_if_eq MtChimney_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, NO, MtChimney_EventScript_DeclineLavaCookie + checkmoney 200 + goto_if_eq VAR_RESULT, FALSE, MtChimney_EventScript_NotEnoughMoney msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT - checkitemspace ITEM_LAVA_COOKIE, 1 - compare VAR_RESULT, TRUE - call_if_eq MtChimney_EventScript_RemoveMoney + checkitemspace ITEM_LAVA_COOKIE + 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 @@ -132,8 +124,8 @@ MtChimney_EventScript_BagIsFull:: end MtChimney_EventScript_RemoveMoney:: - removemoney 200, 0 - updatemoneybox 0, 0 + removemoney 200 + updatemoneybox return MtChimney_EventScript_DeclineLavaCookie:: @@ -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_2F/scripts.inc b/data/maps/MtPyre_2F/scripts.inc index 9fe7bf9d2..381d03459 100644 --- a/data/maps/MtPyre_2F/scripts.inc +++ b/data/maps/MtPyre_2F/scripts.inc @@ -6,7 +6,7 @@ MtPyre_2F_MapScripts:: MtPyre_2F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_MT_PYRE_1F, 255, 0, 0 + setholewarp MAP_MT_PYRE_1F end MtPyre_2F_EventScript_Woman:: 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 b12e62248..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 @@ -18,7 +17,7 @@ NavelRock_Harbor_EventScript_Sailor:: hideobjectat LOCALID_SAILOR, MAP_NAVEL_ROCK_HARBOR setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepartIsland - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end 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 0a98d4ba6..4c498190e 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -4,17 +4,16 @@ 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:: - setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile0, 1 - setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile1, 1 - setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile2, 1 - setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile3, 1 - setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile4, 1 - setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile5, 1 + setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile0, TRUE + setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile1, TRUE + setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile2, TRUE + setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile3, TRUE + setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile4, TRUE + setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile5, TRUE return NewMauville_Entrance_OnTransition: @@ -26,19 +25,17 @@ NewMauville_Entrance_EventScript_Door:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT - checkitem ITEM_BASEMENT_KEY, 1 - compare VAR_RESULT, FALSE - goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor + checkitem ITEM_BASEMENT_KEY + 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, 0 - setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, 0 - setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile2, 0 - setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile3, 1 - setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile4, 0 - setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile5, 1 + setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, FALSE + setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, FALSE + setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile2, FALSE + setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile3, TRUE + setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile4, FALSE + setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile5, TRUE special DrawWholeMapView playse SE_BANG setvar VAR_NEW_MAUVILLE_STATE, 1 diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc index d924651ce..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:: @@ -65,83 +61,83 @@ NewMauville_Inside_EventScript_GreenButton:: end NewMauville_Inside_EventScript_SetBarrierStateBlueButton:: - setmetatile 23, 34, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 23, 35, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 23, 36, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 23, 37, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 10, 16, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 10, 17, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 10, 18, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 10, 19, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 10, 0, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 10, 1, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 10, 2, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 10, 3, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 37, 33, METATILE_BikeShop_Barrier_Green_Top, 1 - setmetatile 37, 34, METATILE_BikeShop_Barrier_Green_TopMid, 1 - setmetatile 37, 35, METATILE_BikeShop_Barrier_Green_BottomMid, 1 - setmetatile 37, 36, METATILE_BikeShop_Barrier_Green_Bottom, 1 - setmetatile 28, 22, METATILE_BikeShop_Barrier_Green_Top, 1 - setmetatile 28, 23, METATILE_BikeShop_Barrier_Green_TopMid, 1 - setmetatile 28, 24, METATILE_BikeShop_Barrier_Green_BottomMid, 1 - setmetatile 28, 25, METATILE_BikeShop_Barrier_Green_Bottom, 1 - setmetatile 10, 24, METATILE_BikeShop_Barrier_Green_Top, 1 - setmetatile 10, 25, METATILE_BikeShop_Barrier_Green_TopMid, 1 - setmetatile 10, 26, METATILE_BikeShop_Barrier_Green_BottomMid, 1 - setmetatile 10, 27, METATILE_BikeShop_Barrier_Green_Bottom, 1 - setmetatile 21, 2, METATILE_BikeShop_Barrier_Green_Top, 1 - setmetatile 21, 3, METATILE_BikeShop_Barrier_Green_TopMid, 1 - setmetatile 21, 4, METATILE_BikeShop_Barrier_Green_BottomMid, 1 - setmetatile 21, 5, METATILE_BikeShop_Barrier_Green_Bottom, 1 - setmetatile 6, 11, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 13, 10, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 16, 22, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 4, 26, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 30, 38, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 2, 11, METATILE_BikeShop_Button_Green, 0 - setmetatile 17, 10, METATILE_BikeShop_Button_Green, 0 - setmetatile 25, 18, METATILE_BikeShop_Button_Green, 0 - setmetatile 18, 36, METATILE_BikeShop_Button_Green, 0 + setmetatile 23, 34, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 23, 35, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 23, 36, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 23, 37, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 10, 16, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 10, 17, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 10, 18, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 10, 19, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 10, 0, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 10, 1, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 10, 2, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 10, 3, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 37, 33, METATILE_BikeShop_Barrier_Green_Top, TRUE + setmetatile 37, 34, METATILE_BikeShop_Barrier_Green_TopMid, TRUE + setmetatile 37, 35, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE + setmetatile 37, 36, METATILE_BikeShop_Barrier_Green_Bottom, TRUE + setmetatile 28, 22, METATILE_BikeShop_Barrier_Green_Top, TRUE + setmetatile 28, 23, METATILE_BikeShop_Barrier_Green_TopMid, TRUE + setmetatile 28, 24, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE + setmetatile 28, 25, METATILE_BikeShop_Barrier_Green_Bottom, TRUE + setmetatile 10, 24, METATILE_BikeShop_Barrier_Green_Top, TRUE + setmetatile 10, 25, METATILE_BikeShop_Barrier_Green_TopMid, TRUE + setmetatile 10, 26, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE + setmetatile 10, 27, METATILE_BikeShop_Barrier_Green_Bottom, TRUE + setmetatile 21, 2, METATILE_BikeShop_Barrier_Green_Top, TRUE + setmetatile 21, 3, METATILE_BikeShop_Barrier_Green_TopMid, TRUE + setmetatile 21, 4, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE + setmetatile 21, 5, METATILE_BikeShop_Barrier_Green_Bottom, TRUE + setmetatile 6, 11, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 13, 10, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 16, 22, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 4, 26, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 30, 38, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 2, 11, METATILE_BikeShop_Button_Green, FALSE + setmetatile 17, 10, METATILE_BikeShop_Button_Green, FALSE + setmetatile 25, 18, METATILE_BikeShop_Button_Green, FALSE + setmetatile 18, 36, METATILE_BikeShop_Button_Green, FALSE return NewMauville_Inside_EventScript_SetBarrierStateGreenButton:: - setmetatile 23, 34, METATILE_BikeShop_Barrier_Blue_Top, 1 - setmetatile 23, 35, METATILE_BikeShop_Barrier_Blue_TopMid, 1 - setmetatile 23, 36, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 - setmetatile 23, 37, METATILE_BikeShop_Barrier_Blue_Bottom, 1 - setmetatile 10, 16, METATILE_BikeShop_Barrier_Blue_Top, 1 - setmetatile 10, 17, METATILE_BikeShop_Barrier_Blue_TopMid, 1 - setmetatile 10, 18, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 - setmetatile 10, 19, METATILE_BikeShop_Barrier_Blue_Bottom, 1 - setmetatile 10, 0, METATILE_BikeShop_Barrier_Blue_Top, 1 - setmetatile 10, 1, METATILE_BikeShop_Barrier_Blue_TopMid, 1 - setmetatile 10, 2, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 - setmetatile 10, 3, METATILE_BikeShop_Barrier_Blue_Bottom, 1 - setmetatile 37, 33, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 37, 34, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 37, 35, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 37, 36, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 28, 22, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 28, 23, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 28, 24, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 28, 25, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 10, 24, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 10, 25, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 10, 26, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 10, 27, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 21, 2, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 21, 3, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 21, 4, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 21, 5, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 2, 11, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 17, 10, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 25, 18, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 18, 36, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 6, 11, METATILE_BikeShop_Button_Blue, 0 - setmetatile 13, 10, METATILE_BikeShop_Button_Blue, 0 - setmetatile 16, 22, METATILE_BikeShop_Button_Blue, 0 - setmetatile 4, 26, METATILE_BikeShop_Button_Blue, 0 - setmetatile 30, 38, METATILE_BikeShop_Button_Blue, 0 + setmetatile 23, 34, METATILE_BikeShop_Barrier_Blue_Top, TRUE + setmetatile 23, 35, METATILE_BikeShop_Barrier_Blue_TopMid, TRUE + setmetatile 23, 36, METATILE_BikeShop_Barrier_Blue_BottomMid, TRUE + setmetatile 23, 37, METATILE_BikeShop_Barrier_Blue_Bottom, TRUE + setmetatile 10, 16, METATILE_BikeShop_Barrier_Blue_Top, TRUE + setmetatile 10, 17, METATILE_BikeShop_Barrier_Blue_TopMid, TRUE + setmetatile 10, 18, METATILE_BikeShop_Barrier_Blue_BottomMid, TRUE + setmetatile 10, 19, METATILE_BikeShop_Barrier_Blue_Bottom, TRUE + setmetatile 10, 0, METATILE_BikeShop_Barrier_Blue_Top, TRUE + setmetatile 10, 1, METATILE_BikeShop_Barrier_Blue_TopMid, TRUE + setmetatile 10, 2, METATILE_BikeShop_Barrier_Blue_BottomMid, TRUE + setmetatile 10, 3, METATILE_BikeShop_Barrier_Blue_Bottom, TRUE + setmetatile 37, 33, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 37, 34, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 37, 35, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 37, 36, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 28, 22, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 28, 23, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 28, 24, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 28, 25, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 10, 24, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 10, 25, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 10, 26, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 10, 27, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 21, 2, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 21, 3, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 21, 4, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 21, 5, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 2, 11, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 17, 10, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 25, 18, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 18, 36, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 6, 11, METATILE_BikeShop_Button_Blue, FALSE + setmetatile 13, 10, METATILE_BikeShop_Button_Blue, FALSE + setmetatile 16, 22, METATILE_BikeShop_Button_Blue, FALSE + setmetatile 4, 26, METATILE_BikeShop_Button_Blue, FALSE + setmetatile 30, 38, METATILE_BikeShop_Button_Blue, FALSE return NewMauville_Inside_EventScript_RedButton:: @@ -153,22 +149,21 @@ NewMauville_Inside_EventScript_RedButton:: end NewMauville_Inside_EventScript_SetGeneratorOffMetatiles:: - setmetatile 33, 6, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 32, 2, METATILE_BikeShop_Generator_Off_Tile0, 1 - setmetatile 33, 2, METATILE_BikeShop_Generator_Off_Tile1, 1 - setmetatile 34, 2, METATILE_BikeShop_Generator_Off_Tile2, 1 - setmetatile 35, 2, METATILE_BikeShop_Generator_Off_Tile3, 1 - setmetatile 32, 3, METATILE_BikeShop_Generator_Off_Tile4, 1 - setmetatile 33, 3, METATILE_BikeShop_Generator_Off_Tile5, 1 - setmetatile 34, 3, METATILE_BikeShop_Generator_Off_Tile6, 1 - setmetatile 35, 3, METATILE_BikeShop_Generator_Off_Tile7, 1 + setmetatile 33, 6, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 32, 2, METATILE_BikeShop_Generator_Off_Tile0, TRUE + setmetatile 33, 2, METATILE_BikeShop_Generator_Off_Tile1, TRUE + setmetatile 34, 2, METATILE_BikeShop_Generator_Off_Tile2, TRUE + setmetatile 35, 2, METATILE_BikeShop_Generator_Off_Tile3, TRUE + setmetatile 32, 3, METATILE_BikeShop_Generator_Off_Tile4, TRUE + setmetatile 33, 3, METATILE_BikeShop_Generator_Off_Tile5, TRUE + setmetatile 34, 3, METATILE_BikeShop_Generator_Off_Tile6, TRUE + setmetatile 35, 3, METATILE_BikeShop_Generator_Off_Tile7, TRUE special DrawWholeMapView return 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 27f966e96..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 @@ -68,7 +63,7 @@ PacifidlogTown_House2_EventScript_GiveFrustration:: PacifidlogTown_House2_EventScript_ComeBackInXDays:: specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable - buffernumberstring 0, VAR_RESULT + buffernumberstring STR_VAR_1, VAR_RESULT msgbox PacifidlogTown_House2_Text_GetGoodTMInXDays, MSGBOX_DEFAULT release end diff --git a/data/maps/PacifidlogTown_House3/scripts.inc b/data/maps/PacifidlogTown_House3/scripts.inc index c53ef0519..5582f3b6b 100644 --- a/data/maps/PacifidlogTown_House3/scripts.inc +++ b/data/maps/PacifidlogTown_House3/scripts.inc @@ -10,24 +10,21 @@ 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, 255 - 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 special DoInGameTradeScene waitstate - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox PacifidlogTown_House3_Text_ItsSubtlyDifferentThankYou, MSGBOX_DEFAULT setflag FLAG_PACIFIDLOG_NPC_TRADE_COMPLETED release @@ -39,7 +36,7 @@ PacifidlogTown_House3_EventScript_DeclineTrade:: end PacifidlogTown_House3_EventScript_NotRequestedMon:: - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox PacifidlogTown_House3_Text_WontAcceptAnyLessThanRealMon, MSGBOX_DEFAULT release end 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 a77939c4d..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:: @@ -60,7 +56,7 @@ PetalburgCity_EventScript_WallyTutorial:: clearflag FLAG_DONT_TRANSITION_MUSIC special LoadPlayerParty setvar VAR_PETALBURG_GYM_STATE, 1 - warp MAP_PETALBURG_CITY_GYM, 255, 4, 108 + warp MAP_PETALBURG_CITY_GYM, 4, 108 waitstate releaseall end @@ -85,7 +81,7 @@ PetalburgCity_EventScript_WalkToWallyHouse:: clearflag FLAG_HIDE_MAP_NAME_POPUP fadedefaultbgm clearflag FLAG_DONT_TRANSITION_MUSIC - warp MAP_PETALBURG_CITY_WALLYS_HOUSE, 255, 2, 4 + warp MAP_PETALBURG_CITY_WALLYS_HOUSE, 2, 4 waitstate releaseall end @@ -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 cae696a50..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 @@ -220,7 +190,7 @@ PetalburgCity_Gym_EventScript_BeginWallyTutorial:: clearflag FLAG_HIDE_PETALBURG_GYM_WALLY setflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_RIVAL special InitBirchState - warp MAP_PETALBURG_CITY, 255, 15, 8 + warp MAP_PETALBURG_CITY, 15, 8 waitstate release end @@ -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 - checkitem ITEM_ENIGMA_BERRY, 1 - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry - checkpcitem ITEM_ENIGMA_BERRY, 1 - 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, FALSE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + checkitem ITEM_ENIGMA_BERRY + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + checkpcitem ITEM_ENIGMA_BERRY + 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,35 +432,26 @@ 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 - warp MAP_PETALBURG_CITY, 255, 15, 8 + warp MAP_PETALBURG_CITY, 15, 8 waitstate release end @@ -782,21 +736,18 @@ 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:: closemessage delay 30 - warpdoor MAP_PETALBURG_CITY_GYM, 255, VAR_0x8008, VAR_0x8009 + warpdoor MAP_PETALBURG_CITY_GYM, VAR_0x8008, VAR_0x8009 waitstate releaseall end @@ -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,122 +995,106 @@ 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 PetalburgCity_Gym_EventScript_SetEntranceRoomDoorMetatiles:: - setmetatile 6, 85, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 85, METATILE_PetalburgGym_RoomEntrance_Right, 0 - setmetatile 1, 98, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 98, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 85, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 85, METATILE_PetalburgGym_RoomEntrance_Right, FALSE + setmetatile 1, 98, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 98, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetSpeedRoomDoorMetatiles:: - setmetatile 6, 46, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 46, METATILE_PetalburgGym_RoomEntrance_Right, 0 - setmetatile 1, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 46, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 46, METATILE_PetalburgGym_RoomEntrance_Right, FALSE + setmetatile 1, 59, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 59, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetAccuracyRoomDoorMetatiles:: - setmetatile 6, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0 - setmetatile 1, 72, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 72, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 59, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 59, METATILE_PetalburgGym_RoomEntrance_Right, FALSE + setmetatile 1, 72, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 72, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetConfusionRoomDoorMetatiles:: - setmetatile 1, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 20, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 20, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetDefenseRoomDoorMetatiles:: - setmetatile 6, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0 - setmetatile 1, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 20, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 20, METATILE_PetalburgGym_RoomEntrance_Right, FALSE + setmetatile 1, 33, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 33, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetRecoveryRoomDoorMetatiles:: - setmetatile 6, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 33, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 33, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetStrengthRoomDoorMetatiles:: - setmetatile 1, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 7, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 7, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetOHKORoomDoorMetatiles:: - setmetatile 6, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 7, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 7, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SlideOpenRoomDoors:: 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 a41bc2fcb..dd0ef5dce 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -241,11 +241,9 @@ 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 - warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 255, 6, 5 + 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 end 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 4553f431c..e2b75e0c3 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -15,17 +15,15 @@ Route103_OnLoad: end Route103_EventScript_OpenAlteringCave:: - setmetatile 45, 5, METATILE_General_CaveEntrance_Top, 1 - setmetatile 45, 6, METATILE_General_CaveEntrance_Bottom, 0 + setmetatile 45, 5, METATILE_General_CaveEntrance_Top, TRUE + setmetatile 45, 6, METATILE_General_CaveEntrance_Bottom, FALSE return 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 d58bc5060..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 @@ -361,8 +347,8 @@ Route104_EventScript_Girl2:: end Route104_EventScript_SailToDewford:: - setobjectpriority LOCALID_BRINEY_R104, MAP_ROUTE104, 0 - setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104, 0 + setobjectsubpriority LOCALID_BRINEY_R104, MAP_ROUTE104, 0 + setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104, 0 applymovement LOCALID_BRINEY_R104, Route104_Movement_BrineyBoardBoat waitmovement 0 removeobject LOCALID_BRINEY_R104 @@ -409,7 +395,7 @@ Route104_EventScript_ArriveInDewford:: waitmovement 0 setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8 addobject LOCALID_BRINEY_DEWFORD - setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN applymovement LOCALID_BRINEY_DEWFORD, Route104_Movement_BrineyExitBoat waitmovement 0 @@ -419,8 +405,8 @@ Route104_EventScript_ArriveInDewford:: setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT hideobjectat LOCALID_BOAT_R104, MAP_ROUTE104 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 - resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104 - resetobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN + resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104 + resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN copyobjectxytoperm LOCALID_BRINEY_DEWFORD setvar VAR_BOARD_BRINEY_BOAT_STATE, 0 goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_DeliverLetterReminder @@ -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 f2e169d10..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 @@ -86,7 +82,7 @@ Route104_MrBrineysHouse_EventScript_SailToDewford:: setvar VAR_ROUTE104_STATE, 2 setflag FLAG_HIDE_RUSTBORO_CITY_RIVAL setflag FLAG_HIDE_ROUTE_104_RIVAL - warp MAP_ROUTE104, 255, 13, 51 + warp MAP_ROUTE104, 13, 51 waitstate releaseall 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 b60cd181f..bfad0daaa 100644 --- a/data/maps/Route105/scripts.inc +++ b/data/maps/Route105/scripts.inc @@ -6,24 +6,19 @@ 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:: - setmetatile 9, 19, METATILE_General_RockWall_RockBase, 1 - setmetatile 9, 20, METATILE_General_RockWall_SandBase, 1 + setmetatile 9, 19, METATILE_General_RockWall_RockBase, TRUE + setmetatile 9, 20, METATILE_General_RockWall_SandBase, TRUE 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 37852c873..f0353fef4 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -6,8 +6,8 @@ Route109_MapScripts:: Route109_EventScript_StartDepartForDewford:: call EventScript_BackupMrBrineyLocation - setobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0 - setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109, 0 + setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0 + setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109, 0 applymovement LOCALID_BRINEY_R109, Route109_Movement_BrineyEnterBoat waitmovement 0 removeobject LOCALID_BRINEY_R109 @@ -50,7 +50,7 @@ Route109_EventScript_DoSailToDewford:: clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8 addobject LOCALID_BRINEY_DEWFORD - setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 applymovement LOCALID_BRINEY_DEWFORD, Route109_Movement_BrineyExitBoat waitmovement 0 clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN @@ -59,8 +59,8 @@ Route109_EventScript_DoSailToDewford:: msgbox DewfordTown_Text_BrineyLandedInDewford, MSGBOX_DEFAULT closemessage copyvar VAR_BRINEY_LOCATION, VAR_0x8008 - resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109 - resetobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN + resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109 + resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN copyobjectxytoperm LOCALID_BRINEY_DEWFORD release end @@ -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 c4cfd1576..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 @@ -37,25 +36,22 @@ Route109_SeashoreHouse_EventScript_BagFull:: end Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop:: - showmoneybox 0, 0, 0 + 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 end Route109_SeashoreHouse_EventScript_BuySodaPop:: - checkmoney 300, 0 - compare VAR_RESULT, FALSE - goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughMoney - checkitemspace ITEM_SODA_POP, 1 - compare VAR_RESULT, FALSE - goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughSpace + checkmoney 300 + goto_if_eq VAR_RESULT, FALSE, Route109_SeashoreHouse_EventScript_NotEnoughMoney + checkitemspace ITEM_SODA_POP + goto_if_eq VAR_RESULT, FALSE, Route109_SeashoreHouse_EventScript_NotEnoughSpace msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT - removemoney 300, 0 - updatemoneybox 0, 0 + removemoney 300 + updatemoneybox giveitem ITEM_SODA_POP hidemoneybox release 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 f30d74f01..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: @@ -39,7 +38,7 @@ Route110_TrickHouseEnd_EventScript_CloseDoor:: end Route110_TrickHouseEnd_EventScript_SetDoorClosedMetatile:: - setmetatile 10, 1, METATILE_GenericBuilding_TrickHouse_Door_Closed, 1 + setmetatile 10, 1, METATILE_GenericBuilding_TrickHouse_Door_Closed, TRUE return Route110_TrickHouseEnd_EventScript_TrickMaster:: @@ -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 e756feadc..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,25 +235,17 @@ 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, 255, 6, 2 + warpsilent MAP_ROUTE110_TRICK_HOUSE_ENTRANCE, 6, 2 waitstate releaseall end @@ -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,13 +459,12 @@ 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 Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom:: - setmetatile 5, 1, METATILE_GenericBuilding_TrickHouse_Stairs_Down, 0 + setmetatile 5, 1, METATILE_GenericBuilding_TrickHouse_Stairs_Down, FALSE special DrawWholeMapView delay 20 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkUp @@ -535,49 +487,49 @@ Route110_TrickHouseEntrance_Movement_EnterRoom: step_end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom1:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE1, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE1, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom2:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE2, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE2, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom3:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE3, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE3, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom4:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE4, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE4, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom5:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom6:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE6, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE6, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom7:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom8:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE8, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE8, 0, 21 waitstate 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,89 +564,81 @@ 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 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall 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 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall 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 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall 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 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall 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 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall 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 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall 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 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall 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 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall end @@ -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 6fc6adcd5..2ed769167 100644 --- a/data/maps/Route110_TrickHousePuzzle1/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle1/scripts.inc @@ -3,18 +3,16 @@ 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:: - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE end 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 a0222733a..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 @@ -70,23 +65,23 @@ Route110_TrickHousePuzzle2_EventScript_Button4:: end Route110_TrickHousePuzzle2_EventScript_PressButton1:: - setmetatile 11, 12, METATILE_TrickHousePuzzle_Button_Pressed, 0 - setmetatile 1, 13, METATILE_TrickHousePuzzle_Door_Shuttered, 0 + setmetatile 11, 12, METATILE_TrickHousePuzzle_Button_Pressed, FALSE + setmetatile 1, 13, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE return Route110_TrickHousePuzzle2_EventScript_PressButton2:: - setmetatile 0, 4, METATILE_TrickHousePuzzle_Button_Pressed, 0 - setmetatile 5, 6, METATILE_TrickHousePuzzle_Door_Shuttered, 0 + setmetatile 0, 4, METATILE_TrickHousePuzzle_Button_Pressed, FALSE + setmetatile 5, 6, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE return Route110_TrickHousePuzzle2_EventScript_PressButton3:: - setmetatile 14, 5, METATILE_TrickHousePuzzle_Button_Pressed, 0 - setmetatile 7, 15, METATILE_TrickHousePuzzle_Door_Shuttered, 0 + setmetatile 14, 5, METATILE_TrickHousePuzzle_Button_Pressed, FALSE + setmetatile 7, 15, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE return Route110_TrickHousePuzzle2_EventScript_PressButton4:: - setmetatile 7, 11, METATILE_TrickHousePuzzle_Button_Pressed, 0 - setmetatile 14, 12, METATILE_TrickHousePuzzle_Door_Shuttered, 0 + setmetatile 7, 11, METATILE_TrickHousePuzzle_Button_Pressed, FALSE + setmetatile 14, 12, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE return Route110_TrickHousePuzzle2_EventScript_Ted:: diff --git a/data/maps/Route110_TrickHousePuzzle3/scripts.inc b/data/maps/Route110_TrickHousePuzzle3/scripts.inc index 4e706268c..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: @@ -21,188 +19,184 @@ Route110_TrickHousePuzzle3_OnTransition: end Route110_TrickHousePuzzle3_EventScript_UpdateButtonMetatiles:: - setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Up, 0 - setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Up, 0 - setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Up, 0 - setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Up, 0 - 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 + setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Up, FALSE + setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Up, FALSE + setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Up, FALSE + setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Up, FALSE + 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:: - setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Pressed, FALSE return Route110_TrickHousePuzzle3_EventScript_PressedButton2Metatile:: - setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Pressed, FALSE return Route110_TrickHousePuzzle3_EventScript_PressedButton3Metatile:: - setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Pressed, FALSE return Route110_TrickHousePuzzle3_EventScript_PressedButton4Metatile:: - setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Pressed, FALSE return Route110_TrickHousePuzzle3_EventScript_SetDoorsState0:: - setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 3, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 3, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 6, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 9, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 12, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 - setmetatile 3, 17, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 - setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 - setmetatile 9, 5, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 3, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 3, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 6, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 9, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 12, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Open0, TRUE + setmetatile 3, 17, METATILE_TrickHousePuzzle_RedDoorV_Open1, TRUE + setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Open0, TRUE + setmetatile 9, 5, METATILE_TrickHousePuzzle_RedDoorV_Open1, TRUE return Route110_TrickHousePuzzle3_EventScript_SetDoorsState1:: - setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 3, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 3, 14, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 6, 5, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 9, 17, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 12, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 - setmetatile 3, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 - setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 - setmetatile 9, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 3, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 3, 14, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 6, 5, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 9, 17, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 12, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Retracted, TRUE + setmetatile 3, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, FALSE + setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Retracted, TRUE + setmetatile 9, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, FALSE return Route110_TrickHousePuzzle3_EventScript_Button1:: @@ -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 3c574441e..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 @@ -465,7 +442,7 @@ Route110_TrickHousePuzzle5_EventScript_IncorrectAnswer:: waitmovement 0 msgbox Route110_TrickHousePuzzle5_Text_WaitForNextChallenge, MSGBOX_DEFAULT closemessage - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 0, 21 waitstate releaseall end @@ -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 b0f1cbea1..a47df82ca 100644 --- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc @@ -22,58 +22,57 @@ Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles:: @ Leftover from R/S, none of the below metatile scripts are ever called Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOn:: - setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 - setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE + setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOn:: - setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 - setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE + setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOn:: - setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 - setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE + setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOn:: - setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt, 0 - setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt, FALSE + setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOn:: - setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0 - setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, FALSE + setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOff:: - setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0 - setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, FALSE + setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_Off, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOff:: - setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0 - setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, FALSE + setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_Off, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOff:: - setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0 - setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, FALSE + setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_Off, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOff:: - setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt, 0 - setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt, FALSE + setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_Off, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOff:: - setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right, 0 - setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right, FALSE + setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_Off, TRUE 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 @@ -113,7 +110,7 @@ Route110_TrickHousePuzzle7_EventScript_FoundScroll:: Route110_TrickHousePuzzle7_EventScript_TeleportPad:: lockall setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1 - warpteleport MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 255, 3, 19 + warpteleport MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 3, 19 waitstate releaseall 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 72e30958a..6cb83b452 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -15,45 +15,42 @@ 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:: - setmetatile 29, 86, METATILE_General_RockWall_RockBase, 1 - setmetatile 29, 87, METATILE_General_RockWall_SandBase, 1 + setmetatile 29, 86, METATILE_General_RockWall_RockBase, TRUE + setmetatile 29, 87, METATILE_General_RockWall_SandBase, TRUE return @ Show Mirage Tower just prior to disintegration. Mirage Tower is otherwise handled by the map layout Route111_EventScript_ShowTemporaryMirageTower:: - setmetatile 18, 53, METATILE_Mauville_MirageTower_Tile0, 0 - setmetatile 19, 53, METATILE_Mauville_MirageTower_Tile1, 0 - setmetatile 20, 53, METATILE_Mauville_MirageTower_Tile2, 0 - setmetatile 18, 54, METATILE_Mauville_MirageTower_Tile3, 0 - setmetatile 19, 54, METATILE_Mauville_MirageTower_Tile4, 0 - setmetatile 20, 54, METATILE_Mauville_MirageTower_Tile5, 0 - setmetatile 18, 55, METATILE_Mauville_MirageTower_Tile6, 0 - setmetatile 19, 55, METATILE_Mauville_MirageTower_Tile7, 0 - setmetatile 20, 55, METATILE_Mauville_MirageTower_Tile8, 0 - setmetatile 18, 56, METATILE_Mauville_MirageTower_Tile9, 0 - setmetatile 19, 56, METATILE_Mauville_MirageTower_TileA, 0 - setmetatile 20, 56, METATILE_Mauville_MirageTower_TileB, 0 - setmetatile 18, 57, METATILE_Mauville_MirageTower_TileC, 0 - setmetatile 19, 57, METATILE_Mauville_MirageTower_TileD, 0 - setmetatile 20, 57, METATILE_Mauville_MirageTower_TileE, 0 - setmetatile 18, 58, METATILE_Mauville_MirageTower_TileF, 0 - setmetatile 19, 58, METATILE_Mauville_MirageTower_Tile10, 0 - setmetatile 20, 58, METATILE_Mauville_MirageTower_Tile11, 0 + setmetatile 18, 53, METATILE_Mauville_MirageTower_Tile0, FALSE + setmetatile 19, 53, METATILE_Mauville_MirageTower_Tile1, FALSE + setmetatile 20, 53, METATILE_Mauville_MirageTower_Tile2, FALSE + setmetatile 18, 54, METATILE_Mauville_MirageTower_Tile3, FALSE + setmetatile 19, 54, METATILE_Mauville_MirageTower_Tile4, FALSE + setmetatile 20, 54, METATILE_Mauville_MirageTower_Tile5, FALSE + setmetatile 18, 55, METATILE_Mauville_MirageTower_Tile6, FALSE + setmetatile 19, 55, METATILE_Mauville_MirageTower_Tile7, FALSE + setmetatile 20, 55, METATILE_Mauville_MirageTower_Tile8, FALSE + setmetatile 18, 56, METATILE_Mauville_MirageTower_Tile9, FALSE + setmetatile 19, 56, METATILE_Mauville_MirageTower_TileA, FALSE + setmetatile 20, 56, METATILE_Mauville_MirageTower_TileB, FALSE + setmetatile 18, 57, METATILE_Mauville_MirageTower_TileC, FALSE + setmetatile 19, 57, METATILE_Mauville_MirageTower_TileD, FALSE + setmetatile 20, 57, METATILE_Mauville_MirageTower_TileE, FALSE + setmetatile 18, 58, METATILE_Mauville_MirageTower_TileF, FALSE + setmetatile 19, 58, METATILE_Mauville_MirageTower_Tile10, FALSE + setmetatile 20, 58, METATILE_Mauville_MirageTower_Tile11, FALSE return 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 @@ -210,9 +199,8 @@ Route111_EventScript_ViciousSandstormTriggerRight:: end Route111_EventScript_ViciousSandstormTrigger:: - checkitem ITEM_GO_GOGGLES, 1 - compare VAR_RESULT, FALSE - goto_if_eq Route111_EventScript_PreventRouteAccess + checkitem ITEM_GO_GOGGLES + 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 86fe61a05..3ce4f62e2 100644 --- a/data/maps/Route112_CableCarStation/scripts.inc +++ b/data/maps/Route112_CableCarStation/scripts.inc @@ -6,9 +6,8 @@ Route112_CableCarStation_MapScripts:: .byte 0 Route112_CableCarStation_OnTransition: - setescapewarp MAP_ROUTE112, 255, 28, 28 - compare VAR_CABLE_CAR_STATION_STATE, 2 - call_if_eq Route112_CableCarStation_EventScript_MoveAttendantAside + setescapewarp MAP_ROUTE112, 28, 28 + 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 bad739806..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 @@ -43,12 +39,10 @@ Route113_GlassWorkshop_EventScript_ExplainSootSack:: end Route113_GlassWorkshop_EventScript_CheckCollectedAsh:: - checkitem ITEM_SOOT_SACK, 1 - compare VAR_RESULT, FALSE - goto_if_eq Route113_GlassWorkshop_EventScript_SootSackNotInBag + checkitem ITEM_SOOT_SACK + 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 @@ -78,13 +72,11 @@ Route113_GlassWorkshop_EventScript_ChooseGlassItem:: Route113_GlassWorkshop_EventScript_BlueFlute:: setvar VAR_0x8008, ITEM_BLUE_FLUTE - bufferitemname 0, VAR_0x8008 + 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 @@ -92,13 +84,11 @@ Route113_GlassWorkshop_EventScript_BlueFlute:: Route113_GlassWorkshop_EventScript_YellowFlute:: setvar VAR_0x8008, ITEM_YELLOW_FLUTE - bufferitemname 0, VAR_0x8008 + 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 @@ -106,13 +96,11 @@ Route113_GlassWorkshop_EventScript_YellowFlute:: Route113_GlassWorkshop_EventScript_RedFlute:: setvar VAR_0x8008, ITEM_RED_FLUTE - bufferitemname 0, VAR_0x8008 + 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 @@ -120,13 +108,11 @@ Route113_GlassWorkshop_EventScript_RedFlute:: Route113_GlassWorkshop_EventScript_WhiteFlute:: setvar VAR_0x8008, ITEM_WHITE_FLUTE - bufferitemname 0, VAR_0x8008 + 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 @@ -134,13 +120,11 @@ Route113_GlassWorkshop_EventScript_WhiteFlute:: Route113_GlassWorkshop_EventScript_BlackFlute:: setvar VAR_0x8008, ITEM_BLACK_FLUTE - bufferitemname 0, VAR_0x8008 + 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 @@ -149,13 +133,11 @@ Route113_GlassWorkshop_EventScript_BlackFlute:: Route113_GlassWorkshop_EventScript_PrettyChair:: setvar VAR_0x8009, 1 setvar VAR_0x8008, DECOR_PRETTY_CHAIR - bufferdecorationname 0, VAR_0x8008 + 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 @@ -164,13 +146,11 @@ Route113_GlassWorkshop_EventScript_PrettyChair:: Route113_GlassWorkshop_EventScript_PrettyDesk:: setvar VAR_0x8009, 1 setvar VAR_0x8008, DECOR_PRETTY_DESK - bufferdecorationname 0, VAR_0x8008 + 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 @@ -184,14 +164,14 @@ Route113_GlassWorkshop_EventScript_CancelGlassItemSelect:: Route113_GlassWorkshop_EventScript_NotEnoughAsh:: setvar VAR_0x800A, LOWEST_ASH_PRICE subvar VAR_0x800A, VAR_ASH_GATHER_COUNT - buffernumberstring 0, VAR_0x800A + buffernumberstring STR_VAR_1, VAR_0x800A msgbox Route113_GlassWorkshop_Text_NotEnoughAshNeedX, MSGBOX_DEFAULT release end Route113_GlassWorkshop_EventScript_NotEnoughAshForItem:: subvar VAR_0x800A, VAR_ASH_GATHER_COUNT - buffernumberstring 1, VAR_0x800A + buffernumberstring STR_VAR_2, VAR_0x800A message Route113_GlassWorkshop_Text_NotEnoughAshToMakeItem waitmessage goto Route113_GlassWorkshop_EventScript_ChooseGlassItem @@ -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:: @@ -257,58 +233,56 @@ Route113_GlassWorkshop_EventScript_GiveItemAfterNoRoom:: Route113_GlassWorkshop_EventScript_GiveBlueFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_BLUE_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GiveYellowFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_YELLOW_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GiveRedFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_RED_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GiveWhiteFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_WHITE_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GiveBlackFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_BLACK_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GivePrettyChair:: setvar VAR_0x8009, 1 setvar VAR_0x8008, DECOR_PRETTY_CHAIR - bufferdecorationname 0, DECOR_PRETTY_CHAIR + bufferdecorationname STR_VAR_1, DECOR_PRETTY_CHAIR goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GivePrettyDesk:: setvar VAR_0x8009, 1 setvar VAR_0x8008, DECOR_PRETTY_DESK - bufferdecorationname 0, DECOR_PRETTY_DESK + bufferdecorationname STR_VAR_1, DECOR_PRETTY_DESK goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end 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 3a6dd785c..72138bbe4 100644 --- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc +++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc @@ -19,8 +19,8 @@ Route114_FossilManiacsTunnel_OnLoad: end Route114_FossilManiacsTunnel_EventScript_CloseDesertUnderpass:: - setmetatile 6, 1, METATILE_Fallarbor_RedRockWall, 1 - setmetatile 6, 2, METATILE_Fallarbor_RedRockWall, 1 + setmetatile 6, 1, METATILE_Fallarbor_RedRockWall, TRUE + setmetatile 6, 2, METATILE_Fallarbor_RedRockWall, TRUE return Route114_FossilManiacsTunnel_EventScript_ManiacMentionCaveIn:: @@ -37,12 +37,10 @@ Route114_FossilManiacsTunnel_EventScript_FossilManiac:: lock faceplayer goto_if_set FLAG_RECEIVED_REVIVED_FOSSIL_MON, Route114_FossilManiacsTunnel_EventScript_PlayerRevivedFossil - checkitem ITEM_ROOT_FOSSIL, 1 - compare VAR_RESULT, TRUE - goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil - checkitem ITEM_CLAW_FOSSIL, 1 - compare VAR_RESULT, TRUE - goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil + checkitem ITEM_ROOT_FOSSIL + goto_if_eq VAR_RESULT, TRUE, Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil + checkitem ITEM_CLAW_FOSSIL + 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 0ef6a05e1..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 @@ -165,12 +155,10 @@ Route116_EventScript_BrineyTrigger:: Route116_EventScript_GlassesMan:: lock faceplayer - checkitem ITEM_BLACK_GLASSES, 1 - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_PlayerHasGlasses + checkitem ITEM_BLACK_GLASSES + 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 3b94d5cc1..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 @@ -128,7 +122,7 @@ Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare:: message Route119_WeatherInstitute_2F_Text_PlayerReceivedCastform waitmessage waitfanfare - bufferspeciesname 0, SPECIES_CASTFORM + bufferspeciesname STR_VAR_1, SPECIES_CASTFORM return Route119_WeatherInstitute_2F_EventScript_ExplainCastform:: @@ -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 588fa17a0..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 @@ -49,15 +41,15 @@ Route120_OnLoad: end Route120_EventScript_CloseAncientTomb:: - setmetatile 7, 54, METATILE_General_RockWall_RockBase, 1 - setmetatile 7, 55, METATILE_General_RockWall_SandBase, 1 + setmetatile 7, 54, METATILE_General_RockWall_RockBase, TRUE + setmetatile 7, 55, METATILE_General_RockWall_SandBase, TRUE return Route120_EventScript_SetBridgeClearMetatiles:: - setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, 0 - setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, 0 - setmetatile 12, 17, METATILE_General_ReflectiveWater, 0 - setmetatile 13, 17, METATILE_General_ReflectiveWater, 0 + setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, FALSE + setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, FALSE + setmetatile 12, 17, METATILE_General_ReflectiveWater, FALSE + setmetatile 13, 17, METATILE_General_ReflectiveWater, FALSE return Route120_EventScript_SetBridgeKecleonMovement:: @@ -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 @@ -253,10 +230,10 @@ Route120_EventScript_StevenGiveDeconScope:: delay 15 removeobject LOCALID_STEVEN waitfieldeffect FLDEFF_NPCFLY_OUT - setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, 0 - setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, 0 - setmetatile 12, 17, METATILE_General_ReflectiveWater, 0 - setmetatile 13, 17, METATILE_General_ReflectiveWater, 0 + setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, FALSE + setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, FALSE + setmetatile 12, 17, METATILE_General_ReflectiveWater, FALSE + setmetatile 13, 17, METATILE_General_ReflectiveWater, FALSE special DrawWholeMapView release 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 8bd5dac04..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 @@ -48,26 +47,23 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger:: lockall applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 - showmoneybox 0, 0, 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, 1 - compare VAR_RESULT, 0 - goto_if_eq Route121_SafariZoneEntrance_EventScript_NoPokeblockCase + checkitem ITEM_POKEBLOCK_CASE + goto_if_eq VAR_RESULT, 0, Route121_SafariZoneEntrance_EventScript_NoPokeblockCase call Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon - checkmoney 500, 0 - compare VAR_RESULT, 0 - goto_if_eq Route121_SafariZoneEntrance_EventScript_NotEnoughMoney + checkmoney 500 + goto_if_eq VAR_RESULT, 0, Route121_SafariZoneEntrance_EventScript_NotEnoughMoney playse SE_SHOP msgbox Route121_SafariZoneEntrance_Text_ThatWillBe500Please, MSGBOX_DEFAULT - removemoney 500, 0 - updatemoneybox 0, 0 + removemoney 500 + updatemoneybox msgbox Route121_SafariZoneEntrance_Text_HereAreYourSafariBalls, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_ITEM message Route121_SafariZoneEntrance_Text_Received30SafariBalls @@ -80,17 +76,15 @@ Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: special EnterSafariMode setvar VAR_SAFARI_ZONE_STATE, 2 clearflag FLAG_GOOD_LUCK_SAFARI_ZONE - warp MAP_SAFARI_ZONE_SOUTH, 255, 32, 33 + warp MAP_SAFARI_ZONE_SOUTH, 32, 33 waitstate end 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 63bee6ed5..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, 1 - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard - checkitem ITEM_YELLOW_SHARD, 1 - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard - checkitem ITEM_BLUE_SHARD, 1 - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard - checkitem ITEM_GREEN_SHARD, 1 - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard + checkitem ITEM_RED_SHARD + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard + checkitem ITEM_YELLOW_SHARD + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard + checkitem ITEM_BLUE_SHARD + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard + checkitem ITEM_GREEN_SHARD + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard return Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard:: @@ -243,17 +238,14 @@ Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard:: goto Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard:: - bufferitemname 0, VAR_0x8008 - bufferitemname 1, VAR_0x8009 + 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 - checkitemspace VAR_0x8009, 1 - compare VAR_RESULT, TRUE - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard + goto_if_eq VAR_RESULT, NO, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + checkitemspace VAR_0x8009 + 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/Route134/scripts.inc b/data/maps/Route134/scripts.inc index 043835373..226135c1d 100644 --- a/data/maps/Route134/scripts.inc +++ b/data/maps/Route134/scripts.inc @@ -3,7 +3,7 @@ Route134_MapScripts:: .byte 0 Route134_OnResume: - setdivewarp MAP_UNDERWATER_ROUTE134, 255, 8, 6 + setdivewarp MAP_UNDERWATER_ROUTE134, 8, 6 end Route134_EventScript_Jack:: diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc index 8d286d5de..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,27 +594,21 @@ 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 setflag FLAG_HIDE_RUSTBORO_CITY_DEVON_EMPLOYEE_1 setvar VAR_RUSTBORO_CITY_STATE, 5 delay 30 - warp MAP_RUSTBORO_CITY_DEVON_CORP_3F, 255, 2, 2 + warp MAP_RUSTBORO_CITY_DEVON_CORP_3F, 2, 2 waitstate releaseall end @@ -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 326cd946e..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, 1 - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil - checkitem ITEM_CLAW_FOSSIL, 1 - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil + checkitem ITEM_ROOT_FOSSIL + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil + checkitem ITEM_CLAW_FOSSIL + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil release end @@ -87,16 +78,14 @@ 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 - checkitem ITEM_CLAW_FOSSIL, 1 - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil + checkitem ITEM_CLAW_FOSSIL + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil end RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil:: - bufferitemname 0, ITEM_ROOT_FOSSIL + bufferitemname STR_VAR_1, ITEM_ROOT_FOSSIL msgbox RustboroCity_DevonCorp_2F_Text_HandedFossilToResearcher, MSGBOX_DEFAULT removeitem ITEM_ROOT_FOSSIL setvar VAR_FOSSIL_RESURRECTION_STATE, 1 @@ -112,16 +101,14 @@ 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 - checkitem ITEM_ROOT_FOSSIL, 1 - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil + checkitem ITEM_ROOT_FOSSIL + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil end RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil:: - bufferitemname 0, ITEM_CLAW_FOSSIL + bufferitemname STR_VAR_1, ITEM_CLAW_FOSSIL msgbox RustboroCity_DevonCorp_2F_Text_HandedFossilToResearcher, MSGBOX_DEFAULT removeitem ITEM_CLAW_FOSSIL setvar VAR_FOSSIL_RESURRECTION_STATE, 1 @@ -140,20 +127,18 @@ 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:: - bufferspeciesname 1, SPECIES_LILEEP + bufferspeciesname STR_VAR_2, SPECIES_LILEEP msgbox RustboroCity_DevonCorp_2F_Text_FossilizedMonBroughtBackToLife, MSGBOX_DEFAULT goto RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep end RustboroCity_DevonCorp_2F_EventScript_AnorithReady:: - bufferspeciesname 1, SPECIES_ANORITH + bufferspeciesname STR_VAR_2, SPECIES_ANORITH msgbox RustboroCity_DevonCorp_2F_Text_FossilizedMonBroughtBackToLife, MSGBOX_DEFAULT goto RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith end @@ -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 @@ -193,12 +174,12 @@ RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC:: end RustboroCity_DevonCorp_2F_EventScript_ReceivedLileepFanfare:: - bufferspeciesname 1, SPECIES_LILEEP + bufferspeciesname STR_VAR_2, SPECIES_LILEEP playfanfare MUS_OBTAIN_ITEM message RustboroCity_DevonCorp_2F_Text_ReceivedMonFromResearcher waitmessage waitfanfare - bufferspeciesname 0, SPECIES_LILEEP + bufferspeciesname STR_VAR_1, SPECIES_LILEEP return RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep:: @@ -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 @@ -242,12 +219,12 @@ RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC:: end RustboroCity_DevonCorp_2F_EventScript_ReceivedAnorithFanfare:: - bufferspeciesname 1, SPECIES_ANORITH + bufferspeciesname STR_VAR_2, SPECIES_ANORITH playfanfare MUS_OBTAIN_ITEM message RustboroCity_DevonCorp_2F_Text_ReceivedMonFromResearcher waitmessage waitfanfare - bufferspeciesname 0, SPECIES_ANORITH + bufferspeciesname STR_VAR_1, SPECIES_ANORITH return RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith:: @@ -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 0b7de48bc..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, 255 - 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 @@ -38,7 +35,7 @@ RustboroCity_House1_EventScript_DeclineTrade:: end RustboroCity_House1_EventScript_NotRequestedMon:: - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox RustboroCity_House1_Text_DoesntLookLikeMonToMe, MSGBOX_DEFAULT release end 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 4aa94de23..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 @@ -129,7 +125,7 @@ SSTidalCorridor_EventScript_ExitLilycove:: setrespawn HEAL_LOCATION_LILYCOVE_CITY msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end @@ -138,7 +134,7 @@ SSTidalCorridor_EventScript_ExitSlateport:: setrespawn HEAL_LOCATION_SLATEPORT_CITY msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver - warp MAP_SLATEPORT_CITY_HARBOR, 255, 8, 11 + warp MAP_SLATEPORT_CITY_HARBOR, 8, 11 waitstate 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 791572fe0..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 @@ -94,7 +92,7 @@ SafariZone_South_EventScript_ExitEarlyEast:: SafariZone_South_EventScript_Exit:: setvar VAR_SAFARI_ZONE_STATE, 1 special ExitSafariMode - warpdoor MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5 + warpdoor MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 2, 5 waitstate end diff --git a/data/maps/SeafloorCavern_Entrance/scripts.inc b/data/maps/SeafloorCavern_Entrance/scripts.inc index a4c621e3e..eec69e6f8 100644 --- a/data/maps/SeafloorCavern_Entrance/scripts.inc +++ b/data/maps/SeafloorCavern_Entrance/scripts.inc @@ -5,14 +5,13 @@ SeafloorCavern_Entrance_MapScripts:: .byte 0 SeafloorCavern_Entrance_OnResume: - setdivewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5 - setescapewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5 + setdivewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 6, 5 + setescapewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 6, 5 end 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/SeafloorCavern_Room9/scripts.inc b/data/maps/SeafloorCavern_Room9/scripts.inc index 3db2348a4..63e6baf3c 100644 --- a/data/maps/SeafloorCavern_Room9/scripts.inc +++ b/data/maps/SeafloorCavern_Room9/scripts.inc @@ -145,7 +145,7 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: setflag FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_KYOGRE setflag FLAG_HIDE_SEAFLOOR_CAVERN_AQUA_GRUNTS setflag FLAG_HIDE_MAP_NAME_POPUP - warp MAP_ROUTE128, 255, 38, 22 + warp MAP_ROUTE128, 38, 22 waitstate releaseall end 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/SealedChamber_OuterRoom/scripts.inc b/data/maps/SealedChamber_OuterRoom/scripts.inc index 7d57ea544..bf02c7fe3 100644 --- a/data/maps/SealedChamber_OuterRoom/scripts.inc +++ b/data/maps/SealedChamber_OuterRoom/scripts.inc @@ -5,8 +5,8 @@ SealedChamber_OuterRoom_MapScripts:: .byte 0 SealedChamber_OuterRoom_OnResume: - setdivewarp MAP_UNDERWATER_SEALED_CHAMBER, 255, 12, 44 - setescapewarp MAP_UNDERWATER_SEALED_CHAMBER, 255, 12, 44 + setdivewarp MAP_UNDERWATER_SEALED_CHAMBER, 12, 44 + setescapewarp MAP_UNDERWATER_SEALED_CHAMBER, 12, 44 end SealedChamber_OuterRoom_OnTransition: @@ -18,12 +18,12 @@ SealedChamber_OuterRoom_OnLoad: end SealedChamber_OuterRoom_EventScript_CloseInnerRoomEntrance:: - setmetatile 9, 1, METATILE_Cave_EntranceCover, 1 - setmetatile 10, 1, METATILE_Cave_EntranceCover, 1 - setmetatile 11, 1, METATILE_Cave_EntranceCover, 1 - setmetatile 9, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 10, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 11, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 9, 1, METATILE_Cave_EntranceCover, TRUE + setmetatile 10, 1, METATILE_Cave_EntranceCover, TRUE + setmetatile 11, 1, METATILE_Cave_EntranceCover, TRUE + setmetatile 9, 2, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 10, 2, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 11, 2, METATILE_Cave_SealedChamberBraille_Mid, TRUE return SealedChamber_OuterRoom_EventScript_BrailleABC:: diff --git a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc index a1206dfb4..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 - checkitemspace ITEM_SHELL_BELL, 1 - compare VAR_RESULT, FALSE - call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed - compare VAR_RESULT, 2 - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell + goto_if_eq VAR_RESULT, NO, ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell + checkitemspace ITEM_SHELL_BELL + 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:: @@ -68,12 +60,10 @@ ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell:: end ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells:: - checkitem ITEM_SHOAL_SALT, 1 - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell - checkitem ITEM_SHOAL_SHELL, 1 - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell + checkitem ITEM_SHOAL_SALT + goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell + checkitem ITEM_SHOAL_SHELL + 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 9692d2f69..17f6a7ca6 100644 --- a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc @@ -22,38 +22,38 @@ ShoalCave_LowTideInnerRoom_OnLoad: ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles:: goto_if_set FLAG_RECEIVED_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2 goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2 - setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Large, 1 + setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2:: goto_if_set FLAG_RECEIVED_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3 goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3 - setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Large, 1 + setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3:: goto_if_set FLAG_RECEIVED_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles4 - setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Large, 1 + setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles4 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles4:: goto_if_set FLAG_RECEIVED_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles5 - setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Large, 1 + setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles5 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles5:: goto_if_set FLAG_RECEIVED_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles6 - setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Large, 1 + setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles6 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles6:: goto_if_set FLAG_RECEIVED_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatilesEnd - setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Large, 1 + setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE return ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatilesEnd:: @@ -63,9 +63,8 @@ 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 - setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, 0 + 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 releaseall @@ -80,9 +79,8 @@ 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 - setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, 0 + 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 releaseall @@ -92,9 +90,8 @@ 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 - setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, 0 + 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 releaseall @@ -104,9 +101,8 @@ 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 - setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, 0 + 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 releaseall @@ -116,9 +112,8 @@ 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 - setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, 0 + 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 releaseall @@ -133,9 +128,8 @@ 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 - setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, 0 + 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 releaseall diff --git a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc index d7937998e..a06d46cc2 100644 --- a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc @@ -8,7 +8,7 @@ ShoalCave_LowTideLowerRoom_OnLoad: ShoalCave_LowTideLowerRoom_EventScript_SetShoalItemMetatiles:: goto_if_set FLAG_RECEIVED_SHOAL_SALT_4, ShoalCave_LowTideLowerRoom_EventScript_SetShoalItemMetatilesEnd - setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Large, 1 + setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE return ShoalCave_LowTideLowerRoom_EventScript_SetShoalItemMetatilesEnd:: @@ -18,9 +18,8 @@ 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 - setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Small, 0 + 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 releaseall @@ -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 a778a18e1..655711e9c 100644 --- a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc @@ -8,7 +8,7 @@ ShoalCave_LowTideStairsRoom_OnLoad: ShoalCave_LowTideStairsRoom_EventScript_SetShoalItemMetatiles:: goto_if_set FLAG_RECEIVED_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_SetShoalItemMetatilesEnd - setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Large, 1 + setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE return ShoalCave_LowTideStairsRoom_EventScript_SetShoalItemMetatilesEnd:: @@ -18,9 +18,8 @@ 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 - setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Small, 0 + 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 releaseall 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 9990ebba9..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 @@ -16,6 +15,6 @@ SkyPillar_2F_EventScript_CleanFloor:: SkyPillar_2F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_SKY_PILLAR_1F, 255, 0, 0 + setholewarp MAP_SKY_PILLAR_1F 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 bed91a175..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 @@ -16,6 +15,6 @@ SkyPillar_4F_EventScript_CleanFloor:: SkyPillar_4F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_SKY_PILLAR_3F, 255, 0, 0 + setholewarp MAP_SKY_PILLAR_3F 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 9ffcd2de7..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:: @@ -26,8 +24,8 @@ SkyPillar_Outside_OnLoad: end SkyPillar_Outside_EventScript_OpenDoor:: - setmetatile 14, 4, METATILE_Pacifidlog_SkyPillar_DoorOpen_Top, 0 - setmetatile 14, 5, METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom, 0 + setmetatile 14, 4, METATILE_Pacifidlog_SkyPillar_DoorOpen_Top, FALSE + setmetatile 14, 5, METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom, FALSE return SkyPillar_Outside_OnFrame: diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index 2b3c02120..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 @@ -88,7 +82,7 @@ SkyPillar_Top_EventScript_RanFromRayquaza2:: fadescreenswapbuffers FADE_TO_BLACK removeobject VAR_LAST_TALKED fadescreenswapbuffers FADE_FROM_BLACK - bufferspeciesname 0, VAR_0x8004 + bufferspeciesname STR_VAR_1, VAR_0x8004 msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT releaseall end diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index 3e8648531..653f405c4 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -19,6 +19,8 @@ .set LOCALID_GRUNT_11, 33 .set LOCALID_SCOTT, 35 +@ Note: LOCALID_SLATEPORT_ENERGY_GURU is a local id for this map used elsewhere. It's defined in event_objects.h + SlateportCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_OnFrame @@ -27,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:: @@ -59,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 @@ -162,14 +161,12 @@ SlateportCity_Pokemart_EnergyGuru: SlateportCity_EventScript_EffortRibbonWoman:: lock faceplayer - bufferleadmonspeciesname 0 + 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 @@ -192,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 @@ -206,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 @@ -220,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 @@ -240,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 @@ -252,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 @@ -264,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 @@ -345,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 @@ -635,7 +625,7 @@ SlateportCity_EventScript_CaptStern:: clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_AQUA_GRUNT clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_ARCHIE setvar VAR_SLATEPORT_CITY_STATE, 2 - warp MAP_SLATEPORT_CITY_HARBOR, 255, 11, 14 + warp MAP_SLATEPORT_CITY_HARBOR, 11, 14 waitstate releaseall end @@ -758,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 @@ -793,77 +782,77 @@ SlateportCity_EventScript_ChooseBerryPowderItem:: end SlateportCity_EventScript_EnergyPowder:: - bufferitemname 0, ITEM_ENERGY_POWDER + bufferitemname STR_VAR_1, ITEM_ENERGY_POWDER setvar VAR_0x8008, ITEM_ENERGY_POWDER setvar VAR_0x8009, 50 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_EnergyRoot:: - bufferitemname 0, ITEM_ENERGY_ROOT + bufferitemname STR_VAR_1, ITEM_ENERGY_ROOT setvar VAR_0x8008, ITEM_ENERGY_ROOT setvar VAR_0x8009, 80 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_HealPowder:: - bufferitemname 0, ITEM_HEAL_POWDER + bufferitemname STR_VAR_1, ITEM_HEAL_POWDER setvar VAR_0x8008, ITEM_HEAL_POWDER setvar VAR_0x8009, 50 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_RevivalHerb:: - bufferitemname 0, ITEM_REVIVAL_HERB + bufferitemname STR_VAR_1, ITEM_REVIVAL_HERB setvar VAR_0x8008, ITEM_REVIVAL_HERB setvar VAR_0x8009, 300 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Protein:: - bufferitemname 0, ITEM_PROTEIN + bufferitemname STR_VAR_1, ITEM_PROTEIN setvar VAR_0x8008, ITEM_PROTEIN setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Iron:: - bufferitemname 0, ITEM_IRON + bufferitemname STR_VAR_1, ITEM_IRON setvar VAR_0x8008, ITEM_IRON setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Carbos:: - bufferitemname 0, ITEM_CARBOS + bufferitemname STR_VAR_1, ITEM_CARBOS setvar VAR_0x8008, ITEM_CARBOS setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Calcium:: - bufferitemname 0, ITEM_CALCIUM + bufferitemname STR_VAR_1, ITEM_CALCIUM setvar VAR_0x8008, ITEM_CALCIUM setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Zinc:: - bufferitemname 0, ITEM_ZINC + bufferitemname STR_VAR_1, ITEM_ZINC setvar VAR_0x8008, ITEM_ZINC setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_HPUp:: - bufferitemname 0, ITEM_HP_UP + bufferitemname STR_VAR_1, ITEM_HP_UP setvar VAR_0x8008, ITEM_HP_UP setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_PPUp:: - bufferitemname 0, ITEM_PP_UP + bufferitemname STR_VAR_1, ITEM_PP_UP setvar VAR_0x8008, ITEM_PP_UP setvar VAR_0x8009, 3000 goto SlateportCity_EventScript_TryBuyBerryPowderItem @@ -877,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 06052e145..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:: @@ -68,7 +66,7 @@ SlateportCity_BattleTentBattleRoom_EventScript_EnterRoom:: SlateportCity_BattleTent_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST special LoadPlayerParty - warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 6, 6 waitstate @ forced stop @@ -79,14 +77,14 @@ SlateportCity_BattleTentBattleRoom_EventScript_DefeatedOpponent:: switch VAR_RESULT case 3, SlateportCity_BattleTentBattleRoom_EventScript_WarpToLobbyWon setvar VAR_0x8006, 1 - warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 255, 2, 3 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 2, 3 waitstate @ forced stop SlateportCity_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON special LoadPlayerParty - warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 6, 6 waitstate @ forced stop diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 37b0f6fc8..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 @@ -52,7 +49,7 @@ SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom:: waitmovement 0 closedoor 2, 1 waitdooranim - warp MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM, 255, 4, 4 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM, 4, 4 waitstate end @@ -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 8361cdfcc..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,14 +126,13 @@ 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 closemessage call SlateportCity_BattleTentLobby_EventScript_WalkToDoor - warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 255, 2, 7 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 2, 7 setvar VAR_TEMP_0, 0 waitstate end @@ -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 58e5978cf..b2a71f2b7 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -9,10 +9,9 @@ SlateportCity_Harbor_MapScripts:: .byte 0 SlateportCity_Harbor_OnTransition: - setescapewarp MAP_SLATEPORT_CITY, 255, 28, 13 + 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,21 +201,19 @@ 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, 255, 1, 10 + warp MAP_SS_TIDAL_CORRIDOR, 1, 10 waitstate release end 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, 255, 19, 67 + warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate release end @@ -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 - checkitem ITEM_SCANNER, 1 - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_Harbor_EventScript_AskToTradeScanner + goto_if_eq VAR_TEMP_1, 1, SlateportCity_Harbor_EventScript_TradedScanner + checkitem ITEM_SCANNER + 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 87ed2d07f..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, 255 - goto_if_ne SlateportCity_NameRatersHouse_EventScript_RateMonNickname - compare VAR_0x8004, 255 - 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 cfe547de5..96892f948 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -22,10 +22,9 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight:: end SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: - showmoneybox 0, 0, 0 + 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 @@ -34,12 +33,11 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: end SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee:: - checkmoney 50, 0 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney + checkmoney 50 + goto_if_eq VAR_RESULT, FALSE, SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney playse SE_SHOP - removemoney 50, 0 - updatemoneybox 0, 0 + removemoney 50 + updatemoneybox msgbox SlateportCity_OceanicMuseum_1F_Text_PleaseEnjoyYourself, MSGBOX_DEFAULT setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1 hidemoneybox @@ -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 96e1a7633..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 @@ -47,7 +45,7 @@ SlateportCity_PokemonFanClub_EventScript_ChairmanAssessLeadMon:: call_if_unset FLAG_RECEIVED_PINK_SCARF, SlateportCity_PokemonFanClub_EventScript_CheckMonCute call_if_unset FLAG_RECEIVED_BLUE_SCARF, SlateportCity_PokemonFanClub_EventScript_CheckMonBeauty call_if_unset FLAG_RECEIVED_RED_SCARF, SlateportCity_PokemonFanClub_EventScript_CheckMonCool - bufferleadmonspeciesname 0 + bufferleadmonspeciesname STR_VAR_1 switch VAR_TEMP_1 case 0, SlateportCity_PokemonFanClub_EventScript_NoHighConditions case 1, SlateportCity_PokemonFanClub_EventScript_GiveRedScarf @@ -72,9 +70,8 @@ SlateportCity_PokemonFanClub_EventScript_NoHighConditions:: end SlateportCity_PokemonFanClub_EventScript_GiveRedScarf:: - checkitemspace ITEM_RED_SCARF, 1 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + checkitemspace ITEM_RED_SCARF + 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 @@ -83,9 +80,8 @@ SlateportCity_PokemonFanClub_EventScript_GiveRedScarf:: end SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf:: - checkitemspace ITEM_BLUE_SCARF, 1 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + checkitemspace ITEM_BLUE_SCARF + 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 @@ -94,9 +90,8 @@ SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf:: end SlateportCity_PokemonFanClub_EventScript_GivePinkScarf:: - checkitemspace ITEM_PINK_SCARF, 1 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + checkitemspace ITEM_PINK_SCARF + 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 @@ -105,9 +100,8 @@ SlateportCity_PokemonFanClub_EventScript_GivePinkScarf:: end SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf:: - checkitemspace ITEM_GREEN_SCARF, 1 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + checkitemspace ITEM_GREEN_SCARF + 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 @@ -116,9 +110,8 @@ SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf:: end SlateportCity_PokemonFanClub_EventScript_GiveYellowScarf:: - checkitemspace ITEM_YELLOW_SCARF, 1 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + checkitemspace ITEM_YELLOW_SCARF + 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 f3f8ea024..69f74880e 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -34,49 +34,37 @@ SootopolisCity_EventScript_LegendariesNotArrived:: end SootopolisCity_EventScript_LockHouseDoors:: - setmetatile 9, 6, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 9, 17, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 9, 26, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 44, 17, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 8, 35, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 53, 28, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 45, 6, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 48, 25, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 51, 36, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 9, 6, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 9, 17, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 9, 26, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 44, 17, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 8, 35, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 53, 28, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 45, 6, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 48, 25, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 51, 36, METATILE_Sootopolis_Door_Closed, TRUE return SootopolisCity_EventScript_LockGymDoor:: - setmetatile 31, 32, METATILE_Sootopolis_GymDoor_Closed, 1 + setmetatile 31, 32, METATILE_Sootopolis_GymDoor_Closed, TRUE return 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:: @@ -206,7 +177,7 @@ SootopolisCity_EventScript_PlayerFaceLegendaries2:: return SootopolisCity_OnResume: - setdivewarp MAP_UNDERWATER_SOOTOPOLIS_CITY, 255, 9, 6 + setdivewarp MAP_UNDERWATER_SOOTOPOLIS_CITY, 9, 6 end SootopolisCity_OnFrame: @@ -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 @@ -565,7 +532,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: fadenewbgm MUS_SOOTOPOLIS delay 120 clearflag FLAG_HIDE_MAP_NAME_POPUP - warpsootopolislegend MAP_SOOTOPOLIS_CITY, 255, 43, 32 + warpwhitefade MAP_SOOTOPOLIS_CITY, 43, 32 waitstate end @@ -618,35 +585,35 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: fadenewbgm MUS_SURF delay 120 clearflag FLAG_HIDE_MAP_NAME_POPUP - warpsootopolislegend MAP_SOOTOPOLIS_CITY, 255, 29, 53 + warpwhitefade MAP_SOOTOPOLIS_CITY, 29, 53 waitstate end SootopolisCity_EventScript_SetRoughWater:: - setmetatile 27, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 28, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 29, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 30, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 27, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 28, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 29, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 30, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 27, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 28, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 29, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 30, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 32, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 33, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 34, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 35, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 32, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 33, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 34, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 35, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 32, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 33, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 34, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 35, 45, METATILE_Sootopolis_RoughWater, 0 + setmetatile 27, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 28, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 29, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 30, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 27, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 28, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 29, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 30, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 27, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 28, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 29, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 30, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 32, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 33, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 34, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 35, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 32, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 33, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 34, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 35, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 32, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 33, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 34, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 35, 45, METATILE_Sootopolis_RoughWater, FALSE return SootopolisCity_Movement_RayquazaFlyOff: @@ -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 @@ -1003,7 +942,7 @@ SootopolisCity_EventScript_StevenLeadPlayerCaveOfOrigin:: setflag FLAG_STEVEN_GUIDES_TO_CAVE_OF_ORIGIN applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerEnterCaveOfOrigin waitmovement 0 - warp MAP_CAVE_OF_ORIGIN_ENTRANCE, 255, 9, 20 + warp MAP_CAVE_OF_ORIGIN_ENTRANCE, 9, 20 waitstate end @@ -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 @@ -1460,7 +1389,7 @@ SootopolisCity_EventScript_MaxieArchieLeave:: clearflag FLAG_HIDE_MT_PYRE_SUMMIT_MAXIE clearflag FLAG_HIDE_MT_PYRE_SUMMIT_ARCHIE setvar VAR_MT_PYRE_STATE, 2 - warpsilent MAP_SOOTOPOLIS_CITY, 255, 31, 34 + warpsilent MAP_SOOTOPOLIS_CITY, 31, 34 waitstate releaseall end diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc index b20cf7888..7f739935b 100644 --- a/data/maps/SootopolisCity_Gym_1F/scripts.inc +++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc @@ -19,20 +19,17 @@ 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 - setmetatile 8, 4, METATILE_SootopolisGym_Stairs, 0 - setmetatile 8, 5, METATILE_SootopolisGym_Stairs, 0 + 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:: - setmetatile 8, 10, METATILE_SootopolisGym_Stairs, 0 - setmetatile 8, 11, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 10, METATILE_SootopolisGym_Stairs, FALSE + setmetatile 8, 11, METATILE_SootopolisGym_Stairs, FALSE SootopolisCity_Gym_1F_EventScript_OpenFirstStairs:: - setmetatile 8, 15, METATILE_SootopolisGym_Stairs, 0 - setmetatile 8, 16, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 15, METATILE_SootopolisGym_Stairs, FALSE + setmetatile 8, 16, METATILE_SootopolisGym_Stairs, FALSE SootopolisCity_Gym_1F_EventScript_StopCheckingStairs:: return @@ -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 be2dad11f..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 @@ -27,7 +25,7 @@ SootopolisCity_House6_EventScript_ReceivedWailmerDoll:: end SootopolisCity_House6_EventScript_NoRoomForWailmerDoll:: - bufferdecorationname 1, DECOR_WAILMER_DOLL + bufferdecorationname STR_VAR_2, DECOR_WAILMER_DOLL msgbox gText_NoRoomLeftForAnother, MSGBOX_DEFAULT msgbox SootopolisCity_House6_Text_IllHoldItForYou, MSGBOX_DEFAULT release diff --git a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc index ab087696e..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, 255 - 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, 255 - 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 1fb8a8f72..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,29 +86,22 @@ 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 - warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F, 255, 3, 1 + 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 end diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc index f0ebbf516..533eb7cfa 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc @@ -22,19 +22,16 @@ 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 waitmovement 0 special LoadPlayerParty setvar VAR_TEMP_1, 1 - warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F, 255, 3, 1 + warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F, 3, 1 waitstate releaseall end 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 b491c2f6c..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 @@ -23,7 +22,7 @@ SouthernIsland_Exterior_EventScript_Sailor:: hideobjectat LOCALID_SAILOR, MAP_SOUTHERN_ISLAND_EXTERIOR setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepartIsland - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end 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 f4ebc7ea9..bec1ffbff 100644 --- a/data/maps/TrainerHill_Elevator/scripts.inc +++ b/data/maps/TrainerHill_Elevator/scripts.inc @@ -15,7 +15,7 @@ TrainerHill_Elevator_EventScript_ExitToRoof:: applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevatorToRoof waitmovement 0 releaseall - warp MAP_TRAINER_HILL_ROOF, 255, 15, 5 + warp MAP_TRAINER_HILL_ROOF, 15, 5 waitstate end @@ -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 @@ -37,7 +36,7 @@ TrainerHill_Elevator_EventScript_EnterElevator:: delay 25 applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevator waitmovement 0 - warp MAP_TRAINER_HILL_ENTRANCE, 255, 17, 8 + warp MAP_TRAINER_HILL_ENTRANCE, 17, 8 waitstate end diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc index af4a4c123..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,12 +46,11 @@ 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:: - setmetatile 17, 10, METATILE_TrainerHill_GreenFloorTile, 0 + setmetatile 17, 10, METATILE_TrainerHill_GreenFloorTile, FALSE return TrainerHill_Entrance_OnFrame: @@ -67,7 +64,7 @@ TrainerHill_Entrance_EventScript_ExitElevator:: lockall applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerExitElevator waitmovement 0 - setmetatile 17, 10, METATILE_TrainerHill_CounterDoor, 1 + setmetatile 17, 10, METATILE_TrainerHill_CounterDoor, TRUE special DrawWholeMapView playse SE_CLICK waitse @@ -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_MarineCave/scripts.inc b/data/maps/Underwater_MarineCave/scripts.inc index cbd158e27..6c8762835 100644 --- a/data/maps/Underwater_MarineCave/scripts.inc +++ b/data/maps/Underwater_MarineCave/scripts.inc @@ -8,6 +8,6 @@ Underwater_MarineCave_OnTransition: end Underwater_MarineCave_OnResume: - setdivewarp MAP_MARINE_CAVE_ENTRANCE, 255, 10, 17 + setdivewarp MAP_MARINE_CAVE_ENTRANCE, 10, 17 end diff --git a/data/maps/Underwater_Route134/scripts.inc b/data/maps/Underwater_Route134/scripts.inc index 909b2f8b1..b5ab48e26 100644 --- a/data/maps/Underwater_Route134/scripts.inc +++ b/data/maps/Underwater_Route134/scripts.inc @@ -3,6 +3,6 @@ Underwater_Route134_MapScripts:: .byte 0 Underwater_Route134_OnResume: - setdivewarp MAP_ROUTE134, 255, 60, 31 + setdivewarp MAP_ROUTE134, 60, 31 end diff --git a/data/maps/Underwater_SeafloorCavern/scripts.inc b/data/maps/Underwater_SeafloorCavern/scripts.inc index 2e0613c04..7f1231fef 100644 --- a/data/maps/Underwater_SeafloorCavern/scripts.inc +++ b/data/maps/Underwater_SeafloorCavern/scripts.inc @@ -18,22 +18,22 @@ Underwater_SeafloorCavern_OnLoad: end Underwater_SeafloorCavern_EventScript_SetSubmarineGoneMetatiles:: - setmetatile 5, 3, METATILE_Underwater_RockWall, 1 - setmetatile 6, 3, METATILE_Underwater_RockWall, 1 - setmetatile 7, 3, METATILE_Underwater_RockWall, 1 - setmetatile 8, 3, METATILE_Underwater_RockWall, 1 - setmetatile 5, 4, METATILE_Underwater_FloorShadow, 0 - setmetatile 6, 4, METATILE_Underwater_FloorShadow, 0 - setmetatile 7, 4, METATILE_Underwater_FloorShadow, 0 - setmetatile 8, 4, METATILE_Underwater_FloorShadow, 0 - setmetatile 5, 5, METATILE_Underwater_FloorShadow, 0 - setmetatile 6, 5, METATILE_Underwater_FloorShadow, 0 - setmetatile 7, 5, METATILE_Underwater_FloorShadow, 0 - setmetatile 8, 5, METATILE_Underwater_FloorShadow, 0 + setmetatile 5, 3, METATILE_Underwater_RockWall, TRUE + setmetatile 6, 3, METATILE_Underwater_RockWall, TRUE + setmetatile 7, 3, METATILE_Underwater_RockWall, TRUE + setmetatile 8, 3, METATILE_Underwater_RockWall, TRUE + setmetatile 5, 4, METATILE_Underwater_FloorShadow, FALSE + setmetatile 6, 4, METATILE_Underwater_FloorShadow, FALSE + setmetatile 7, 4, METATILE_Underwater_FloorShadow, FALSE + setmetatile 8, 4, METATILE_Underwater_FloorShadow, FALSE + setmetatile 5, 5, METATILE_Underwater_FloorShadow, FALSE + setmetatile 6, 5, METATILE_Underwater_FloorShadow, FALSE + setmetatile 7, 5, METATILE_Underwater_FloorShadow, FALSE + setmetatile 8, 5, METATILE_Underwater_FloorShadow, FALSE return Underwater_SeafloorCavern_OnResume: - setdivewarp MAP_SEAFLOOR_CAVERN_ENTRANCE, 255, 10, 17 + setdivewarp MAP_SEAFLOOR_CAVERN_ENTRANCE, 10, 17 end Underwater_SeafloorCavern_EventScript_CheckStolenSub:: diff --git a/data/maps/Underwater_SealedChamber/scripts.inc b/data/maps/Underwater_SealedChamber/scripts.inc index 2b3fe5e0d..f4f8d8ccb 100644 --- a/data/maps/Underwater_SealedChamber/scripts.inc +++ b/data/maps/Underwater_SealedChamber/scripts.inc @@ -4,18 +4,16 @@ 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:: - setdivewarp MAP_ROUTE134, 255, 60, 31 + setdivewarp MAP_ROUTE134, 60, 31 end Underwater_SealedChamber_EventScript_SurfaceSealedChamber:: - setdivewarp MAP_SEALED_CHAMBER_OUTER_ROOM, 255, 10, 19 + setdivewarp MAP_SEALED_CHAMBER_OUTER_ROOM, 10, 19 end Underwater_SealedChamber_EventScript_Braille:: diff --git a/data/maps/Underwater_SootopolisCity/scripts.inc b/data/maps/Underwater_SootopolisCity/scripts.inc index 4346c284f..8bf30560c 100644 --- a/data/maps/Underwater_SootopolisCity/scripts.inc +++ b/data/maps/Underwater_SootopolisCity/scripts.inc @@ -3,6 +3,6 @@ Underwater_SootopolisCity_MapScripts:: .byte 0 Underwater_SootopolisCity_OnResume: - setdivewarp MAP_SOOTOPOLIS_CITY, 255, 29, 53 + setdivewarp MAP_SOOTOPOLIS_CITY, 29, 53 end diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index b349a395c..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 @@ -59,7 +56,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST special LoadPlayerParty - warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 6, 6 waitstate VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: @@ -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 @@ -120,7 +115,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge:: VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON special LoadPlayerParty - warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 6, 6 waitstate VerdanturfTown_BattleTentBattleRoom_EventScript_PauseChallenge:: diff --git a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc index c2e9dbd6a..debf1b177 100644 --- a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc @@ -22,7 +22,7 @@ VerdanturfTown_BattleTentCorridor_EventScript_EnterCorridor:: closedoor 2, 1 waitdooranim setvar VAR_0x8006, 0 - warp MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM, 255, 6, 5 + warp MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM, 6, 5 waitstate releaseall end diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index dd8f0eaa4..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,15 +151,14 @@ 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 msgbox VerdanturfTown_BattleTentLobby_Text_NowFollowMe, MSGBOX_DEFAULT closemessage call VerdanturfTown_BattleTentLobby_EventScript_WalkToDoor - warp MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR, 255, 2, 7 + warp MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR, 2, 7 setvar VAR_TEMP_0, 0 waitstate end @@ -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 |
