diff options
Diffstat (limited to 'data/scripts/cable_club.inc')
-rw-r--r-- | data/scripts/cable_club.inc | 374 |
1 files changed, 132 insertions, 242 deletions
diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index d6ea1a707..0ab93c403 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -4,11 +4,9 @@ CableClub_OnTransition: CableClub_EventScript_HideOrShowMysteryGiftMan:: specialvar VAR_RESULT, ShouldDistributeEonTicket - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_ShowMysteryGiftMan + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_ShowMysteryGiftMan specialvar VAR_RESULT, ValidateSavedWonderCard - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_HideMysteryGiftMan + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_HideMysteryGiftMan goto CableClub_EventScript_ShowMysteryGiftMan end @@ -22,24 +20,20 @@ CableClub_EventScript_HideMysteryGiftMan:: CableClub_EventScript_MysteryGiftMan:: specialvar VAR_RESULT, ShouldDistributeEonTicket - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_DistributeEonTicket - goto CableClub_EventScript_AlreadyGotEonTicket + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_DistributeEonTicket + goto CableClub_EventScript_TryWonderCardScript end -CableClub_EventScript_AlreadyGotEonTicket:: - gotoram - -@ Unused? +CableClub_EventScript_TryWonderCardScript:: + trywondercardscript CableClub_EventScript_MysteryGiftThankYou:: msgbox gText_ThankYouForAccessingMysteryGift, MSGBOX_NPC end CableClub_EventScript_DistributeEonTicket:: - checkitem ITEM_EON_TICKET, 1 - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AlreadyGotEonTicket - goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_AlreadyGotEonTicket + checkitem ITEM_EON_TICKET + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_TryWonderCardScript + goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_TryWonderCardScript msgbox MysteryGift_Text_TheresATicketForYou, MSGBOX_DEFAULT giveitem ITEM_EON_TICKET setflag FLAG_ENABLE_SHIP_SOUTHERN_ISLAND @@ -66,29 +60,20 @@ CableClub_OnWarp: .2byte 0 CableClub_EventScript_CheckTurnAttendant:: - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_DontTurnAttendant + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_DontTurnAttendant turnobject VAR_0x8007, DIR_WEST CableClub_EventScript_DontTurnAttendant:: end CableClub_OnLoad: - compare VAR_CABLE_CLUB_STATE, USING_SINGLE_BATTLE - goto_if_eq CableClub_EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_DOUBLE_BATTLE - goto_if_eq CableClub_EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_MULTI_BATTLE - goto_if_eq CableClub_EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_TRADE_CENTER - goto_if_eq CableClub_EventScript_OnLoadFromTradeCenter - compare VAR_CABLE_CLUB_STATE, USING_RECORD_CORNER - goto_if_eq CableClub_EventScript_OnLoadFromRecordCorner - compare VAR_CABLE_CLUB_STATE, USING_UNION_ROOM - goto_if_eq CableClub_EventScript_OnLoadFromUnionRoom - compare VAR_CABLE_CLUB_STATE, USING_BERRY_CRUSH - goto_if_eq CableClub_EventScript_OnLoadFromBerryCrush - compare VAR_CABLE_CLUB_STATE, USING_MINIGAME - goto_if_eq CableClub_EventScript_OnLoadFromGameCorner + goto_if_eq VAR_CABLE_CLUB_STATE, USING_SINGLE_BATTLE, CableClub_EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_DOUBLE_BATTLE, CableClub_EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_MULTI_BATTLE, CableClub_EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_TRADE_CENTER, CableClub_EventScript_OnLoadFromTradeCenter + goto_if_eq VAR_CABLE_CLUB_STATE, USING_RECORD_CORNER, CableClub_EventScript_OnLoadFromRecordCorner + goto_if_eq VAR_CABLE_CLUB_STATE, USING_UNION_ROOM, CableClub_EventScript_OnLoadFromUnionRoom + goto_if_eq VAR_CABLE_CLUB_STATE, USING_BERRY_CRUSH, CableClub_EventScript_OnLoadFromBerryCrush + goto_if_eq VAR_CABLE_CLUB_STATE, USING_MINIGAME, CableClub_EventScript_OnLoadFromGameCorner end CableClub_EventScript_OnLoadFromColosseum:: @@ -150,8 +135,7 @@ CableClub_EventScript_ExitMinigameRoom:: CableClub_EventScript_CloseLinkAndExitLinkRoom:: special CloseLink setvar VAR_CABLE_CLUB_STATE, 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement VAR_0x8007, Movement_AttendantFaceLeft waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom @@ -173,8 +157,7 @@ CableClub_EventScript_ExitTradeCenter:: CableClub_EventScript_PlayerExitTradeCenter:: special CloseLink setvar VAR_CABLE_CLUB_STATE, 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft @@ -197,8 +180,7 @@ CableClub_EventScript_PlayerExitRecordCorner:: setvar VAR_CABLE_CLUB_STATE, 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom waitmovement 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_ExitRecordCornerRet + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_ExitRecordCornerRet applymovement VAR_0x8007, Movement_AttendantFaceDown waitmovement 0 CableClub_EventScript_ExitRecordCornerRet:: @@ -216,8 +198,7 @@ CableClub_EventScript_ExitUnionRoom:: CableClub_EventScript_PlayerExitUnionRoom:: setvar VAR_CABLE_CLUB_STATE, 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft @@ -325,8 +306,7 @@ CableClub_EventScript_SingleBattleMode:: CableClub_EventScript_DoubleBattleMode:: special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne CableClub_EventScript_NeedTwoMonsForDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, CableClub_EventScript_NeedTwoMonsForDoubleBattle setvar VAR_0x8004, USING_DOUBLE_BATTLE goto CableClub_EventScript_TryEnterColosseum end @@ -343,24 +323,17 @@ CableClub_EventScript_MultiBattleMode:: CableClub_EventScript_TryEnterColosseum:: call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message gText_PleaseWaitForLink waitmessage special TryBattleLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterColosseum - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterColosseum + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError end CableClub_EventScript_EnterColosseum:: @@ -387,10 +360,9 @@ CableClub_EventScript_EnterColosseum:: closedoor 9, 1 waitdooranim release - compare VAR_0x8004, USING_MULTI_BATTLE - goto_if_eq CableClub_EventScript_WarpTo4PColosseum + goto_if_eq VAR_0x8004, USING_MULTI_BATTLE, CableClub_EventScript_WarpTo4PColosseum special SetCableClubWarp - warp MAP_BATTLE_COLOSSEUM_2P, 255, 6, 8 + warp MAP_BATTLE_COLOSSEUM_2P, 6, 8 special DoCableClubWarp waitstate end @@ -403,7 +375,7 @@ CableClub_EventScript_PlayerApproachLinkRoomRight:: CableClub_EventScript_WarpTo4PColosseum:: special SetCableClubWarp - warp MAP_BATTLE_COLOSSEUM_4P, 255, 5, 8 + warp MAP_BATTLE_COLOSSEUM_4P, 5, 8 special DoCableClubWarp waitstate end @@ -443,31 +415,21 @@ CableClub_EventScript_ConfirmNumberAndRestart:: CableClub_EventScript_TradeCenter:: copyvar VAR_0x8007, VAR_LAST_TALKED call CableClub_EventScript_CheckPartyTradeRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message gText_PleaseWaitForLink waitmessage special TryTradeLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterTradeCenter - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError - compare VAR_RESULT, LINKUP_PLAYER_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkPlayerNotReady - compare VAR_RESULT, LINKUP_PARTNER_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkOtherTrainerNotReady + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterTradeCenter + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_PLAYER_NOT_READY, CableClub_EventScript_AbortLinkPlayerNotReady + goto_if_eq VAR_RESULT, LINKUP_PARTNER_NOT_READY, CableClub_EventScript_AbortLinkOtherTrainerNotReady end CableClub_EventScript_EnterTradeCenter:: @@ -493,18 +455,16 @@ CableClub_EventScript_EnterTradeCenter:: waitdooranim release special SetCableClubWarp - setwarp MAP_TRADE_CENTER, 255, 5, 8 + setwarp MAP_TRADE_CENTER, 5, 8 special DoCableClubWarp waitstate end CableClub_EventScript_CheckPartyTradeRequirements:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, 2 - goto_if_lt CableClub_EventScript_NeedTwoMonsToTrade + goto_if_lt VAR_RESULT, 2, CableClub_EventScript_NeedTwoMonsToTrade specialvar VAR_RESULT, DoesPartyHaveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_CantTradeEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_CantTradeEnigmaBerry setvar VAR_RESULT, 1 return @@ -521,28 +481,20 @@ CableClub_EventScript_CantTradeEnigmaBerry:: CableClub_EventScript_RecordCorner:: copyvar VAR_0x8007, VAR_LAST_TALKED call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message gText_PleaseWaitForLink waitmessage special TryRecordMixLinkup waitstate special ValidateMixingGameLanguage waitstate - compare VAR_RESULT, LINKUP_FOREIGN_GAME - goto_if_eq CableClub_EventScript_AbortLinkForeignGame - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterRecordCorner - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_FOREIGN_GAME, CableClub_EventScript_AbortLinkForeignGame + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterRecordCorner + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError end CableClub_EventScript_EnterRecordCorner:: @@ -568,7 +520,7 @@ CableClub_EventScript_EnterRecordCorner:: waitdooranim release special SetCableClubWarp - setwarp MAP_RECORD_CORNER, 255, 8, 9 + setwarp MAP_RECORD_CORNER, 8, 9 special DoCableClubWarp waitstate end @@ -726,8 +678,7 @@ EventScript_BattleColosseum_4P_PlayerSpot0:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 0 special ColosseumPlayerSpotTriggered waitstate @@ -737,8 +688,7 @@ EventScript_BattleColosseum_4P_PlayerSpot1:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 1 special ColosseumPlayerSpotTriggered waitstate @@ -748,8 +698,7 @@ EventScript_BattleColosseum_4P_PlayerSpot2:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 2 special ColosseumPlayerSpotTriggered waitstate @@ -759,8 +708,7 @@ EventScript_BattleColosseum_4P_PlayerSpot3:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 3 special ColosseumPlayerSpotTriggered waitstate @@ -800,36 +748,32 @@ EventScript_RecordCenter_Spot0:: setvar VAR_0x8005, 0 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end EventScript_RecordCenter_Spot1:: setvar VAR_0x8005, 1 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end EventScript_RecordCenter_Spot2:: setvar VAR_0x8005, 2 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end EventScript_RecordCenter_Spot3:: setvar VAR_0x8005, 3 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end RecordCorner_EventScript_ReceivedGiftItem:: - bufferitemname 1, VAR_TEMP_1 + bufferitemname STR_VAR_2, VAR_TEMP_1 message RecordCorner_Text_PlayerSentOverOneX waitmessage waitbuttonpress @@ -870,8 +814,7 @@ TradeCenter_EventScript_Attendant:: end RecordCorner_EventScript_Attendant:: - compare VAR_TEMP_0, 0 - goto_if_ne RecordCorner_EventScript_AlreadyMixed + goto_if_ne VAR_TEMP_0, 0, RecordCorner_EventScript_AlreadyMixed special Script_FacePlayer message RecordCorner_Text_TakeSeatAndWait waitmessage @@ -891,8 +834,7 @@ RecordCorner_EventScript_AlreadyMixed:: EventScript_ConfirmLeaveCableClubRoom:: msgbox Text_TerminateLinkConfirmation, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_TerminateLink + goto_if_eq VAR_RESULT, YES, EventScript_TerminateLink erasebox 0, 0, 29, 19 releaseall end @@ -915,12 +857,10 @@ CableClub_EventScript_UnionRoomAttendant:: setvar VAR_FRONTIER_FACILITY, FACILITY_UNION_ROOM goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AbortLinkPlayerHasBadEgg + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_AbortLinkPlayerHasBadEgg copyvar VAR_0x8007, VAR_LAST_TALKED specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_UnionRoomAdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_UnionRoomAdapterNotConnected message CableClub_Text_WelcomeUnionRoomEnter waitmessage goto CableClub_EventScript_UnionRoomSelect @@ -943,11 +883,9 @@ CableClub_EventScript_UnionRoomInfo:: CableClub_EventScript_EnterUnionRoom:: call CableClub_EventScript_CheckPartyUnionRoomRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink msgbox CableClub_Text_EnjoyUnionRoom, MSGBOX_DEFAULT closemessage special HealPlayerParty @@ -970,7 +908,7 @@ CableClub_EventScript_EnterUnionRoom:: waitdooranim special Script_ResetUnionRoomTrade special SetCableClubWarp - warpteleport2 MAP_UNION_ROOM, 255, 7, 11 + warpspinenter MAP_UNION_ROOM, 7, 11 waitstate special RunUnionRoom waitstate @@ -978,11 +916,9 @@ CableClub_EventScript_EnterUnionRoom:: CableClub_EventScript_CheckPartyUnionRoomRequirements:: specialvar VAR_RESULT, CountPartyNonEggMons - compare VAR_RESULT, 2 - goto_if_lt CableClub_EventScript_NeedTwoMonsForUnionRoom + goto_if_lt VAR_RESULT, 2, CableClub_EventScript_NeedTwoMonsForUnionRoom specialvar VAR_RESULT, DoesPartyHaveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_NoEnigmaBerryInUnionRoom + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_NoEnigmaBerryInUnionRoom setvar VAR_RESULT, 1 return @@ -1006,8 +942,7 @@ CableClub_EventScript_WirelessClubAttendant:: faceplayer goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements msgbox CableClub_Text_AskAboutLinking, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_DontAskAboutLinking + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_DontAskAboutLinking msgbox CableClub_Text_ExplainWirelessClub, MSGBOX_DEFAULT release return @@ -1023,11 +958,9 @@ CableClub_EventScript_DirectCornerAttendant:: setvar VAR_FRONTIER_FACILITY, FACILITY_MULTI_OR_EREADER @ Set preemptively for multi battles, ignored otherwise goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AbortLinkPlayerHasBadEgg + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_AbortLinkPlayerHasBadEgg specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_WelcomeToCableClub + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_WelcomeToCableClub message CableClub_Text_WelcomeWhichDirectCornerRoom waitmessage delay 28 @@ -1035,9 +968,8 @@ CableClub_EventScript_DirectCornerAttendant:: end CableClub_EventScript_DirectCornerSelectService:: - checkitem ITEM_POWDER_JAR, 1 - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_DirectCornerNoBerry + checkitem ITEM_POWDER_JAR + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_DirectCornerNoBerry goto_if_set FLAG_VISITED_MAUVILLE_CITY, CableClub_EventScript_DirectCornerSelectAllServices multichoice 0, 0, MULTI_WIRELESS_NO_RECORD, FALSE switch VAR_RESULT @@ -1081,11 +1013,9 @@ CableClub_EventScript_DirectCornerHasRecordMix:: CableClub_EventScript_WirelessTrade:: msgbox CableClub_Text_TradePokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink call CableClub_EventScript_CheckPartyTradeRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink setvar VAR_0x8004, LINK_GROUP_TRADE goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -1110,8 +1040,7 @@ CableClub_EventScript_WirelessSingleBattle:: CableClub_EventScript_WirelessDoubleBattle:: special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne CableClub_EventScript_TwoMonsNeededForWirelessDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, CableClub_EventScript_TwoMonsNeededForWirelessDoubleBattle setvar VAR_0x8004, LINK_GROUP_DOUBLE_BATTLE goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -1133,19 +1062,16 @@ CableClub_EventScript_WirelessBattleInfo:: CableClub_EventScript_WirelessRecordMix:: msgbox CableClub_Text_AccessRecordCorner, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink setvar VAR_0x8004, LINK_GROUP_RECORD_CORNER goto CableClub_EventScript_SaveAndChooseLinkLeader end CableClub_EventScript_WirelessBerryCrush:: msgbox CableClub_Text_UseBerryCrush, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink special HasAtLeastOneBerry - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_NeedBerryForBerryCrush + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_NeedBerryForBerryCrush setvar VAR_0x8004, LINK_GROUP_BERRY_CRUSH goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -1157,8 +1083,7 @@ CableClub_EventScript_NeedBerryForBerryCrush:: CableClub_EventScript_SaveAndChooseLinkLeader:: call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink switch VAR_0x8004 case LINK_GROUP_TRADE, CableClub_EventScript_ChooseLinkLeaderFrom2 case LINK_GROUP_SINGLE_BATTLE, CableClub_EventScript_ChooseLinkLeaderFrom2 @@ -1181,23 +1106,17 @@ CableClub_EventScript_ChooseLinkLeaderFrom2:: CableClub_EventScript_TryLeadGroup2Players:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryLeadGroup2Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom2 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryLeadGroup2Players release return CableClub_EventScript_TryJoinGroup2Players:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryJoinGroup2Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom2 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryJoinGroup2Players release return @@ -1214,23 +1133,17 @@ CableClub_EventScript_ChooseLinkLeaderFrom4:: CableClub_EventScript_TryLeadGroup4Players:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryLeadGroup4Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom4 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryLeadGroup4Players release return CableClub_EventScript_TryJoinGroup4Players:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryJoinGroup4Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom4 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryJoinGroup4Players release return @@ -1247,23 +1160,17 @@ CableClub_EventScript_ChooseLinkLeader:: CableClub_EventScript_TryLeadGroupXPlayers:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryLeadGroupXPlayers + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryLeadGroupXPlayers release return CableClub_EventScript_TryJoinGroupXPlayers:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryJoinGroupXPlayers + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryJoinGroupXPlayers release return @@ -1307,8 +1214,7 @@ EventScript_WirelessBoxResults:: lockall goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_NotReadyYet specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_AdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_AdapterNotConnected fadescreen FADE_TO_BLACK special ShowWirelessCommunicationScreen waitstate @@ -1322,33 +1228,33 @@ CableClub_EventScript_AdapterNotConnected:: end CableClub_EventScript_OpenUnionRoomBarrier:: - setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, 0 - setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 + setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, FALSE + setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, FALSE return CableClub_EventScript_CloseUnionRoomBarrier:: - setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop, 1 - setmetatile 5, 3, METATILE_PokemonCenter_CounterBarrier, 1 + setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop, TRUE + setmetatile 5, 3, METATILE_PokemonCenter_CounterBarrier, TRUE return CableClub_EventScript_OpenDirectCornerBarrier:: - setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, 0 - setmetatile 9, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 + setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, FALSE + setmetatile 9, 3, METATILE_PokemonCenter_Floor_Plain_Alt, FALSE return CableClub_EventScript_CloseDirectCornerBarrier:: - setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop, 1 - setmetatile 9, 3, METATILE_PokemonCenter_CounterBarrier, 1 + setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop, TRUE + setmetatile 9, 3, METATILE_PokemonCenter_CounterBarrier, TRUE return EventScript_OpenMossdeepGameCornerBarrier:: - setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterOpen_Top, 0 - setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterOpen_Bottom, 0 + setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterOpen_Top, FALSE + setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterOpen_Bottom, FALSE return EventScript_CloseMossdeepGameCornerBarrier:: - setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterClosed_Top, 1 - setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterClosed_Bottom, 1 + setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterClosed_Top, TRUE + setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterClosed_Bottom, TRUE return CableClub_OnResume: @@ -1389,8 +1295,7 @@ MossdeepCity_GameCorner_1F_EventScript_OldMan2:: message MossdeepCity_GameCorner_1F_Text_WelcomeCanYouWait waitmessage specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected delay 60 message MossdeepCity_GameCorner_1F_Text_PlayWhichGame waitmessage @@ -1405,18 +1310,15 @@ MossdeepCity_GameCorner_1F_EventScript_OldMan2:: MossdeepCity_GameCorner_1F_EventScript_PlayPokemonJump:: setvar VAR_0x8005, 0 special IsPokemonJumpSpeciesInParty - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon msgbox MossdeepCity_GameCorner_1F_Text_EnterWhichPokemon, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK setvar VAR_0x8005, 0 special ChooseMonForWirelessMinigame waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_ge VAR_0x8004, PARTY_SIZE, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_eq VAR_RESULT, 0, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame setvar VAR_0x8004, LINK_GROUP_POKEMON_JUMP goto MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader end @@ -1424,18 +1326,15 @@ MossdeepCity_GameCorner_1F_EventScript_PlayPokemonJump:: MossdeepCity_GameCorner_1F_EventScript_PlayDodrioBerryPicking:: setvar VAR_0x8005, 1 special IsDodrioInParty - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon msgbox MossdeepCity_GameCorner_1F_Text_EnterWhichPokemon, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK setvar VAR_0x8005, 1 special ChooseMonForWirelessMinigame waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_ge VAR_0x8004, PARTY_SIZE, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_eq VAR_RESULT, 0, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame setvar VAR_0x8004, LINK_GROUP_BERRY_PICKING goto MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader end @@ -1453,23 +1352,17 @@ MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader:: MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader release return MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup release return @@ -1501,12 +1394,9 @@ MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected:: MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon:: msgbox MossdeepCity_GameCorner_1F_Text_ExplainRequiredMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame - compare VAR_0x8005, 0 - call_if_eq MossdeepCity_GameCorner_1F_EventScript_ExplainPokemonJumpRequirements - compare VAR_0x8005, 1 - call_if_eq MossdeepCity_GameCorner_1F_EventScript_ExplainDodrioBerryPickingRequirements + goto_if_eq VAR_RESULT, NO, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + call_if_eq VAR_0x8005, 0, MossdeepCity_GameCorner_1F_EventScript_ExplainPokemonJumpRequirements + call_if_eq VAR_0x8005, 1, MossdeepCity_GameCorner_1F_EventScript_ExplainDodrioBerryPickingRequirements goto MossdeepCity_GameCorner_1F_EventScript_AbortMinigame end |