diff --git a/constants/item_constants.asm b/constants/item_constants.asm index 4452571b9..0914e7ab6 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -290,7 +290,8 @@ NUM_HMS = const_value - HM01 add_mt ICE_BEAM NUM_TM_HM_TUTOR = __enum__ +- 1 -ITEM_FROM_MEM EQU $ff +USE_SCRIPT_VAR EQU $00 +ITEM_FROM_MEM EQU $ff ; leftovers from red SAFARI_BALL EQU $08 ; MOON_STONE diff --git a/constants/script_constants.asm b/constants/script_constants.asm index e871ed301..6fed31f0a 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -3,6 +3,40 @@ PLAYER EQU 0 LAST_TALKED EQU -2 +; memory constants + const_def + const MEM_BUFFER_0 ; use StringBuffer3 + const MEM_BUFFER_1 ; use StringBuffer4 + const MEM_BUFFER_2 ; use StringBuffer5 +NUM_MEM_BUFFERS EQU const_value + + +; checkmoney/takemoney accounts + const_def + const YOUR_MONEY ; 0 + const MOMS_MONEY ; 1 + +; checkmoney/checkcoins return values + const_def + const HAVE_MORE ; 0 + const HAVE_AMOUNT ; 1 + const HAVE_LESS ; 2 + +; checkpokeitem return values + const_def + const POKEMAIL_WRONG_MAIL ; 0 + const POKEMAIL_CORRECT ; 1 + const POKEMAIL_REFUSED ; 2 + const POKEMAIL_NO_MAIL ; 3 + const POKEMAIL_LAST_MON ; 4 + +; askforphonenumber return values + const_def + const PHONE_CONTACT_GOT ; 0 + const PHONE_CONTACTS_FULL ; 1 + const PHONE_CONTACT_REFUSED ; 2 + + ; GetVarAction arguments (see engine/variables.asm) const_def const VAR_STRINGBUFFER2 ; 00 @@ -80,6 +114,7 @@ NUM_PLAYER_EVENTS EQU const_value const OBJECTTYPE_6 +; showemote arguments ; Emotes indexes (see data/sprites/emotes.asm) const_def const EMOTE_SHOCK ; 0 @@ -97,8 +132,8 @@ NUM_PLAYER_EVENTS EQU const_value EMOTE_MEM EQU -1 +; fruittree arguments ; FruitTreeItems indexes (see data/items/fruit_trees.asm) -; used by fruittree command const_value set 1 const FRUITTREE_ROUTE_29 ; 01 const FRUITTREE_ROUTE_30_1 ; 02 @@ -133,8 +168,18 @@ const_value set 1 NUM_FRUIT_TREES EQU const_value +- 1 +; describedecoration arguments +; DescribeDecoration.JumpTable indexes (see engine/decorations.asm) + const_def + const DECODESC_POSTER ; 0 + const DECODESC_LEFT_DOLL ; 1 + const DECODESC_RIGHT_DOLL ; 2 + const DECODESC_BIG_DOLL ; 3 + const DECODESC_CONSOLE ; 4 + + +; elevfloor macro values ; ElevatorFloorNames indexes (see data/elevator_floors.asm) -; used by elevfloor macro const_def const FLOOR_B4F const FLOOR_B3F @@ -167,6 +212,40 @@ CMDQUEUE_CAPACITY EQU 4 CMDQUEUE_STONETABLE EQU 2 +; SpecialGameboyCheck return values + const_def + const GBCHECK_GB ; 0 + const GBCHECK_SGB ; 1 + const GBCHECK_CGB ; 2 + +; Special_CheckMagikarpLength return values + const_def + const MAGIKARPLENGTH_NOT_MAGIKARP ; 0 + const MAGIKARPLENGTH_REFUSED ; 1 + const MAGIKARPLENGTH_TOO_SHORT ; 2 + const MAGIKARPLENGTH_BEAT_RECORD ; 3 + +; SpecialReturnShuckle return values + const_def + const SHUCKIE_WRONG_MON ; 0 + const SHUCKIE_REFUSED ; 1 + const SHUCKIE_RETURNED ; 2 + const SHUCKIE_HAPPY ; 3 + const SHUCKIE_FAINTED ; 4 + +; CheckPartyFullAfterContest return values + const_def + const BUGCONTEST_CAUGHT_MON ; 0 + const BUGCONTEST_BOXED_MON ; 1 + const BUGCONTEST_NO_CATCH ; 2 + +; used by HealMachineAnim +; HealMachineAnim.Pointers indexes (see engine/events/heal_machine_anim.asm) + const_def + const HEALMACHINE_POKECENTER ; 0 + const HEALMACHINE_ELMS_LAB ; 1 + const HEALMACHINE_HALL_OF_FAME ; 2 + ; used by Special_UnownPuzzle ; LoadUnownPuzzlePiecesGFX.LZPointers indexes (see engine/unown_puzzle.asm) const_def @@ -183,3 +262,9 @@ NUM_UNOWN_PUZZLES EQU const_value const UNOWNWORDS_LIGHT ; 1 const UNOWNWORDS_WATER ; 2 const UNOWNWORDS_HO_OH ; 3 + +; used by Special_MoveTutor +const_value set 1 + const MOVETUTOR_FLAMETHROWER ; 1 + const MOVETUTOR_THUNDERBOLT ; 2 + const MOVETUTOR_ICE_BEAM ; 3 diff --git a/docs/event_commands.md b/docs/event_commands.md index b4314bd24..dfbe943f1 100644 --- a/docs/event_commands.md +++ b/docs/event_commands.md @@ -133,7 +133,7 @@ Defined in [macros/scripts/events.asm](/macros/scripts/events.asm) and [engine/s ## `$3E`: `readcoins` *memory* -## `$3F`: `RAM2MEM` *memory* +## `$3F`: `vartomem` *memory* ## `$40`: `pokenamemem` *mon_id*, *memory* @@ -151,7 +151,7 @@ Defined in [macros/scripts/events.asm](/macros/scripts/events.asm) and [engine/s ## `$47`: `opentext` -## `$48`: `refreshscreen` *dummy* +## `$48`: `refreshscreen` [*dummy*=0] ## `$49`: `closetext` diff --git a/engine/caught_data.asm b/engine/caught_data.asm index 534e318a4..694d1bb74 100644 --- a/engine/caught_data.asm +++ b/engine/caught_data.asm @@ -81,7 +81,7 @@ CheckPartyFullAfterContest: ; 4d9e5 ld [hl], a xor a ld [wContestMon], a - and a + and a ; BUGCONTEST_CAUGHT_MON ld [ScriptVar], a ret @@ -142,12 +142,12 @@ CheckPartyFullAfterContest: ; 4d9e5 call CloseSRAM xor a ld [wContestMon], a - ld a, $1 + ld a, BUGCONTEST_BOXED_MON ld [ScriptVar], a ret .DidntCatchAnything: ; 4db35 - ld a, $2 + ld a, BUGCONTEST_NO_CATCH ld [ScriptVar], a ret diff --git a/engine/decorations.asm b/engine/decorations.asm index c1b703fb6..bd9eb0251 100755 --- a/engine/decorations.asm +++ b/engine/decorations.asm @@ -1061,12 +1061,13 @@ INCLUDE "data/decorations/decorations.asm" DescribeDecoration:: ; 26f59 ld a, b - ld hl, JumpTable_DecorationDesc + ld hl, .JumpTable rst JumpTable ret ; 26f5f -JumpTable_DecorationDesc: ; 26f5f +.JumpTable: ; 26f5f +; entries correspond to DECODESC_* constants dw DecorationDesc_Poster dw DecorationDesc_LeftOrnament dw DecorationDesc_RightOrnament diff --git a/engine/events/daycare.asm b/engine/events/daycare.asm index 6395a40fb..ed6e16e87 100755 --- a/engine/events/daycare.asm +++ b/engine/events/daycare.asm @@ -465,14 +465,14 @@ Special_DayCareManOutside: ; 16936 .Load0: call PrintText - xor a + xor a ; FALSE ld [ScriptVar], a ret .PartyFull: ld hl, .PartyFullText call PrintText - ld a, $1 + ld a, TRUE ld [ScriptVar], a ret ; 16993 diff --git a/engine/events/fruit_trees.asm b/engine/events/fruit_trees.asm index d0b0bac15..768bedb0b 100644 --- a/engine/events/fruit_trees.asm +++ b/engine/events/fruit_trees.asm @@ -2,7 +2,7 @@ FruitTreeScript:: ; 44000 callasm GetCurTreeFruit opentext copybytetovar CurFruit - itemtotext $0, $0 + itemtotext USE_SCRIPT_VAR, MEM_BUFFER_0 writetext FruitBearingTreeText buttonsound callasm TryResetFruitTrees diff --git a/engine/events/happiness_egg.asm b/engine/events/happiness_egg.asm index a4ae8b7e6..df58c7143 100755 --- a/engine/events/happiness_egg.asm +++ b/engine/events/happiness_egg.asm @@ -21,7 +21,7 @@ CheckFirstMonIsEgg: ; 71ac ld a, [PartySpecies] ld [wd265], a cp EGG - ld a, $1 + ld a, 1 jr z, .egg xor a diff --git a/engine/events/heal_machine_anim.asm b/engine/events/heal_machine_anim.asm index dac46d2e2..0f20d76b6 100755 --- a/engine/events/heal_machine_anim.asm +++ b/engine/events/heal_machine_anim.asm @@ -47,6 +47,7 @@ HealMachineAnim: ; 12324 ; 12365 .Pointers: ; 12365 +; entries correspond to HEALMACHINE_* constants dw .Pokecenter dw .ElmLab dw .HallOfFame diff --git a/engine/events/kurt.asm b/engine/events/kurt.asm index 9bc06a613..3cabfd6f1 100644 --- a/engine/events/kurt.asm +++ b/engine/events/kurt.asm @@ -76,7 +76,7 @@ Kurt_SelectApricorn: ; 88055 jr nz, .done .nope - xor a + xor a ; FALSE .done ld c, a diff --git a/engine/events/magikarp.asm b/engine/events/magikarp.asm index 68e8baad7..336d27e79 100644 --- a/engine/events/magikarp.asm +++ b/engine/events/magikarp.asm @@ -52,22 +52,22 @@ Special_CheckMagikarpLength: ; fbb32 ld hl, PartyMonOT call SkipNames call CopyBytes - ld a, 3 + ld a, MAGIKARPLENGTH_BEAT_RECORD ld [ScriptVar], a ret .not_long_enough - ld a, 2 + ld a, MAGIKARPLENGTH_TOO_SHORT ld [ScriptVar], a ret .declined - ld a, 1 + ld a, MAGIKARPLENGTH_REFUSED ld [ScriptVar], a ret .not_magikarp - xor a + xor a ; MAGIKARPLENGTH_NOT_MAGIKARP ld [ScriptVar], a ret ; fbba9 diff --git a/engine/events/misc_scripts_2.asm b/engine/events/misc_scripts_2.asm index c4c51d5e6..29416a9e5 100644 --- a/engine/events/misc_scripts_2.asm +++ b/engine/events/misc_scripts_2.asm @@ -13,7 +13,7 @@ RepelWoreOffScript:: ; 0x13619 HiddenItemScript:: ; 0x13625 opentext copybytetovar EngineBuffer3 - itemtotext 0, 0 + itemtotext USE_SCRIPT_VAR, MEM_BUFFER_0 writetext .found_text giveitem ITEM_FROM_MEM iffalse .bag_full diff --git a/engine/events/move_tutor.asm b/engine/events/move_tutor.asm index a15ecaf93..802b9ef21 100644 --- a/engine/events/move_tutor.asm +++ b/engine/events/move_tutor.asm @@ -22,7 +22,7 @@ Special_MoveTutor: ; 4925b .enter_loop call CheckCanLearnMoveTutorMove jr nc, .loop - xor a + xor a ; FALSE ld [ScriptVar], a jr .quit @@ -35,10 +35,11 @@ Special_MoveTutor: ; 4925b .GetMoveTutorMove: ; 492a5 ld a, [ScriptVar] - cp 1 + cp MOVETUTOR_FLAMETHROWER jr z, .flamethrower - cp 2 + cp MOVETUTOR_THUNDERBOLT jr z, .thunderbolt + ; MOVETUTOR_ICE_BEAM ld a, ICE_BEAM ret diff --git a/engine/events/special.asm b/engine/events/special.asm index 939db4a25..9bd83f068 100755 --- a/engine/events/special.asm +++ b/engine/events/special.asm @@ -1,3 +1,5 @@ +MANIA_OT_ID EQU 00518 + SpecialGiveShuckle: ; 7305 ; Adding to the party. @@ -32,9 +34,9 @@ SpecialGiveShuckle: ; 7305 ; OT ID. ld hl, PartyMon1ID call AddNTimes - ld a, $2 + ld a, HIGH(MANIA_OT_ID) ld [hli], a - ld [hl], $6 + ld [hl], LOW(MANIA_OT_ID) ; Nickname. ld a, [PartyCount] @@ -54,8 +56,7 @@ SpecialGiveShuckle: ; 7305 ; Engine flag for this event. ld hl, wDailyFlags - set 5, [hl] -; setflag ENGINE_SHUCKLE_GIVEN + set 5, [hl] ; ENGINE_SHUCKLE_GIVEN ld a, 1 ld [ScriptVar], a ret @@ -85,10 +86,10 @@ SpecialReturnShuckle: ; 737e ; OT ID ld a, [hli] - cp HIGH(00518) + cp HIGH(MANIA_OT_ID) jr nz, .DontReturn ld a, [hl] - cp LOW(00518) + cp LOW(MANIA_OT_ID) jr nz, .DontReturn ; OT @@ -115,28 +116,28 @@ SpecialReturnShuckle: ; 737e call AddNTimes ld a, [hl] cp 150 - ld a, $3 + ld a, SHUCKIE_HAPPY jr nc, .HappyToStayWithYou xor a ; take from pc ld [wPokemonWithdrawDepositParameter], a callfar RemoveMonFromPartyOrBox - ld a, $2 + ld a, SHUCKIE_RETURNED .HappyToStayWithYou: ld [ScriptVar], a ret .refused - ld a, $1 + ld a, SHUCKIE_REFUSED ld [ScriptVar], a ret .DontReturn: - xor a + xor a ; SHUCKIE_WRONG_MON ld [ScriptVar], a ret .fainted - ld a, $4 + ld a, SHUCKIE_FAINTED ld [ScriptVar], a ret diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm index da2d38138..708165046 100644 --- a/engine/events/std_scripts.asm +++ b/engine/events/std_scripts.asm @@ -113,7 +113,7 @@ PokecenterNurseScript: pause 10 special HealParty playmusic MUSIC_NONE - writebyte 0 ; Machine is at a Pokemon Center + writebyte HEALMACHINE_POKECENTER special HealMachineAnim pause 30 special RestartMapMusic @@ -251,25 +251,25 @@ DayToTextScript: if_equal THURSDAY, .Thursday if_equal FRIDAY, .Friday if_equal SATURDAY, .Saturday - stringtotext .SundayText, 0 + stringtotext .SundayText, MEM_BUFFER_0 end .Monday: - stringtotext .MondayText, 0 + stringtotext .MondayText, MEM_BUFFER_0 end .Tuesday: - stringtotext .TuesdayText, 0 + stringtotext .TuesdayText, MEM_BUFFER_0 end .Wednesday: - stringtotext .WednesdayText, 0 + stringtotext .WednesdayText, MEM_BUFFER_0 end .Thursday: - stringtotext .ThursdayText, 0 + stringtotext .ThursdayText, MEM_BUFFER_0 end .Friday: - stringtotext .FridayText, 0 + stringtotext .FridayText, MEM_BUFFER_0 end .Saturday: - stringtotext .SaturdayText, 0 + stringtotext .SaturdayText, MEM_BUFFER_0 end .SundayText: db "SUNDAY@" @@ -298,7 +298,7 @@ RadioTowerRocketsScript: clearevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST specialphonecall SPECIALCALL_WEIRDBROADCAST - setmapscene MAHOGANY_TOWN, $1 + setmapscene MAHOGANY_TOWN, 1 end BugContestResultsWarpScript: @@ -307,7 +307,7 @@ BugContestResultsWarpScript: setevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY clearevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY setevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE - warp ROUTE_36_NATIONAL_PARK_GATE, $0, $4 + warp ROUTE_36_NATIONAL_PARK_GATE, 0, 4 applymovement PLAYER, Movement_ContestResults_WalkAfterWarp BugContestResultsScript: @@ -321,7 +321,7 @@ BugContestResultsScript: farwritetext ContestResults_ReadyToJudgeText waitbutton special BugContestJudging - RAM2MEM $0 + vartomem MEM_BUFFER_0 if_equal 1, BugContestResults_FirstPlace if_equal 2, BugContestResults_SecondPlace if_equal 3, BugContestResults_ThirdPlace @@ -349,14 +349,15 @@ BugContestResults_FinishUp special ContestReturnMons BugContestResults_DidNotLeaveMons special CheckPartyFullAfterContest - if_equal $0, BugContestResults_CleanUp - if_equal $2, BugContestResults_CleanUp + if_equal BUGCONTEST_CAUGHT_MON, BugContestResults_CleanUp + if_equal BUGCONTEST_NO_CATCH, BugContestResults_CleanUp + ; BUGCONTEST_BOXED_MON farwritetext ContestResults_PartyFullText waitbutton BugContestResults_CleanUp closetext - setscene $0 - setmapscene ROUTE_35_NATIONAL_PARK_GATE, $0 + setscene 0 + setmapscene ROUTE_35_NATIONAL_PARK_GATE, 0 setevent EVENT_BUG_CATCHING_CONTESTANT_1A setevent EVENT_BUG_CATCHING_CONTESTANT_2A setevent EVENT_BUG_CATCHING_CONTESTANT_3A @@ -384,7 +385,7 @@ BugContestResults_CleanUp BugContestResults_FirstPlace ; 0xbc31e setevent EVENT_GAVE_KURT_APRICORNS - itemtotext SUN_STONE, $1 + itemtotext SUN_STONE, MEM_BUFFER_1 farwritetext ContestResults_PlayerWonAPrizeText waitbutton verbosegiveitem SUN_STONE @@ -393,7 +394,7 @@ BugContestResults_FirstPlace ; 0xbc31e ; 0xbc332 BugContestResults_SecondPlace ; 0xbc332 - itemtotext EVERSTONE, $1 + itemtotext EVERSTONE, MEM_BUFFER_1 farwritetext ContestResults_PlayerWonAPrizeText waitbutton verbosegiveitem EVERSTONE @@ -402,7 +403,7 @@ BugContestResults_SecondPlace ; 0xbc332 ; 0xbc343 BugContestResults_ThirdPlace ; 0xbc343 - itemtotext GOLD_BERRY, $1 + itemtotext GOLD_BERRY, MEM_BUFFER_1 farwritetext ContestResults_PlayerWonAPrizeText waitbutton verbosegiveitem GOLD_BERRY @@ -1759,7 +1760,7 @@ RematchGiftFScript: end GymStatue1Script: - mapnametotext $0 + mapnametotext MEM_BUFFER_0 opentext farwritetext GymStatue_CityGymText waitbutton @@ -1767,7 +1768,7 @@ GymStatue1Script: end GymStatue2Script: - mapnametotext $0 + mapnametotext MEM_BUFFER_0 opentext farwritetext GymStatue_CityGymText buttonsound @@ -1813,18 +1814,18 @@ CoinVendor_IntroScript: ; 0xbcde0 loadmenudata .MenuDataHeader verticalmenu closewindow - if_equal $1, .Buy50 - if_equal $2, .Buy500 + if_equal 1, .Buy50 + if_equal 2, .Buy500 jump .Cancel ; 0xbcdf7 .Buy50: ; 0xbcdf7 checkcoins MAX_COINS - 50 - if_equal $0, .CoinCaseFull - checkmoney $0, 1000 - if_equal $2, .NotEnoughMoney + if_equal HAVE_MORE, .CoinCaseFull + checkmoney YOUR_MONEY, 1000 + if_equal HAVE_LESS, .NotEnoughMoney givecoins 50 - takemoney $0, 1000 + takemoney YOUR_MONEY, 1000 waitsfx playsound SFX_TRANSACTION farwritetext CoinVendor_Buy50CoinsText @@ -1834,11 +1835,11 @@ CoinVendor_IntroScript: ; 0xbcde0 .Buy500: ; 0xbce1b checkcoins MAX_COINS - 500 - if_equal $0, .CoinCaseFull - checkmoney $0, 10000 - if_equal $2, .NotEnoughMoney + if_equal HAVE_MORE, .CoinCaseFull + checkmoney YOUR_MONEY, 10000 + if_equal HAVE_LESS, .NotEnoughMoney givecoins 500 - takemoney $0, 10000 + takemoney YOUR_MONEY, 10000 waitsfx playsound SFX_TRANSACTION farwritetext CoinVendor_Buy500CoinsText diff --git a/engine/events/whiteout.asm b/engine/events/whiteout.asm index a9d6f900e..14a7066f1 100755 --- a/engine/events/whiteout.asm +++ b/engine/events/whiteout.asm @@ -4,7 +4,7 @@ Script_BattleWhiteout:: ; 0x124c1 ; 0x124c8 Script_OverworldWhiteout:: ; 0x124c8 - refreshscreen $0 + refreshscreen callasm OverworldBGMap Script_Whiteout: ; 0x124ce diff --git a/engine/mail.asm b/engine/mail.asm index 0335a6dfe..c860693be 100755 --- a/engine/mail.asm +++ b/engine/mail.asm @@ -128,7 +128,7 @@ CheckPokeItem:: ; 44654 push bc push de farcall SelectMonFromParty - ld a, $2 + ld a, POKEMAIL_REFUSED jr c, .pop_return ld a, [CurPartyMon] @@ -137,7 +137,7 @@ CheckPokeItem:: ; 44654 call AddNTimes ld d, [hl] farcall ItemIsMail - ld a, $3 + ld a, POKEMAIL_NO_MAIL jr nc, .pop_return ld a, BANK(sPartyMail) @@ -162,7 +162,7 @@ CheckPokeItem:: ; 44654 cp "@" jr z, .done cp c - ld a, $0 + ld a, POKEMAIL_WRONG_MAIL jr nz, .close_sram_return inc hl inc de @@ -173,12 +173,12 @@ CheckPokeItem:: ; 44654 .done farcall CheckCurPartyMonFainted - ld a, $4 + ld a, POKEMAIL_LAST_MON jr c, .close_sram_return xor a ld [wPokemonWithdrawDepositParameter], a farcall RemoveMonFromPartyOrBox - ld a, $1 + ld a, POKEMAIL_CORRECT .close_sram_return call CloseSRAM diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm index 9a22ff143..630249bf2 100644 --- a/engine/phone/phone.asm +++ b/engine/phone/phone.asm @@ -437,7 +437,7 @@ WrongNumber: ; 90233 ; 90241 Script_ReceivePhoneCall: ; 0x90241 - refreshscreen $0 + refreshscreen callasm RingTwice_StartCall ptcall wPhoneScriptPointer waitbutton diff --git a/engine/phone/phone_scripts.asm b/engine/phone/phone_scripts.asm index 62eb4ac87..c34113437 100644 --- a/engine/phone/phone_scripts.asm +++ b/engine/phone/phone_scripts.asm @@ -20,10 +20,10 @@ MomPhoneScript: ; 0xbceaa iftrue MomPhoneHangUpScript farwritetext MomPhoneGreetingText buttonsound - mapnametotext $0 + mapnametotext MEM_BUFFER_0 checkcode VAR_ROOFPALETTE - if_equal $1, MomPhonePalette1 - if_equal $2, MomPhonePalette2 + if_equal 1, MomPhonePalette1 + if_equal 2, MomPhonePalette2 jump MomPhoneOther MomPhoneLandmark: ; 0xbcedf @@ -53,13 +53,13 @@ MomPhonePalette1: ; 0xbcee7 jump MomSavingMoney .violet ; 0xbcf15 - landmarktotext SPROUT_TOWER, 1 + landmarktotext SPROUT_TOWER, MEM_BUFFER_1 jump MomPhoneLandmark .azalea ; 0xbcf1b - landmarktotext SLOWPOKE_WELL, 1 + landmarktotext SLOWPOKE_WELL, MEM_BUFFER_1 jump MomPhoneLandmark .goldenrod ; 0xbcf21 - landmarktotext RADIO_TOWER, 1 + landmarktotext RADIO_TOWER, MEM_BUFFER_1 jump MomPhoneLandmark MomPhonePalette2: ; 0xbcf27 @@ -75,17 +75,17 @@ MomPhoneOther: ; 0xbcf2f MomSavingMoney: ; 0xbcf37 checkflag ENGINE_MOM_SAVING_MONEY iffalse MomIsNotSaving - checkmoney $1, 0 - if_equal $0, MomSavingHasMoney + checkmoney MOMS_MONEY, 0 + if_equal HAVE_MORE, MomSavingHasMoney jump MomSavingButBroke MomIsNotSaving: ; 0xbcf49 - checkmoney $1, 0 - if_equal $0, MomHasMoney + checkmoney MOMS_MONEY, 0 + if_equal HAVE_MORE, MomHasMoney jump MomHasNoMoney MomSavingHasMoney: ; 0xbcf55 - readmoney $1, $0 + readmoney MOMS_MONEY, MEM_BUFFER_0 farwritetext MomCheckBalanceText yesorno iftrue MomPhoneSaveMoneyScript @@ -104,7 +104,7 @@ MomHasNoMoney: ; 0xbcf6e jump MomPhoneWontSaveMoneyScript MomHasMoney: ; 0xbcf79 - readmoney $1, $0 + readmoney MOMS_MONEY, MEM_BUFFER_0 farwritetext MomYouveSavedText yesorno iftrue MomPhoneSaveMoneyScript @@ -172,9 +172,9 @@ BillPhoneScript1: ; 0xbcfc5 farwritetext BillPhoneGeneriText buttonsound checkcode VAR_BOXSPACE - RAM2MEM $0 - if_equal $0, .full - if_less_than $6, .nearlyfull + vartomem MEM_BUFFER_0 + if_equal 0, .full + if_less_than PARTY_LENGTH, .nearlyfull farwritetext BillPhoneNotFullText end @@ -195,7 +195,7 @@ BillPhoneScript2: ; 0xbd007 ElmPhoneScript1: ; 0xbd00d checkcode VAR_SPECIALPHONECALL - if_equal $1, .pokerus + if_equal SPECIALCALL_POKERUS, .pokerus checkevent EVENT_SHOWED_TOGEPI_TO_ELM iftrue .discovery checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE @@ -242,8 +242,8 @@ ElmPhoneScript1: ; 0xbd00d end .discovery ; 0xbd069 - random $2 - if_equal $0, .nextdiscovery + random 2 + if_equal 0, .nextdiscovery farwritetext ElmPhoneDiscovery1Text end @@ -258,11 +258,11 @@ ElmPhoneScript1: ; 0xbd00d ElmPhoneScript2: ; 0xbd081 checkcode VAR_SPECIALPHONECALL - if_equal $2, .disaster - if_equal $3, .assistant - if_equal $4, .rocket - if_equal $5, .gift - if_equal $8, .gift + if_equal SPECIALCALL_ROBBED, .disaster + if_equal SPECIALCALL_ASSISTANT, .assistant + if_equal SPECIALCALL_WEIRDBROADCAST, .rocket + if_equal SPECIALCALL_SSTICKET, .gift + if_equal SPECIALCALL_MASTERBALL, .gift farwritetext ElmPhonePokerusText specialphonecall SPECIALCALL_NONE end @@ -299,7 +299,7 @@ ElmPhoneScript2: ; 0xbd081 ; Jack JackPhoneScript1: - trainertotext SCHOOLBOY, JACK1, $0 + trainertotext SCHOOLBOY, JACK1, MEM_BUFFER_0 checkflag ENGINE_JACK iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -314,31 +314,31 @@ JackPhoneScript1: farjump JackPhoneTips .WantsBattle: - landmarktotext NATIONAL_PARK, $2 + landmarktotext NATIONAL_PARK, MEM_BUFFER_2 farjump JackWantsBattleScript JackPhoneScript2: - trainertotext SCHOOLBOY, JACK1, $0 + trainertotext SCHOOLBOY, JACK1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male farscall PhoneScript_Random2 - if_equal $0, JackBattleTrivia + if_equal 0, JackBattleTrivia checkflag ENGINE_JACK iftrue .WaitingForBattle checkflag ENGINE_JACK_MONDAY_MORNING iftrue .WaitingForBattle farscall PhoneScript_Random2 - if_equal $0, JackWantsToBattle + if_equal 0, JackWantsToBattle .WaitingForBattle: farscall PhoneScript_Random3 - if_equal $0, JackFindsRare + if_equal 0, JackFindsRare farjump Phone_GenericCall_Male JackMondayMorning: setflag ENGINE_JACK_MONDAY_MORNING JackWantsToBattle: - landmarktotext NATIONAL_PARK, $2 + landmarktotext NATIONAL_PARK, MEM_BUFFER_2 setflag ENGINE_JACK farjump PhoneScript_WantsToBattle_Male @@ -351,36 +351,36 @@ JackBattleTrivia: ; Beverly BeverlyPhoneScript1: - trainertotext POKEFANF, BEVERLY1, $0 + trainertotext POKEFANF, BEVERLY1, MEM_BUFFER_0 farscall PhoneScript_AnswerPhone_Female checkflag ENGINE_BEVERLY_HAS_NUGGET iftrue .HasNugget farjump UnknownScript_0xa0900 .HasNugget: - landmarktotext NATIONAL_PARK, $2 + landmarktotext NATIONAL_PARK, MEM_BUFFER_2 farjump UnknownScript_0xa0aa5 BeverlyPhoneScript2: - trainertotext POKEFANF, BEVERLY1, $0 + trainertotext POKEFANF, BEVERLY1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Female checkflag ENGINE_BEVERLY_HAS_NUGGET iftrue .HasNugget farscall PhoneScript_Random4 - if_equal $0, .FoundNugget + if_equal 0, .FoundNugget .HasNugget: farjump Phone_GenericCall_Female .FoundNugget: setflag ENGINE_BEVERLY_HAS_NUGGET - landmarktotext NATIONAL_PARK, $2 + landmarktotext NATIONAL_PARK, MEM_BUFFER_2 farjump PhoneScript_FoundItem_Female ; Huey HueyPhoneScript1: - trainertotext SAILOR, HUEY1, $0 + trainertotext SAILOR, HUEY1, MEM_BUFFER_0 checkflag ENGINE_HUEY iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -396,19 +396,19 @@ HueyPhoneScript1: farjump UnknownScript_0xa0908 .WantsBattle: - landmarktotext LIGHTHOUSE, $2 + landmarktotext LIGHTHOUSE, MEM_BUFFER_2 farjump HueyWantsBattleScript HueyPhoneScript2: - trainertotext SAILOR, HUEY1, $0 + trainertotext SAILOR, HUEY1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_HUEY iftrue .Flavor checkflag ENGINE_HUEY_WEDNESDAY_NIGHT iftrue .Flavor farscall PhoneScript_Random3 - if_equal $0, HueyWantsBattle - if_equal $1, HueyWantsBattle + if_equal 0, HueyWantsBattle + if_equal 1, HueyWantsBattle .Flavor: farjump PhoneScript_MonFlavorText @@ -417,14 +417,14 @@ HueyWednesdayNight: setflag ENGINE_HUEY_WEDNESDAY_NIGHT HueyWantsBattle: - landmarktotext LIGHTHOUSE, $2 + landmarktotext LIGHTHOUSE, MEM_BUFFER_2 setflag ENGINE_HUEY farjump PhoneScript_WantsToBattle_Male ; Gaven GavenPhoneScript1: - trainertotext COOLTRAINERM, GAVEN3, $0 + trainertotext COOLTRAINERM, GAVEN3, MEM_BUFFER_0 checkflag ENGINE_GAVEN iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -439,29 +439,29 @@ GavenPhoneScript1: farjump UnknownScript_0xa0910 .WantsBattle: - landmarktotext ROUTE_26, $2 + landmarktotext ROUTE_26, MEM_BUFFER_2 farjump UnknownScript_0xa0a37 GavenPhoneScript2: - trainertotext COOLTRAINERM, GAVEN3, $0 + trainertotext COOLTRAINERM, GAVEN3, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_GAVEN iftrue .WaitingForBattle checkflag ENGINE_GAVEN_THURSDAY_MORNING iftrue .WaitingForBattle farscall PhoneScript_Random2 - if_equal $0, GavenWantsRematch + if_equal 0, GavenWantsRematch .WaitingForBattle: farscall PhoneScript_Random3 - if_equal $0, GavenFoundRare + if_equal 0, GavenFoundRare farjump Phone_GenericCall_Male GavenThursdayMorning: setflag ENGINE_GAVEN_THURSDAY_MORNING GavenWantsRematch: - landmarktotext ROUTE_26, $2 + landmarktotext ROUTE_26, MEM_BUFFER_2 setflag ENGINE_GAVEN farjump PhoneScript_WantsToBattle_Male @@ -471,7 +471,7 @@ GavenFoundRare: ; Beth BethPhoneScript1: - trainertotext COOLTRAINERF, BETH1, $0 + trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0 checkflag ENGINE_BETH iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Female @@ -486,18 +486,18 @@ BethPhoneScript1: farjump UnknownScript_0xa0918 .WantsBattle: - landmarktotext ROUTE_26, $2 + landmarktotext ROUTE_26, MEM_BUFFER_2 farjump BethBattleReminderScript BethPhoneScript2: - trainertotext COOLTRAINERF, BETH1, $0 + trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Female checkflag ENGINE_BETH iftrue .Generic checkflag ENGINE_BETH_FRIDAY_AFTERNOON iftrue .Generic farscall PhoneScript_Random2 - if_equal $0, BethWantsBattle + if_equal 0, BethWantsBattle .Generic: farjump Phone_GenericCall_Female @@ -506,14 +506,14 @@ BethFridayAfternoon: setflag ENGINE_BETH_FRIDAY_AFTERNOON BethWantsBattle: - landmarktotext ROUTE_26, $2 + landmarktotext ROUTE_26, MEM_BUFFER_2 setflag ENGINE_BETH farjump PhoneScript_WantsToBattle_Female ; Jose JosePhoneScript1: - trainertotext BIRD_KEEPER, JOSE2, $0 + trainertotext BIRD_KEEPER, JOSE2, MEM_BUFFER_0 checkflag ENGINE_JOSE iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -530,15 +530,15 @@ JosePhoneScript1: farjump UnknownScript_0xa0920 .WantsBattle: - landmarktotext ROUTE_27, $2 + landmarktotext ROUTE_27, MEM_BUFFER_2 farjump UnknownScript_0xa0a41 .HasItem: - landmarktotext ROUTE_27, $2 + landmarktotext ROUTE_27, MEM_BUFFER_2 farjump UnknownScript_0xa0a41 JosePhoneScript2: - trainertotext BIRD_KEEPER, JOSE2, $0 + trainertotext BIRD_KEEPER, JOSE2, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_JOSE iftrue .Generic @@ -547,20 +547,20 @@ JosePhoneScript2: checkflag ENGINE_JOSE_HAS_STAR_PIECE iftrue .Generic farscall PhoneScript_Random3 - if_equal $0, JoseWantsBattle + if_equal 0, JoseWantsBattle farscall PhoneScript_Random3 - if_equal $0, JoseHasStarPiece + if_equal 0, JoseHasStarPiece .Generic: farscall PhoneScript_Random3 - if_equal $0, JoseFoundRare + if_equal 0, JoseFoundRare farjump Phone_GenericCall_Male JoseSaturdayNight: setflag ENGINE_JOSE_SATURDAY_NIGHT JoseWantsBattle: - landmarktotext ROUTE_27, $2 + landmarktotext ROUTE_27, MEM_BUFFER_2 setflag ENGINE_JOSE farjump PhoneScript_WantsToBattle_Male @@ -569,13 +569,13 @@ JoseFoundRare: JoseHasStarPiece: setflag ENGINE_JOSE_HAS_STAR_PIECE - landmarktotext ROUTE_27, $2 + landmarktotext ROUTE_27, MEM_BUFFER_2 farjump PhoneScript_FoundItem_Male ; Reena ReenaPhoneScript1: - trainertotext COOLTRAINERF, REENA1, $0 + trainertotext COOLTRAINERF, REENA1, MEM_BUFFER_0 checkflag ENGINE_REENA iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Female @@ -590,18 +590,18 @@ ReenaPhoneScript1: farjump UnknownScript_0xa0928 .WantsBattle: - landmarktotext ROUTE_27, $2 + landmarktotext ROUTE_27, MEM_BUFFER_2 farjump UnknownScript_0xa0a46 ReenaPhoneScript2: - trainertotext COOLTRAINERF, REENA1, $0 + trainertotext COOLTRAINERF, REENA1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Female checkflag ENGINE_REENA iftrue .Generic checkflag ENGINE_REENA_SUNDAY_MORNING iftrue .Generic farscall PhoneScript_Random2 - if_equal $0, ReenaWantsBattle + if_equal 0, ReenaWantsBattle .Generic: farjump Phone_GenericCall_Female @@ -610,14 +610,14 @@ ReenaSundayMorning: setflag ENGINE_REENA_SUNDAY_MORNING ReenaWantsBattle: - landmarktotext ROUTE_27, $2 + landmarktotext ROUTE_27, MEM_BUFFER_2 setflag ENGINE_REENA farjump PhoneScript_WantsToBattle_Female ; Joey JoeyPhoneScript1: - trainertotext YOUNGSTER, JOEY1, $0 + trainertotext YOUNGSTER, JOEY1, MEM_BUFFER_0 checkflag ENGINE_JOEY iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -633,19 +633,19 @@ JoeyPhoneScript1: farjump UnknownScript_0xa0930 .WantsBattle: - landmarktotext ROUTE_30, $2 + landmarktotext ROUTE_30, MEM_BUFFER_2 farjump UnknownScript_0xa0a4b JoeyPhoneScript2: - trainertotext YOUNGSTER, JOEY1, $0 + trainertotext YOUNGSTER, JOEY1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_JOEY iftrue .Generic checkflag ENGINE_JOEY_MONDAY_AFTERNOON iftrue .Generic farscall PhoneScript_Random3 - if_equal $0, JoeyWantsBattle - if_equal $1, JoeyWantsBattle + if_equal 0, JoeyWantsBattle + if_equal 1, JoeyWantsBattle .Generic: farjump Phone_GenericCall_Male @@ -654,14 +654,14 @@ JoeyMondayAfternoon: setflag ENGINE_JOEY_MONDAY_AFTERNOON JoeyWantsBattle: - landmarktotext ROUTE_30, $2 + landmarktotext ROUTE_30, MEM_BUFFER_2 setflag ENGINE_JOEY farjump PhoneScript_WantsToBattle_Male ; Wade WadePhoneScript1: - trainertotext BUG_CATCHER, WADE1, $0 + trainertotext BUG_CATCHER, WADE1, MEM_BUFFER_0 checkflag ENGINE_WADE iftrue WadeWantsBattle farscall PhoneScript_AnswerPhone_Male @@ -676,7 +676,7 @@ WadePhoneScript1: .NotTuesday: farscall PhoneScript_Random2 - if_equal $0, .NoContest + if_equal 0, .NoContest checkflag ENGINE_DAILY_BUG_CONTEST iftrue .NoContest checkcode VAR_WEEKDAY @@ -691,18 +691,18 @@ WadeContestToday: farjump PhoneScript_BugCatchingContest WadeWantsBattle: - landmarktotext ROUTE_31, $2 + landmarktotext ROUTE_31, MEM_BUFFER_2 farjump UnknownScript_0xa0a50 WadeHasItem: - landmarktotext ROUTE_31, $2 + landmarktotext ROUTE_31, MEM_BUFFER_2 farjump UnknownScript_0xa0ab5 WadePhoneScript2: - trainertotext BUG_CATCHER, WADE1, $0 + trainertotext BUG_CATCHER, WADE1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male farscall PhoneScript_Random2 - if_equal $0, .NoContest + if_equal 0, .NoContest checkflag ENGINE_DAILY_BUG_CONTEST iftrue .NoContest checkcode VAR_WEEKDAY @@ -718,15 +718,15 @@ WadePhoneScript2: checkflag ENGINE_WADE_HAS_ITEM iftrue .next farscall PhoneScript_Random2 - if_equal $0, WadeHasItem2 + if_equal 0, WadeHasItem2 checkflag ENGINE_FLYPOINT_GOLDENROD iffalse .next farscall PhoneScript_Random2 - if_equal $0, WadeWantsBattle2 + if_equal 0, WadeWantsBattle2 .next: farscall PhoneScript_Random3 - if_equal $0, WadeFoundRare + if_equal 0, WadeFoundRare farjump Phone_GenericCall_Male Wade_ContestToday: @@ -736,7 +736,7 @@ WadeTuesdayNight: setflag ENGINE_WADE_TUESDAY_NIGHT WadeWantsBattle2: - landmarktotext ROUTE_31, $2 + landmarktotext ROUTE_31, MEM_BUFFER_2 setflag ENGINE_WADE farjump PhoneScript_WantsToBattle_Male @@ -745,16 +745,16 @@ WadeFoundRare: WadeHasItem2: setflag ENGINE_WADE_HAS_ITEM - landmarktotext ROUTE_31, $2 + landmarktotext ROUTE_31, MEM_BUFFER_2 clearevent EVENT_WADE_HAS_BERRY clearevent EVENT_WADE_HAS_PSNCUREBERRY clearevent EVENT_WADE_HAS_PRZCUREBERRY clearevent EVENT_WADE_HAS_BITTER_BERRY - random $4 - if_equal $0, .Berry - if_equal $1, .PsnCureBerry - if_equal $2, .PrzCureBerry - if_equal $3, .Bitterberry + random 4 + if_equal 0, .Berry + if_equal 1, .PsnCureBerry + if_equal 2, .PrzCureBerry + if_equal 3, .Bitterberry .Berry: setevent EVENT_WADE_HAS_BERRY @@ -777,7 +777,7 @@ WadeHasItem2: ; Ralph RalphPhoneScript1: - trainertotext FISHER, RALPH1, $0 + trainertotext FISHER, RALPH1, MEM_BUFFER_0 checkflag ENGINE_RALPH iftrue Ralph_Rematch farscall PhoneScript_AnswerPhone_Male @@ -793,15 +793,15 @@ Ralph_CheckSwarm: farjump UnknownScript_0xa0940 Ralph_Rematch: - landmarktotext ROUTE_32, $2 + landmarktotext ROUTE_32, MEM_BUFFER_2 farjump UnknownScript_0xa0a55 Ralph_ReportSwarm: - landmarktotext ROUTE_32, $2 + landmarktotext ROUTE_32, MEM_BUFFER_2 farjump UnknownScript_0xa0af5 RalphPhoneScript2: - trainertotext FISHER, RALPH1, $0 + trainertotext FISHER, RALPH1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_FLYPOINT_GOLDENROD iffalse Ralph_CheckSwarm2 @@ -810,16 +810,16 @@ RalphPhoneScript2: checkflag ENGINE_RALPH_WEDNESDAY_MORNING iftrue Ralph_CheckSwarm2 farscall PhoneScript_Random2 - if_equal $0, Ralph_FightMe + if_equal 0, Ralph_FightMe Ralph_CheckSwarm2: farscall PhoneScript_Random5 - if_equal $0, Ralph_SetUpSwarm + if_equal 0, Ralph_SetUpSwarm farjump Phone_GenericCall_Male Ralph_WednesdayMorning: setflag ENGINE_RALPH_WEDNESDAY_MORNING Ralph_FightMe: - landmarktotext ROUTE_32, $2 + landmarktotext ROUTE_32, MEM_BUFFER_2 setflag ENGINE_RALPH farjump PhoneScript_WantsToBattle_Male @@ -827,8 +827,8 @@ Ralph_SetUpSwarm: checkflag ENGINE_SPECIAL_WILDDATA iftrue .Generic setflag ENGINE_SPECIAL_WILDDATA - pokenamemem QWILFISH, $1 - landmarktotext ROUTE_32, $2 + pokenamemem QWILFISH, MEM_BUFFER_1 + landmarktotext ROUTE_32, MEM_BUFFER_2 writebyte FISHSWARM_QWILFISH special Special_ActivateFishingSwarm farjump UnknownScript_0xa05d6 @@ -839,7 +839,7 @@ Ralph_SetUpSwarm: ; Liz LizPhoneScript1: - trainertotext PICNICKER, LIZ1, $0 + trainertotext PICNICKER, LIZ1, MEM_BUFFER_0 checkflag ENGINE_LIZ iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Female @@ -855,13 +855,13 @@ LizPhoneScript1: farjump UnknownScript_0xa0948 .WantsBattle: - landmarktotext ROUTE_32, $2 + landmarktotext ROUTE_32, MEM_BUFFER_2 farjump UnknownScript_0xa0a5a LizPhoneScript2: - trainertotext PICNICKER, LIZ1, $0 + trainertotext PICNICKER, LIZ1, MEM_BUFFER_0 farscall PhoneScript_Random4 - if_equal $0, LizWrongNumber + if_equal 0, LizWrongNumber farscall PhoneScript_GreetPhone_Female checkflag ENGINE_LIZ iftrue .next @@ -870,11 +870,11 @@ LizPhoneScript2: .next: farscall PhoneScript_Random2 - if_equal $0, LizGossip + if_equal 0, LizGossip checkflag ENGINE_FLYPOINT_GOLDENROD iffalse .Generic farscall PhoneScript_Random2 - if_equal $0, LizWantsBattle + if_equal 0, LizWantsBattle .Generic: farjump Phone_GenericCall_Female @@ -883,7 +883,7 @@ LizThursdayAfternoon: setflag ENGINE_LIZ_THURSDAY_AFTERNOON LizWantsBattle: - landmarktotext ROUTE_32, $2 + landmarktotext ROUTE_32, MEM_BUFFER_2 setflag ENGINE_LIZ farjump PhoneScript_WantsToBattle_Female @@ -891,51 +891,51 @@ LizWrongNumber: farjump LizWrongNumberScript LizGossip: - random $9 - if_equal $0, .CoolTrainerM - if_equal $1, .Beauty - if_equal $2, .Grunt - if_equal $3, .Teacher - if_equal $4, .SwimmerF - if_equal $5, .KimonoGirl - if_equal $6, .Skier - if_equal $7, .Medium - if_equal $8, .PokefanM + random 9 + if_equal 0, .CoolTrainerM + if_equal 1, .Beauty + if_equal 2, .Grunt + if_equal 3, .Teacher + if_equal 4, .SwimmerF + if_equal 5, .KimonoGirl + if_equal 6, .Skier + if_equal 7, .Medium + if_equal 8, .PokefanM .CoolTrainerM: - trainerclassname COOLTRAINERM, $1 + trainerclassname COOLTRAINERM, NICK jump LizGossipScript .Beauty: - trainerclassname BEAUTY, $1 + trainerclassname BEAUTY, VICTORIA jump LizGossipScript .Grunt: - trainerclassname GRUNTM, $1 + trainerclassname GRUNTM, GRUNTM_1 jump LizGossipScript .Teacher: - trainerclassname TEACHER, $1 + trainerclassname TEACHER, COLETTE jump LizGossipScript .SwimmerF: - trainerclassname SWIMMERF, $1 + trainerclassname SWIMMERF, ELAINE jump LizGossipScript .KimonoGirl: - trainerclassname KIMONO_GIRL, $1 + trainerclassname KIMONO_GIRL, NAOKO1 jump LizGossipScript .Skier: - trainerclassname SKIER, $1 + trainerclassname SKIER, ROXANNE jump LizGossipScript .Medium: - trainerclassname MEDIUM, $1 + trainerclassname MEDIUM, MARTHA jump LizGossipScript .PokefanM: - trainerclassname POKEFANM, $1 + trainerclassname POKEFANM, WILLIAM jump LizGossipScript LizGossipScript: @@ -944,7 +944,7 @@ LizGossipScript: ; Anthony AnthonyPhoneScript1: - trainertotext HIKER, ANTHONY2, $0 + trainertotext HIKER, ANTHONY2, MEM_BUFFER_0 checkflag ENGINE_ANTHONY iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -961,15 +961,15 @@ AnthonyPhoneScript1: farjump UnknownScript_0xa0950 .WantsBattle: - landmarktotext ROUTE_33, $2 + landmarktotext ROUTE_33, MEM_BUFFER_2 farjump UnknownScript_0xa0a5f .AlreadySwarming: - landmarktotext ROUTE_33, $2 + landmarktotext ROUTE_33, MEM_BUFFER_2 farjump UnknownScript_0xa0afa AnthonyPhoneScript2: - trainertotext HIKER, ANTHONY2, $0 + trainertotext HIKER, ANTHONY2, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_FLYPOINT_GOLDENROD iffalse .TriesSwarm @@ -978,18 +978,18 @@ AnthonyPhoneScript2: checkflag ENGINE_ANTHONY_FRIDAY_NIGHT iftrue .TriesSwarm farscall PhoneScript_Random2 - if_equal $0, AnthonyWantsBattle + if_equal 0, AnthonyWantsBattle .TriesSwarm: farscall PhoneScript_Random5 - if_equal $0, AnthonyTriesDunsparceSwarm + if_equal 0, AnthonyTriesDunsparceSwarm farjump Phone_GenericCall_Male AnthonyFridayNight: setflag ENGINE_ANTHONY_FRIDAY_NIGHT AnthonyWantsBattle: - landmarktotext ROUTE_33, $2 + landmarktotext ROUTE_33, MEM_BUFFER_2 setflag ENGINE_ANTHONY farjump PhoneScript_WantsToBattle_Male @@ -997,9 +997,9 @@ AnthonyTriesDunsparceSwarm: checkflag ENGINE_DUNSPARCE_SWARM iftrue .Generic setflag ENGINE_DUNSPARCE_SWARM - pokenamemem DUNSPARCE, $1 + pokenamemem DUNSPARCE, MEM_BUFFER_1 swarm SWARM_DUNSPARCE, DARK_CAVE_VIOLET_ENTRANCE - landmarktotext DARK_CAVE, $2 + landmarktotext DARK_CAVE, MEM_BUFFER_2 farjump UnknownScript_0xa05de .Generic: @@ -1008,7 +1008,7 @@ AnthonyTriesDunsparceSwarm: ; Todd ToddPhoneScript1: - trainertotext CAMPER, TODD1, $0 + trainertotext CAMPER, TODD1, MEM_BUFFER_0 checkflag ENGINE_TODD iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -1025,14 +1025,14 @@ ToddPhoneScript1: farjump UnknownScript_0xa0958 .WantsBattle: - landmarktotext ROUTE_34, $2 + landmarktotext ROUTE_34, MEM_BUFFER_2 farjump UnknownScript_0xa0a64 .SaleOn: farjump UnknownScript_0xa0b04 ToddPhoneScript2: - trainertotext CAMPER, TODD1, $0 + trainertotext CAMPER, TODD1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_TODD iftrue .TryForSale @@ -1041,22 +1041,22 @@ ToddPhoneScript2: checkflag ENGINE_FLYPOINT_GOLDENROD iffalse ToddNoGoldenrod farscall PhoneScript_Random2 - if_equal $0, ToddWantsBattle + if_equal 0, ToddWantsBattle .TryForSale: farscall PhoneScript_Random2 - if_equal $0, ToddDeptStoreSale + if_equal 0, ToddDeptStoreSale ToddNoGoldenrod: farscall PhoneScript_Random3 - if_equal $0, ToddFoundRare + if_equal 0, ToddFoundRare farjump Phone_GenericCall_Male ToddSaturdayMorning: setflag ENGINE_TODD_SATURDAY_MORNING ToddWantsBattle: - landmarktotext ROUTE_34, $2 + landmarktotext ROUTE_34, MEM_BUFFER_2 setflag ENGINE_TODD farjump PhoneScript_WantsToBattle_Male @@ -1070,7 +1070,7 @@ ToddDeptStoreSale: ; Gina GinaPhoneScript1: - trainertotext PICNICKER, GINA1, $0 + trainertotext PICNICKER, GINA1, MEM_BUFFER_0 checkflag ENGINE_GINA iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Female @@ -1092,15 +1092,15 @@ GinaPhoneScript1: farjump UnknownScript_0xa05c6 .WantsBattle: - landmarktotext ROUTE_34, $2 + landmarktotext ROUTE_34, MEM_BUFFER_2 farjump UnknownScript_0xa0a69 .HasLeafStone: - landmarktotext ROUTE_34, $2 + landmarktotext ROUTE_34, MEM_BUFFER_2 farjump UnknownScript_0xa0abd GinaPhoneScript2: - trainertotext PICNICKER, GINA1, $0 + trainertotext PICNICKER, GINA1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Female checkflag ENGINE_ROCKETS_IN_RADIO_TOWER iftrue GinaRockets @@ -1113,15 +1113,15 @@ GinaPhoneScript2: checkevent EVENT_GINA_GAVE_LEAF_STONE iftrue .GaveLeafStone farscall PhoneScript_Random2 - if_equal $0, GinaHasLeafStone + if_equal 0, GinaHasLeafStone .GaveLeafStone: farscall PhoneScript_Random11 - if_equal $0, GinaHasLeafStone + if_equal 0, GinaHasLeafStone checkflag ENGINE_FLYPOINT_GOLDENROD iffalse .Generic farscall PhoneScript_Random3 - if_equal $0, GinaWantsBattle + if_equal 0, GinaWantsBattle .Generic: farjump Phone_GenericCall_Female @@ -1130,7 +1130,7 @@ GinaSundayDay: setflag ENGINE_GINA_SUNDAY_AFTERNOON GinaWantsBattle: - landmarktotext ROUTE_34, $2 + landmarktotext ROUTE_34, MEM_BUFFER_2 setflag ENGINE_GINA farjump PhoneScript_WantsToBattle_Female @@ -1139,13 +1139,13 @@ GinaRockets: GinaHasLeafStone: setflag ENGINE_GINA_HAS_LEAF_STONE - landmarktotext ROUTE_34, $2 + landmarktotext ROUTE_34, MEM_BUFFER_2 farjump PhoneScript_FoundItem_Female ; Irwin IrwinPhoneScript1: - trainertotext JUGGLER, IRWIN1, $0 + trainertotext JUGGLER, IRWIN1, MEM_BUFFER_0 farscall PhoneScript_AnswerPhone_Male checkflag ENGINE_ROCKETS_IN_RADIO_TOWER iftrue .Rockets @@ -1155,7 +1155,7 @@ IrwinPhoneScript1: farjump IrwinRocketRumor IrwinPhoneScript2: - trainertotext JUGGLER, IRWIN1, $0 + trainertotext JUGGLER, IRWIN1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_ROCKETS_IN_RADIO_TOWER iftrue .Rockets @@ -1167,7 +1167,7 @@ IrwinPhoneScript2: ; Arnie ArniePhoneScript1: - trainertotext BUG_CATCHER, ARNIE1, $0 + trainertotext BUG_CATCHER, ARNIE1, MEM_BUFFER_0 checkflag ENGINE_ARNIE iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -1184,35 +1184,35 @@ ArniePhoneScript1: farjump UnknownScript_0xa0968 .WantsBattle: - landmarktotext ROUTE_35, $2 + landmarktotext ROUTE_35, MEM_BUFFER_2 farjump UnknownScript_0xa0a6e .AlreadySwarming: - landmarktotext ROUTE_35, $2 + landmarktotext ROUTE_35, MEM_BUFFER_2 farjump UnknownScript_0xa0aff ArniePhoneScript2: - trainertotext BUG_CATCHER, ARNIE1, $0 + trainertotext BUG_CATCHER, ARNIE1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_ARNIE iftrue .Swarm checkflag ENGINE_ARNIE_TUESDAY_MORNING iftrue .Swarm farscall PhoneScript_Random2 - if_equal $0, ArnieWantsBattle + if_equal 0, ArnieWantsBattle .Swarm: farscall PhoneScript_Random5 - if_equal $0, ArnieYanmaSwarm + if_equal 0, ArnieYanmaSwarm farscall PhoneScript_Random3 - if_equal $0, ArnieFoundRare + if_equal 0, ArnieFoundRare farjump Phone_GenericCall_Male ArnieTuesdayMorning: setflag ENGINE_ARNIE_TUESDAY_MORNING ArnieWantsBattle: - landmarktotext ROUTE_35, $2 + landmarktotext ROUTE_35, MEM_BUFFER_2 setflag ENGINE_ARNIE farjump PhoneScript_WantsToBattle_Male @@ -1220,9 +1220,9 @@ ArnieYanmaSwarm: ; start swarm checkflag ENGINE_YANMA_SWARM iftrue ArnieYanmaAlreadySwarming setflag ENGINE_YANMA_SWARM - pokenamemem YANMA, $1 + pokenamemem YANMA, MEM_BUFFER_1 swarm SWARM_YANMA, ROUTE_35 - landmarktotext ROUTE_35, $2 + landmarktotext ROUTE_35, MEM_BUFFER_2 farjump UnknownScript_0xa05ce ArnieFoundRare: @@ -1234,7 +1234,7 @@ ArnieYanmaAlreadySwarming: ; Alan AlanPhoneScript1: - trainertotext SCHOOLBOY, ALAN1, $0 + trainertotext SCHOOLBOY, ALAN1, MEM_BUFFER_0 checkflag ENGINE_ALAN iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -1251,15 +1251,15 @@ AlanPhoneScript1: farjump UnknownScript_0xa0970 .WantsBattle: - landmarktotext ROUTE_36, $2 + landmarktotext ROUTE_36, MEM_BUFFER_2 farjump UnknownScript_0xa0a73 .FireStone: - landmarktotext ROUTE_36, $2 + landmarktotext ROUTE_36, MEM_BUFFER_2 farjump UnknownScript_0xa0ac5 AlanPhoneScript2: - trainertotext SCHOOLBOY, ALAN1, $0 + trainertotext SCHOOLBOY, ALAN1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_ALAN iftrue AlanGenericCall @@ -1268,15 +1268,15 @@ AlanPhoneScript2: checkflag ENGINE_ALAN_HAS_FIRE_STONE iftrue AlanGenericCall farscall PhoneScript_Random3 - if_equal $0, AlanWantsBattle + if_equal 0, AlanWantsBattle checkevent EVENT_ALAN_GAVE_FIRE_STONE iftrue .FireStone farscall PhoneScript_Random2 - if_equal $0, AlanHasFireStone + if_equal 0, AlanHasFireStone .FireStone: farscall PhoneScript_Random11 - if_equal $0, AlanHasFireStone + if_equal 0, AlanHasFireStone AlanGenericCall: farjump Phone_GenericCall_Male @@ -1285,19 +1285,19 @@ AlanWednesdayDay: setflag ENGINE_ALAN_WEDNESDAY_AFTERNOON AlanWantsBattle: - landmarktotext ROUTE_36, $2 + landmarktotext ROUTE_36, MEM_BUFFER_2 setflag ENGINE_ALAN farjump PhoneScript_WantsToBattle_Male AlanHasFireStone: setflag ENGINE_ALAN_HAS_FIRE_STONE - landmarktotext ROUTE_36, $2 + landmarktotext ROUTE_36, MEM_BUFFER_2 farjump PhoneScript_FoundItem_Male ; Dana DanaPhoneScript1: - trainertotext LASS, DANA1, $0 + trainertotext LASS, DANA1, MEM_BUFFER_0 checkflag ENGINE_DANA iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Female @@ -1314,15 +1314,15 @@ DanaPhoneScript1: farjump UnknownScript_0xa0978 .WantsBattle: - landmarktotext ROUTE_38, $2 + landmarktotext ROUTE_38, MEM_BUFFER_2 farjump UnknownScript_0xa0a78 .HasThunderstone: - landmarktotext ROUTE_38, $2 + landmarktotext ROUTE_38, MEM_BUFFER_2 farjump UnknownScript_0xa0acd DanaPhoneScript2: - trainertotext LASS, DANA1, $0 + trainertotext LASS, DANA1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Female checkflag ENGINE_DANA iftrue .Generic @@ -1331,26 +1331,26 @@ DanaPhoneScript2: checkflag ENGINE_DANA_HAS_THUNDERSTONE iftrue .Generic farscall PhoneScript_Random3 - if_equal $0, DanaWantsBattle + if_equal 0, DanaWantsBattle checkevent EVENT_DANA_GAVE_THUNDERSTONE iftrue .Thunderstone farscall PhoneScript_Random2 - if_equal $0, DanaHasThunderstone + if_equal 0, DanaHasThunderstone .Thunderstone: farscall PhoneScript_Random11 - if_equal $0, DanaHasThunderstone + if_equal 0, DanaHasThunderstone .Generic: farscall PhoneScript_Random3 - if_equal $0, DanaFoundRare + if_equal 0, DanaFoundRare farjump Phone_GenericCall_Female DanaThursdayNight: setflag ENGINE_DANA_THURSDAY_NIGHT DanaWantsBattle: - landmarktotext ROUTE_38, $2 + landmarktotext ROUTE_38, MEM_BUFFER_2 setflag ENGINE_DANA farjump PhoneScript_WantsToBattle_Female @@ -1359,13 +1359,13 @@ DanaFoundRare: DanaHasThunderstone: setflag ENGINE_DANA_HAS_THUNDERSTONE - landmarktotext ROUTE_38, $2 + landmarktotext ROUTE_38, MEM_BUFFER_2 farjump PhoneScript_FoundItem_Female ; Chad ChadPhoneScript1: - trainertotext SCHOOLBOY, CHAD1, $0 + trainertotext SCHOOLBOY, CHAD1, MEM_BUFFER_0 checkflag ENGINE_CHAD iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -1380,31 +1380,31 @@ ChadPhoneScript1: farjump UnknownScript_0xa0980 .WantsBattle: - landmarktotext ROUTE_38, $2 + landmarktotext ROUTE_38, MEM_BUFFER_2 farjump UnknownScript_0xa0a7d ChadPhoneScript2: - trainertotext SCHOOLBOY, CHAD1, $0 + trainertotext SCHOOLBOY, CHAD1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male farscall PhoneScript_Random2 - if_equal $0, ChadOakGossip + if_equal 0, ChadOakGossip checkflag ENGINE_CHAD iftrue .Generic checkflag ENGINE_CHAD_FRIDAY_MORNING iftrue .Generic farscall PhoneScript_Random2 - if_equal $0, ChadWantsBattle + if_equal 0, ChadWantsBattle .Generic: farscall PhoneScript_Random3 - if_equal $0, ChadFoundRare + if_equal 0, ChadFoundRare farjump Phone_GenericCall_Male ChadFridayMorning: setflag ENGINE_CHAD_FRIDAY_MORNING ChadWantsBattle: - landmarktotext ROUTE_38, $2 + landmarktotext ROUTE_38, MEM_BUFFER_2 setflag ENGINE_CHAD farjump PhoneScript_WantsToBattle_Male @@ -1415,12 +1415,12 @@ ChadOakGossip: farjump ChadOakGossipScript DerekPhoneScript1: - trainertotext POKEFANM, DEREK1, $0 + trainertotext POKEFANM, DEREK1, MEM_BUFFER_0 farscall PhoneScript_AnswerPhone_Male checkflag ENGINE_DEREK_HAS_NUGGET iftrue .Nugget farscall PhoneScript_Random2 - if_equal $0, .NoContest + if_equal 0, .NoContest checkflag ENGINE_DAILY_BUG_CONTEST iftrue .NoContest checkcode VAR_WEEKDAY @@ -1435,14 +1435,14 @@ DerekPhoneScript1: farjump PhoneScript_BugCatchingContest .Nugget: - landmarktotext ROUTE_39, $2 + landmarktotext ROUTE_39, MEM_BUFFER_2 farjump UnknownScript_0xa0ad5 DerekPhoneScript2: - trainertotext POKEFANM, DEREK1, $0 + trainertotext POKEFANM, DEREK1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male farscall PhoneScript_Random2 - if_equal $0, .NoContest + if_equal 0, .NoContest checkflag ENGINE_DAILY_BUG_CONTEST iftrue .NoContest checkcode VAR_WEEKDAY @@ -1452,7 +1452,7 @@ DerekPhoneScript2: .NoContest: farscall PhoneScript_Random4 - if_equal $0, .Nugget + if_equal 0, .Nugget farjump Phone_GenericCall_Male .ContestToday: @@ -1460,11 +1460,11 @@ DerekPhoneScript2: .Nugget: setflag ENGINE_DEREK_HAS_NUGGET - landmarktotext ROUTE_39, $2 + landmarktotext ROUTE_39, MEM_BUFFER_2 farjump PhoneScript_FoundItem_Male TullyPhoneScript1: - trainertotext FISHER, TULLY1, $0 + trainertotext FISHER, TULLY1, MEM_BUFFER_0 checkflag ENGINE_TULLY iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -1481,15 +1481,15 @@ TullyPhoneScript1: farjump UnknownScript_0xa0990 .WantsBattle: - landmarktotext ROUTE_42, $2 + landmarktotext ROUTE_42, MEM_BUFFER_2 farjump UnknownScript_0xa0a82 TullyHasWaterStone: - landmarktotext ROUTE_42, $2 + landmarktotext ROUTE_42, MEM_BUFFER_2 farjump UnknownScript_0xa0add TullyPhoneScript2: - trainertotext FISHER, TULLY1, $0 + trainertotext FISHER, TULLY1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_TULLY iftrue .Generic @@ -1498,15 +1498,15 @@ TullyPhoneScript2: checkflag ENGINE_TULLY_HAS_WATER_STONE iftrue .Generic farscall PhoneScript_Random3 - if_equal $0, TullyWantsBattle + if_equal 0, TullyWantsBattle checkevent EVENT_TULLY_GAVE_WATER_STONE iftrue .WaterStone farscall PhoneScript_Random2 - if_equal $0, TullyFoundWaterStone + if_equal 0, TullyFoundWaterStone .WaterStone: farscall PhoneScript_Random11 - if_equal $0, TullyFoundWaterStone + if_equal 0, TullyFoundWaterStone .Generic: farjump Phone_GenericCall_Male @@ -1515,17 +1515,17 @@ TullySundayNight: setflag ENGINE_TULLY_SUNDAY_NIGHT TullyWantsBattle: - landmarktotext ROUTE_42, $2 + landmarktotext ROUTE_42, MEM_BUFFER_2 setflag ENGINE_TULLY farjump PhoneScript_WantsToBattle_Male TullyFoundWaterStone: setflag ENGINE_TULLY_HAS_WATER_STONE - landmarktotext ROUTE_42, $2 + landmarktotext ROUTE_42, MEM_BUFFER_2 farjump PhoneScript_FoundItem_Male BrentPhoneScript1: - trainertotext POKEMANIAC, BRENT1, $0 + trainertotext POKEMANIAC, BRENT1, MEM_BUFFER_0 checkflag ENGINE_BRENT iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -1540,20 +1540,20 @@ BrentPhoneScript1: farjump UnknownScript_0xa0998 .WantsBattle: - landmarktotext ROUTE_43, $2 + landmarktotext ROUTE_43, MEM_BUFFER_2 farjump UnknownScript_0xa0a87 BrentPhoneScript2: - trainertotext POKEMANIAC, BRENT1, $0 + trainertotext POKEMANIAC, BRENT1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male farscall PhoneScript_Random2 - if_equal $0, BrentBillTrivia + if_equal 0, BrentBillTrivia checkflag ENGINE_BRENT iftrue .Generic checkflag ENGINE_BRENT_MONDAY_MORNING iftrue .Generic farscall PhoneScript_Random2 - if_equal $0, BrentWantsBattle + if_equal 0, BrentWantsBattle .Generic: farjump Phone_GenericCall_Male @@ -1562,7 +1562,7 @@ BrentMondayMorning: setflag ENGINE_BRENT_MONDAY_MORNING BrentWantsBattle: - landmarktotext ROUTE_43, $2 + landmarktotext ROUTE_43, MEM_BUFFER_2 setflag ENGINE_BRENT farjump PhoneScript_WantsToBattle_Male @@ -1570,7 +1570,7 @@ BrentBillTrivia: farjump BrentBillTriviaScript TiffanyPhoneScript1: - trainertotext PICNICKER, TIFFANY3, $0 + trainertotext PICNICKER, TIFFANY3, MEM_BUFFER_0 checkflag ENGINE_TIFFANY iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Female @@ -1587,17 +1587,17 @@ TiffanyPhoneScript1: farjump UnknownScript_0xa09a0 .WantsBattle: - landmarktotext ROUTE_43, $2 + landmarktotext ROUTE_43, MEM_BUFFER_2 farjump UnknownScript_0xa0a8c .HasItem: - landmarktotext ROUTE_43, $2 + landmarktotext ROUTE_43, MEM_BUFFER_2 farjump UnknownScript_0xa0ae5 TiffanyPhoneScript2: - trainertotext PICNICKER, TIFFANY3, $0 + trainertotext PICNICKER, TIFFANY3, MEM_BUFFER_0 farscall PhoneScript_Random4 - if_equal $0, TiffanysFamilyMembers + if_equal 0, TiffanysFamilyMembers farscall PhoneScript_GreetPhone_Female checkflag ENGINE_TIFFANY iftrue TiffanyGenericCall @@ -1606,15 +1606,15 @@ TiffanyPhoneScript2: checkflag ENGINE_TIFFANY_HAS_PINK_BOW iftrue TiffanyGenericCall farscall PhoneScript_Random3 - if_equal $0, TiffanyWantsBattle + if_equal 0, TiffanyWantsBattle checkevent EVENT_TIFFANY_GAVE_PINK_BOW iftrue .PinkBow farscall PhoneScript_Random2 - if_equal $0, TiffanyHasPinkBow + if_equal 0, TiffanyHasPinkBow .PinkBow: farscall PhoneScript_Random11 - if_equal $0, TiffanyHasPinkBow + if_equal 0, TiffanyHasPinkBow TiffanyGenericCall: farjump Phone_GenericCall_Female @@ -1623,41 +1623,41 @@ TiffanyTuesdayAfternoon: setflag ENGINE_TIFFANY_TUESDAY_AFTERNOON TiffanyWantsBattle: - landmarktotext ROUTE_43, $2 + landmarktotext ROUTE_43, MEM_BUFFER_2 setflag ENGINE_TIFFANY farjump PhoneScript_WantsToBattle_Female TiffanysFamilyMembers: - random $6 - if_equal $0, .Grandma - if_equal $1, .Grandpa - if_equal $2, .Mom - if_equal $3, .Dad - if_equal $4, .Sister - if_equal $5, .Brother + random 6 + if_equal 0, .Grandma + if_equal 1, .Grandpa + if_equal 2, .Mom + if_equal 3, .Dad + if_equal 4, .Sister + if_equal 5, .Brother .Grandma: - stringtotext GrandmaString, $1 + stringtotext GrandmaString, MEM_BUFFER_1 jump TiffanysPoorClefairy .Grandpa: - stringtotext GrandpaString, $1 + stringtotext GrandpaString, MEM_BUFFER_1 jump TiffanysPoorClefairy .Mom: - stringtotext MomString, $1 + stringtotext MomString, MEM_BUFFER_1 jump TiffanysPoorClefairy .Dad: - stringtotext DadString, $1 + stringtotext DadString, MEM_BUFFER_1 jump TiffanysPoorClefairy .Sister: - stringtotext SisterString, $1 + stringtotext SisterString, MEM_BUFFER_1 jump TiffanysPoorClefairy .Brother: - stringtotext BrotherString, $1 + stringtotext BrotherString, MEM_BUFFER_1 jump TiffanysPoorClefairy TiffanysPoorClefairy: @@ -1665,13 +1665,13 @@ TiffanysPoorClefairy: TiffanyHasPinkBow: setflag ENGINE_TIFFANY_HAS_PINK_BOW - landmarktotext ROUTE_43, $2 + landmarktotext ROUTE_43, MEM_BUFFER_2 farjump PhoneScript_FoundItem_Female ; Vance VancePhoneScript1: - trainertotext BIRD_KEEPER, VANCE1, $0 + trainertotext BIRD_KEEPER, VANCE1, MEM_BUFFER_0 checkflag ENGINE_VANCE iftrue VanceWantsBattle farscall PhoneScript_AnswerPhone_Male @@ -1686,19 +1686,19 @@ VancePhoneScript1: farjump VanceLookingForward VanceWantsBattle: - landmarktotext ROUTE_44, $2 + landmarktotext ROUTE_44, MEM_BUFFER_2 farjump VanceHurryHurry VancePhoneScript2: - trainertotext BIRD_KEEPER, VANCE1, $0 + trainertotext BIRD_KEEPER, VANCE1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_VANCE iftrue .WantsBattle checkflag ENGINE_VANCE_WEDNESDAY_NIGHT iftrue .WantsBattle farscall PhoneScript_Random3 - if_equal $0, VanceWantsRematch - if_equal $1, VanceWantsRematch + if_equal 0, VanceWantsRematch + if_equal 1, VanceWantsRematch .WantsBattle: farjump Phone_GenericCall_Male @@ -1707,12 +1707,12 @@ VanceWednesdayNight: setflag ENGINE_VANCE_WEDNESDAY_NIGHT VanceWantsRematch: - landmarktotext ROUTE_44, $2 + landmarktotext ROUTE_44, MEM_BUFFER_2 setflag ENGINE_VANCE farjump PhoneScript_WantsToBattle_Male WiltonPhoneScript1: - trainertotext FISHER, WILTON1, $0 + trainertotext FISHER, WILTON1, MEM_BUFFER_0 checkflag ENGINE_WILTON iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -1729,15 +1729,15 @@ WiltonPhoneScript1: farjump WiltonHaventFoundAnything .WantsBattle: - landmarktotext ROUTE_44, $2 + landmarktotext ROUTE_44, MEM_BUFFER_2 farjump WiltonNotBiting .HasItem: - landmarktotext ROUTE_44, $2 + landmarktotext ROUTE_44, MEM_BUFFER_2 farjump WiltonWantThis WiltonPhoneScript2: - trainertotext FISHER, WILTON1, $0 + trainertotext FISHER, WILTON1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_WILTON iftrue .GenericCall @@ -1746,9 +1746,9 @@ WiltonPhoneScript2: checkflag ENGINE_WILTON_HAS_ITEM iftrue .GenericCall farscall PhoneScript_Random2 - if_equal $0, WiltonWantsBattle + if_equal 0, WiltonWantsBattle farscall PhoneScript_Random2 - if_equal $0, WiltonHasItem + if_equal 0, WiltonHasItem .GenericCall: farjump Phone_GenericCall_Male @@ -1757,20 +1757,20 @@ WiltonThursdayMorning: setflag ENGINE_WILTON_THURSDAY_MORNING WiltonWantsBattle: - landmarktotext ROUTE_44, $2 + landmarktotext ROUTE_44, MEM_BUFFER_2 setflag ENGINE_WILTON farjump PhoneScript_WantsToBattle_Male WiltonHasItem: setflag ENGINE_WILTON_HAS_ITEM - landmarktotext ROUTE_44, $2 + landmarktotext ROUTE_44, MEM_BUFFER_2 clearevent EVENT_WILTON_HAS_ULTRA_BALL clearevent EVENT_WILTON_HAS_GREAT_BALL clearevent EVENT_WILTON_HAS_POKE_BALL - random $5 - if_equal $0, .UltraBall - random $3 - if_equal $0, .GreatBall + random 5 + if_equal 0, .UltraBall + random 3 + if_equal 0, .GreatBall jump .PokeBall .UltraBall: @@ -1790,19 +1790,19 @@ WiltonHasItem: ; Kenji KenjiPhoneScript1: - trainertotext BLACKBELT_T, KENJI3, $0 + trainertotext BLACKBELT_T, KENJI3, MEM_BUFFER_0 farscall PhoneScript_AnswerPhone_Male farjump KenjiAnswerPhoneScript KenjiPhoneScript2: - trainertotext BLACKBELT_T, KENJI3, $0 + trainertotext BLACKBELT_T, KENJI3, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male farjump KenjiCallingPhoneScript ; Parry ParryPhoneScript1: - trainertotext HIKER, PARRY1, $0 + trainertotext HIKER, PARRY1, MEM_BUFFER_0 checkflag ENGINE_PARRY iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Male @@ -1817,19 +1817,19 @@ ParryPhoneScript1: farjump ParryBattleWithMe .WantsBattle: - landmarktotext ROUTE_45, $2 + landmarktotext ROUTE_45, MEM_BUFFER_2 farjump ParryHaventYouGottenTo ParryPhoneScript2: - trainertotext HIKER, PARRY1, $0 + trainertotext HIKER, PARRY1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Male checkflag ENGINE_PARRY iftrue .GenericCall checkflag ENGINE_PARRY_FRIDAY_AFTERNOON iftrue .GenericCall farscall PhoneScript_Random2 - if_equal $0, ParryWantsBattle - if_equal $1, ParryWantsBattle + if_equal 0, ParryWantsBattle + if_equal 1, ParryWantsBattle .GenericCall: farjump Phone_GenericCall_Male @@ -1838,14 +1838,14 @@ ParryFridayDay: setflag ENGINE_PARRY_FRIDAY_AFTERNOON ParryWantsBattle: - landmarktotext ROUTE_45, $2 + landmarktotext ROUTE_45, MEM_BUFFER_2 setflag ENGINE_PARRY farjump PhoneScript_WantsToBattle_Male ; Erin ErinPhoneScript1: - trainertotext PICNICKER, ERIN1, $0 + trainertotext PICNICKER, ERIN1, MEM_BUFFER_0 checkflag ENGINE_ERIN iftrue .WantsBattle farscall PhoneScript_AnswerPhone_Female @@ -1860,19 +1860,19 @@ ErinPhoneScript1: farjump ErinWorkingHardScript .WantsBattle: - landmarktotext ROUTE_46, $2 + landmarktotext ROUTE_46, MEM_BUFFER_2 farjump ErinComeBattleScript ErinPhoneScript2: - trainertotext PICNICKER, ERIN1, $0 + trainertotext PICNICKER, ERIN1, MEM_BUFFER_0 farscall PhoneScript_GreetPhone_Female checkflag ENGINE_ERIN iftrue .GenericCall checkflag ENGINE_ERIN_SATURDAY_NIGHT iftrue .GenericCall farscall PhoneScript_Random3 - if_equal $0, ErinWantsBattle - if_equal $1, ErinWantsBattle + if_equal 0, ErinWantsBattle + if_equal 1, ErinWantsBattle .GenericCall: farjump Phone_GenericCall_Female @@ -1881,6 +1881,6 @@ ErinSaturdayNight: setflag ENGINE_ERIN_SATURDAY_NIGHT ErinWantsBattle: - landmarktotext ROUTE_46, $2 + landmarktotext ROUTE_46, MEM_BUFFER_2 setflag ENGINE_ERIN farjump PhoneScript_WantsToBattle_Female diff --git a/engine/scripting.asm b/engine/scripting.asm index a7650351a..c2cfe8e15 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -128,7 +128,7 @@ ScriptCommandTable: dw Script_warp ; 3c dw Script_readmoney ; 3d dw Script_readcoins ; 3e - dw Script_RAM2MEM ; 3f + dw Script_vartomem ; 3f dw Script_pokenamemem ; 40 dw Script_itemtotext ; 41 dw Script_mapnametotext ; 42 @@ -728,14 +728,14 @@ Script_askforphonenumber: ld c, a farcall AddPhoneNumber jr c, .phonefull - xor a + xor a ; PHONE_CONTACT_GOT jr .done .phonefull - ld a, 1 + ld a, PHONE_CONTACTS_FULL jr .done .refused call GetScriptByte - ld a, 2 + ld a, PHONE_CONTACT_REFUSED .done ld [ScriptVar], a ret @@ -1880,7 +1880,7 @@ Script_checkver: Script_pokenamemem: ; script command 0x40 -; parameters: pokemon (0 to use ScriptVar), memory +; parameters: pokemon (0 aka USE_SCRIPT_VAR to use ScriptVar), memory call GetScriptByte and a @@ -1893,7 +1893,7 @@ Script_pokenamemem: ConvertMemToText: call GetScriptByte - cp 3 + cp NUM_MEM_BUFFERS jr c, .ok xor a .ok @@ -1907,10 +1907,10 @@ CopyConvertedText: Script_itemtotext: ; script command 0x41 -; parameters: item (0 to use ScriptVar), memory +; parameters: item (0 aka USE_SCRIPT_VAR to use ScriptVar), memory call GetScriptByte - and a + and a ; USE_SCRIPT_VAR jr nz, .ok ld a, [ScriptVar] .ok @@ -1999,7 +1999,7 @@ Script_readcoins: ld de, StringBuffer1 jp ConvertMemToText -Script_RAM2MEM: +Script_vartomem: ; script command 0x3f ; parameters: memory @@ -2150,15 +2150,15 @@ Script_checkmoney: farcall CompareMoney CompareMoneyAction: - jr c, .two - jr z, .one - ld a, 0 + jr c, .less + jr z, .exact + ld a, HAVE_MORE jr .done -.one - ld a, 1 +.exact + ld a, HAVE_AMOUNT jr .done -.two - ld a, 2 +.less + ld a, HAVE_LESS .done ld [ScriptVar], a ret @@ -2166,9 +2166,9 @@ CompareMoneyAction: GetMoneyAccount: call GetScriptByte and a - ld de, Money + ld de, Money ; YOUR_MONEY ret z - ld de, wMomsMoney + ld de, wMomsMoney ; MOMS_MONEY ret LoadMoneyAmountToMem: @@ -2431,7 +2431,7 @@ Script_checkflag: ld e, a call GetScriptByte ld d, a - ld b, 2 ; check + ld b, CHECK_FLAG call _EngineFlagAction ld a, c and a @@ -2667,7 +2667,7 @@ Script_loadbytec2cf: ld [wc2cf], a ret - ld c, c ; XXX + db $49 ; XXX Script_closetext: ; script command 0x49 diff --git a/engine/specials.asm b/engine/specials.asm index cd2394b96..a08f1ac85 100644 --- a/engine/specials.asm +++ b/engine/specials.asm @@ -603,13 +603,13 @@ SpecialGameboyCheck: ; c478 jr nz, .sgb .gb - xor a + xor a ; GBCHECK_GB jr .done .sgb - ld a, 1 + ld a, GBCHECK_SGB jr .done .cgb - ld a, 2 + ld a, GBCHECK_CGB .done ld [ScriptVar], a ret diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index 694a7cd12..40a5bbf46 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -424,9 +424,9 @@ readcoins: MACRO db \1 ; memory ENDM - enum RAM2MEM_command ; $3f -RAM2MEM: MACRO - db RAM2MEM_command + enum vartomem_command ; $3f +vartomem: MACRO + db vartomem_command db \1 ; memory ENDM @@ -483,7 +483,11 @@ ENDM enum refreshscreen_command ; $48 refreshscreen: MACRO db refreshscreen_command +if _NARG == 1 db \1 ; dummy +else + db 0 +endc ENDM enum closetext_command ; $49 diff --git a/maps/AzaleaGym.asm b/maps/AzaleaGym.asm index b73a00a03..c10add3c4 100644 --- a/maps/AzaleaGym.asm +++ b/maps/AzaleaGym.asm @@ -146,7 +146,7 @@ AzaleaGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext BUGSY, BUGSY1, $1 + trainertotext BUGSY, BUGSY1, MEM_BUFFER_1 jumpstd gymstatue2 BugsyText_INeverLose: diff --git a/maps/BattleTower1F.asm b/maps/BattleTower1F.asm index b769b0429..aafa5698c 100644 --- a/maps/BattleTower1F.asm +++ b/maps/BattleTower1F.asm @@ -125,7 +125,7 @@ Script_GivePlayerHisPrize: ; 0x9e47a writebyte BATTLETOWERACTION_GIVEREWARD special BattleTowerAction if_equal POTION, Script_YourPackIsStuffedFull - itemtotext $0, $1 + itemtotext USE_SCRIPT_VAR, MEM_BUFFER_1 giveitem ITEM_FROM_MEM, 5 writetext Text_PlayerGotFive writebyte BATTLETOWERACTION_1D diff --git a/maps/BattleTowerBattleRoom.asm b/maps/BattleTowerBattleRoom.asm index 3b2916f56..82e1ea21e 100644 --- a/maps/BattleTowerBattleRoom.asm +++ b/maps/BattleTowerBattleRoom.asm @@ -29,7 +29,7 @@ Script_BattleRoomLoop: ; 0x9f425 waitsfx applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksIn opentext - battletowertext 1 + battletowertext $1 buttonsound closetext special BattleTowerBattle ; calls predef startbattle diff --git a/maps/BlackthornGym1F.asm b/maps/BlackthornGym1F.asm index 0d654d5c8..4ea64fd18 100644 --- a/maps/BlackthornGym1F.asm +++ b/maps/BlackthornGym1F.asm @@ -70,7 +70,7 @@ BlackthornGymClairScript: buttonsound giveitem TM_DRAGONBREATH iffalse .BagFull - itemtotext TM_DRAGONBREATH, $0 + itemtotext TM_DRAGONBREATH, MEM_BUFFER_0 writetext BlackthornGymText_ReceivedTM24 playsound SFX_ITEM waitsfx @@ -146,7 +146,7 @@ BlackthornGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext CLAIR, CLAIR1, $1 + trainertotext CLAIR, CLAIR1, MEM_BUFFER_1 jumpstd gymstatue2 ClairIntroText: diff --git a/maps/BluesHouse.asm b/maps/BluesHouse.asm index 9a40a68f6..0203e7522 100644 --- a/maps/BluesHouse.asm +++ b/maps/BluesHouse.asm @@ -27,8 +27,8 @@ DaisyScript: writetext DaisyWhichMonText waitbutton special Special_DaisyMassage - if_equal 0, .Refused - if_equal 1, .CantGroomEgg + if_equal $0, .Refused + if_equal $1, .CantGroomEgg setflag ENGINE_TEA_IN_BLUES_HOUSE writetext DaisyAlrightText waitbutton diff --git a/maps/BurnedTowerB1F.asm b/maps/BurnedTowerB1F.asm index 935c14516..0125d41a9 100644 --- a/maps/BurnedTowerB1F.asm +++ b/maps/BurnedTowerB1F.asm @@ -92,7 +92,7 @@ ReleaseTheBeasts: setevent EVENT_BURNED_TOWER_MORTY setevent EVENT_BURNED_TOWER_1F_EUSINE appear BURNEDTOWERB1F_EUSINE - refreshscreen $0 + refreshscreen changeblock 6, 14, $1b reloadmappart closetext @@ -106,7 +106,7 @@ BurnedTowerB1FEusine: waitbutton closetext checkcode VAR_FACING - if_equal $1, .Movement + if_equal UP, .Movement applymovement BURNEDTOWERB1F_EUSINE, BurnedTowerB1FEusineMovement1 jump UnknownScript_0x18622a diff --git a/maps/CeladonCafe.asm b/maps/CeladonCafe.asm index de89b1953..9a1b58799 100644 --- a/maps/CeladonCafe.asm +++ b/maps/CeladonCafe.asm @@ -96,7 +96,7 @@ CeladonCafeTrashcan: giveitem LEFTOVERS iffalse .PackFull opentext - itemtotext LEFTOVERS, $0 + itemtotext LEFTOVERS, MEM_BUFFER_0 writetext FoundLeftoversText playsound SFX_ITEM waitsfx @@ -107,7 +107,7 @@ CeladonCafeTrashcan: .PackFull: opentext - itemtotext LEFTOVERS, $0 + itemtotext LEFTOVERS, MEM_BUFFER_0 writetext FoundLeftoversText buttonsound writetext NoRoomForLeftoversText diff --git a/maps/CeladonDeptStore6F.asm b/maps/CeladonDeptStore6F.asm index ad34df21f..95c0f6199 100644 --- a/maps/CeladonDeptStore6F.asm +++ b/maps/CeladonDeptStore6F.asm @@ -11,7 +11,7 @@ CeladonDeptStore6F_MapScriptHeader: dbw MAPCALLBACK_TILES, .Callback .Callback: - changeblock 12, 0, $3 + changeblock 12, 0, $03 return CeladonDeptStore6FSuperNerdScript: @@ -28,37 +28,37 @@ CeladonDeptStore6FVendingMachine: loadmenudata .MenuData verticalmenu closewindow - if_equal $1, .FreshWater - if_equal $2, .SodaPop - if_equal $3, .Lemonade + if_equal 1, .FreshWater + if_equal 2, .SodaPop + if_equal 3, .Lemonade closetext end .FreshWater: - checkmoney $0, 200 - if_equal $2, .NotEnoughMoney + checkmoney YOUR_MONEY, 200 + if_equal HAVE_LESS, .NotEnoughMoney giveitem FRESH_WATER iffalse .NotEnoughSpace - takemoney $0, 200 - itemtotext FRESH_WATER, $0 + takemoney YOUR_MONEY, 200 + itemtotext FRESH_WATER, MEM_BUFFER_0 jump .VendItem .SodaPop: - checkmoney $0, 300 - if_equal $2, .NotEnoughMoney + checkmoney YOUR_MONEY, 300 + if_equal HAVE_LESS, .NotEnoughMoney giveitem SODA_POP iffalse .NotEnoughSpace - takemoney $0, 300 - itemtotext SODA_POP, $0 + takemoney YOUR_MONEY, 300 + itemtotext SODA_POP, MEM_BUFFER_0 jump .VendItem .Lemonade: - checkmoney $0, 350 - if_equal $2, .NotEnoughMoney + checkmoney YOUR_MONEY, 350 + if_equal HAVE_LESS, .NotEnoughMoney giveitem LEMONADE iffalse .NotEnoughSpace - takemoney $0, 350 - itemtotext LEMONADE, $0 + takemoney YOUR_MONEY, 350 + itemtotext LEMONADE, MEM_BUFFER_0 jump .VendItem .VendItem: diff --git a/maps/CeladonGameCorner.asm b/maps/CeladonGameCorner.asm index d35b1a45b..42eea1775 100644 --- a/maps/CeladonGameCorner.asm +++ b/maps/CeladonGameCorner.asm @@ -59,8 +59,8 @@ CeladonGameCornerFisherScript: checkitem COIN_CASE iffalse .NoCoinCase checkcoins MAX_COINS - 1 - if_equal $0, .FullCoinCase - stringtotext .coinname, $1 + if_equal HAVE_MORE, .FullCoinCase + stringtotext .coinname, MEM_BUFFER_1 scall .GiveCoins givecoins 18 setevent EVENT_GOT_COINS_FROM_GAMBLER_AT_CELADON @@ -111,23 +111,23 @@ CeladonGameCornerPoster2Script: jumptext CeladonGameCornerPoster2Text CeladonGameCornerLuckySlotMachineScript: - random $6 - if_equal $0, CeladonGameCornerSlotMachineScript - refreshscreen $0 - writebyte $0 + random 6 + if_equal 0, CeladonGameCornerSlotMachineScript + refreshscreen + writebyte FALSE special Special_SlotMachine closetext end CeladonGameCornerSlotMachineScript: - refreshscreen $0 - writebyte $1 + refreshscreen + writebyte TRUE special Special_SlotMachine closetext end CeladonGameCornerCardFlipScript: - refreshscreen $0 + refreshscreen special Special_CardFlip closetext end diff --git a/maps/CeladonGameCornerPrizeRoom.asm b/maps/CeladonGameCornerPrizeRoom.asm index 7f74c684f..3918c86fa 100644 --- a/maps/CeladonGameCornerPrizeRoom.asm +++ b/maps/CeladonGameCornerPrizeRoom.asm @@ -28,15 +28,15 @@ CeladonPrizeRoom_tmcounterloop: loadmenudata CeladonPrizeRoom_TMMenuDataHeader verticalmenu closewindow - if_equal $1, .doubleteam - if_equal $2, .psychic - if_equal $3, .hyperbeam + if_equal 1, .doubleteam + if_equal 2, .psychic + if_equal 3, .hyperbeam jump CeladonPrizeRoom_cancel .doubleteam checkcoins 1500 - if_equal $2, CeladonPrizeRoom_notenoughcoins - itemtotext TM_DOUBLE_TEAM, $0 + if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins + itemtotext TM_DOUBLE_TEAM, MEM_BUFFER_0 scall CeladonPrizeRoom_askbuy iffalse CeladonPrizeRoom_cancel giveitem TM_DOUBLE_TEAM @@ -46,8 +46,8 @@ CeladonPrizeRoom_tmcounterloop: .psychic checkcoins 3500 - if_equal $2, CeladonPrizeRoom_notenoughcoins - itemtotext TM_PSYCHIC_M, $0 + if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins + itemtotext TM_PSYCHIC_M, MEM_BUFFER_0 scall CeladonPrizeRoom_askbuy iffalse CeladonPrizeRoom_cancel giveitem TM_PSYCHIC_M @@ -57,8 +57,8 @@ CeladonPrizeRoom_tmcounterloop: .hyperbeam checkcoins 7500 - if_equal $2, CeladonPrizeRoom_notenoughcoins - itemtotext TM_HYPER_BEAM, $0 + if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins + itemtotext TM_HYPER_BEAM, MEM_BUFFER_0 scall CeladonPrizeRoom_askbuy iffalse CeladonPrizeRoom_cancel giveitem TM_HYPER_BEAM @@ -132,17 +132,17 @@ GoldenrodGameCornerPokemonVendor: loadmenudata .MenuDataHeader verticalmenu closewindow - if_equal $1, .pikachu - if_equal $2, .porygon - if_equal $3, .larvitar + if_equal 1, .pikachu + if_equal 2, .porygon + if_equal 3, .larvitar jump CeladonPrizeRoom_cancel .pikachu checkcoins 2222 - if_equal $2, CeladonPrizeRoom_notenoughcoins + if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins checkcode VAR_PARTYCOUNT - if_equal $6, CeladonPrizeRoom_notenoughroom - pokenamemem PIKACHU, $0 + if_equal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom + pokenamemem PIKACHU, MEM_BUFFER_0 scall CeladonPrizeRoom_askbuy iffalse CeladonPrizeRoom_cancel waitsfx @@ -157,10 +157,10 @@ GoldenrodGameCornerPokemonVendor: .porygon checkcoins 5555 - if_equal $2, CeladonPrizeRoom_notenoughcoins + if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins checkcode VAR_PARTYCOUNT - if_equal $6, CeladonPrizeRoom_notenoughroom - pokenamemem PORYGON, $0 + if_equal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom + pokenamemem PORYGON, MEM_BUFFER_0 scall CeladonPrizeRoom_askbuy iffalse CeladonPrizeRoom_cancel waitsfx @@ -175,10 +175,10 @@ GoldenrodGameCornerPokemonVendor: .larvitar checkcoins 8888 - if_equal $2, CeladonPrizeRoom_notenoughcoins + if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins checkcode VAR_PARTYCOUNT - if_equal $6, CeladonPrizeRoom_notenoughroom - pokenamemem LARVITAR, $0 + if_equal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom + pokenamemem LARVITAR, MEM_BUFFER_0 scall CeladonPrizeRoom_askbuy iffalse CeladonPrizeRoom_cancel waitsfx diff --git a/maps/CeladonGym.asm b/maps/CeladonGym.asm index 0bbad4f98..2cd4d74ad 100644 --- a/maps/CeladonGym.asm +++ b/maps/CeladonGym.asm @@ -109,7 +109,7 @@ CeladonGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext ERIKA, ERIKA1, $1 + trainertotext ERIKA, ERIKA1, MEM_BUFFER_1 jumpstd gymstatue2 UnknownText_0x72b28: diff --git a/maps/CeladonMansion3F.asm b/maps/CeladonMansion3F.asm index 5274b5b38..82b9919de 100644 --- a/maps/CeladonMansion3F.asm +++ b/maps/CeladonMansion3F.asm @@ -16,7 +16,7 @@ CooltrainerMScript_0x71670: opentext writetext UnknownText_0x716ce checkcode VAR_DEXCAUGHT - if_greater_than 248, UnknownScript_0x7167e + if_greater_than NUM_POKEMON - 2 - 1, UnknownScript_0x7167e ; ignore Mew and Celebi waitbutton closetext end diff --git a/maps/CeladonPokecenter1F.asm b/maps/CeladonPokecenter1F.asm index e607d0e9d..b08c75f23 100644 --- a/maps/CeladonPokecenter1F.asm +++ b/maps/CeladonPokecenter1F.asm @@ -45,7 +45,7 @@ CeladonEusine: waitbutton closetext checkcode VAR_FACING - if_equal $1, .Location1 + if_equal UP, .Location1 applymovement CELADONPOKECENTER1F_EUSINE, .Movement1 jump .Continue diff --git a/maps/CeruleanGym.asm b/maps/CeruleanGym.asm index 3ed242b70..af9939f2d 100644 --- a/maps/CeruleanGym.asm +++ b/maps/CeruleanGym.asm @@ -161,7 +161,7 @@ CeruleanGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext MISTY, MISTY1, $1 + trainertotext MISTY, MISTY1, MEM_BUFFER_1 jumpstd gymstatue2 MovementData_0x1884e3: diff --git a/maps/CherrygroveCity.asm b/maps/CherrygroveCity.asm index 94b66d104..40bc7d4ee 100644 --- a/maps/CherrygroveCity.asm +++ b/maps/CherrygroveCity.asm @@ -69,7 +69,7 @@ CherrygroveCityGuideGent: opentext writetext GuideGentGiftText buttonsound - stringtotext .mapcardname, $1 + stringtotext .mapcardname, MEM_BUFFER_1 scall .JumpstdReceiveItem setflag ENGINE_MAP_CARD writetext GotMapCardText diff --git a/maps/CianwoodGym.asm b/maps/CianwoodGym.asm index 49db07005..95aa6aaf0 100644 --- a/maps/CianwoodGym.asm +++ b/maps/CianwoodGym.asm @@ -138,7 +138,7 @@ CianwoodGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext CHUCK, CHUCK1, $1 + trainertotext CHUCK, CHUCK1, MEM_BUFFER_1 jumpstd gymstatue2 CianwoodGymMovement_ChuckChucksBoulder: diff --git a/maps/DragonShrine.asm b/maps/DragonShrine.asm index a27c0e6b0..fd6cd48bf 100644 --- a/maps/DragonShrine.asm +++ b/maps/DragonShrine.asm @@ -33,9 +33,9 @@ DragonShrine_MapScriptHeader: loadmenudata MenuDataHeader_0x18d215 verticalmenu closewindow - if_equal $1, .RightAnswer - if_equal $2, .WrongAnswer - if_equal $3, .RightAnswer + if_equal 1, .RightAnswer + if_equal 2, .WrongAnswer + if_equal 3, .RightAnswer end .Question2: @@ -45,9 +45,9 @@ DragonShrine_MapScriptHeader: loadmenudata MenuDataHeader_0x18d234 verticalmenu closewindow - if_equal $1, .RightAnswer - if_equal $2, .RightAnswer - if_equal $3, .WrongAnswer + if_equal 1, .RightAnswer + if_equal 2, .RightAnswer + if_equal 3, .WrongAnswer .Question3: setevent EVENT_DRAGON_SHRINE_QUESTION_3 writetext UnknownText_0x18d3f3 @@ -55,9 +55,9 @@ DragonShrine_MapScriptHeader: loadmenudata MenuDataHeader_0x18d258 verticalmenu closewindow - if_equal $1, .WrongAnswer - if_equal $2, .RightAnswer - if_equal $3, .RightAnswer + if_equal 1, .WrongAnswer + if_equal 2, .RightAnswer + if_equal 3, .RightAnswer .Question4: setevent EVENT_DRAGON_SHRINE_QUESTION_4 writetext UnknownText_0x18d420 @@ -65,9 +65,9 @@ DragonShrine_MapScriptHeader: loadmenudata MenuDataHeader_0x18d283 verticalmenu closewindow - if_equal $1, .RightAnswer - if_equal $2, .WrongAnswer - if_equal $3, .RightAnswer + if_equal 1, .RightAnswer + if_equal 2, .WrongAnswer + if_equal 3, .RightAnswer .Question5: setevent EVENT_DRAGON_SHRINE_QUESTION_5 writetext UnknownText_0x18d44a @@ -75,9 +75,9 @@ DragonShrine_MapScriptHeader: loadmenudata MenuDataHeader_0x18d2a5 verticalmenu closewindow - if_equal $1, .WrongAnswer - if_equal $2, .RightAnswer - if_equal $3, .WrongAnswer + if_equal 1, .WrongAnswer + if_equal 2, .RightAnswer + if_equal 3, .WrongAnswer .RightAnswer: checkevent EVENT_DRAGON_SHRINE_QUESTION_5 iftrue .PassedTheTest diff --git a/maps/DragonsDenB1F.asm b/maps/DragonsDenB1F.asm index b79857e36..81dc33341 100644 --- a/maps/DragonsDenB1F.asm +++ b/maps/DragonsDenB1F.asm @@ -57,7 +57,7 @@ DragonsDenB1F_ClairScene: buttonsound giveitem TM_DRAGONBREATH iffalse .BagFull - itemtotext TM_DRAGONBREATH, $0 + itemtotext TM_DRAGONBREATH, MEM_BUFFER_0 writetext NotifyReceiveDragonbreath playsound SFX_ITEM waitsfx @@ -135,7 +135,7 @@ PokeBallScript_0x18c95a: iffalse .BagFull disappear DRAGONSDENB1F_POKE_BALL1 opentext - itemtotext DRAGON_FANG, $0 + itemtotext DRAGON_FANG, MEM_BUFFER_0 writetext Text_FoundDragonFang playsound SFX_ITEM waitsfx @@ -145,7 +145,7 @@ PokeBallScript_0x18c95a: .BagFull: opentext - itemtotext DRAGON_FANG, $0 + itemtotext DRAGON_FANG, MEM_BUFFER_0 writetext Text_FoundDragonFang buttonsound writetext Text_NoRoomForDragonFang diff --git a/maps/EarlsPokemonAcademy.asm b/maps/EarlsPokemonAcademy.asm index 3ed66a713..62ef5b16b 100644 --- a/maps/EarlsPokemonAcademy.asm +++ b/maps/EarlsPokemonAcademy.asm @@ -69,11 +69,11 @@ AcademyBlackboard: loadmenudata .BlackboardMenuData _2dmenu closewindow - if_equal $1, .Poison - if_equal $2, .Paralysis - if_equal $3, .Sleep - if_equal $4, .Burn - if_equal $5, .Freeze + if_equal 1, .Poison + if_equal 2, .Paralysis + if_equal 3, .Sleep + if_equal 4, .Burn + if_equal 5, .Freeze closetext end diff --git a/maps/EcruteakGym.asm b/maps/EcruteakGym.asm index 6948996e2..f88910855 100644 --- a/maps/EcruteakGym.asm +++ b/maps/EcruteakGym.asm @@ -162,7 +162,7 @@ EcruteakGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext MORTY, MORTY1, $1 + trainertotext MORTY, MORTY1, MEM_BUFFER_1 jumpstd gymstatue2 MovementData_0x99e5d: diff --git a/maps/ElmsLab.asm b/maps/ElmsLab.asm index c3e1a51f5..bd228e93b 100644 --- a/maps/ElmsLab.asm +++ b/maps/ElmsLab.asm @@ -161,7 +161,7 @@ CyndaquilPokeBallScript: checkevent EVENT_GOT_A_POKEMON_FROM_ELM iftrue LookAtElmPokeBallScript spriteface ELMSLAB_ELM, DOWN - refreshscreen $0 + refreshscreen pokepic CYNDAQUIL cry CYNDAQUIL waitbutton @@ -175,7 +175,7 @@ CyndaquilPokeBallScript: writetext ChoseStarterText buttonsound waitsfx - pokenamemem CYNDAQUIL, $0 + pokenamemem CYNDAQUIL, MEM_BUFFER_0 writetext ReceivedStarterText playsound SFX_CAUGHT_MON waitsfx @@ -191,7 +191,7 @@ TotodilePokeBallScript: checkevent EVENT_GOT_A_POKEMON_FROM_ELM iftrue LookAtElmPokeBallScript spriteface ELMSLAB_ELM, DOWN - refreshscreen $0 + refreshscreen pokepic TOTODILE cry TOTODILE waitbutton @@ -205,7 +205,7 @@ TotodilePokeBallScript: writetext ChoseStarterText buttonsound waitsfx - pokenamemem TOTODILE, $0 + pokenamemem TOTODILE, MEM_BUFFER_0 writetext ReceivedStarterText playsound SFX_CAUGHT_MON waitsfx @@ -219,7 +219,7 @@ ChikoritaPokeBallScript: checkevent EVENT_GOT_A_POKEMON_FROM_ELM iftrue LookAtElmPokeBallScript spriteface ELMSLAB_ELM, DOWN - refreshscreen $0 + refreshscreen pokepic CHIKORITA cry CHIKORITA waitbutton @@ -233,7 +233,7 @@ ChikoritaPokeBallScript: writetext ChoseStarterText buttonsound waitsfx - pokenamemem CHIKORITA, $0 + pokenamemem CHIKORITA, MEM_BUFFER_0 writetext ReceivedStarterText playsound SFX_CAUGHT_MON waitsfx @@ -311,7 +311,7 @@ ElmsLabHealingMachine_HealParty: special TrainerRankings_Healings special HealParty playmusic MUSIC_NONE - writebyte 1 ; Machine is in Elm's Lab + writebyte HEALMACHINE_ELMS_LAB special HealMachineAnim pause 30 special RestartMapMusic @@ -500,7 +500,7 @@ AideScript_GiveYouBalls: opentext writetext AideText_GiveYouBalls buttonsound - itemtotext POKE_BALL, $1 + itemtotext POKE_BALL, MEM_BUFFER_1 scall AideScript_ReceiveTheBalls giveitem POKE_BALL, 5 writetext AideText_ExplainBalls diff --git a/maps/FastShipCabins_NNW_NNE_NE.asm b/maps/FastShipCabins_NNW_NNE_NE.asm index 26618e8d3..f9145bcf7 100644 --- a/maps/FastShipCabins_NNW_NNE_NE.asm +++ b/maps/FastShipCabins_NNW_NNE_NE.asm @@ -100,7 +100,7 @@ SailorScript_0x755f1: setevent EVENT_FAST_SHIP_LAZY_SAILOR setmapscene FAST_SHIP_B1F, 1 checkcode VAR_FACING - if_equal $3, UnknownScript_0x75629 + if_equal RIGHT, UnknownScript_0x75629 applymovement FASTSHIPCABINS_NNW_NNE_NE_SAILOR, MovementData_0x75637 playsound SFX_EXIT_BUILDING disappear FASTSHIPCABINS_NNW_NNE_NE_SAILOR diff --git a/maps/FuchsiaGym.asm b/maps/FuchsiaGym.asm index 64f580c5b..8a2a1fbd7 100644 --- a/maps/FuchsiaGym.asm +++ b/maps/FuchsiaGym.asm @@ -216,7 +216,7 @@ FuchsiaGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext JANINE, JANINE1, $1 + trainertotext JANINE, JANINE1, MEM_BUFFER_1 jumpstd gymstatue2 Movement_NinjaSpin: diff --git a/maps/GoldenrodBillsHouse.asm b/maps/GoldenrodBillsHouse.asm index 2032c5b1e..e2b286848 100644 --- a/maps/GoldenrodBillsHouse.asm +++ b/maps/GoldenrodBillsHouse.asm @@ -22,7 +22,7 @@ BillsHouseBill: buttonsound waitsfx checkcode VAR_PARTYCOUNT - if_equal $6, UnknownScript_0x54c13 + if_equal PARTY_LENGTH, UnknownScript_0x54c13 writetext UnknownText_0x54dae playsound SFX_CAUGHT_MON waitsfx @@ -74,8 +74,8 @@ BillsSister: iftrue UnknownScript_0x54c58 writetext UnknownText_0x54f9e askforphonenumber PHONE_BILL - if_equal $1, UnknownScript_0x54c64 - if_equal $2, UnknownScript_0x54c5e + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x54c64 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x54c5e waitsfx addcellnum PHONE_BILL writetext UnknownText_0x54fd9 diff --git a/maps/GoldenrodCity.asm b/maps/GoldenrodCity.asm index 8e324a9bb..356a0e6ef 100644 --- a/maps/GoldenrodCity.asm +++ b/maps/GoldenrodCity.asm @@ -63,35 +63,35 @@ MoveTutor: yesorno iffalse .Refused2 checkcoins 4000 - if_equal $2, .NotEnoughMoney + if_equal HAVE_LESS, .NotEnoughMoney writetext UnknownText_0x1990ce loadmenudata .MoveMenuDataHeader verticalmenu closewindow - if_equal $1, .Flamethrower - if_equal $2, .Thunderbolt - if_equal $3, .IceBeam + if_equal MOVETUTOR_FLAMETHROWER, .Flamethrower + if_equal MOVETUTOR_THUNDERBOLT, .Thunderbolt + if_equal MOVETUTOR_ICE_BEAM, .IceBeam jump .Incompatible .Flamethrower: - writebyte $1 + writebyte MOVETUTOR_FLAMETHROWER writetext UnknownText_0x1991cf special Special_MoveTutor - if_equal $0, .TeachMove + if_equal FALSE, .TeachMove jump .Incompatible .Thunderbolt: - writebyte $2 + writebyte MOVETUTOR_THUNDERBOLT writetext UnknownText_0x1991cf special Special_MoveTutor - if_equal $0, .TeachMove + if_equal FALSE, .TeachMove jump .Incompatible .IceBeam: - writebyte $3 + writebyte MOVETUTOR_ICE_BEAM writetext UnknownText_0x1991cf special Special_MoveTutor - if_equal $0, .TeachMove + if_equal FALSE, .TeachMove jump .Incompatible diff --git a/maps/GoldenrodDeptStore5F.asm b/maps/GoldenrodDeptStore5F.asm index 70e7ab046..9039975cd 100644 --- a/maps/GoldenrodDeptStore5F.asm +++ b/maps/GoldenrodDeptStore5F.asm @@ -68,8 +68,8 @@ ReceptionistScript_0x560ce: special GetFirstPokemonHappiness writetext UnknownText_0x56143 buttonsound - if_greater_than $95, .VeryHappy - if_greater_than $31, .SomewhatHappy + if_greater_than 150 - 1, .VeryHappy + if_greater_than 50 - 1, .SomewhatHappy jump .NotVeryHappy .VeryHappy: @@ -107,7 +107,7 @@ Carrie: faceplayer opentext special SpecialGameboyCheck - if_not_equal $2, .NotGBC ; This is a dummy check from Gold and Silver. In normal gameplay, this would not be checked. + if_not_equal GBCHECK_CGB, .NotGBC ; This is a dummy check from Gold/Silver writetext UnknownText_0x56241 waitbutton closetext diff --git a/maps/GoldenrodDeptStore6F.asm b/maps/GoldenrodDeptStore6F.asm index 6cbb4441a..cfe7fde52 100644 --- a/maps/GoldenrodDeptStore6F.asm +++ b/maps/GoldenrodDeptStore6F.asm @@ -17,37 +17,37 @@ GoldenrodVendingMachine: loadmenudata .MenuData verticalmenu closewindow - if_equal $1, .FreshWater - if_equal $2, .SodaPop - if_equal $3, .Lemonade + if_equal 1, .FreshWater + if_equal 2, .SodaPop + if_equal 3, .Lemonade closetext end .FreshWater: - checkmoney $0, 200 - if_equal $2, .NotEnoughMoney + checkmoney YOUR_MONEY, 200 + if_equal HAVE_LESS, .NotEnoughMoney giveitem FRESH_WATER iffalse .NotEnoughSpace - takemoney $0, 200 - itemtotext FRESH_WATER, $0 + takemoney YOUR_MONEY, 200 + itemtotext FRESH_WATER, MEM_BUFFER_0 jump .VendItem .SodaPop: - checkmoney $0, 300 - if_equal $2, .NotEnoughMoney + checkmoney YOUR_MONEY, 300 + if_equal HAVE_LESS, .NotEnoughMoney giveitem SODA_POP iffalse .NotEnoughSpace - takemoney $0, 300 - itemtotext SODA_POP, $0 + takemoney YOUR_MONEY, 300 + itemtotext SODA_POP, MEM_BUFFER_0 jump .VendItem .Lemonade: - checkmoney $0, 350 - if_equal $2, .NotEnoughMoney + checkmoney YOUR_MONEY, 350 + if_equal HAVE_LESS, .NotEnoughMoney giveitem LEMONADE iffalse .NotEnoughSpace - takemoney $0, 350 - itemtotext LEMONADE, $0 + takemoney YOUR_MONEY, 350 + itemtotext LEMONADE, MEM_BUFFER_0 jump .VendItem .VendItem: diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm index fc0216504..f6412f3b2 100644 --- a/maps/GoldenrodGameCorner.asm +++ b/maps/GoldenrodGameCorner.asm @@ -64,15 +64,15 @@ GoldenrodGmeCornerTMVendor_LoopScript: ; 056c36 loadmenudata GoldenrodGameCornerTMVendorMenuData verticalmenu closewindow - if_equal $1, .Thunder - if_equal $2, .Blizzard - if_equal $3, .FireBlast + if_equal 1, .Thunder + if_equal 2, .Blizzard + if_equal 3, .FireBlast jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript .Thunder: checkcoins 5500 - if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript - itemtotext TM_THUNDER, $0 + if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + itemtotext TM_THUNDER, MEM_BUFFER_0 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript giveitem TM_THUNDER @@ -82,8 +82,8 @@ GoldenrodGmeCornerTMVendor_LoopScript: ; 056c36 .Blizzard: checkcoins 5500 - if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript - itemtotext TM_BLIZZARD, $0 + if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + itemtotext TM_BLIZZARD, MEM_BUFFER_0 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript giveitem TM_BLIZZARD @@ -93,8 +93,8 @@ GoldenrodGmeCornerTMVendor_LoopScript: ; 056c36 .FireBlast: checkcoins 5500 - if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript - itemtotext TM_FIRE_BLAST, $0 + if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + itemtotext TM_FIRE_BLAST, MEM_BUFFER_0 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript giveitem TM_FIRE_BLAST @@ -168,17 +168,17 @@ GoldenrodGameCornerPrizeMonVendorScript: loadmenudata .MenuDataHeader verticalmenu closewindow - if_equal $1, .abra - if_equal $2, .cubone - if_equal $3, .wobbuffet + if_equal 1, .abra + if_equal 2, .cubone + if_equal 3, .wobbuffet jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript .abra checkcoins 100 - if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript checkcode VAR_PARTYCOUNT - if_equal $6, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript - pokenamemem ABRA, $0 + if_equal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript + pokenamemem ABRA, MEM_BUFFER_0 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript waitsfx @@ -193,10 +193,10 @@ GoldenrodGameCornerPrizeMonVendorScript: .cubone checkcoins 800 - if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript checkcode VAR_PARTYCOUNT - if_equal $6, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript - pokenamemem CUBONE, $0 + if_equal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript + pokenamemem CUBONE, MEM_BUFFER_0 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript waitsfx @@ -211,10 +211,10 @@ GoldenrodGameCornerPrizeMonVendorScript: .wobbuffet checkcoins 1500 - if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript checkcode VAR_PARTYCOUNT - if_equal $6, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript - pokenamemem WOBBUFFET, $0 + if_equal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript + pokenamemem WOBBUFFET, MEM_BUFFER_0 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript waitsfx @@ -301,21 +301,21 @@ GoldenrodGameCornerLeftTheirDrinkScript: GoldenrodGameCornerSlotsMachineScript: random 6 if_equal 0, GoldenrodGameCornerLuckySlotsMachineScript - refreshscreen $0 + refreshscreen writebyte FALSE special Special_SlotMachine closetext end GoldenrodGameCornerLuckySlotsMachineScript: - refreshscreen $0 + refreshscreen writebyte TRUE special Special_SlotMachine closetext end GoldenrodGameCornerCardFlipMachineScript: - refreshscreen $0 + refreshscreen special Special_CardFlip closetext end diff --git a/maps/GoldenrodGym.asm b/maps/GoldenrodGym.asm index 248864782..598fa8673 100644 --- a/maps/GoldenrodGym.asm +++ b/maps/GoldenrodGym.asm @@ -171,7 +171,7 @@ GoldenrodGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext WHITNEY, WHITNEY1, $1 + trainertotext WHITNEY, WHITNEY1, MEM_BUFFER_1 jumpstd gymstatue2 BridgetWalksUpMovement: diff --git a/maps/GoldenrodHappinessRater.asm b/maps/GoldenrodHappinessRater.asm index 667698662..c3e07b326 100644 --- a/maps/GoldenrodHappinessRater.asm +++ b/maps/GoldenrodHappinessRater.asm @@ -16,11 +16,11 @@ TeacherScript_0x54953: special GetFirstPokemonHappiness writetext UnknownText_0x549a3 buttonsound - if_greater_than $f9, UnknownScript_0x54973 - if_greater_than $c7, UnknownScript_0x54979 - if_greater_than $95, UnknownScript_0x5497f - if_greater_than $63, UnknownScript_0x54985 - if_greater_than $31, UnknownScript_0x5498b + if_greater_than 250 - 1, UnknownScript_0x54973 + if_greater_than 200 - 1, UnknownScript_0x54979 + if_greater_than 150 - 1, UnknownScript_0x5497f + if_greater_than 100 - 1, UnknownScript_0x54985 + if_greater_than 50 - 1, UnknownScript_0x5498b jump UnknownScript_0x54991 UnknownScript_0x54973: diff --git a/maps/GoldenrodMagnetTrainStation.asm b/maps/GoldenrodMagnetTrainStation.asm index 73cc9701a..e05525a18 100644 --- a/maps/GoldenrodMagnetTrainStation.asm +++ b/maps/GoldenrodMagnetTrainStation.asm @@ -34,7 +34,7 @@ OfficerScript_0x550ec: closetext applymovement GOLDENRODMAGNETTRAINSTATION_OFFICER, MovementData_0x55146 applymovement PLAYER, MovementData_0x5514f - writebyte $0 + writebyte FALSE special Special_MagnetTrain warpcheck newloadmap MAPSETUP_TRAIN diff --git a/maps/GoldenrodPokeComCenter2FMobile.asm b/maps/GoldenrodPokeComCenter2FMobile.asm index a3e639409..304bb2234 100644 --- a/maps/GoldenrodPokeComCenter2FMobile.asm +++ b/maps/GoldenrodPokeComCenter2FMobile.asm @@ -28,8 +28,8 @@ UnknownScript_0x625df: loadmenudata MenuDataHeader_0x62602 verticalmenu closewindow - if_equal $1, UnknownScript_0x625f0 - if_equal $2, UnknownScript_0x625f8 + if_equal 1, UnknownScript_0x625f0 + if_equal 2, UnknownScript_0x625f8 jump UnknownScript_0x62600 UnknownScript_0x625f0: @@ -73,8 +73,8 @@ UnknownScript_0x62629: loadmenudata MenuDataHeader_0x6264c verticalmenu closewindow - if_equal $1, UnknownScript_0x6263a - if_equal $2, UnknownScript_0x62642 + if_equal 1, UnknownScript_0x6263a + if_equal 2, UnknownScript_0x62642 jump UnknownScript_0x6264a UnknownScript_0x6263a: diff --git a/maps/GoldenrodUnderground.asm b/maps/GoldenrodUnderground.asm index 1c5872548..3a07046fd 100644 --- a/maps/GoldenrodUnderground.asm +++ b/maps/GoldenrodUnderground.asm @@ -35,7 +35,7 @@ GoldenrodUnderground_MapScriptHeader: clearevent EVENT_SWITCH_12 clearevent EVENT_SWITCH_13 clearevent EVENT_SWITCH_14 - writebyte $0 + writebyte 0 copyvartobyte UndergroundSwitchPositions return @@ -196,8 +196,8 @@ OlderHaircutBrotherScript: writetext UnknownText_0x7c5f9 yesorno iffalse .Refused - checkmoney $0, 500 - if_equal $2, .NotEnoughMoney + checkmoney YOUR_MONEY, 500 + if_equal HAVE_LESS, .NotEnoughMoney writetext UnknownText_0x7c69a buttonsound special Special_YoungerHaircutBrother @@ -227,7 +227,7 @@ OlderHaircutBrotherScript: jump .then .then - takemoney $0, 500 + takemoney YOUR_MONEY, 500 special PlaceMoneyTopRight writetext UnknownText_0x7c6b8 waitbutton @@ -279,8 +279,8 @@ YoungerHaircutBrotherScript: writetext UnknownText_0x7c75c yesorno iffalse .Refused - checkmoney $0, 300 - if_equal $2, .NotEnoughMoney + checkmoney YOUR_MONEY, 300 + if_equal HAVE_LESS, .NotEnoughMoney writetext UnknownText_0x7c7f1 buttonsound special Special_OlderHaircutBrother @@ -310,7 +310,7 @@ YoungerHaircutBrotherScript: jump .then .then - takemoney $0, 300 + takemoney YOUR_MONEY, 300 special PlaceMoneyTopRight writetext UnknownText_0x7c80e waitbutton diff --git a/maps/GoldenrodUndergroundWarehouse.asm b/maps/GoldenrodUndergroundWarehouse.asm index 03841736b..49ae5e39f 100644 --- a/maps/GoldenrodUndergroundWarehouse.asm +++ b/maps/GoldenrodUndergroundWarehouse.asm @@ -31,7 +31,7 @@ GoldenrodUndergroundWarehouse_MapScriptHeader: clearevent EVENT_SWITCH_12 clearevent EVENT_SWITCH_13 clearevent EVENT_SWITCH_14 - writebyte $0 + writebyte 0 copyvartobyte UndergroundSwitchPositions return diff --git a/maps/HallOfFame.asm b/maps/HallOfFame.asm index a10468875..a5b92d3b1 100644 --- a/maps/HallOfFame.asm +++ b/maps/HallOfFame.asm @@ -30,7 +30,7 @@ HallOfFame_MapScriptHeader: applymovement PLAYER, HallOfFame_SlowlyApproachMachine setscene 1 pause 15 - writebyte 2 ; Machine is in the Hall of Fame + writebyte HEALMACHINE_HALL_OF_FAME special HealMachineAnim setevent EVENT_BEAT_ELITE_FOUR setevent EVENT_TELEPORT_GUY diff --git a/maps/KrissHouse1F.asm b/maps/KrissHouse1F.asm index addfeef13..e6bc721aa 100644 --- a/maps/KrissHouse1F.asm +++ b/maps/KrissHouse1F.asm @@ -38,7 +38,7 @@ UnknownScript_0x7a4f6: opentext writetext UnknownText_0x7a604 buttonsound - stringtotext GearName, $1 + stringtotext GearName, MEM_BUFFER_1 scall UnknownScript_0x7a57e setflag ENGINE_POKEGEAR setflag ENGINE_PHONE_CARD diff --git a/maps/KrissHouse2F.asm b/maps/KrissHouse2F.asm index 15e5d3641..c941bcdb3 100644 --- a/maps/KrissHouse2F.asm +++ b/maps/KrissHouse2F.asm @@ -31,27 +31,25 @@ KrissHouse2F_MapScriptHeader: special ToggleMaptileDecorations return - db 0, 0, 0 ; filler - Doll1: - describedecoration 1 + describedecoration DECODESC_LEFT_DOLL Doll2: - describedecoration 2 + describedecoration DECODESC_RIGHT_DOLL BigDoll: - describedecoration 3 + describedecoration DECODESC_BIG_DOLL GameConsole: - describedecoration 4 + describedecoration DECODESC_CONSOLE KrissHousePoster: dw EVENT_KRISS_ROOM_POSTER, .Script .Script: - describedecoration 0 + describedecoration DECODESC_POSTER KrissHouseRadio: checkevent EVENT_GOT_A_POKEMON_FROM_ELM diff --git a/maps/KrissNeighborsHouse.asm b/maps/KrissNeighborsHouse.asm index 0cd9f77dc..4c3b2a2b6 100644 --- a/maps/KrissNeighborsHouse.asm +++ b/maps/KrissNeighborsHouse.asm @@ -31,7 +31,7 @@ KrissNeighborsHouseRadio: pause 45 writetext KrisNeighborRadioText3 pause 45 - musicfadeout MUSIC_NEW_BARK_TOWN, $10 + musicfadeout MUSIC_NEW_BARK_TOWN, 16 writetext KrisNeighborRadioText4 pause 45 closetext diff --git a/maps/KurtsHouse.asm b/maps/KurtsHouse.asm index 2c1e7ba70..c9d9589e9 100644 --- a/maps/KurtsHouse.asm +++ b/maps/KurtsHouse.asm @@ -132,7 +132,7 @@ KurtScript_0x18e178: buttonsound setevent EVENT_DRAGON_SHRINE_QUESTION_2 special Special_SelectApricornForKurt - if_equal $0, .Cancel + if_equal FALSE, .Cancel if_equal BLU_APRICORN, .Blu if_equal YLW_APRICORN, .Ylw if_equal GRN_APRICORN, .Grn diff --git a/maps/LakeOfRageMagikarpHouse.asm b/maps/LakeOfRageMagikarpHouse.asm index cc494c8c5..8e164b6f9 100644 --- a/maps/LakeOfRageMagikarpHouse.asm +++ b/maps/LakeOfRageMagikarpHouse.asm @@ -45,9 +45,10 @@ UnknownScript_0x19a6e0: writetext UnknownText_0x19a93e waitbutton special Special_CheckMagikarpLength - if_equal $0, UnknownScript_0x19a71c - if_equal $1, UnknownScript_0x19a722 - if_equal $2, UnknownScript_0x19a716 + if_equal MAGIKARPLENGTH_NOT_MAGIKARP, UnknownScript_0x19a71c + if_equal MAGIKARPLENGTH_REFUSED, UnknownScript_0x19a722 + if_equal MAGIKARPLENGTH_TOO_SHORT, UnknownScript_0x19a716 + ; MAGIKARPLENGTH_BEAT_RECORD jump UnknownScript_0x19a6fe UnknownScript_0x19a6fe: diff --git a/maps/LancesRoom.asm b/maps/LancesRoom.asm index 6a1931d1b..9b73671d6 100644 --- a/maps/LancesRoom.asm +++ b/maps/LancesRoom.asm @@ -73,7 +73,7 @@ LanceScript_0x180e7b: reloadmappart closetext setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED - musicfadeout MUSIC_BEAUTY_ENCOUNTER, $10 + musicfadeout MUSIC_BEAUTY_ENCOUNTER, 16 pause 30 showemote EMOTE_SHOCK, LANCESROOM_LANCE, 15 spriteface LANCESROOM_LANCE, DOWN diff --git a/maps/LavRadioTower1F.asm b/maps/LavRadioTower1F.asm index 424a802c9..4ab8c6f48 100644 --- a/maps/LavRadioTower1F.asm +++ b/maps/LavRadioTower1F.asm @@ -36,7 +36,7 @@ GentlemanScript_0x7ee6c: .UnknownScript_0x7ee80: writetext UnknownText_0x7f0a1 buttonsound - stringtotext .expncardname, $1 + stringtotext .expncardname, MEM_BUFFER_1 scall .UnknownScript_0x7ee94 setflag ENGINE_EXPN_CARD .UnknownScript_0x7ee8e: diff --git a/maps/MahoganyGym.asm b/maps/MahoganyGym.asm index 814e81776..3c403a735 100644 --- a/maps/MahoganyGym.asm +++ b/maps/MahoganyGym.asm @@ -146,7 +146,7 @@ MahoganyGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext PRYCE, PRYCE1, $1 + trainertotext PRYCE, PRYCE1, MEM_BUFFER_1 jumpstd gymstatue2 PryceText_Intro: diff --git a/maps/MahoganyTown.asm b/maps/MahoganyTown.asm index ba907383d..5ed0450c2 100644 --- a/maps/MahoganyTown.asm +++ b/maps/MahoganyTown.asm @@ -56,13 +56,13 @@ UnknownScript_0x190040: special PlaceMoneyTopRight yesorno iffalse UnknownScript_0x190072 - checkmoney $0, 300 - if_equal $2, UnknownScript_0x19006c + checkmoney YOUR_MONEY, 300 + if_equal HAVE_LESS, UnknownScript_0x19006c giveitem RAGECANDYBAR iffalse UnknownScript_0x190078 waitsfx playsound SFX_TRANSACTION - takemoney $0, 300 + takemoney YOUR_MONEY, 300 special PlaceMoneyTopRight writetext UnknownText_0x19014a waitbutton diff --git a/maps/ManiasHouse.asm b/maps/ManiasHouse.asm index d60d1081d..a1de377a0 100644 --- a/maps/ManiasHouse.asm +++ b/maps/ManiasHouse.asm @@ -55,10 +55,11 @@ ManiaScript: yesorno iffalse .refused special SpecialReturnShuckle - if_equal $0, .wrong - if_equal $1, .refused - if_equal $3, .superhappy - if_equal $4, .default_postevent + if_equal SHUCKIE_WRONG_MON, .wrong + if_equal SHUCKIE_REFUSED, .refused + if_equal SHUCKIE_HAPPY, .superhappy + if_equal SHUCKIE_FAINTED, .default_postevent + ; SHUCKIE_RETURNED writetext ManiaText_ThankYou waitbutton closetext diff --git a/maps/MobileBattleRoom.asm b/maps/MobileBattleRoom.asm index 9439eabf3..4c8c068e9 100644 --- a/maps/MobileBattleRoom.asm +++ b/maps/MobileBattleRoom.asm @@ -20,7 +20,7 @@ MobileBattleRoom_MapScriptHeader: end MapMobileBattleRoomSignpost0Script: - refreshscreen $0 + refreshscreen special Function1037c2 if_equal $1, .one special Function1037eb @@ -39,7 +39,7 @@ MapMobileBattleRoomSignpost0Script: pause 60 special FadeInPalettes special RestartMapMusic - refreshscreen $0 + refreshscreen .two_ special TrainerRankings_Healings special HealParty diff --git a/maps/MobileTradeRoomMobile.asm b/maps/MobileTradeRoomMobile.asm index bcc2c2d79..f286a5452 100644 --- a/maps/MobileTradeRoomMobile.asm +++ b/maps/MobileTradeRoomMobile.asm @@ -20,7 +20,7 @@ MobileTradeRoomMobile_MapScriptHeader: end MapMobileTradeRoomMobileSignpost0Script: - refreshscreen $0 + refreshscreen special Function1037c2 writetext MobileTradeRoomMobile_EstablishingCommsText waitbutton diff --git a/maps/MountMortarB1F.asm b/maps/MountMortarB1F.asm index ad00662f8..f3db52690 100644 --- a/maps/MountMortarB1F.asm +++ b/maps/MountMortarB1F.asm @@ -35,7 +35,7 @@ UnknownScript_0x7e217: buttonsound waitsfx checkcode VAR_PARTYCOUNT - if_equal $6, UnknownScript_0x7e237 + if_equal PARTY_LENGTH, UnknownScript_0x7e237 writetext UnknownText_0x7e355 playsound SFX_CAUGHT_MON waitsfx diff --git a/maps/NationalPark.asm b/maps/NationalPark.asm index fe1547ea5..4f5077724 100644 --- a/maps/NationalPark.asm +++ b/maps/NationalPark.asm @@ -94,9 +94,9 @@ UnknownScript_0x5c071: scall UnknownScript_0x5c100 UnknownScript_0x5c074: askforphonenumber PHONE_SCHOOLBOY_JACK - if_equal $1, UnknownScript_0x5c110 - if_equal $2, UnknownScript_0x5c10c - trainertotext SCHOOLBOY, JACK1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x5c110 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x5c10c + trainertotext SCHOOLBOY, JACK1, MEM_BUFFER_0 scall UnknownScript_0x5c104 jump UnknownScript_0x5c108 @@ -224,9 +224,9 @@ UnknownScript_0x5c160: scall UnknownScript_0x5c193 UnknownScript_0x5c163: askforphonenumber PHONE_POKEFAN_BEVERLY - if_equal $1, UnknownScript_0x5c1a3 - if_equal $2, UnknownScript_0x5c19f - trainertotext POKEFANF, BEVERLY1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x5c1a3 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x5c19f + trainertotext POKEFANF, BEVERLY1, MEM_BUFFER_0 scall UnknownScript_0x5c197 jump UnknownScript_0x5c19b diff --git a/maps/OaksLab.asm b/maps/OaksLab.asm index 17da0485d..877211b56 100644 --- a/maps/OaksLab.asm +++ b/maps/OaksLab.asm @@ -26,8 +26,8 @@ Oak: setevent EVENT_TALKED_TO_OAK_IN_KANTO .CheckBadges: checkcode VAR_BADGES - if_equal 16, .OpenMtSilver - if_equal 8, .Complain + if_equal NUM_BADGES, .OpenMtSilver + if_equal NUM_JOHTO_BADGES, .Complain jump .AhGood .CheckPokedex: diff --git a/maps/OlivineCity.asm b/maps/OlivineCity.asm index 26e673ded..0f01ab008 100644 --- a/maps/OlivineCity.asm +++ b/maps/OlivineCity.asm @@ -78,8 +78,8 @@ OlivineCitySailor1Script: StandingYoungsterScript_0x1a88a6: faceplayer opentext - random $2 - if_equal $0, UnknownScript_0x1a88b4 + random 2 + if_equal 0, UnknownScript_0x1a88b4 writetext UnknownText_0x1a8b04 waitbutton closetext diff --git a/maps/OlivineGym.asm b/maps/OlivineGym.asm index 849f6eecf..514b8e89a 100644 --- a/maps/OlivineGym.asm +++ b/maps/OlivineGym.asm @@ -91,7 +91,7 @@ OlivineGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext JASMINE, JASMINE1, $1 + trainertotext JASMINE, JASMINE1, MEM_BUFFER_1 jumpstd gymstatue2 Jasmine_SteelTypeIntro: diff --git a/maps/OlivineLighthouse2F.asm b/maps/OlivineLighthouse2F.asm index 0961a4427..6f7ea422e 100644 --- a/maps/OlivineLighthouse2F.asm +++ b/maps/OlivineLighthouse2F.asm @@ -41,9 +41,9 @@ UnknownScript_0x5afb0: scall UnknownScript_0x5b057 UnknownScript_0x5afb3: askforphonenumber PHONE_SAILOR_HUEY - if_equal $1, UnknownScript_0x5b067 - if_equal $2, UnknownScript_0x5b063 - trainertotext SAILOR, HUEY1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x5b067 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x5b063 + trainertotext SAILOR, HUEY1, MEM_BUFFER_0 scall UnknownScript_0x5b05b jump UnknownScript_0x5b05f diff --git a/maps/PewterGym.asm b/maps/PewterGym.asm index cfe63fe18..305baf7fa 100644 --- a/maps/PewterGym.asm +++ b/maps/PewterGym.asm @@ -72,7 +72,7 @@ PewterGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext BROCK, BROCK1, $1 + trainertotext BROCK, BROCK1, MEM_BUFFER_1 jumpstd gymstatue2 UnknownText_0x1a28d0: diff --git a/maps/Pokecenter2F.asm b/maps/Pokecenter2F.asm index cf626c500..dffd92de9 100644 --- a/maps/Pokecenter2F.asm +++ b/maps/Pokecenter2F.asm @@ -157,13 +157,13 @@ LinkReceptionistScript_Trade: writetext Text_PleaseComeIn2 waitbutton closetext - writebyte $0 + writebyte FALSE end .Mobile_DidNotSave: writetext Text_PleaseComeAgain closetext - writebyte $1 + writebyte TRUE end BattleTradeMobile_WalkIn: @@ -261,13 +261,13 @@ LinkReceptionistScript_Battle: writetext Text_PleaseComeIn2 waitbutton closetext - writebyte $0 + writebyte FALSE end .Mobile_DidNotSave: writetext Text_PleaseComeAgain closetext - writebyte $1 + writebyte TRUE end .SelectThreeMons: @@ -283,11 +283,11 @@ LinkReceptionistScript_Battle: waitbutton .Mobile_DidNotSelect: closetext - writebyte $0 + writebyte FALSE end .Mobile_OK: - writebyte $1 + writebyte TRUE end Script_TimeCapsuleClosed: @@ -584,7 +584,7 @@ Script_LeftTimeCapsule: end MapPokecenter2FSignpost0Script: - refreshscreen $0 + refreshscreen special Special_DisplayLinkRecord closetext end diff --git a/maps/RadioTower1F.asm b/maps/RadioTower1F.asm index d3ded02ea..05a2a8cb8 100644 --- a/maps/RadioTower1F.asm +++ b/maps/RadioTower1F.asm @@ -148,7 +148,7 @@ CooltrainerFScript_0x5cdd5: waitsfx writetext UnknownText_0x5d37b buttonsound - stringtotext RadioCardText, $1 + stringtotext RadioCardText, MEM_BUFFER_1 scall UnknownScript_0x5ce3e writetext UnknownText_0x5d3c0 buttonsound diff --git a/maps/RadioTower2F.asm b/maps/RadioTower2F.asm index 7942063f9..4ddd1c1af 100644 --- a/maps/RadioTower2F.asm +++ b/maps/RadioTower2F.asm @@ -133,7 +133,7 @@ UnknownScript_0x5d7be: waitbutton closetext spriteface RADIOTOWER2F_BUENA, DOWN - refreshscreen $0 + refreshscreen special SpecialBuenasPassword closetext iffalse UnknownScript_0x5d845 @@ -142,7 +142,7 @@ UnknownScript_0x5d7be: waitbutton closetext checkcode VAR_BLUECARDBALANCE - addvar $1 + addvar 1 writevarcode VAR_BLUECARDBALANCE waitsfx playsound SFX_TRANSACTION @@ -157,7 +157,7 @@ UnknownScript_0x5d7be: pause 20 special RestartMapMusic checkcode VAR_BLUECARDBALANCE - if_equal $1e, UnknownScript_0x5d8a4 + if_equal 30, UnknownScript_0x5d8a4 end UnknownScript_0x5d800: @@ -281,8 +281,8 @@ UnknownScript_0x5d8cc: writetext UnknownText_0x5e2bf UnknownScript_0x5d8d0: askforphonenumber PHONE_BUENA - if_equal $1, UnknownScript_0x5d8f6 - if_equal $2, UnknownScript_0x5d8ed + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x5d8f6 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x5d8ed writetext UnknownText_0x5e2f3 playsound SFX_REGISTER_PHONE_NUMBER waitsfx diff --git a/maps/Route16.asm b/maps/Route16.asm index e08bf0a25..14e8cbebc 100644 --- a/maps/Route16.asm +++ b/maps/Route16.asm @@ -8,9 +8,9 @@ Route16_MapScriptHeader: .AlwaysOnBike: checkcode VAR_YCOORD - if_less_than $5, .CanWalk + if_less_than 5, .CanWalk checkcode VAR_XCOORD - if_greater_than $d, .CanWalk + if_greater_than 13, .CanWalk setflag ENGINE_ALWAYS_ON_BIKE return diff --git a/maps/Route26.asm b/maps/Route26.asm index 4af45fe1f..bb6774f27 100644 --- a/maps/Route26.asm +++ b/maps/Route26.asm @@ -49,9 +49,9 @@ UnknownScript_0x1a4d62: scall UnknownScript_0x1a4dc3 UnknownScript_0x1a4d65: askforphonenumber PHONE_COOLTRAINERM_GAVEN - if_equal $1, UnknownScript_0x1a4dd3 - if_equal $2, UnknownScript_0x1a4dcf - trainertotext COOLTRAINERM, GAVEN3, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a4dd3 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a4dcf + trainertotext COOLTRAINERM, GAVEN3, MEM_BUFFER_0 scall UnknownScript_0x1a4dc7 jump UnknownScript_0x1a4dcb @@ -155,7 +155,7 @@ UnknownScript_0x1a4e21: askforphonenumber PHONE_COOLTRAINERF_BETH if_equal $1, UnknownScript_0x1a4e8f if_equal $2, UnknownScript_0x1a4e8b - trainertotext COOLTRAINERF, BETH1, $0 + trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0 scall UnknownScript_0x1a4e83 jump UnknownScript_0x1a4e87 diff --git a/maps/Route27.asm b/maps/Route27.asm index 4b02422f7..a21606768 100644 --- a/maps/Route27.asm +++ b/maps/Route27.asm @@ -84,9 +84,9 @@ UnknownScript_0x1a08e8: scall UnknownScript_0x1a095b UnknownScript_0x1a08eb: askforphonenumber PHONE_BIRDKEEPER_JOSE - if_equal $1, UnknownScript_0x1a096b - if_equal $2, UnknownScript_0x1a0967 - trainertotext BIRD_KEEPER, JOSE2, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a096b + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a0967 + trainertotext BIRD_KEEPER, JOSE2, MEM_BUFFER_0 scall UnknownScript_0x1a095f jump UnknownScript_0x1a0963 @@ -217,9 +217,9 @@ UnknownScript_0x1a09d2: scall UnknownScript_0x1a0a33 UnknownScript_0x1a09d5: askforphonenumber PHONE_COOLTRAINERF_REENA - if_equal $1, UnknownScript_0x1a0a43 - if_equal $2, UnknownScript_0x1a0a3f - trainertotext COOLTRAINERF, REENA1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a0a43 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a0a3f + trainertotext COOLTRAINERF, REENA1, MEM_BUFFER_0 scall UnknownScript_0x1a0a37 jump UnknownScript_0x1a0a3b diff --git a/maps/Route27SandstormHouse.asm b/maps/Route27SandstormHouse.asm index e66f41f4e..bb1690efe 100644 --- a/maps/Route27SandstormHouse.asm +++ b/maps/Route27SandstormHouse.asm @@ -16,7 +16,7 @@ SandstormHouseWoman: special GetFirstPokemonHappiness writetext SandstormHouseWomanText1 buttonsound - if_greater_than $95, .Loyal + if_greater_than 150 - 1, .Loyal jump .Disloyal .Loyal: diff --git a/maps/Route29.asm b/maps/Route29.asm index a990cdc18..9be77fafe 100644 --- a/maps/Route29.asm +++ b/maps/Route29.asm @@ -108,7 +108,7 @@ CatchingTutorialDudeScript: faceplayer opentext checkcode VAR_BOXSPACE - if_equal $0, .BoxFull + if_equal 0, .BoxFull checkevent EVENT_LEARNED_TO_CATCH_POKEMON iftrue .BoxFull checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM diff --git a/maps/Route30.asm b/maps/Route30.asm index 74db65a31..9830f4019 100644 --- a/maps/Route30.asm +++ b/maps/Route30.asm @@ -61,9 +61,9 @@ TrainerYoungsterJoey: scall .AskNumber2 .RequestNumber: askforphonenumber PHONE_YOUNGSTER_JOEY - if_equal $1, .PhoneFull - if_equal $2, .NumberDeclined - trainertotext YOUNGSTER, JOEY1, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFull + if_equal PHONE_CONTACT_REFUSED, .NumberDeclined + trainertotext YOUNGSTER, JOEY1, MEM_BUFFER_0 scall .RegisteredNumber jump .NumberAccepted diff --git a/maps/Route31.asm b/maps/Route31.asm index e5498917f..4ef8ae314 100644 --- a/maps/Route31.asm +++ b/maps/Route31.asm @@ -49,9 +49,9 @@ TrainerBugCatcherWade1: scall .AskAgainSTD .Continue: askforphonenumber PHONE_BUG_CATCHER_WADE - if_equal $1, .PhoneFullSTD - if_equal $2, .DeclinedNumberSTD - trainertotext BUG_CATCHER, WADE1, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFullSTD + if_equal PHONE_CONTACT_REFUSED, .DeclinedNumberSTD + trainertotext BUG_CATCHER, WADE1, MEM_BUFFER_0 scall .RegisterNumberSTD jump .AcceptedNumberSTD @@ -198,10 +198,11 @@ Route31MailRecipientScript: writetext Text_Route31SleepyManGotMail buttonsound checkpokeitem ReceivedSpearowMailText - if_equal $0, .WrongMail - if_equal $2, .Refused - if_equal $3, .NoMail - if_equal $4, .LastMon + if_equal POKEMAIL_WRONG_MAIL, .WrongMail + if_equal POKEMAIL_REFUSED, .Refused + if_equal POKEMAIL_NO_MAIL, .NoMail + if_equal POKEMAIL_LAST_MON, .LastMon + ; POKEMAIL_CORRECT writetext Text_Route31HandOverMailMon buttonsound writetext Text_Route31ReadingMail diff --git a/maps/Route32.asm b/maps/Route32.asm index b9de0d4df..d9149ad7f 100644 --- a/maps/Route32.asm +++ b/maps/Route32.asm @@ -190,9 +190,9 @@ TrainerFisherRalph1: scall .AskNumber2 .AskForNumber: askforphonenumber PHONE_FISHER_RALPH - if_equal $1, .PhoneFull - if_equal $2, .NumberDeclined - trainertotext FISHER, RALPH1, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFull + if_equal PHONE_CONTACT_REFUSED, .NumberDeclined + trainertotext FISHER, RALPH1, MEM_BUFFER_0 scall .RegisteredNumber jump .NumberAccepted @@ -324,9 +324,9 @@ TrainerPicnickerLiz1: scall .AskNumber2 .AskForNumber: askforphonenumber PHONE_PICNICKER_LIZ - if_equal $1, .PhoneFull - if_equal $2, .NumberDeclined - trainertotext PICNICKER, LIZ1, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFull + if_equal PHONE_CONTACT_REFUSED, .NumberDeclined + trainertotext PICNICKER, LIZ1, MEM_BUFFER_0 scall .RegisteredNumber jump .NumberAccepted diff --git a/maps/Route33.asm b/maps/Route33.asm index fbc7b3190..5ab8610d7 100644 --- a/maps/Route33.asm +++ b/maps/Route33.asm @@ -38,9 +38,9 @@ TrainerHikerAnthony: scall .AskNumber2 .AskForPhoneNumber: askforphonenumber PHONE_HIKER_ANTHONY - if_equal $1, .PhoneFull - if_equal $2, .NumberDeclined - trainertotext HIKER, ANTHONY2, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFull + if_equal PHONE_CONTACT_REFUSED, .NumberDeclined + trainertotext HIKER, ANTHONY2, MEM_BUFFER_0 scall .RegisteredNumber jump .NumberAccepted diff --git a/maps/Route34.asm b/maps/Route34.asm index 144973036..29d3232d8 100644 --- a/maps/Route34.asm +++ b/maps/Route34.asm @@ -59,7 +59,7 @@ DayCareManScript_Outside: special Special_DayCareManOutside waitbutton closetext - if_equal $1, .end_fail + if_equal TRUE, .end_fail clearflag ENGINE_DAY_CARE_MAN_HAS_EGG checkcode VAR_FACING if_equal RIGHT, .walk_around_player @@ -112,9 +112,9 @@ TrainerCamperTodd1: scall .AskNumber2 .FinishAsk: askforphonenumber PHONE_CAMPER_TODD - if_equal $1, .PhoneFull - if_equal $2, .NumberDeclined - trainertotext CAMPER, TODD1, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFull + if_equal PHONE_CONTACT_REFUSED, .NumberDeclined + trainertotext CAMPER, TODD1, MEM_BUFFER_0 scall .RegisteredNumber jump .NumberAccepted @@ -237,9 +237,9 @@ TrainerPicnickerGina1: scall .AskNumber2 .FinishAsk: askforphonenumber PHONE_PICNICKER_GINA - if_equal $1, .PhoneFull - if_equal $2, .NumberDeclined - trainertotext PICNICKER, GINA1, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFull + if_equal PHONE_CONTACT_REFUSED, .NumberDeclined + trainertotext PICNICKER, GINA1, MEM_BUFFER_0 scall .RegisteredNumber jump .NumberAccepted diff --git a/maps/Route35.asm b/maps/Route35.asm index becb45ad0..a8a8bfe46 100644 --- a/maps/Route35.asm +++ b/maps/Route35.asm @@ -50,9 +50,9 @@ UnknownScript_0x19c8ec: scall UnknownScript_0x19c907 UnknownScript_0x19c8ef: askforphonenumber PHONE_JUGGLER_IRWIN - if_equal $1, UnknownScript_0x19c917 - if_equal $2, UnknownScript_0x19c913 - trainertotext JUGGLER, IRWIN1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19c917 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19c913 + trainertotext JUGGLER, IRWIN1, MEM_BUFFER_0 scall UnknownScript_0x19c90b jump UnknownScript_0x19c90f @@ -153,9 +153,9 @@ UnknownScript_0x19c9a4: scall UnknownScript_0x19c907 UnknownScript_0x19c9a7: askforphonenumber PHONE_BUG_CATCHER_ARNIE - if_equal $1, UnknownScript_0x19c917 - if_equal $2, UnknownScript_0x19c913 - trainertotext BUG_CATCHER, ARNIE1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19c917 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19c913 + trainertotext BUG_CATCHER, ARNIE1, MEM_BUFFER_0 scall UnknownScript_0x19c90b jump UnknownScript_0x19c90f diff --git a/maps/Route35NationalParkGate.asm b/maps/Route35NationalParkGate.asm index 84bc40ccc..80bf1531c 100644 --- a/maps/Route35NationalParkGate.asm +++ b/maps/Route35NationalParkGate.asm @@ -58,8 +58,8 @@ Route35NationalParkGate_MapScriptHeader: spriteface ROUTE35NATIONALPARKGATE_OFFICER1, RIGHT opentext checkcode VAR_CONTESTMINUTES - addvar $1 - RAM2MEM $0 + addvar 1 + vartomem MEM_BUFFER_0 writetext UnknownText_0x6a79a yesorno iffalse .GoBackToContest @@ -94,7 +94,7 @@ OfficerScript_0x6a204: yesorno iffalse Route35NationalParkGate_DeclinedToParticipate checkcode VAR_PARTYCOUNT - if_greater_than $1, Route35NationalParkGate_LeaveTheRestBehind + if_greater_than 1, Route35NationalParkGate_LeaveTheRestBehind special ContestDropOffMons clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER Route35NationalParkGate_OkayToProceed: @@ -129,13 +129,13 @@ Route35NationalParkGate_FacingLeft: Route35NationalParkGate_LeaveTheRestBehind: checkcode VAR_PARTYCOUNT - if_less_than 6, Route35NationalParkGate_LessThanFullParty + if_less_than PARTY_LENGTH, Route35NationalParkGate_LessThanFullParty checkcode VAR_BOXSPACE if_equal 0, Route35NationalParkGate_NoRoomInBox Route35NationalParkGate_LessThanFullParty: ; 6a27d special CheckFirstMonIsEgg - if_equal $1, Route35NationalParkGate_FirstMonIsEgg + if_equal TRUE, Route35NationalParkGate_FirstMonIsEgg writetext UnknownText_0x6a4c6 yesorno iffalse Route35NationalParkGate_DeclinedToLeaveMonsBehind diff --git a/maps/Route36.asm b/maps/Route36.asm index 40a4ae446..cdc2360e9 100644 --- a/maps/Route36.asm +++ b/maps/Route36.asm @@ -191,9 +191,9 @@ TrainerSchoolboyAlan1: scall .AskNumber2 .ContinueAskForPhoneNumber: askforphonenumber PHONE_SCHOOLBOY_ALAN - if_equal $1, .PhoneFull - if_equal $2, .NumberDeclined - trainertotext SCHOOLBOY, ALAN1, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFull + if_equal PHONE_CONTACT_REFUSED, .NumberDeclined + trainertotext SCHOOLBOY, ALAN1, MEM_BUFFER_0 scall .RegisteredNumber jump .NumberAccepted diff --git a/maps/Route36NationalParkGate.asm b/maps/Route36NationalParkGate.asm index 9c6bd8c45..cc74c5dfb 100644 --- a/maps/Route36NationalParkGate.asm +++ b/maps/Route36NationalParkGate.asm @@ -67,8 +67,8 @@ Route36NationalParkGate_MapScriptHeader: spriteface PLAYER, UP opentext checkcode VAR_CONTESTMINUTES - addvar $1 - RAM2MEM $0 + addvar 1 + vartomem MEM_BUFFER_0 writetext UnknownText_0x6b284 yesorno iffalse .GoBackToContest @@ -155,7 +155,7 @@ Route36OfficerScriptContest: yesorno iffalse .DecidedNotToJoinContest checkcode VAR_PARTYCOUNT - if_greater_than $1, .LeaveMonsWithOfficer + if_greater_than 1, .LeaveMonsWithOfficer special ContestDropOffMons clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER .ResumeStartingContest: @@ -182,12 +182,12 @@ Route36OfficerScriptContest: .LeaveMonsWithOfficer: checkcode VAR_PARTYCOUNT - if_less_than $6, .ContinueLeavingMons + if_less_than PARTY_LENGTH, .ContinueLeavingMons checkcode VAR_BOXSPACE - if_equal $0, .BoxFull + if_equal 0, .BoxFull .ContinueLeavingMons: special CheckFirstMonIsEgg - if_equal $1, .FirstMonIsEgg + if_equal TRUE, .FirstMonIsEgg writetext UnknownText_0x6afb0 yesorno iffalse .RefusedToLeaveMons diff --git a/maps/Route38.asm b/maps/Route38.asm index 526bf3e36..c91ad06c1 100644 --- a/maps/Route38.asm +++ b/maps/Route38.asm @@ -61,9 +61,9 @@ TrainerLassDana1: scall .AskNumber2F .AskForPhoneNumber: askforphonenumber PHONE_LASS_DANA - if_equal $1, .PhoneFull - if_equal $2, .DeclinedPhoneNumber - trainertotext LASS, DANA1, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFull + if_equal PHONE_CONTACT_REFUSED, .DeclinedPhoneNumber + trainertotext LASS, DANA1, MEM_BUFFER_0 scall .RegisteredPhoneNumber jump .NumberAccepted @@ -197,9 +197,9 @@ TrainerSchoolboyChad1: scall .AskPhoneNumber2 .AskToRegisterNumber: askforphonenumber PHONE_SCHOOLBOY_CHAD - if_equal $1, .PhoneFull - if_equal $2, .SaidNo - trainertotext SCHOOLBOY, CHAD1, $0 + if_equal PHONE_CONTACTS_FULL, .PhoneFull + if_equal PHONE_CONTACT_REFUSED, .SaidNo + trainertotext SCHOOLBOY, CHAD1, MEM_BUFFER_0 scall .RegisteredChad jump .HaveChadsNumber diff --git a/maps/Route39.asm b/maps/Route39.asm index 6545dd77d..db7b37410 100644 --- a/maps/Route39.asm +++ b/maps/Route39.asm @@ -50,9 +50,9 @@ PokefanMDerekWantsYourNumber: scall PokefanMDerekAsksNumber2 PokefanMDerekAsksForPhoneNumber: askforphonenumber PHONE_POKEFANM_DEREK - if_equal $1, PokefanMDerekPhoneFull - if_equal $2, PokefanMDerekDeclined - trainertotext POKEFANM, DEREK1, $0 + if_equal PHONE_CONTACTS_FULL, PokefanMDerekPhoneFull + if_equal PHONE_CONTACT_REFUSED, PokefanMDerekDeclined + trainertotext POKEFANM, DEREK1, MEM_BUFFER_0 scall PokefanMDerekRegistered jump PokefanMDerekAccepted diff --git a/maps/Route39Farmhouse.asm b/maps/Route39Farmhouse.asm index 77531a70d..aa6b15078 100644 --- a/maps/Route39Farmhouse.asm +++ b/maps/Route39Farmhouse.asm @@ -27,11 +27,11 @@ FarmerMScript_SellMilk: special PlaceMoneyTopRight yesorno iffalse FarmerMScript_NoSale - checkmoney $0, 500 - if_equal $2, FarmerMScript_NoMoney + checkmoney YOUR_MONEY, 500 + if_equal HAVE_LESS, FarmerMScript_NoMoney giveitem MOOMOO_MILK iffalse FarmerMScript_NoRoom - takemoney $0, 500 + takemoney YOUR_MONEY, 500 special PlaceMoneyTopRight waitsfx playsound SFX_TRANSACTION diff --git a/maps/Route42.asm b/maps/Route42.asm index 9f18f09e8..2a7b0e775 100644 --- a/maps/Route42.asm +++ b/maps/Route42.asm @@ -61,9 +61,9 @@ UnknownScript_0x1a9268: scall UnknownScript_0x1a92f5 UnknownScript_0x1a926b: askforphonenumber PHONE_FISHER_TULLY - if_equal $1, UnknownScript_0x1a9305 - if_equal $2, UnknownScript_0x1a9301 - trainertotext FISHER, TULLY1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a9305 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a9301 + trainertotext FISHER, TULLY1, MEM_BUFFER_0 scall UnknownScript_0x1a92f9 jump UnknownScript_0x1a92fd diff --git a/maps/Route43.asm b/maps/Route43.asm index 79e367af9..8b0c7b307 100644 --- a/maps/Route43.asm +++ b/maps/Route43.asm @@ -71,9 +71,9 @@ UnknownScript_0x19d0b8: scall UnknownScript_0x19d130 UnknownScript_0x19d0bb: askforphonenumber PHONE_POKEMANIAC_BRENT - if_equal $1, UnknownScript_0x19d140 - if_equal $2, UnknownScript_0x19d13c - trainertotext POKEMANIAC, BRENT1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19d140 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19d13c + trainertotext POKEMANIAC, BRENT1, MEM_BUFFER_0 scall UnknownScript_0x19d134 jump UnknownScript_0x19d138 @@ -202,9 +202,9 @@ UnknownScript_0x19d1aa: scall UnknownScript_0x19d23d UnknownScript_0x19d1ad: askforphonenumber PHONE_PICNICKER_TIFFANY - if_equal $1, UnknownScript_0x19d24d - if_equal $2, UnknownScript_0x19d249 - trainertotext PICNICKER, TIFFANY3, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19d24d + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19d249 + trainertotext PICNICKER, TIFFANY3, MEM_BUFFER_0 scall UnknownScript_0x19d241 jump UnknownScript_0x19d245 diff --git a/maps/Route43Gate.asm b/maps/Route43Gate.asm index e59c04390..9a59957db 100644 --- a/maps/Route43Gate.asm +++ b/maps/Route43Gate.asm @@ -50,17 +50,17 @@ RocketScript_Southbound: opentext writetext RocketText_TollFee buttonsound - checkmoney $0, ROUTE43GATE_TOLL - 1 - if_equal $0, RocketScript_TollSouth + checkmoney YOUR_MONEY, ROUTE43GATE_TOLL - 1 + if_equal HAVE_MORE, RocketScript_TollSouth jump RocketScript_YoureBrokeSouth RocketScript_TollSouth: - takemoney $0, ROUTE43GATE_TOLL + takemoney YOUR_MONEY, ROUTE43GATE_TOLL writetext RocketText_ThankYou jump RocketScript_ShakeDownSouth RocketScript_YoureBrokeSouth: - takemoney $0, ROUTE43GATE_TOLL + takemoney YOUR_MONEY, ROUTE43GATE_TOLL writetext RocketText_AllYouGot jump RocketScript_ShakeDownSouth @@ -82,17 +82,17 @@ RocketScript_Northbound: opentext writetext RocketText_TollFee buttonsound - checkmoney $0, ROUTE43GATE_TOLL - 1 - if_equal $0, RocketScript_TollNorth + checkmoney YOUR_MONEY, ROUTE43GATE_TOLL - 1 + if_equal HAVE_MORE, RocketScript_TollNorth jump RocketScript_YoureBrokeNorth RocketScript_TollNorth: - takemoney $0, ROUTE43GATE_TOLL + takemoney YOUR_MONEY, ROUTE43GATE_TOLL writetext RocketText_ThankYou jump RocketScript_ShakeDownNorth RocketScript_YoureBrokeNorth: - takemoney $0, ROUTE43GATE_TOLL + takemoney YOUR_MONEY, ROUTE43GATE_TOLL writetext RocketText_AllYouGot jump RocketScript_ShakeDownNorth diff --git a/maps/Route44.asm b/maps/Route44.asm index 4f9261a59..5693e9e15 100644 --- a/maps/Route44.asm +++ b/maps/Route44.asm @@ -41,9 +41,9 @@ UnknownScript_0x19d853: scall UnknownScript_0x19d8e3 UnknownScript_0x19d856: askforphonenumber PHONE_BIRDKEEPER_VANCE - if_equal $1, UnknownScript_0x19d8f3 - if_equal $2, UnknownScript_0x19d8ef - trainertotext BIRD_KEEPER, VANCE1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19d8f3 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19d8ef + trainertotext BIRD_KEEPER, VANCE1, MEM_BUFFER_0 scall UnknownScript_0x19d8e7 jump UnknownScript_0x19d8eb @@ -185,9 +185,9 @@ UnknownScript_0x19d957: scall UnknownScript_0x19d8e3 UnknownScript_0x19d95a: askforphonenumber PHONE_FISHER_WILTON - if_equal $1, UnknownScript_0x19d8f3 - if_equal $2, UnknownScript_0x19d8ef - trainertotext FISHER, WILTON1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19d8f3 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19d8ef + trainertotext FISHER, WILTON1, MEM_BUFFER_0 scall UnknownScript_0x19d8e7 jump UnknownScript_0x19d8eb diff --git a/maps/Route45.asm b/maps/Route45.asm index 38b7f77f2..f024eb7d7 100644 --- a/maps/Route45.asm +++ b/maps/Route45.asm @@ -42,15 +42,15 @@ UnknownScript_0x19e0cd: scall UnknownScript_0x19e11f UnknownScript_0x19e0d0: askforphonenumber PHONE_BLACKBELT_KENJI - if_equal $1, UnknownScript_0x19e12f - if_equal $2, UnknownScript_0x19e12b - trainertotext BLACKBELT_T, KENJI3, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19e12f + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19e12b + trainertotext BLACKBELT_T, KENJI3, MEM_BUFFER_0 scall UnknownScript_0x19e123 jump UnknownScript_0x19e127 UnknownScript_0x19e0e4: checkcode VAR_KENJI_BREAK - if_not_equal $1, UnknownScript_0x19e127 + if_not_equal 1, UnknownScript_0x19e127 checkmorn iftrue UnknownScript_0x19e10c checknite @@ -169,9 +169,9 @@ UnknownScript_0x19e1a1: scall UnknownScript_0x19e11f UnknownScript_0x19e1a4: askforphonenumber PHONE_HIKER_PARRY - if_equal $1, UnknownScript_0x19e12f - if_equal $2, UnknownScript_0x19e12b - trainertotext HIKER, PARRY1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19e12f + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19e12b + trainertotext HIKER, PARRY1, MEM_BUFFER_0 scall UnknownScript_0x19e123 jump UnknownScript_0x19e127 diff --git a/maps/Route46.asm b/maps/Route46.asm index 3ecab00f1..6edd26404 100644 --- a/maps/Route46.asm +++ b/maps/Route46.asm @@ -47,9 +47,9 @@ UnknownScript_0x1a96c3: scall UnknownScript_0x1a9753 UnknownScript_0x1a96c6: askforphonenumber PHONE_PICNICKER_ERIN - if_equal $1, UnknownScript_0x1a9763 - if_equal $2, UnknownScript_0x1a975f - trainertotext PICNICKER, ERIN1, $0 + if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a9763 + if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a975f + trainertotext PICNICKER, ERIN1, MEM_BUFFER_0 scall UnknownScript_0x1a9757 jump UnknownScript_0x1a975b diff --git a/maps/RuinsOfAlphAerodactylChamber.asm b/maps/RuinsOfAlphAerodactylChamber.asm index cce84bafd..a575828f6 100644 --- a/maps/RuinsOfAlphAerodactylChamber.asm +++ b/maps/RuinsOfAlphAerodactylChamber.asm @@ -48,7 +48,7 @@ RuinsOfAlphAerodactylChamber_MapScriptHeader: end MapRuinsOfAlphAerodactylChamberSignpost2Script: - refreshscreen $0 + refreshscreen writebyte UNOWNPUZZLE_AERODACTYL special Special_UnownPuzzle closetext diff --git a/maps/RuinsOfAlphHoOhChamber.asm b/maps/RuinsOfAlphHoOhChamber.asm index 02a306f72..ec90edc03 100644 --- a/maps/RuinsOfAlphHoOhChamber.asm +++ b/maps/RuinsOfAlphHoOhChamber.asm @@ -49,7 +49,7 @@ RuinsOfAlphHoOhChamber_MapScriptHeader: end MapRuinsOfAlphHoOhChamberSignpost2Script: - refreshscreen $0 + refreshscreen writebyte UNOWNPUZZLE_HO_OH special Special_UnownPuzzle closetext diff --git a/maps/RuinsOfAlphKabutoChamber.asm b/maps/RuinsOfAlphKabutoChamber.asm index efcf238c0..bbaaa4ad3 100644 --- a/maps/RuinsOfAlphKabutoChamber.asm +++ b/maps/RuinsOfAlphKabutoChamber.asm @@ -55,7 +55,7 @@ RuinsOfAlphKabutoChamberReceptionistScript: jumptextfaceplayer RuinsOfAlphKabutoChamberReceptionistText MapRuinsOfAlphKabutoChamberSignpost2Script: - refreshscreen $0 + refreshscreen writebyte UNOWNPUZZLE_KABUTO special Special_UnownPuzzle closetext @@ -86,7 +86,7 @@ ScientistScript_0x587a8: faceplayer opentext checkcode VAR_UNOWNCOUNT - if_equal 26, UnknownScript_0x587cf + if_equal NUM_UNOWN, UnknownScript_0x587cf checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER iftrue UnknownScript_0x587c9 checkevent EVENT_SOLVED_KABUTO_PUZZLE diff --git a/maps/RuinsOfAlphOmanyteChamber.asm b/maps/RuinsOfAlphOmanyteChamber.asm index 862b629f7..21583e485 100644 --- a/maps/RuinsOfAlphOmanyteChamber.asm +++ b/maps/RuinsOfAlphOmanyteChamber.asm @@ -49,7 +49,7 @@ RuinsOfAlphOmanyteChamber_MapScriptHeader: end MapRuinsOfAlphOmanyteChamberSignpost2Script: - refreshscreen $0 + refreshscreen writebyte UNOWNPUZZLE_OMANYTE special Special_UnownPuzzle closetext diff --git a/maps/RuinsOfAlphOutside.asm b/maps/RuinsOfAlphOutside.asm index 258a6f1c8..d313644bb 100644 --- a/maps/RuinsOfAlphOutside.asm +++ b/maps/RuinsOfAlphOutside.asm @@ -30,7 +30,7 @@ RuinsOfAlphOutside_MapScriptHeader: .MaybeScientist: checkcode VAR_UNOWNCOUNT - if_greater_than $2, .YesScientist + if_greater_than 2, .YesScientist jump .NoScientist .YesScientist: diff --git a/maps/RuinsOfAlphResearchCenter.asm b/maps/RuinsOfAlphResearchCenter.asm index bd20284d0..e9606cd42 100644 --- a/maps/RuinsOfAlphResearchCenter.asm +++ b/maps/RuinsOfAlphResearchCenter.asm @@ -22,7 +22,7 @@ RuinsOfAlphResearchCenter_MapScriptHeader: .ScientistCallback: checkscene - if_equal $1, .ShowScientist + if_equal 1, .ShowScientist return .ShowScientist: @@ -63,7 +63,7 @@ ScientistScript_0x591d1: faceplayer opentext checkcode VAR_UNOWNCOUNT - if_equal 26, UnknownScript_0x591df + if_equal NUM_UNOWN, UnknownScript_0x591df writetext UnknownText_0x59311 waitbutton closetext @@ -79,7 +79,7 @@ ScientistScript_0x591e5: faceplayer opentext checkcode VAR_UNOWNCOUNT - if_equal 26, UnknownScript_0x5920b + if_equal NUM_UNOWN, UnknownScript_0x5920b checkflag ENGINE_UNOWN_DEX iftrue UnknownScript_0x59205 checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS @@ -112,7 +112,7 @@ ScientistScript_0x59214: faceplayer opentext checkcode VAR_UNOWNCOUNT - if_equal 26, UnknownScript_0x5922e + if_equal NUM_UNOWN, UnknownScript_0x5922e checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS iftrue UnknownScript_0x59228 writetext UnknownText_0x5954f @@ -137,7 +137,7 @@ MapRuinsOfAlphResearchCenterSignpost1Script: checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST iftrue UnknownScript_0x59241 checkcode VAR_UNOWNCOUNT - if_equal 26, UnknownScript_0x59247 + if_equal NUM_UNOWN, UnknownScript_0x59247 UnknownScript_0x59241: writetext UnknownText_0x597b6 waitbutton @@ -155,7 +155,7 @@ MapRuinsOfAlphResearchCenterSignpost2Script: checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST iftrue UnknownScript_0x5925a checkcode VAR_UNOWNCOUNT - if_equal 26, UnknownScript_0x59260 + if_equal NUM_UNOWN, UnknownScript_0x59260 UnknownScript_0x5925a: writetext UnknownText_0x5980e waitbutton diff --git a/maps/SaffronGym.asm b/maps/SaffronGym.asm index 53f900cad..909c2754a 100644 --- a/maps/SaffronGym.asm +++ b/maps/SaffronGym.asm @@ -111,7 +111,7 @@ SaffronGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext SABRINA, SABRINA1, $1 + trainertotext SABRINA, SABRINA1, MEM_BUFFER_1 jumpstd gymstatue2 UnknownText_0x189cdf: diff --git a/maps/SaffronTrainStation.asm b/maps/SaffronTrainStation.asm index 19ea7a6ec..105a938a7 100644 --- a/maps/SaffronTrainStation.asm +++ b/maps/SaffronTrainStation.asm @@ -36,7 +36,7 @@ OfficerScript_0x18a81e: closetext applymovement SAFFRONTRAINSTATION_OFFICER, MovementData_0x18a88f applymovement PLAYER, MovementData_0x18a898 - writebyte $1 + writebyte TRUE special Special_MagnetTrain warpcheck newloadmap MAPSETUP_TRAIN diff --git a/maps/SilverCaveRoom3.asm b/maps/SilverCaveRoom3.asm index fd546e67a..e15469876 100644 --- a/maps/SilverCaveRoom3.asm +++ b/maps/SilverCaveRoom3.asm @@ -32,7 +32,7 @@ Red: special Special_FadeInQuickly pause 30 special HealParty - refreshscreen $0 + refreshscreen credits end diff --git a/maps/TeamRocketBaseB1F.asm b/maps/TeamRocketBaseB1F.asm index fce00700b..76b3cdc9f 100644 --- a/maps/TeamRocketBaseB1F.asm +++ b/maps/TeamRocketBaseB1F.asm @@ -35,7 +35,7 @@ SecurityCamera1a: spriteface PLAYER, LEFT applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 scall TrainerCameraGrunt1 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera scall PlaySecurityCameraSounds showemote EMOTE_SHOCK, PLAYER, 15 playmusic MUSIC_ROCKET_ENCOUNTER @@ -43,7 +43,7 @@ SecurityCamera1a: appear TEAMROCKETBASEB1F_ROCKET1 applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 scall TrainerCameraGrunt2 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera setevent EVENT_SECURITY_CAMERA_1 end @@ -60,7 +60,7 @@ SecurityCamera1b: spriteface PLAYER, LEFT applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 scall TrainerCameraGrunt1 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera scall PlaySecurityCameraSounds showemote EMOTE_SHOCK, PLAYER, 15 playmusic MUSIC_ROCKET_ENCOUNTER @@ -68,7 +68,7 @@ SecurityCamera1b: appear TEAMROCKETBASEB1F_ROCKET1 applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 scall TrainerCameraGrunt2 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera setevent EVENT_SECURITY_CAMERA_1 end @@ -85,7 +85,7 @@ SecurityCamera2a: spriteface PLAYER, LEFT applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement2 scall TrainerCameraGrunt1 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera scall PlaySecurityCameraSounds showemote EMOTE_SHOCK, PLAYER, 15 playmusic MUSIC_ROCKET_ENCOUNTER @@ -94,7 +94,7 @@ SecurityCamera2a: appear TEAMROCKETBASEB1F_ROCKET1 applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement3 scall TrainerCameraGrunt2 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera setevent EVENT_SECURITY_CAMERA_2 end @@ -111,7 +111,7 @@ SecurityCamera2b: spriteface PLAYER, LEFT applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement4 scall TrainerCameraGrunt1 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera scall PlaySecurityCameraSounds showemote EMOTE_SHOCK, PLAYER, 15 playmusic MUSIC_ROCKET_ENCOUNTER @@ -120,7 +120,7 @@ SecurityCamera2b: appear TEAMROCKETBASEB1F_ROCKET1 applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement5 scall TrainerCameraGrunt2 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera setevent EVENT_SECURITY_CAMERA_2 end @@ -137,7 +137,7 @@ SecurityCamera3a: spriteface PLAYER, LEFT applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 scall TrainerCameraGrunt1 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera scall PlaySecurityCameraSounds showemote EMOTE_SHOCK, PLAYER, 15 playmusic MUSIC_ROCKET_ENCOUNTER @@ -146,7 +146,7 @@ SecurityCamera3a: appear TEAMROCKETBASEB1F_ROCKET1 applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement6 scall TrainerCameraGrunt2 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera setevent EVENT_SECURITY_CAMERA_3 end @@ -163,7 +163,7 @@ SecurityCamera3b: spriteface PLAYER, LEFT applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 scall TrainerCameraGrunt1 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera scall PlaySecurityCameraSounds showemote EMOTE_SHOCK, PLAYER, 15 playmusic MUSIC_ROCKET_ENCOUNTER @@ -172,7 +172,7 @@ SecurityCamera3b: appear TEAMROCKETBASEB1F_ROCKET1 applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement7 scall TrainerCameraGrunt2 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera setevent EVENT_SECURITY_CAMERA_3 end @@ -189,7 +189,7 @@ SecurityCamera4: spriteface PLAYER, LEFT applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 scall TrainerCameraGrunt1 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera scall PlaySecurityCameraSounds showemote EMOTE_SHOCK, PLAYER, 15 playmusic MUSIC_ROCKET_ENCOUNTER @@ -198,7 +198,7 @@ SecurityCamera4: appear TEAMROCKETBASEB1F_ROCKET1 applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement8 scall TrainerCameraGrunt2 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera setevent EVENT_SECURITY_CAMERA_4 end @@ -215,7 +215,7 @@ SecurityCamera5: spriteface PLAYER, LEFT applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 scall TrainerCameraGrunt1 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera scall PlaySecurityCameraSounds showemote EMOTE_SHOCK, PLAYER, 15 playmusic MUSIC_ROCKET_ENCOUNTER @@ -224,7 +224,7 @@ SecurityCamera5: appear TEAMROCKETBASEB1F_ROCKET1 applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement9 scall TrainerCameraGrunt2 - if_equal $1, NoSecurityCamera + if_equal TRUE, NoSecurityCamera setevent EVENT_SECURITY_CAMERA_5 end diff --git a/maps/TinTower1F.asm b/maps/TinTower1F.asm index a322c6846..cfbb966f5 100644 --- a/maps/TinTower1F.asm +++ b/maps/TinTower1F.asm @@ -197,7 +197,7 @@ TinTower1FSage5Script: buttonsound verbosegiveitem RAINBOW_WING closetext - refreshscreen $0 + refreshscreen earthquake 72 waitsfx playsound SFX_STRENGTH diff --git a/maps/TrainerHouseB1F.asm b/maps/TrainerHouseB1F.asm index c4219a991..d2c689d5c 100644 --- a/maps/TrainerHouseB1F.asm +++ b/maps/TrainerHouseB1F.asm @@ -22,11 +22,11 @@ TrainerHouseReceptionistScript: buttonsound special SpecialTrainerHouse iffalse .GetCal3Name - trainertotext CAL, CAL2, $0 + trainertotext CAL, CAL2, MEM_BUFFER_0 jump .GotName .GetCal3Name: - trainertotext CAL, CAL3, $0 + trainertotext CAL, CAL3, MEM_BUFFER_0 .GotName: writetext TrainerHouseB1FYourOpponentIsText buttonsound diff --git a/maps/VermilionCity.asm b/maps/VermilionCity.asm index 90baf28b0..3dee2616b 100644 --- a/maps/VermilionCity.asm +++ b/maps/VermilionCity.asm @@ -68,7 +68,7 @@ VermilionGymBadgeGuy: checkevent EVENT_GOT_HP_UP_FROM_VERMILION_GUY iftrue .AlreadyGotItem checkcode VAR_BADGES - if_equal 16, .AllBadges + if_equal NUM_BADGES, .AllBadges if_greater_than 13, .MostBadges if_greater_than 9, .SomeBadges writetext UnknownText_0x1aabc8 diff --git a/maps/VermilionGym.asm b/maps/VermilionGym.asm index a815a0e35..ac70f5c95 100644 --- a/maps/VermilionGym.asm +++ b/maps/VermilionGym.asm @@ -101,7 +101,7 @@ VermilionGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext LT_SURGE, LT_SURGE1, $1 + trainertotext LT_SURGE, LT_SURGE1, MEM_BUFFER_1 jumpstd gymstatue2 UnknownText_0x192142: diff --git a/maps/VictoryRoadGate.asm b/maps/VictoryRoadGate.asm index 3d15be073..f1ae34fab 100644 --- a/maps/VictoryRoadGate.asm +++ b/maps/VictoryRoadGate.asm @@ -29,7 +29,7 @@ VictoryRoadGateBadgeCheckScript: writetext VictoryRoadGateOfficerText buttonsound checkcode VAR_BADGES - if_greater_than 7, .AllEightBadges + if_greater_than NUM_JOHTO_BADGES - 1, .AllEightBadges writetext VictoryRoadGateNotEnoughBadgesText waitbutton closetext diff --git a/maps/VioletGym.asm b/maps/VioletGym.asm index aa5934103..fc7cb0169 100644 --- a/maps/VioletGym.asm +++ b/maps/VioletGym.asm @@ -109,7 +109,7 @@ VioletGymStatue: iftrue .Beaten jumpstd gymstatue1 .Beaten: - trainertotext FALKNER, FALKNER1, $1 + trainertotext FALKNER, FALKNER1, MEM_BUFFER_1 jumpstd gymstatue2 UnknownText_0x68473: diff --git a/maps/VioletPokecenter1F.asm b/maps/VioletPokecenter1F.asm index f16ee8989..757ab1f44 100644 --- a/maps/VioletPokecenter1F.asm +++ b/maps/VioletPokecenter1F.asm @@ -27,7 +27,7 @@ VioletPokecenter1F_ElmsAideScript: checkcode VAR_PARTYCOUNT if_equal PARTY_LENGTH, .PartyFull giveegg TOGEPI, 5 - stringtotext .eggname, $1 + stringtotext .eggname, MEM_BUFFER_1 scall .AideGivesEgg setevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE clearevent EVENT_ELMS_AIDE_IN_LAB diff --git a/maps/ViridianGym.asm b/maps/ViridianGym.asm index ce75a5503..19f8654d9 100644 --- a/maps/ViridianGym.asm +++ b/maps/ViridianGym.asm @@ -60,7 +60,7 @@ ViridianGymStatue: jumpstd gymstatue1 .Beaten: - trainertotext BLUE, BLUE1, $1 + trainertotext BLUE, BLUE1, MEM_BUFFER_1 jumpstd gymstatue2 LeaderBlueBeforeText: