ref: e002b536af8423f420e13e93d6c0e59f94ee5044
parent: 6393ecb7e5d1f105db65cb831964b925db2bb2e8
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sun Mar 10 11:31:59 EDT 2019
Rename more script commands for consistency and predictability Fixes #540
--- a/constants/battle_tower_constants.asm
+++ b/constants/battle_tower_constants.asm
@@ -7,7 +7,7 @@
BATTLETOWER_TRAINERDATALENGTH EQU $24
BATTLE_TOWER_STRUCT_LENGTH EQUS "(NAME_LENGTH + BATTLETOWER_PARTY_LENGTH * NICKNAMED_MON_STRUCT_LENGTH + BATTLETOWER_TRAINERDATALENGTH)"
-; BattleTowerAction writebyte arguments (see engine/events/battle_tower/battle_tower.asm)
+; BattleTowerAction setval arguments (see engine/events/battle_tower/battle_tower.asm)
const_def
const BATTLETOWERACTION_CHECK_EXPLANATION_READ
const BATTLETOWERACTION_SET_EXPLANATION_READ
--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -2,12 +2,12 @@
PLAYER EQU 0
LAST_TALKED EQU -2
-; memory constants
+; string buffer constants
const_def
- const MEM_BUFFER_0 ; use wStringBuffer3
- const MEM_BUFFER_1 ; use wStringBuffer4
- const MEM_BUFFER_2 ; use wStringBuffer5
-NUM_MEM_BUFFERS EQU const_value
+ const STRING_BUFFER_3 ; use wStringBuffer3
+ const STRING_BUFFER_4 ; use wStringBuffer4
+ const STRING_BUFFER_5 ; use wStringBuffer5
+NUM_STRING_BUFFERS EQU const_value
; checkmoney/takemoney accounts
const_def
@@ -34,7 +34,13 @@
const PHONE_CONTACTS_FULL ; 1
const PHONE_CONTACT_REFUSED ; 2
-; writecode/checkcode arguments
+; trainertext arguments
+ const_def
+ const TRAINERTEXT_SEEN
+ const TRAINERTEXT_WIN
+ const TRAINERTEXT_LOSS
+
+; readvar/writevar/loadvar arguments
; _GetVarAction.VarActionTable indexes (see engine/overworld/variables.asm)
const_def
const VAR_STRINGBUFFER2 ; 00
@@ -223,7 +229,7 @@
const SWARM_DUNSPARCE ; 0
const SWARM_YANMA ; 1
-; ActivateFishingSwarm writebyte arguments
+; ActivateFishingSwarm setval arguments
const_def
const FISHSWARM_NONE ; 0
const FISHSWARM_QWILFISH ; 1
@@ -256,7 +262,7 @@
const BUGCONTEST_BOXED_MON ; 1
const BUGCONTEST_NO_CATCH ; 2
-; HealMachineAnim writebyte arguments
+; HealMachineAnim setval arguments
; HealMachineAnim.Pointers indexes (see engine/events/heal_machine_anim.asm)
const_def
const HEALMACHINE_POKECENTER ; 0
@@ -263,7 +269,7 @@
const HEALMACHINE_ELMS_LAB ; 1
const HEALMACHINE_HALL_OF_FAME ; 2
-; UnownPuzzle writebyte arguments
+; UnownPuzzle setval arguments
; LoadUnownPuzzlePiecesGFX.LZPointers indexes (see engine/games/unown_puzzle.asm)
const_def
const UNOWNPUZZLE_KABUTO ; 0
@@ -272,7 +278,7 @@
const UNOWNPUZZLE_HO_OH ; 3
NUM_UNOWN_PUZZLES EQU const_value
-; DisplayUnownWords writebyte arguments
+; DisplayUnownWords setval arguments
; UnownWalls and MenuHeaders_UnownWalls indexes (see data/events/unown_walls.asm)
const_def
const UNOWNWORDS_ESCAPE ; 0
@@ -280,7 +286,7 @@
const UNOWNWORDS_WATER ; 2
const UNOWNWORDS_HO_OH ; 3
-; MoveTutor writebyte arguments
+; MoveTutor setval arguments
const_def 1
const MOVETUTOR_FLAMETHROWER ; 1
const MOVETUTOR_THUNDERBOLT ; 2
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -1388,8 +1388,8 @@
callasm .empty_fn ; empty function
- copybytetovar wBuffer2
- writevarcode VAR_MOVEMENT
+ readmem wBuffer2
+ writevar VAR_MOVEMENT
special ReplaceKrisSprite
special PlayMapMusic
--- a/docs/event_commands.md
+++ b/docs/event_commands.md
@@ -7,340 +7,555 @@
## `$00`: <code>scall <i>script</i></code>
+
## `$01`: <code>farscall <i>script</i></code>
+
## `$02`: <code>ptcall <i>script</i></code>
+
## `$03`: <code>jump <i>script</i></code>
+
## `$04`: <code>farjump <i>script</i></code>
+
## `$05`: <code>ptjump <i>script</i></code>
+
## `$06`: <code>ifequal <i>byte</i>, <i>script</i></code>
+
## `$07`: <code>ifnotequal <i>byte</i>, <i>script</i></code>
+
## `$08`: <code>iffalse <i>script</i></code>
+
## `$09`: <code>iftrue <i>script</i></code>
+
## `$0A`: <code>ifgreater <i>byte</i>, <i>script</i></code>
+
## `$0B`: <code>ifless <i>byte</i>, <i>script</i></code>
+
## `$0C`: <code>jumpstd <i>std_script</i></code>
+
## `$0D`: <code>callstd <i>std_script</i></code>
+
## `$0E`: <code>callasm <i>asm</i></code>
+
## `$0F`: <code>special <i>special_pointer</i></code>
+
## `$10`: <code>ptcallasm <i>asm</i></code>
+
## `$11`: <code>checkmapscene <i>map</i></code>
+
## `$12`: <code>setmapscene <i>map</i>, <i>scene_id</i></code>
+
## `$13`: `checkscene`
+
## `$14`: <code>setscene <i>scene_id</i></code>
-## `$15`: <code>writebyte <i>value</i></code>
-## `$16`: <code>addvar <i>value</i></code>
+## `$15`: <code>setval <i>value</i></code>
+<code>[wScriptVar] = <i>value</i></code>
+
+
+## `$16`: <code>addval <i>value</i></code>
+
+<code>[wScriptVar] += <i>value</i></code>
+
+
## `$17`: <code>random <i>value</i></code>
+
## `$18`: `checkver`
-## `$19`: <code>copybytetovar <i>address</i></code>
-## `$1A`: <code>copyvartobyte <i>address</i></code>
+## `$19`: <code>readmem <i>address</i></code>
-## `$1B`: <code>loadvar <i>address</i>, <i>value</i></code>
+<code>[wScriptVar] = [<i>address</i>]</code>
-## `$1C`: <code>checkcode <i>variable</i></code>
-## `$1D`: <code>writevarcode <i>variable</i></code>
+## `$1A`: <code>writemem <i>address</i></code>
-## `$1E`: <code>writecode <i>variable</i>, <i>value</i></code>
+<code>[<i>address</i>] = [wScriptVar]</code>
+
+## `$1B`: <code>loadmem <i>address</i>, <i>value</i></code>
+
+<code>[<i>address</i>] = <i>value</i></code>
+
+
+## `$1C`: <code>readvar <i>variable</i></code>
+
+<code>[wScriptVar] = GetVarAction(<i>variable</i>)</code>
+
+
+## `$1D`: <code>writevar <i>variable</i></code>
+
+<code>GetVarAction(<i>variable</i>) = [wScriptVar]</code>
+
+
+## `$1E`: <code>loadvar <i>variable</i>, <i>value</i></code>
+
+<code>GetVarAction(<i>variable</i>) = <i>value</i></code>
+
+
## `$1F`: <code>giveitem <i>item_id</i>[, <i>quantity</i>=1]</code>
+
## `$20`: <code>takeitem <i>item_id</i>[, <i>quantity</i>=1]</code>
+
## `$21`: <code>checkitem <i>item_id</i></code>
+
## `$22`: <code>givemoney <i>account</i>, <i>value</i></code>
+
## `$23`: <code>takemoney <i>account</i>, <i>value</i></code>
+
## `$24`: <code>checkmoney <i>account</i>, <i>value</i></code>
+
## `$25`: <code>givecoins <i>value</i></code>
+
## `$26`: <code>takecoins <i>value</i></code>
+
## `$27`: <code>checkcoins <i>value</i></code>
+
## `$28`: <code>addcellnum <i>contact_id</i></code>
+
## `$29`: <code>delcellnum <i>contact_id</i></code>
+
## `$2A`: <code>checkcellnum <i>contact_id</i></code>
+
## `$2B`: <code>checktime <i>time</i></code>
+
## `$2C`: <code>checkpoke <i>mon_id</i></code>
+
## `$2D`: <code>givepoke <i>mon_id</i>, <i>level</i>[, <i>item</i>=0[, <i>trainer</i>=0, <i>ot_name</i>, <i>nickname</i>]]</code>
+
## `$2E`: <code>giveegg <i>mon_id</i>, <i>level</i></code>
+
## `$2F`: <code>givepokemail <i>pointer</i></code>
+
## `$30`: <code>checkpokemail <i>pointer</i></code>
+
## `$31`: <code>checkevent <i>event_flag</i></code>
+
## `$32`: <code>clearevent <i>event_flag</i></code>
+
## `$33`: <code>setevent <i>event_flag</i></code>
+
## `$34`: <code>checkflag <i>engine_flag</i></code>
+
## `$35`: <code>clearflag <i>engine_flag</i></code>
+
## `$36`: <code>setflag <i>engine_flag</i></code>
+
## `$37`: `wildon`
+
## `$38`: `wildoff`
+
## `$39`: <code>xycompare <i>pointer</i></code>
+
## `$3A`: <code>warpmod <i>warp_id</i>, <i>map</i></code>
+
## `$3B`: <code>blackoutmod <i>map</i></code>
+
## `$3C`: <code>warp <i>map</i>, <i>x</i>, <i>y</i></code>
-## `$3D`: <code>readmoney <i>account</i>, <i>memory</i></code>
-## `$3E`: <code>readcoins <i>memory</i></code>
+## `$3D`: <code>getmoney <i>string_buffer</i>, <i>account</i></code>
-## `$3F`: <code>vartomem <i>memory</i></code>
+<code>GetStringBuffer(<i>string_buffer</i>) = PrintNum(GetMoneyAccount(<i>account</i>))</code>
-## `$40`: <code>pokenamemem <i>mon_id</i>, <i>memory</i></code>
-## `$41`: <code>itemtotext <i>item_id</i>, <i>memory</i></code>
+## `$3E`: <code>getcoins <i>string_buffer</i></code>
-## `$42`: <code>mapnametotext <i>memory</i></code>
+<code>GetStringBuffer(<i>string_buffer</i>) = PrintNum([wCoins])</code>
-## `$43`: <code>trainertotext <i>trainer_id</i>, <i>trainer_group</i>, <i>memory</i></code>
-## `$44`: <code>stringtotext <i>text_pointer</i>, <i>memory</i></code>
+## `$3F`: <code>getnum <i>string_buffer</i></code>
+<code>GetStringBuffer(<i>string_buffer</i>) = PrintNum([wScriptVar])</code>
+
+
+## `$40`: <code>getmonname <i>string_buffer</i>, <i>mon_id</i></code>
+
+<code>GetStringBuffer(<i>string_buffer</i>) = GetPokemonName(<i>mon_id</i>)</code>
+
+If <code><i>mon_id</i></code> = `USE_SCRIPT_VAR`, then it uses `[wScriptVar]` instead.
+
+
+## `$41`: <code>getitemname <i>string_buffer</i>, <i>item_id</i></code>
+
+<code>GetStringBuffer(<i>string_buffer</i>) = GetItemName(<i>item_id</i>)</code>
+
+If <code><i>item_id</i></code> = `USE_SCRIPT_VAR`, then it uses `[wScriptVar]` instead.
+
+
+## `$42`: <code>getcurlandmarkname <i>string_buffer</i></code>
+
+<code>GetStringBuffer(<i>string_buffer</i>) = GetLandmarkName(GetWorldMapLocation())</code>
+
+
+## `$43`: <code>gettrainername <i>string_buffer</i>, <i>trainer_group</i>, <i>trainer_id</i></code>
+
+<code>GetStringBuffer(<i>string_buffer</i>) = GetTrainerName(<i>trainer_group</i>, <i>trainer_id</i>)</code>
+
+
+## `$44`: <code>getstring <i>string_buffer</i>, <i>text_pointer</i></code>
+
+<code>GetStringBuffer(<i>string_buffer</i>) = CopyName1([wScriptBank], <i>text_pointer</i>)</code>
+
+
## `$45`: `itemnotify`
+
## `$46`: `pocketisfull`
+
## `$47`: `opentext`
+
## `$48`: <code>refreshscreen [<i>dummy</i>=0]</code>
+
## `$49`: `closetext`
+
## `$4A`: <code>loadbytec2cf <i>byte</i></code>
+
## `$4B`: <code>farwritetext <i>text_pointer</i></code>
+
## `$4C`: <code>writetext <i>text_pointer</i></code>
+
## `$4D`: <code>repeattext <i>byte1</i>, <i>byte2</i></code>
+
## `$4E`: `yesorno`
+
## `$4F`: <code>loadmenu <i>menu_header</i></code>
+
## `$50`: `closewindow`
+
## `$51`: <code>jumptextfaceplayer <i>text_pointer</i></code>
+
## `$52`: <code>farjumptext <i>text_pointer</i></code>
+
## `$53`: <code>jumptext <i>text_pointer</i></code>
+
## `$54`: `waitbutton`
+
## `$55`: `buttonsound`
+
## `$56`: <code>pokepic <i>mon_id</i></code>
+
## `$57`: `closepokepic`
+
## `$58`: `_2dmenu`
+
## `$59`: `verticalmenu`
+
## `$5A`: `loadpikachudata`
+
## `$5B`: `randomwildmon`
-## `$5C`: `loadmemtrainer`
+## `$5C`: `loadtemptrainer`
+
+`[wOtherTrainer] = [wTempTrainer]`
+
+
## `$5D`: <code>loadwildmon <i>mon_id</i>, <i>level</i></code>
+
## `$5E`: <code>loadtrainer <i>trainer_group</i>, <i>trainer_id</i></code>
+
## `$5F`: `startbattle`
+
## `$60`: `reloadmapafterbattle`
+
## `$61`: <code>catchtutorial <i>byte</i></code>
-## `$62`: <code>trainertext <i>which_text</i></code>
+## `$62`: <code>trainertext <i>text_id</i></code>
+
+
## `$63`: <code>trainerflagaction <i>action</i></code>
+
## `$64`: <code>winlosstext <i>win_text_pointer</i>, <i>loss_text_pointer</i></code>
+
## `$65`: `scripttalkafter`
+
## `$66`: `endifjustbattled`
+
## `$67`: `checkjustbattled`
+
## `$68`: <code>setlasttalked <i>object_id</i></code>
+
## `$69`: <code>applymovement <i>object_id</i>, <i>data_pointer</i></code>
-## `$6A`: <code>applymovement2 <i>data_pointer</i></code>
+## `$6A`: <code>applymovementlasttalked <i>data_pointer</i></code>
+
+
## `$6B`: `faceplayer`
+
## `$6C`: <code>faceobject <i>object1</i>, <i>object2</i></code>
+
## `$6D`: <code>variablesprite <i>variable_sprite_id</i>, <i>sprite_id</i></code>
+
## `$6E`: <code>disappear <i>object_id</i></code>
+
## `$6F`: <code>appear <i>object_id</i></code>
+
## `$70`: <code>follow <i>object2</i>, <i>object1</i></code>
+
## `$71`: `stopfollow`
+
## `$72`: <code>moveobject <i>object_id</i>, <i>x</i>, <i>y</i></code>
+
## `$73`: <code>writeobjectxy <i>object_id</i></code>
+
## `$74`: <code>loademote <i>emote_id</i></code>
+
## `$75`: <code>showemote <i>emote_id</i>, <i>object_id</i>, <i>length</i></code>
+
## `$76`: <code>turnobject <i>object_id</i>, <i>facing</i></code>
+
## `$77`: <code>follownotexact <i>object2</i>, <i>object1</i></code>
+
## `$78`: <code>earthquake <i>param</i></code>
-## `$79`: <code>changemap <i>bank</i>, <i>blockdata_pointer</i></code>
+## `$79`: <code>changemapblocks <i>blockdata_pointer</i></code>
+
+<code>ChangeMap(<i>blockdata_pointer</i>)</code>
+
+
## `$7A`: <code>changeblock <i>x</i>, <i>y</i>, <i>block</i></code>
+
## `$7B`: `reloadmap`
+
## `$7C`: `reloadmappart`
+
## `$7D`: <code>writecmdqueue <i>queue_pointer</i></code>
+
## `$7E`: <code>delcmdqueue <i>byte</i></code>
+
## `$7F`: <code>playmusic <i>music_id</i></code>
+
## `$80`: `encountermusic`
+
## `$81`: <code>musicfadeout <i>music_id</i>, <i>length</i></code>
+
## `$82`: `playmapmusic`
+
## `$83`: `dontrestartmapmusic`
+
## `$84`: <code>cry <i>mon_id</i></code>
+
## `$85`: <code>playsound <i>sfx_id</i></code>
+
## `$86`: `waitsfx`
+
## `$87`: `warpsound`
+
## `$88`: `specialsound`
+
## `$89`: <code>autoinput <i>input_pointer</i></code>
+
## `$8A`: <code>newloadmap <i>which_method</i></code>
+
## `$8B`: <code>pause <i>length</i></code>
+
## `$8C`: <code>deactivatefacing <i>length</i></code>
+
## `$8D`: <code>priorityjump <i>script</i></code>
+
## `$8E`: `warpcheck`
+
## `$8F`: <code>ptpriorityjump <i>script</i></code>
+
## `$90`: `return`
+
## `$91`: `end`
+
## `$92`: <code>reloadandreturn <i>which_method</i></code>
+
## `$93`: `endall`
+
## `$94`: <code>pokemart <i>dialog_id</i>, <i>mart_id</i></code>
+
## `$95`: <code>elevator <i>floor_list</i></code>
+
## `$96`: <code>trade <i>trade_id</i></code>
+
## `$97`: <code>askforphonenumber <i>contact_id</i></code>
+
## `$98`: <code>phonecall <i>call_id</i></code>
+
## `$99`: `hangup`
+
## `$9A`: <code>describedecoration <i>byte</i></code>
+
## `$9B`: <code>fruittree <i>tree_id</i></code>
+
## `$9C`: <code>specialphonecall <i>call_id</i></code>
+
## `$9D`: `checkphonecall`
+
## `$9E`: <code>verbosegiveitem <i>item_id</i>[, <i>quantity</i>=1]</code>
-## `$9F`: <code>verbosegiveitem2 <i>item_id</i>, <i>variable</i></code>
+## `$9F`: <code>verbosegiveitemvar <i>item_id</i>, <i>variable</i></code>
+
+
## `$A0`: <code>swarm <i>swarm_id</i>, <i>map</i></code>
+
## `$A1`: `halloffame`
+
## `$A2`: `credits`
+
## `$A3`: <code>warpfacing <i>facing</i>, <i>map</i>, <i>x</i>, <i>y</i></code>
-## `$A4`: <code>battletowertext <i>memory</i></code>
-## `$A5`: <code>landmarktotext <i>landmark_id</i>, <i>memory</i></code>
+## `$A4`: <code>battletowertext <i>bttext_id</i></code>
-## `$A6`: <code>trainerclassname <i>trainer_group</i>, <i>memory</i></code>
-## `$A7`: <code>name <i>type</i>, <i>id</i>, <i>memory</i></code>
+## `$A5`: <code>getlandmarkname <i>string_buffer</i>, <i>landmark_id</i></code>
+<code>GetStringBuffer(<i>string_buffer</i>) = GetLandmarkName(<i>landmark_id</i>)</code>
+
+
+## `$A6`: <code>gettrainerclassname <i>string_buffer</i>, <i>trainer_group</i></code>
+
+<code>GetStringBuffer(<i>string_buffer</i>) = GetName(TRAINER_NAME, <i>trainer_group</i>)</code>
+
+
+## `$A7`: <code>getname <i>string_buffer</i>, <i>type</i>, <i>id</i></code>
+
+<code>GetStringBuffer(<i>string_buffer</i>) = GetName(<i>type</i>, <i>id</i>)</code>
+
+
## `$A8`: <code>wait <i>duration</i></code>
+
## `$A9`: `checksave`
--- a/docs/move_effect_commands.md
+++ b/docs/move_effect_commands.md
@@ -5,354 +5,530 @@
## `$01`: `checkturn`
+
## `$02`: `checkobedience`
+
## `$03`: `usedmovetext`
+
## `$04`: `doturn`
+
## `$05`: `critical`
+
## `$06`: `damagestats`
+
## `$07`: `stab`
+
## `$08`: `damagevariation`
+
## `$09`: `checkhit`
+
## `$0A`: `lowersub`
+
## `$0B`: `hittargetnosub`
+
## `$0C`: `raisesub`
+
## `$0D`: `failuretext`
+
## `$0E`: `applydamage`
+
## `$0F`: `criticaltext`
+
## `$10`: `supereffectivetext`
+
## `$11`: `checkfaint`
+
## `$12`: `buildopponentrage`
+
## `$13`: `poisontarget`
+
## `$14`: `sleeptarget`
+
## `$15`: `draintarget`
+
## `$16`: `eatdream`
+
## `$17`: `burntarget`
+
## `$18`: `freezetarget`
+
## `$19`: `paralyzetarget`
+
## `$1A`: `selfdestruct`
+
## `$1B`: `mirrormove`
+
## `$1C`: `statup`
+
## `$1D`: `statdown`
+
## `$1E`: `payday`
+
## `$1F`: `conversion`
+
## `$20`: `resetstats`
+
## `$21`: `storeenergy`
+
## `$22`: `unleashenergy`
+
## `$23`: `forceswitch`
+
## `$24`: `endloop`
+
## `$25`: `flinchtarget`
+
## `$26`: `ohko`
+
## `$27`: `recoil`
+
## `$28`: `mist`
+
## `$29`: `focusenergy`
+
## `$2A`: `confuse`
+
## `$2B`: `confusetarget`
+
## `$2C`: `heal`
+
## `$2D`: `transform`
+
## `$2E`: `screen`
+
## `$2F`: `poison`
+
## `$30`: `paralyze`
+
## `$31`: `substitute`
+
## `$32`: `rechargenextturn`
+
## `$33`: `mimic`
+
## `$34`: `metronome`
+
## `$35`: `leechseed`
+
## `$36`: `splash`
+
## `$37`: `disable`
+
## `$38`: `cleartext`
+
## `$39`: `charge`
+
## `$3A`: `checkcharge`
+
## `$3B`: `traptarget`
+
## `$3C`: `effect0x3c`
+
## `$3D`: `rampage`
+
## `$3E`: `checkrampage`
+
## `$3F`: `constantdamage`
+
## `$40`: `counter`
+
## `$41`: `encore`
+
## `$42`: `painsplit`
+
## `$43`: `snore`
+
## `$44`: `conversion2`
+
## `$45`: `lockon`
+
## `$46`: `sketch`
+
## `$47`: `defrostopponent`
+
## `$48`: `sleeptalk`
+
## `$49`: `destinybond`
+
## `$4A`: `spite`
+
## `$4B`: `falseswipe`
+
## `$4C`: `healbell`
+
## `$4D`: `kingsrock`
+
## `$4E`: `triplekick`
+
## `$4F`: `kickcounter`
+
## `$50`: `thief`
+
## `$51`: `arenatrap`
+
## `$52`: `nightmare`
+
## `$53`: `defrost`
+
## `$54`: `curse`
+
## `$55`: `protect`
+
## `$56`: `spikes`
+
## `$57`: `foresight`
+
## `$58`: `perishsong`
+
## `$59`: `startsandstorm`
+
## `$5A`: `endure`
+
## `$5B`: `checkcurl`
+
## `$5C`: `rolloutpower`
+
## `$5D`: `effect0x5d`
+
## `$5E`: `furycutter`
+
## `$5F`: `attract`
+
## `$60`: `happinesspower`
+
## `$61`: `present`
+
## `$62`: `damagecalc`
+
## `$63`: `frustrationpower`
+
## `$64`: `safeguard`
+
## `$65`: `checksafeguard`
+
## `$66`: `getmagnitude`
+
## `$67`: `batonpass`
+
## `$68`: `pursuit`
+
## `$69`: `clearhazards`
+
## `$6A`: `healmorn`
+
## `$6B`: `healday`
+
## `$6C`: `healnite`
+
## `$6D`: `hiddenpower`
+
## `$6E`: `startrain`
+
## `$6F`: `startsun`
+
## `$70`: `attackup`
+
## `$71`: `defenseup`
+
## `$72`: `speedup`
+
## `$73`: `specialattackup`
+
## `$74`: `specialdefenseup`
+
## `$75`: `accuracyup`
+
## `$76`: `evasionup`
+
## `$77`: `attackup2`
+
## `$78`: `defenseup2`
+
## `$79`: `speedup2`
+
## `$7A`: `specialattackup2`
+
## `$7B`: `specialdefenseup2`
+
## `$7C`: `accuracyup2`
+
## `$7D`: `evasionup2`
+
## `$7E`: `attackdown`
+
## `$7F`: `defensedown`
+
## `$80`: `speeddown`
+
## `$81`: `specialattackdown`
+
## `$82`: `specialdefensedown`
+
## `$83`: `accuracydown`
+
## `$84`: `evasiondown`
+
## `$85`: `attackdown2`
+
## `$86`: `defensedown2`
+
## `$87`: `speeddown2`
+
## `$88`: `specialattackdown2`
+
## `$89`: `specialdefensedown2`
+
## `$8A`: `accuracydown2`
+
## `$8B`: `evasiondown2`
+
## `$8C`: `statupmessage`
+
## `$8D`: `statdownmessage`
+
## `$8E`: `statupfailtext`
+
## `$8F`: `statdownfailtext`
+
## `$90`: `effectchance`
+
## `$91`: `statdownanim`
+
## `$92`: `statupanim`
+
## `$93`: `switchturn`
+
## `$94`: `fakeout`
+
## `$95`: `bellydrum`
+
## `$96`: `psychup`
+
## `$97`: `rage`
+
## `$98`: `doubleflyingdamage`
+
## `$99`: `doubleundergrounddamage`
+
## `$9A`: `mirrorcoat`
+
## `$9B`: `checkfuturesight`
+
## `$9C`: `futuresight`
+
## `$9D`: `doubleminimizedamage`
+
## `$9E`: `skipsuncharge`
+
## `$9F`: `thunderaccuracy`
+
## `$A0`: `teleport`
+
## `$A1`: `beatup`
+
## `$A2`: `ragedamage`
+
## `$A3`: `resettypematchup`
+
## `$A4`: `allstatsup`
+
## `$A5`: `bidefailtext`
+
## `$A6`: `raisesubnoanim`
+
## `$A7`: `lowersubnoanim`
+
## `$A8`: `beatupfailtext`
+
## `$A9`: `clearmissdamage`
+
## `$AA`: `movedelay`
+
## `$AB`: `hittarget`
+
## `$AC`: `tristatuschance`
+
## `$AD`: `supereffectivelooptext`
+
## `$AE`: `startloop`
+
## `$AF`: `curl`
+
## `$FE`: `endturn`
+
## `$FF`: `endmove`
--- a/docs/movement_commands.md
+++ b/docs/movement_commands.md
@@ -5,80 +5,119 @@
## `$00`−`$03`: <code>turn_head <i>direction</i></code>
+
## `$04`−`$07`: <code>turn_step <i>direction</i></code>
+
## `$08`−`$0B`: <code>slow_step <i>direction</i></code>
+
## `$0C`−`$0F`: <code>step <i>direction</i></code>
+
## `$10`−`$13`: <code>big_step <i>direction</i></code>
+
## `$14`−`$17`: <code>slow_slide_step <i>direction</i></code>
+
## `$18`−`$1B`: <code>slide_step <i>direction</i></code>
+
## `$1C`−`$1F`: <code>fast_slide_step <i>direction</i></code>
+
## `$20`−`$23`: <code>turn_away <i>direction</i></code>
+
## `$24`−`$27`: <code>turn_in <i>direction</i></code>
+
## `$28`−`$2B`: <code>turn_waterfall <i>direction</i></code>
+
## `$2C`−`$2F`: <code>slow_jump_step <i>direction</i></code>
+
## `$30`−`$33`: <code>jump_step <i>direction</i></code>
+
## `$34`−`$37`: <code>fast_jump_step <i>direction</i></code>
+
## `$38`: `remove_sliding`
+
## `$39`: `set_sliding`
+
## `$3A`: `remove_fixed_facing`
+
## `$3B`: `fix_facing`
+
## `$3C`: `show_object`
+
## `$3D`: `hide_object`
+
## `$3E`−`$46`: <code>step_sleep <i>length</i></code>
+
## `$47`: `step_end`
+
## `$48`: <code>step_48 <i>param</i></code>
+
## `$49`: `remove_object`
+
## `$4A`: `step_loop`
+
## `$4B`: `step_4b`
+
## `$4C`: `teleport_from`
+
## `$4D`: `teleport_to`
+
## `$4E`: `skyfall`
+
## `$4F`: <code>step_dig <i>length</i></code>
+
## `$50`: `step_bump`
+
## `$51`: `fish_got_bite`
+
## `$52`: `fish_cast_rod`
+
## `$53`: `hide_emote`
+
## `$54`: `show_emote`
+
## `$55`: <code>step_shake <i>displacement</i></code>
+
## `$56`: `tree_shake`
+
## `$57`: <code>rock_smash <i>length</i></code>
+
## `$58`: <code>return_dig <i>length</i></code>
+
## `$59`: `skyfall_top`
--- a/engine/events/bug_contest/contest.asm
+++ b/engine/events/bug_contest/contest.asm
@@ -7,11 +7,11 @@
ret
BugCatchingContestBattleScript::
- writecode VAR_BATTLETYPE, BATTLETYPE_CONTEST
+ loadvar VAR_BATTLETYPE, BATTLETYPE_CONTEST
randomwildmon
startbattle
reloadmapafterbattle
- copybytetovar wParkBallsRemaining
+ readmem wParkBallsRemaining
iffalse BugCatchingContestOutOfBallsScript
end
--- a/engine/events/forced_movement.asm
+++ b/engine/events/forced_movement.asm
@@ -1,5 +1,5 @@
Script_ForcedMovement::
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal DOWN, .down
ifequal UP, .up
ifequal LEFT, .left
--- a/engine/events/fruit_trees.asm
+++ b/engine/events/fruit_trees.asm
@@ -1,8 +1,8 @@
FruitTreeScript::
callasm GetCurTreeFruit
opentext
- copybytetovar wCurFruit
- itemtotext USE_SCRIPT_VAR, MEM_BUFFER_0
+ readmem wCurFruit
+ getitemname STRING_BUFFER_3, USE_SCRIPT_VAR
writetext FruitBearingTreeText
buttonsound
callasm TryResetFruitTrees
@@ -14,7 +14,7 @@
.fruit
writetext HeyItsFruitText
- copybytetovar wCurFruit
+ readmem wCurFruit
giveitem ITEM_FROM_MEM
iffalse .packisfull
buttonsound
--- a/engine/events/misc_scripts_2.asm
+++ b/engine/events/misc_scripts_2.asm
@@ -12,8 +12,8 @@
HiddenItemScript::
opentext
- copybytetovar wEngineBuffer3
- itemtotext USE_SCRIPT_VAR, MEM_BUFFER_0
+ readmem wEngineBuffer3
+ getitemname STRING_BUFFER_3, USE_SCRIPT_VAR
writetext .found_text
giveitem ITEM_FROM_MEM
iffalse .bag_full
--- a/engine/events/overworld.asm
+++ b/engine/events/overworld.asm
@@ -414,8 +414,8 @@
callasm .empty_fn ; empty function
- copybytetovar wBuffer2
- writevarcode VAR_MOVEMENT
+ readmem wBuffer2
+ writevar VAR_MOVEMENT
special ReplaceKrisSprite
special PlayMapMusic
@@ -624,7 +624,7 @@
farscall Script_AbortBugContest
special WarpToSpawnPoint
callasm DelayLoadingNewSprites
- writecode VAR_MOVEMENT, PLAYER_NORMAL
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_FLY
callasm FlyToAnim
special WaitSFX
@@ -871,7 +871,7 @@
applymovement PLAYER, .DigOut
farscall Script_AbortBugContest
special WarpToSpawnPoint
- writecode VAR_MOVEMENT, PLAYER_NORMAL
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_DOOR
playsound SFX_WARP_FROM
applymovement PLAYER, .DigReturn
@@ -958,7 +958,7 @@
applymovement PLAYER, .TeleportFrom
farscall Script_AbortBugContest
special WarpToSpawnPoint
- writecode VAR_MOVEMENT, PLAYER_NORMAL
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_TELEPORT
playsound SFX_WARP_FROM
applymovement PLAYER, .TeleportTo
@@ -1025,7 +1025,7 @@
Script_UsedStrength:
callasm SetStrengthFlag
writetext .UsedStrength
- copybytetovar wBuffer6
+ readmem wBuffer6
cry 0
pause 3
writetext .StrengthAllowedItToMoveBoulders
@@ -1390,11 +1390,11 @@
special WaitSFX
playsound SFX_STRENGTH
earthquake 84
- applymovement2 MovementData_0xcf55
+ applymovementlasttalked MovementData_0xcf55
disappear -2
callasm RockMonEncounter
- copybytetovar wTempWildMonSpecies
+ readmem wTempWildMonSpecies
iffalse .done
randomwildmon
startbattle
@@ -1609,7 +1609,7 @@
Script_FishCastRod:
reloadmappart
- loadvar hBGMapMode, $0
+ loadmem hBGMapMode, $0
special UpdateTimePals
loademote EMOTE_ROD
callasm LoadFishingGFX
@@ -1735,7 +1735,7 @@
Script_GetOnBike:
reloadmappart
special UpdateTimePals
- writecode VAR_MOVEMENT, PLAYER_BIKE
+ loadvar VAR_MOVEMENT, PLAYER_BIKE
writetext GotOnTheBikeText
waitbutton
closetext
@@ -1743,7 +1743,7 @@
end
Script_GetOnBike_Register:
- writecode VAR_MOVEMENT, PLAYER_BIKE
+ loadvar VAR_MOVEMENT, PLAYER_BIKE
closetext
special ReplaceKrisSprite
end
@@ -1755,7 +1755,7 @@
Script_GetOffBike:
reloadmappart
special UpdateTimePals
- writecode VAR_MOVEMENT, PLAYER_NORMAL
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
writetext GotOffTheBikeText
waitbutton
@@ -1766,7 +1766,7 @@
end
Script_GetOffBike_Register:
- writecode VAR_MOVEMENT, PLAYER_NORMAL
+ loadvar VAR_MOVEMENT, PLAYER_NORMAL
jump FinishGettingOffBike
Script_CantGetOffBike:
--- a/engine/events/std_scripts.asm
+++ b/engine/events/std_scripts.asm
@@ -113,7 +113,7 @@
pause 10
special HealParty
playmusic MUSIC_NONE
- writebyte HEALMACHINE_POKECENTER
+ setval HEALMACHINE_POKECENTER
special HealMachineAnim
pause 30
special RestartMapMusic
@@ -203,7 +203,7 @@
Radio1Script:
opentext
- writebyte MAPRADIO_POKEMON_CHANNEL
+ setval MAPRADIO_POKEMON_CHANNEL
special MapRadio
closetext
end
@@ -211,7 +211,7 @@
Radio2Script:
; Lucky Channel
opentext
- writebyte MAPRADIO_LUCKY_CHANNEL
+ setval MAPRADIO_LUCKY_CHANNEL
special MapRadio
closetext
end
@@ -244,7 +244,7 @@
farjumptext MartSignText
DayToTextScript:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal MONDAY, .Monday
ifequal TUESDAY, .Tuesday
ifequal WEDNESDAY, .Wednesday
@@ -251,25 +251,25 @@
ifequal THURSDAY, .Thursday
ifequal FRIDAY, .Friday
ifequal SATURDAY, .Saturday
- stringtotext .SundayText, MEM_BUFFER_0
+ getstring STRING_BUFFER_3, .SundayText
end
.Monday:
- stringtotext .MondayText, MEM_BUFFER_0
+ getstring STRING_BUFFER_3, .MondayText
end
.Tuesday:
- stringtotext .TuesdayText, MEM_BUFFER_0
+ getstring STRING_BUFFER_3, .TuesdayText
end
.Wednesday:
- stringtotext .WednesdayText, MEM_BUFFER_0
+ getstring STRING_BUFFER_3, .WednesdayText
end
.Thursday:
- stringtotext .ThursdayText, MEM_BUFFER_0
+ getstring STRING_BUFFER_3, .ThursdayText
end
.Friday:
- stringtotext .FridayText, MEM_BUFFER_0
+ getstring STRING_BUFFER_3, .FridayText
end
.Saturday:
- stringtotext .SaturdayText, MEM_BUFFER_0
+ getstring STRING_BUFFER_3, .SaturdayText
end
.SundayText:
db "SUNDAY@"
@@ -321,7 +321,7 @@
farwritetext ContestResults_ReadyToJudgeText
waitbutton
special BugContestJudging
- vartomem MEM_BUFFER_0
+ getnum STRING_BUFFER_3
ifequal 1, BugContestResults_FirstPlace
ifequal 2, BugContestResults_SecondPlace
ifequal 3, BugContestResults_ThirdPlace
@@ -383,7 +383,7 @@
BugContestResults_FirstPlace:
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1
- itemtotext SUN_STONE, MEM_BUFFER_1
+ getitemname STRING_BUFFER_4, SUN_STONE
farwritetext ContestResults_PlayerWonAPrizeText
waitbutton
verbosegiveitem SUN_STONE
@@ -391,7 +391,7 @@
jump BugContestResults_ReturnAfterWinnersPrize
BugContestResults_SecondPlace:
- itemtotext EVERSTONE, MEM_BUFFER_1
+ getitemname STRING_BUFFER_4, EVERSTONE
farwritetext ContestResults_PlayerWonAPrizeText
waitbutton
verbosegiveitem EVERSTONE
@@ -399,7 +399,7 @@
jump BugContestResults_ReturnAfterWinnersPrize
BugContestResults_ThirdPlace:
- itemtotext GOLD_BERRY, MEM_BUFFER_1
+ getitemname STRING_BUFFER_4, GOLD_BERRY
farwritetext ContestResults_PlayerWonAPrizeText
waitbutton
verbosegiveitem GOLD_BERRY
@@ -614,7 +614,7 @@
AskNumber1MScript:
special RandomPhoneMon
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -699,7 +699,7 @@
AskNumber2MScript:
special RandomPhoneMon
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -790,7 +790,7 @@
end
NumberAcceptedMScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -914,7 +914,7 @@
end
NumberDeclinedMScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -1038,7 +1038,7 @@
end
PhoneFullMScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -1162,7 +1162,7 @@
end
RematchMScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -1268,7 +1268,7 @@
end
GiftMScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_BIRDKEEPER_JOSE, .Jose
ifequal PHONE_BUG_CATCHER_WADE, .Wade
ifequal PHONE_SCHOOLBOY_ALAN, .Alan
@@ -1307,7 +1307,7 @@
end
PackFullMScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_BIRDKEEPER_JOSE, .Jose
ifequal PHONE_YOUNGSTER_JOEY, .Joey
@@ -1378,7 +1378,7 @@
RematchGiftMScript:
opentext
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_YOUNGSTER_JOEY, .Joey
ifequal PHONE_BIRDKEEPER_VANCE, .Vance
@@ -1402,7 +1402,7 @@
end
AskNumber1FScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -1438,7 +1438,7 @@
end
AskNumber2FScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -1481,7 +1481,7 @@
end
NumberAcceptedFScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -1533,7 +1533,7 @@
end
NumberDeclinedFScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -1585,7 +1585,7 @@
end
PhoneFullFScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -1637,7 +1637,7 @@
end
RematchFScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
ifequal PHONE_PICNICKER_LIZ, .Liz
@@ -1683,7 +1683,7 @@
end
GiftFScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_PICNICKER_GINA, .Gina
ifequal PHONE_LASS_DANA, .Dana
@@ -1707,7 +1707,7 @@
end
PackFullFScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_PICNICKER_GINA, .Gina
ifequal PHONE_LASS_DANA, .Dana
@@ -1741,7 +1741,7 @@
end
RematchGiftFScript:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_PICNICKER_ERIN, .Erin
.Erin:
@@ -1751,7 +1751,7 @@
end
GymStatue1Script:
- mapnametotext MEM_BUFFER_0
+ getcurlandmarkname STRING_BUFFER_3
opentext
farwritetext GymStatue_CityGymText
waitbutton
@@ -1759,7 +1759,7 @@
end
GymStatue2Script:
- mapnametotext MEM_BUFFER_0
+ getcurlandmarkname STRING_BUFFER_3
opentext
farwritetext GymStatue_CityGymText
buttonsound
--- a/engine/events/trainer_scripts.asm
+++ b/engine/events/trainer_scripts.asm
@@ -2,16 +2,16 @@
faceplayer
trainerflagaction CHECK_FLAG
iftrue AlreadyBeatenTrainerScript
- loadmemtrainer
+ loadtemptrainer
encountermusic
jump StartBattleWithMapTrainerScript
SeenByTrainerScript::
- loadmemtrainer
+ loadtemptrainer
encountermusic
showemote EMOTE_SHOCK, LAST_TALKED, 30
callasm TrainerWalkToPlayer
- applymovement2 wMovementBuffer
+ applymovementlasttalked wMovementBuffer
writeobjectxy LAST_TALKED
faceobject PLAYER, LAST_TALKED
jump StartBattleWithMapTrainerScript
@@ -18,14 +18,14 @@
StartBattleWithMapTrainerScript:
opentext
- trainertext $0
+ trainertext TRAINERTEXT_SEEN
waitbutton
closetext
- loadmemtrainer
+ loadtemptrainer
startbattle
reloadmapafterbattle
trainerflagaction SET_FLAG
- loadvar wRunningTrainerBattleScript, -1
+ loadmem wRunningTrainerBattleScript, -1
AlreadyBeatenTrainerScript:
scripttalkafter
--- a/engine/overworld/events.asm
+++ b/engine/overworld/events.asm
@@ -849,7 +849,7 @@
StartMenuCallback:
SelectMenuCallback:
- copybytetovar hMenuReturn
+ readmem hMenuReturn
ifequal HMENURETURN_SCRIPT, .Script
ifequal HMENURETURN_ASM, .Asm
end
--- a/engine/overworld/scripting.asm
+++ b/engine/overworld/scripting.asm
@@ -84,16 +84,16 @@
dw Script_setmapscene ; 12
dw Script_checkscene ; 13
dw Script_setscene ; 14
- dw Script_writebyte ; 15
- dw Script_addvar ; 16
+ dw Script_setval ; 15
+ dw Script_addval ; 16
dw Script_random ; 17
dw Script_checkver ; 18
- dw Script_copybytetovar ; 19
- dw Script_copyvartobyte ; 1a
- dw Script_loadvar ; 1b
- dw Script_checkcode ; 1c
- dw Script_writevarcode ; 1d
- dw Script_writecode ; 1e
+ dw Script_readmem ; 19
+ dw Script_writemem ; 1a
+ dw Script_loadmem ; 1b
+ dw Script_readvar ; 1c
+ dw Script_writevar ; 1d
+ dw Script_loadvar ; 1e
dw Script_giveitem ; 1f
dw Script_takeitem ; 20
dw Script_checkitem ; 21
@@ -124,14 +124,14 @@
dw Script_warpmod ; 3a
dw Script_blackoutmod ; 3b
dw Script_warp ; 3c
- dw Script_readmoney ; 3d
- dw Script_readcoins ; 3e
- dw Script_vartomem ; 3f
- dw Script_pokenamemem ; 40
- dw Script_itemtotext ; 41
- dw Script_mapnametotext ; 42
- dw Script_trainertotext ; 43
- dw Script_stringtotext ; 44
+ dw Script_getmoney ; 3d
+ dw Script_getcoins ; 3e
+ dw Script_getnum ; 3f
+ dw Script_getmonname ; 40
+ dw Script_getitemname ; 41
+ dw Script_getcurlandmarkname ; 42
+ dw Script_gettrainername ; 43
+ dw Script_getstring ; 44
dw Script_itemnotify ; 45
dw Script_pocketisfull ; 46
dw Script_opentext ; 47
@@ -157,7 +157,7 @@
dw Script_verticalmenu ; 59
dw Script_loadpikachudata ; 5a
dw Script_randomwildmon ; 5b
- dw Script_loadmemtrainer ; 5c
+ dw Script_loadtemptrainer ; 5c
dw Script_loadwildmon ; 5d
dw Script_loadtrainer ; 5e
dw Script_startbattle ; 5f
@@ -171,7 +171,7 @@
dw Script_checkjustbattled ; 67
dw Script_setlasttalked ; 68
dw Script_applymovement ; 69
- dw Script_applymovement2 ; 6a
+ dw Script_applymovementlasttalked ; 6a
dw Script_faceplayer ; 6b
dw Script_faceobject ; 6c
dw Script_variablesprite ; 6d
@@ -186,7 +186,7 @@
dw Script_turnobject ; 76
dw Script_follownotexact ; 77
dw Script_earthquake ; 78
- dw Script_changemap ; 79
+ dw Script_changemapblocks ; 79
dw Script_changeblock ; 7a
dw Script_reloadmap ; 7b
dw Script_reloadmappart ; 7c
@@ -224,15 +224,15 @@
dw Script_specialphonecall ; 9c
dw Script_checkphonecall ; 9d
dw Script_verbosegiveitem ; 9e
- dw Script_verbosegiveitem2 ; 9f
+ dw Script_verbosegiveitemvar ; 9f
dw Script_swarm ; a0
dw Script_halloffame ; a1
dw Script_credits ; a2
dw Script_warpfacing ; a3
dw Script_battletowertext ; a4
- dw Script_landmarktotext ; a5
- dw Script_trainerclassname ; a6
- dw Script_name ; a7
+ dw Script_getlandmarkname ; a5
+ dw Script_gettrainerclassname ; a6
+ dw Script_getname ; a7
dw Script_wait ; a8
dw Script_checksave ; a9
@@ -496,7 +496,7 @@
Script_battletowertext:
; script command 0xa4
-; parameters: pointer, memory
+; parameters: bttext_id
call SetUpTextBox
call GetScriptByte
@@ -511,7 +511,7 @@
call Script_giveitem
call CurItemName
ld de, wStringBuffer1
- ld a, MEM_BUFFER_1
+ ld a, STRING_BUFFER_4
call CopyConvertedText
ld b, BANK(GiveItemScript)
ld de, GiveItemScript
@@ -539,7 +539,7 @@
text_far UnknownText_0x1c4719
text_end
-Script_verbosegiveitem2:
+Script_verbosegiveitemvar:
; script command 0x9f
; parameters: item, var
@@ -562,7 +562,7 @@
ld [wScriptVar], a
call CurItemName
ld de, wStringBuffer1
- ld a, MEM_BUFFER_1
+ ld a, STRING_BUFFER_4
call CopyConvertedText
ld b, BANK(GiveItemScript)
ld de, GiveItemScript
@@ -754,12 +754,12 @@
Script_trainertext:
; script command 0x62
-; parameters: which_text
+; parameters: text_id
call GetScriptByte
ld c, a
ld b, 0
- ld hl, wWalkingX
+ ld hl, wSeenTextPointer
add hl, bc
add hl, bc
ld a, [hli]
@@ -972,7 +972,7 @@
farcall _SetFlagsForMovement_2
ret
-Script_applymovement2:
+Script_applymovementlasttalked:
; script command 0x6a
; parameters: data
; apply movement to last talked
@@ -1250,9 +1250,9 @@
ShowEmoteScript:
loademote EMOTE_FROM_MEM
- applymovement2 .Show
+ applymovementlasttalked .Show
pause 0
- applymovement2 .Hide
+ applymovementlasttalked .Hide
end
.Show:
@@ -1307,7 +1307,7 @@
ld [wBattleScriptFlags], a
ret
-Script_loadmemtrainer:
+Script_loadtemptrainer:
; script command 0x5c
ld a, (1 << 7) | 1
@@ -1702,7 +1702,7 @@
.no_scene
ret
-Script_copybytetovar:
+Script_readmem:
; script command 0x19
; parameters: address
@@ -1714,7 +1714,7 @@
ld [wScriptVar], a
ret
-Script_copyvartobyte:
+Script_writemem:
; script command 0x1a
; parameters: address
@@ -1726,7 +1726,7 @@
ld [hl], a
ret
-Script_loadvar:
+Script_loadmem:
; script command 0x1b
; parameters: address, value
@@ -1738,7 +1738,7 @@
ld [hl], a
ret
-Script_writebyte:
+Script_setval:
; script command 0x15
; parameters: value
@@ -1746,7 +1746,7 @@
ld [wScriptVar], a
ret
-Script_addvar:
+Script_addval:
; script command 0x16
; parameters: value
@@ -1809,7 +1809,7 @@
add c
ret
-Script_checkcode:
+Script_readvar:
; script command 0x1c
; parameters: variable_id
@@ -1819,7 +1819,7 @@
ld [wScriptVar], a
ret
-Script_writevarcode:
+Script_writevar:
; script command 0x1d
; parameters: variable_id
@@ -1829,7 +1829,7 @@
ld [de], a
ret
-Script_writecode:
+Script_loadvar:
; script command 0x1e
; parameters: variable_id, value
@@ -1854,9 +1854,9 @@
.gs_version:
db GS_VERSION
-Script_pokenamemem:
+Script_getmonname:
; script command 0x40
-; parameters: pokemon (0 aka USE_SCRIPT_VAR to use wScriptVar), memory
+; parameters: string_buffer, mon_id (0 aka USE_SCRIPT_VAR to use wScriptVar)
call GetScriptByte
and a
@@ -1867,9 +1867,9 @@
call GetPokemonName
ld de, wStringBuffer1
-ConvertMemToText:
+GetStringBuffer:
call GetScriptByte
- cp NUM_MEM_BUFFERS
+ cp NUM_STRING_BUFFERS
jr c, .ok
xor a
.ok
@@ -1881,9 +1881,9 @@
call CopyName2
ret
-Script_itemtotext:
+Script_getitemname:
; script command 0x41
-; parameters: item (0 aka USE_SCRIPT_VAR to use wScriptVar), memory
+; parameters: string_buffer, item_id (0 aka USE_SCRIPT_VAR to use wScriptVar)
call GetScriptByte
and a ; USE_SCRIPT_VAR
@@ -1893,11 +1893,11 @@
ld [wNamedObjectIndexBuffer], a
call GetItemName
ld de, wStringBuffer1
- jr ConvertMemToText
+ jr GetStringBuffer
-Script_mapnametotext:
+Script_getcurlandmarkname:
; script command 0x42
-; parameters: memory
+; parameters: string_buffer
ld a, [wMapGroup]
ld b, a
@@ -1909,18 +1909,18 @@
ld e, a
farcall GetLandmarkName
ld de, wStringBuffer1
- jp ConvertMemToText
+ jp GetStringBuffer
-Script_landmarktotext:
+Script_getlandmarkname:
; script command 0xa5
-; parameters: id, memory
+; parameters: string_buffer, landmark_id
call GetScriptByte
jr ConvertLandmarkToText
-Script_trainertotext:
+Script_gettrainername:
; script command 0x43
-; parameters: trainer_id, trainer_group, memory
+; parameters: string_buffer, trainer_group, trainer_id
call GetScriptByte
ld c, a
@@ -1927,11 +1927,11 @@
call GetScriptByte
ld b, a
farcall GetTrainerName
- jr ConvertMemToText
+ jr GetStringBuffer
-Script_name:
+Script_getname:
; script command 0xa7
-; parameters: type, id, memory
+; parameters: string_buffer, type, id
call GetScriptByte
ld [wNamedObjectTypeBuffer], a
@@ -1941,19 +1941,19 @@
ld [wCurSpecies], a
call GetName
ld de, wStringBuffer1
- jp ConvertMemToText
+ jp GetStringBuffer
-Script_trainerclassname:
+Script_gettrainerclassname:
; script command 0xa6
-; parameters: id, memory
+; parameters: string_buffer, trainer_group
ld a, TRAINER_NAME
ld [wNamedObjectTypeBuffer], a
jr ContinueToGetName
-Script_readmoney:
+Script_getmoney:
; script command 0x3d
-; parameters: account, memory
+; parameters: string_buffer, account
call ResetStringBuffer1
call GetMoneyAccount
@@ -1961,11 +1961,11 @@
lb bc, PRINTNUM_RIGHTALIGN | 3, 6
call PrintNum
ld de, wStringBuffer1
- jp ConvertMemToText
+ jp GetStringBuffer
-Script_readcoins:
+Script_getcoins:
; script command 0x3e
-; parameters: memory
+; parameters: string_buffer
call ResetStringBuffer1
ld hl, wStringBuffer1
@@ -1973,11 +1973,11 @@
lb bc, PRINTNUM_RIGHTALIGN | 2, 6
call PrintNum
ld de, wStringBuffer1
- jp ConvertMemToText
+ jp GetStringBuffer
-Script_vartomem:
+Script_getnum:
; script command 0x3f
-; parameters: memory
+; parameters: string_buffer
call ResetStringBuffer1
ld de, wScriptVar
@@ -1985,7 +1985,7 @@
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
call PrintNum
ld de, wStringBuffer1
- jp ConvertMemToText
+ jp GetStringBuffer
ResetStringBuffer1:
ld hl, wStringBuffer1
@@ -1994,9 +1994,9 @@
call ByteFill
ret
-Script_stringtotext:
+Script_getstring:
; script command 0x44
-; parameters: text_pointer, memory
+; parameters: string_buffer, text_pointer
call GetScriptByte
ld e, a
@@ -2006,7 +2006,7 @@
ld hl, CopyName1
rst FarCall
ld de, wStringBuffer2
- jp ConvertMemToText
+ jp GetStringBuffer
Script_givepokemail:
; script command 0x2f
@@ -2551,7 +2551,7 @@
ld [wScriptVar], a
ret
-Script_changemap:
+Script_changemapblocks:
; script command 0x79
; parameters: map_data_pointer
--- a/engine/phone/scripts/alan.asm
+++ b/engine/phone/scripts/alan.asm
@@ -1,5 +1,5 @@
AlanPhoneCalleeScript:
- trainertotext SCHOOLBOY, ALAN1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SCHOOLBOY, ALAN1
checkflag ENGINE_ALAN
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -7,7 +7,7 @@
iftrue .NotWednesday
checkflag ENGINE_ALAN_HAS_FIRE_STONE
iftrue .FireStone
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal WEDNESDAY, .NotWednesday
checktime DAY
iftrue AlanWednesdayDay
@@ -16,15 +16,15 @@
farjump UnknownScript_0xa0970
.WantsBattle:
- landmarktotext ROUTE_36, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_36
farjump UnknownScript_0xa0a73
.FireStone:
- landmarktotext ROUTE_36, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_36
farjump UnknownScript_0xa0ac5
AlanPhoneCallerScript:
- trainertotext SCHOOLBOY, ALAN1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SCHOOLBOY, ALAN1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_ALAN
iftrue .Generic
@@ -50,11 +50,11 @@
setflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
AlanWantsBattle:
- landmarktotext ROUTE_36, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_36
setflag ENGINE_ALAN
farjump PhoneScript_WantsToBattle_Male
AlanHasFireStone:
setflag ENGINE_ALAN_HAS_FIRE_STONE
- landmarktotext ROUTE_36, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_36
farjump PhoneScript_FoundItem_Male
--- a/engine/phone/scripts/anthony.asm
+++ b/engine/phone/scripts/anthony.asm
@@ -1,11 +1,11 @@
AnthonyPhoneCalleeScript:
- trainertotext HIKER, ANTHONY2, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, HIKER, ANTHONY2
checkflag ENGINE_ANTHONY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_ANTHONY_FRIDAY_NIGHT
iftrue .NotFriday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checktime NITE
iftrue AnthonyFridayNight
@@ -16,15 +16,15 @@
farjump UnknownScript_0xa0950
.WantsBattle:
- landmarktotext ROUTE_33, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_33
farjump UnknownScript_0xa0a5f
.AlreadySwarming:
- landmarktotext ROUTE_33, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_33
farjump UnknownScript_0xa0afa
AnthonyPhoneCallerScript:
- trainertotext HIKER, ANTHONY2, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, HIKER, ANTHONY2
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse .TriesSwarm
@@ -44,7 +44,7 @@
setflag ENGINE_ANTHONY_FRIDAY_NIGHT
AnthonyWantsBattle:
- landmarktotext ROUTE_33, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_33
setflag ENGINE_ANTHONY
farjump PhoneScript_WantsToBattle_Male
@@ -52,9 +52,9 @@
checkflag ENGINE_DUNSPARCE_SWARM
iftrue .Generic
setflag ENGINE_DUNSPARCE_SWARM
- pokenamemem DUNSPARCE, MEM_BUFFER_1
+ getmonname STRING_BUFFER_4, DUNSPARCE
swarm SWARM_DUNSPARCE, DARK_CAVE_VIOLET_ENTRANCE
- landmarktotext DARK_CAVE, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, DARK_CAVE
farjump UnknownScript_0xa05de
.Generic:
--- a/engine/phone/scripts/arnie.asm
+++ b/engine/phone/scripts/arnie.asm
@@ -1,11 +1,11 @@
ArniePhoneCalleeScript:
- trainertotext BUG_CATCHER, ARNIE1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BUG_CATCHER, ARNIE1
checkflag ENGINE_ARNIE
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_ARNIE_TUESDAY_MORNING
iftrue .NotTuesday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal TUESDAY, .NotTuesday
checktime MORN
iftrue ArnieTuesdayMorning
@@ -16,15 +16,15 @@
farjump UnknownScript_0xa0968
.WantsBattle:
- landmarktotext ROUTE_35, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_35
farjump UnknownScript_0xa0a6e
.AlreadySwarming:
- landmarktotext ROUTE_35, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_35
farjump UnknownScript_0xa0aff
ArniePhoneCallerScript:
- trainertotext BUG_CATCHER, ARNIE1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BUG_CATCHER, ARNIE1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_ARNIE
iftrue .Swarm
@@ -44,7 +44,7 @@
setflag ENGINE_ARNIE_TUESDAY_MORNING
ArnieWantsBattle:
- landmarktotext ROUTE_35, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_35
setflag ENGINE_ARNIE
farjump PhoneScript_WantsToBattle_Male
@@ -52,9 +52,9 @@
checkflag ENGINE_YANMA_SWARM
iftrue ArnieYanmaAlreadySwarming
setflag ENGINE_YANMA_SWARM
- pokenamemem YANMA, MEM_BUFFER_1
+ getmonname STRING_BUFFER_4, YANMA
swarm SWARM_YANMA, ROUTE_35
- landmarktotext ROUTE_35, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_35
farjump UnknownScript_0xa05ce
ArnieFoundRare:
--- a/engine/phone/scripts/beth.asm
+++ b/engine/phone/scripts/beth.asm
@@ -1,11 +1,11 @@
BethPhoneCalleeScript:
- trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, COOLTRAINERF, BETH1
checkflag ENGINE_BETH
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
checkflag ENGINE_BETH_FRIDAY_AFTERNOON
iftrue .NotFriday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checktime DAY
iftrue BethFridayAfternoon
@@ -14,11 +14,11 @@
farjump UnknownScript_0xa0918
.WantsBattle:
- landmarktotext ROUTE_26, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_26
farjump BethBattleReminderScript
BethPhoneCallerScript:
- trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, COOLTRAINERF, BETH1
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_BETH
iftrue .Generic
@@ -34,6 +34,6 @@
setflag ENGINE_BETH_FRIDAY_AFTERNOON
BethWantsBattle:
- landmarktotext ROUTE_26, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_26
setflag ENGINE_BETH
farjump PhoneScript_WantsToBattle_Female
--- a/engine/phone/scripts/beverly.asm
+++ b/engine/phone/scripts/beverly.asm
@@ -1,5 +1,5 @@
BeverlyPhoneCalleeScript:
- trainertotext POKEFANF, BEVERLY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, POKEFANF, BEVERLY1
farscall PhoneScript_AnswerPhone_Female
checkflag ENGINE_BEVERLY_HAS_NUGGET
iftrue .HasNugget
@@ -6,11 +6,11 @@
farjump UnknownScript_0xa0900
.HasNugget:
- landmarktotext NATIONAL_PARK, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, NATIONAL_PARK
farjump UnknownScript_0xa0aa5
BeverlyPhoneCallerScript:
- trainertotext POKEFANF, BEVERLY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, POKEFANF, BEVERLY1
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_BEVERLY_HAS_NUGGET
iftrue .HasNugget
@@ -22,5 +22,5 @@
.FoundNugget:
setflag ENGINE_BEVERLY_HAS_NUGGET
- landmarktotext NATIONAL_PARK, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, NATIONAL_PARK
farjump PhoneScript_FoundItem_Female
--- a/engine/phone/scripts/bill.asm
+++ b/engine/phone/scripts/bill.asm
@@ -20,8 +20,8 @@
.main
farwritetext BillPhoneGenericText
buttonsound
- checkcode VAR_BOXSPACE
- vartomem MEM_BUFFER_0
+ readvar VAR_BOXSPACE
+ getnum STRING_BUFFER_3
ifequal 0, .full
ifless PARTY_LENGTH, .nearlyfull
farwritetext BillPhoneNotFullText
--- a/engine/phone/scripts/brent.asm
+++ b/engine/phone/scripts/brent.asm
@@ -1,11 +1,11 @@
BrentPhoneCalleeScript:
- trainertotext POKEMANIAC, BRENT1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, POKEMANIAC, BRENT1
checkflag ENGINE_BRENT
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_BRENT_MONDAY_MORNING
iftrue .NotMonday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal MONDAY, .NotMonday
checktime MORN
iftrue BrentMondayMorning
@@ -14,11 +14,11 @@
farjump UnknownScript_0xa0998
.WantsBattle:
- landmarktotext ROUTE_43, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_43
farjump UnknownScript_0xa0a87
BrentPhoneCallerScript:
- trainertotext POKEMANIAC, BRENT1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, POKEMANIAC, BRENT1
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
ifequal 0, BrentBillTrivia
@@ -36,7 +36,7 @@
setflag ENGINE_BRENT_MONDAY_MORNING
BrentWantsBattle:
- landmarktotext ROUTE_43, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_43
setflag ENGINE_BRENT
farjump PhoneScript_WantsToBattle_Male
--- a/engine/phone/scripts/buena.asm
+++ b/engine/phone/scripts/buena.asm
@@ -1,7 +1,7 @@
BuenaPhoneCalleeScript:
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue BuenaPhoneScript_Rocket
- checkcode VAR_HOUR
+ readvar VAR_HOUR
ifgreater 17, BuenaPhoneScript_AfterMidnight1
scall BuenaPhoneScript_CheckTimeOfDay1
jump BuenaPhoneScript_Random1
@@ -36,7 +36,7 @@
end
BuenaPhoneScript_CheckTimeOfDay2:
- checkcode VAR_HOUR
+ readvar VAR_HOUR
ifgreater 17, BuenaPhoneScript_AfterMidnight2
checktime MORN
iftrue .morn
--- a/engine/phone/scripts/chad.asm
+++ b/engine/phone/scripts/chad.asm
@@ -1,11 +1,11 @@
ChadPhoneCalleeScript:
- trainertotext SCHOOLBOY, CHAD1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SCHOOLBOY, CHAD1
checkflag ENGINE_CHAD
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_CHAD_FRIDAY_MORNING
iftrue .NotFriday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checktime MORN
iftrue ChadFridayMorning
@@ -14,11 +14,11 @@
farjump UnknownScript_0xa0980
.WantsBattle:
- landmarktotext ROUTE_38, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_38
farjump UnknownScript_0xa0a7d
ChadPhoneCallerScript:
- trainertotext SCHOOLBOY, CHAD1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SCHOOLBOY, CHAD1
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
ifequal 0, ChadOakGossip
@@ -38,7 +38,7 @@
setflag ENGINE_CHAD_FRIDAY_MORNING
ChadWantsBattle:
- landmarktotext ROUTE_38, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_38
setflag ENGINE_CHAD
farjump PhoneScript_WantsToBattle_Male
--- a/engine/phone/scripts/dana.asm
+++ b/engine/phone/scripts/dana.asm
@@ -1,5 +1,5 @@
DanaPhoneCalleeScript:
- trainertotext LASS, DANA1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, LASS, DANA1
checkflag ENGINE_DANA
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -7,7 +7,7 @@
iftrue .NotThursday
checkflag ENGINE_DANA_HAS_THUNDERSTONE
iftrue .HasThunderstone
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checktime NITE
iftrue DanaThursdayNight
@@ -16,15 +16,15 @@
farjump UnknownScript_0xa0978
.WantsBattle:
- landmarktotext ROUTE_38, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_38
farjump UnknownScript_0xa0a78
.HasThunderstone:
- landmarktotext ROUTE_38, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_38
farjump UnknownScript_0xa0acd
DanaPhoneCallerScript:
- trainertotext LASS, DANA1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, LASS, DANA1
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_DANA
iftrue .Generic
@@ -52,7 +52,7 @@
setflag ENGINE_DANA_THURSDAY_NIGHT
DanaWantsBattle:
- landmarktotext ROUTE_38, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_38
setflag ENGINE_DANA
farjump PhoneScript_WantsToBattle_Female
@@ -61,5 +61,5 @@
DanaHasThunderstone:
setflag ENGINE_DANA_HAS_THUNDERSTONE
- landmarktotext ROUTE_38, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_38
farjump PhoneScript_FoundItem_Female
--- a/engine/phone/scripts/derek.asm
+++ b/engine/phone/scripts/derek.asm
@@ -1,5 +1,5 @@
DerekPhoneCalleeScript:
- trainertotext POKEFANM, DEREK1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, POKEFANM, DEREK1
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_DEREK_HAS_NUGGET
iftrue .Nugget
@@ -7,7 +7,7 @@
ifequal 0, .NoContest
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue .NoContest
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal TUESDAY, .ContestToday
ifequal THURSDAY, .ContestToday
ifequal SATURDAY, .ContestToday
@@ -19,17 +19,17 @@
farjump PhoneScript_BugCatchingContest
.Nugget:
- landmarktotext ROUTE_39, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_39
farjump UnknownScript_0xa0ad5
DerekPhoneCallerScript:
- trainertotext POKEFANM, DEREK1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, POKEFANM, DEREK1
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
ifequal 0, .NoContest
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue .NoContest
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal TUESDAY, .ContestToday
ifequal THURSDAY, .ContestToday
ifequal SATURDAY, .ContestToday
@@ -44,5 +44,5 @@
.Nugget:
setflag ENGINE_DEREK_HAS_NUGGET
- landmarktotext ROUTE_39, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_39
farjump PhoneScript_FoundItem_Male
--- a/engine/phone/scripts/elm.asm
+++ b/engine/phone/scripts/elm.asm
@@ -1,5 +1,5 @@
ElmPhoneCalleeScript:
- checkcode VAR_SPECIALPHONECALL
+ readvar VAR_SPECIALPHONECALL
ifequal SPECIALCALL_POKERUS, .pokerus
checkevent EVENT_SHOWED_TOGEPI_TO_ELM
iftrue .discovery
@@ -62,7 +62,7 @@
end
ElmPhoneCallerScript:
- checkcode VAR_SPECIALPHONECALL
+ readvar VAR_SPECIALPHONECALL
ifequal SPECIALCALL_ROBBED, .disaster
ifequal SPECIALCALL_ASSISTANT, .assistant
ifequal SPECIALCALL_WEIRDBROADCAST, .rocket
--- a/engine/phone/scripts/erin.asm
+++ b/engine/phone/scripts/erin.asm
@@ -1,11 +1,11 @@
ErinPhoneCalleeScript:
- trainertotext PICNICKER, ERIN1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, ERIN1
checkflag ENGINE_ERIN
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
checkflag ENGINE_ERIN_SATURDAY_NIGHT
iftrue .NotSaturday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checktime NITE
iftrue ErinSaturdayNight
@@ -14,11 +14,11 @@
farjump ErinWorkingHardScript
.WantsBattle:
- landmarktotext ROUTE_46, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_46
farjump ErinComeBattleScript
ErinPhoneCallerScript:
- trainertotext PICNICKER, ERIN1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, ERIN1
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_ERIN
iftrue .GenericCall
@@ -35,6 +35,6 @@
setflag ENGINE_ERIN_SATURDAY_NIGHT
ErinWantsBattle:
- landmarktotext ROUTE_46, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_46
setflag ENGINE_ERIN
farjump PhoneScript_WantsToBattle_Female
--- a/engine/phone/scripts/gaven.asm
+++ b/engine/phone/scripts/gaven.asm
@@ -1,11 +1,11 @@
GavenPhoneCalleeScript:
- trainertotext COOLTRAINERM, GAVEN3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, COOLTRAINERM, GAVEN3
checkflag ENGINE_GAVEN
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_GAVEN_THURSDAY_MORNING
iftrue .NotThursday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checktime MORN
iftrue GavenThursdayMorning
@@ -14,11 +14,11 @@
farjump UnknownScript_0xa0910
.WantsBattle:
- landmarktotext ROUTE_26, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_26
farjump UnknownScript_0xa0a37
GavenPhoneCallerScript:
- trainertotext COOLTRAINERM, GAVEN3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, COOLTRAINERM, GAVEN3
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_GAVEN
iftrue .WaitingForBattle
@@ -36,7 +36,7 @@
setflag ENGINE_GAVEN_THURSDAY_MORNING
GavenWantsRematch:
- landmarktotext ROUTE_26, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_26
setflag ENGINE_GAVEN
farjump PhoneScript_WantsToBattle_Male
--- a/engine/phone/scripts/generic_callee.asm
+++ b/engine/phone/scripts/generic_callee.asm
@@ -23,7 +23,7 @@
iftrue PhoneScript_AnswerPhone_Male_Day
checktime NITE
iftrue PhoneScript_AnswerPhone_Male_Nite
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -146,7 +146,7 @@
end
PhoneScript_AnswerPhone_Male_Day:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -269,7 +269,7 @@
end
PhoneScript_AnswerPhone_Male_Nite:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -396,7 +396,7 @@
iftrue PhoneScript_AnswerPhone_Female_Day
checktime NITE
iftrue PhoneScript_AnswerPhone_Female_Nite
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -447,7 +447,7 @@
end
PhoneScript_AnswerPhone_Female_Day:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -498,7 +498,7 @@
end
PhoneScript_AnswerPhone_Female_Nite:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -553,7 +553,7 @@
iftrue PhoneScript_GreetPhone_Male_Day
checktime NITE
iftrue PhoneScript_GreetPhone_Male_Nite
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -676,7 +676,7 @@
end
PhoneScript_GreetPhone_Male_Day:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -799,7 +799,7 @@
end
PhoneScript_GreetPhone_Male_Nite:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -926,7 +926,7 @@
iftrue PhoneScript_GreetPhone_Female_Day
checktime NITE
iftrue PhoneScript_GreetPhone_Female_Nite
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -977,7 +977,7 @@
end
PhoneScript_GreetPhone_Female_Day:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -1028,7 +1028,7 @@
end
PhoneScript_GreetPhone_Female_Nite:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -1079,7 +1079,7 @@
end
PhoneScript_Generic_Male:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
ifequal PHONE_BIRDKEEPER_JOSE, .Jose
@@ -1189,7 +1189,7 @@
end
PhoneScript_Generic_Female:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
--- a/engine/phone/scripts/generic_caller.asm
+++ b/engine/phone/scripts/generic_caller.asm
@@ -55,7 +55,7 @@
farjump PhoneScript_HangupText_Female
Phone_WhosBragging_Male:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
ifequal PHONE_BIRDKEEPER_JOSE, .Jose
@@ -160,7 +160,7 @@
end
Phone_WhosBragging_Female:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -211,7 +211,7 @@
end
Phone_WhoDefeatedMon_Male:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
ifequal PHONE_BIRDKEEPER_JOSE, .Jose
@@ -316,7 +316,7 @@
end
Phone_WhoDefeatedMon_Female:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -367,7 +367,7 @@
end
Phone_WhoLostAMon_Male:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
ifequal PHONE_BIRDKEEPER_JOSE, .Jose
@@ -472,7 +472,7 @@
end
Phone_WhoLostAMon_Female:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -531,7 +531,7 @@
farjump PhoneScript_HangupText_Female
PhoneScript_RematchText_Male:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -636,7 +636,7 @@
end
PhoneScript_RematchText_Female:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
ifequal PHONE_PICNICKER_LIZ, .Liz
@@ -689,7 +689,7 @@
end
PhoneScript_HangupText_Male:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_SCHOOLBOY_JACK, .Jack
ifequal PHONE_SAILOR_HUEY, .Huey
ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven
@@ -792,7 +792,7 @@
end
PhoneScript_HangupText_Female:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_COOLTRAINERF_BETH, .Beth
ifequal PHONE_COOLTRAINERF_REENA, .Reena
@@ -855,7 +855,7 @@
end
PhoneScript_BugCatchingContest:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_BUG_CATCHER_WADE, .Wade
ifequal PHONE_POKEFANM_DEREK, .Derek
@@ -895,7 +895,7 @@
jump PhoneScript_HangupText_Male
PhoneScript_FoundItem_Male:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_BIRDKEEPER_JOSE, .Jose
ifequal PHONE_BUG_CATCHER_WADE, .Wade
ifequal PHONE_SCHOOLBOY_ALAN, .Alan
@@ -928,7 +928,7 @@
end
PhoneScript_FoundItem_Female:
- checkcode VAR_CALLERID
+ readvar VAR_CALLERID
ifequal PHONE_POKEFAN_BEVERLY, .Beverly
ifequal PHONE_PICNICKER_GINA, .Gina
ifequal PHONE_LASS_DANA, .Dana
--- a/engine/phone/scripts/gina.asm
+++ b/engine/phone/scripts/gina.asm
@@ -1,5 +1,5 @@
GinaPhoneCalleeScript:
- trainertotext PICNICKER, GINA1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, GINA1
checkflag ENGINE_GINA
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -7,7 +7,7 @@
iftrue .NotSunday
checkflag ENGINE_GINA_HAS_LEAF_STONE
iftrue .HasLeafStone
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal SUNDAY, .NotSunday
checktime DAY
iftrue GinaSundayDay
@@ -21,15 +21,15 @@
farjump UnknownScript_0xa05c6
.WantsBattle:
- landmarktotext ROUTE_34, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_34
farjump UnknownScript_0xa0a69
.HasLeafStone:
- landmarktotext ROUTE_34, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_34
farjump UnknownScript_0xa0abd
GinaPhoneCallerScript:
- trainertotext PICNICKER, GINA1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, GINA1
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue GinaRockets
@@ -59,7 +59,7 @@
setflag ENGINE_GINA_SUNDAY_AFTERNOON
GinaWantsBattle:
- landmarktotext ROUTE_34, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_34
setflag ENGINE_GINA
farjump PhoneScript_WantsToBattle_Female
@@ -68,5 +68,5 @@
GinaHasLeafStone:
setflag ENGINE_GINA_HAS_LEAF_STONE
- landmarktotext ROUTE_34, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_34
farjump PhoneScript_FoundItem_Female
--- a/engine/phone/scripts/hangups.asm
+++ b/engine/phone/scripts/hangups.asm
@@ -150,7 +150,7 @@
jump PhoneScript_HangupText_Male
KenjiAnswerPhoneScript:
- checkcode VAR_KENJI_BREAK
+ readvar VAR_KENJI_BREAK
ifequal 2, .Training
ifequal 1, .OnBreak
farwritetext UnknownText_0x66e17
--- a/engine/phone/scripts/huey.asm
+++ b/engine/phone/scripts/huey.asm
@@ -1,11 +1,11 @@
HueyPhoneCalleeScript:
- trainertotext SAILOR, HUEY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SAILOR, HUEY1
checkflag ENGINE_HUEY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_HUEY_WEDNESDAY_NIGHT
iftrue .NotWednesday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal WEDNESDAY, .NotWednesday
checktime NITE
iftrue HueyWednesdayNight
@@ -15,11 +15,11 @@
farjump UnknownScript_0xa0908
.WantsBattle:
- landmarktotext LIGHTHOUSE, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, LIGHTHOUSE
farjump HueyWantsBattleScript
HueyPhoneCallerScript:
- trainertotext SAILOR, HUEY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SAILOR, HUEY1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_HUEY
iftrue .Flavor
@@ -36,6 +36,6 @@
setflag ENGINE_HUEY_WEDNESDAY_NIGHT
HueyWantsBattle:
- landmarktotext LIGHTHOUSE, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, LIGHTHOUSE
setflag ENGINE_HUEY
farjump PhoneScript_WantsToBattle_Male
--- a/engine/phone/scripts/irwin.asm
+++ b/engine/phone/scripts/irwin.asm
@@ -1,5 +1,5 @@
IrwinPhoneCalleeScript:
- trainertotext JUGGLER, IRWIN1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, JUGGLER, IRWIN1
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue .Rockets
@@ -9,7 +9,7 @@
farjump IrwinRocketRumor
IrwinPhoneCallerScript:
- trainertotext JUGGLER, IRWIN1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, JUGGLER, IRWIN1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue .Rockets
--- a/engine/phone/scripts/jack.asm
+++ b/engine/phone/scripts/jack.asm
@@ -1,11 +1,11 @@
JackPhoneCalleeScript:
- trainertotext SCHOOLBOY, JACK1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SCHOOLBOY, JACK1
checkflag ENGINE_JACK
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_JACK_MONDAY_MORNING
iftrue .NotMonday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal MONDAY, .NotMonday
checktime MORN
iftrue JackMondayMorning
@@ -14,11 +14,11 @@
farjump JackPhoneTips
.WantsBattle:
- landmarktotext NATIONAL_PARK, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, NATIONAL_PARK
farjump JackWantsBattleScript
JackPhoneCallerScript:
- trainertotext SCHOOLBOY, JACK1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SCHOOLBOY, JACK1
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
ifequal 0, JackBattleTrivia
@@ -38,7 +38,7 @@
setflag ENGINE_JACK_MONDAY_MORNING
JackWantsToBattle:
- landmarktotext NATIONAL_PARK, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, NATIONAL_PARK
setflag ENGINE_JACK
farjump PhoneScript_WantsToBattle_Male
--- a/engine/phone/scripts/joey.asm
+++ b/engine/phone/scripts/joey.asm
@@ -1,11 +1,11 @@
JoeyPhoneCalleeScript:
- trainertotext YOUNGSTER, JOEY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, YOUNGSTER, JOEY1
checkflag ENGINE_JOEY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_JOEY_MONDAY_AFTERNOON
iftrue .NotMonday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal MONDAY, .NotMonday
checktime DAY
iftrue JoeyMondayAfternoon
@@ -15,11 +15,11 @@
farjump UnknownScript_0xa0930
.WantsBattle:
- landmarktotext ROUTE_30, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_30
farjump UnknownScript_0xa0a4b
JoeyPhoneCallerScript:
- trainertotext YOUNGSTER, JOEY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, YOUNGSTER, JOEY1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_JOEY
iftrue .Generic
@@ -36,6 +36,6 @@
setflag ENGINE_JOEY_MONDAY_AFTERNOON
JoeyWantsBattle:
- landmarktotext ROUTE_30, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_30
setflag ENGINE_JOEY
farjump PhoneScript_WantsToBattle_Male
--- a/engine/phone/scripts/jose.asm
+++ b/engine/phone/scripts/jose.asm
@@ -1,5 +1,5 @@
JosePhoneCalleeScript:
- trainertotext BIRD_KEEPER, JOSE2, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BIRD_KEEPER, JOSE2
checkflag ENGINE_JOSE
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -7,7 +7,7 @@
iftrue .NotSaturday
checkflag ENGINE_JOSE_HAS_STAR_PIECE
iftrue .HasItem
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checktime NITE
iftrue JoseSaturdayNight
@@ -16,15 +16,15 @@
farjump UnknownScript_0xa0920
.WantsBattle:
- landmarktotext ROUTE_27, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_27
farjump UnknownScript_0xa0a41
.HasItem:
- landmarktotext ROUTE_27, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_27
farjump UnknownScript_0xa0a41
JosePhoneCallerScript:
- trainertotext BIRD_KEEPER, JOSE2, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BIRD_KEEPER, JOSE2
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_JOSE
iftrue .Generic
@@ -46,7 +46,7 @@
setflag ENGINE_JOSE_SATURDAY_NIGHT
JoseWantsBattle:
- landmarktotext ROUTE_27, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_27
setflag ENGINE_JOSE
farjump PhoneScript_WantsToBattle_Male
@@ -55,5 +55,5 @@
JoseHasStarPiece:
setflag ENGINE_JOSE_HAS_STAR_PIECE
- landmarktotext ROUTE_27, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_27
farjump PhoneScript_FoundItem_Male
--- a/engine/phone/scripts/kenji.asm
+++ b/engine/phone/scripts/kenji.asm
@@ -1,9 +1,9 @@
KenjiPhoneCalleeScript:
- trainertotext BLACKBELT_T, KENJI3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BLACKBELT_T, KENJI3
farscall PhoneScript_AnswerPhone_Male
farjump KenjiAnswerPhoneScript
KenjiPhoneCallerScript:
- trainertotext BLACKBELT_T, KENJI3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BLACKBELT_T, KENJI3
farscall PhoneScript_GreetPhone_Male
farjump KenjiCallingPhoneScript
--- a/engine/phone/scripts/liz.asm
+++ b/engine/phone/scripts/liz.asm
@@ -1,11 +1,11 @@
LizPhoneCalleeScript:
- trainertotext PICNICKER, LIZ1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, LIZ1
checkflag ENGINE_LIZ
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
checkflag ENGINE_LIZ_THURSDAY_AFTERNOON
iftrue .NotThursday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checktime DAY
iftrue LizThursdayAfternoon
@@ -15,11 +15,11 @@
farjump UnknownScript_0xa0948
.WantsBattle:
- landmarktotext ROUTE_32, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_32
farjump UnknownScript_0xa0a5a
LizPhoneCallerScript:
- trainertotext PICNICKER, LIZ1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, LIZ1
farscall PhoneScript_Random4
ifequal 0, LizWrongNumber
farscall PhoneScript_GreetPhone_Female
@@ -43,7 +43,7 @@
setflag ENGINE_LIZ_THURSDAY_AFTERNOON
LizWantsBattle:
- landmarktotext ROUTE_32, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_32
setflag ENGINE_LIZ
farjump PhoneScript_WantsToBattle_Female
@@ -63,39 +63,39 @@
ifequal 8, .PokefanM
.CoolTrainerM:
- trainerclassname COOLTRAINERM, NICK
+ gettrainerclassname STRING_BUFFER_4, COOLTRAINERM
jump LizGossipScript
.Beauty:
- trainerclassname BEAUTY, VICTORIA
+ gettrainerclassname STRING_BUFFER_4, BEAUTY
jump LizGossipScript
.Grunt:
- trainerclassname GRUNTM, GRUNTM_1
+ gettrainerclassname STRING_BUFFER_4, GRUNTM
jump LizGossipScript
.Teacher:
- trainerclassname TEACHER, COLETTE
+ gettrainerclassname STRING_BUFFER_4, TEACHER
jump LizGossipScript
.SwimmerF:
- trainerclassname SWIMMERF, ELAINE
+ gettrainerclassname STRING_BUFFER_4, SWIMMERF
jump LizGossipScript
.KimonoGirl:
- trainerclassname KIMONO_GIRL, NAOKO1
+ gettrainerclassname STRING_BUFFER_4, KIMONO_GIRL
jump LizGossipScript
.Skier:
- trainerclassname SKIER, ROXANNE
+ gettrainerclassname STRING_BUFFER_4, SKIER
jump LizGossipScript
.Medium:
- trainerclassname MEDIUM, MARTHA
+ gettrainerclassname STRING_BUFFER_4, MEDIUM
jump LizGossipScript
.PokefanM:
- trainerclassname POKEFANM, WILLIAM
+ gettrainerclassname STRING_BUFFER_4, POKEFANM
jump LizGossipScript
LizGossipScript:
--- a/engine/phone/scripts/mom.asm
+++ b/engine/phone/scripts/mom.asm
@@ -14,8 +14,8 @@
iftrue MomPhoneHangUpScript
farwritetext MomPhoneGreetingText
buttonsound
- mapnametotext MEM_BUFFER_0
- checkcode VAR_ROOFPALETTE
+ getcurlandmarkname STRING_BUFFER_3
+ readvar VAR_ROOFPALETTE
ifequal 1, MomPhonePalette1
ifequal 2, MomPhonePalette2
jump MomPhoneOther
@@ -26,7 +26,7 @@
jump MomSavingMoney
MomPhonePalette1:
- checkcode VAR_MAPGROUP
+ readvar VAR_MAPGROUP
ifequal GROUP_NEW_BARK_TOWN, .newbark
ifequal GROUP_CHERRYGROVE_CITY, .cherrygrove
ifequal GROUP_VIOLET_CITY, .violet
@@ -47,13 +47,13 @@
jump MomSavingMoney
.violet
- landmarktotext SPROUT_TOWER, MEM_BUFFER_1
+ getlandmarkname STRING_BUFFER_4, SPROUT_TOWER
jump MomPhoneLandmark
.azalea
- landmarktotext SLOWPOKE_WELL, MEM_BUFFER_1
+ getlandmarkname STRING_BUFFER_4, SLOWPOKE_WELL
jump MomPhoneLandmark
.goldenrod
- landmarktotext RADIO_TOWER, MEM_BUFFER_1
+ getlandmarkname STRING_BUFFER_4, RADIO_TOWER
jump MomPhoneLandmark
MomPhonePalette2:
@@ -79,7 +79,7 @@
jump .NoMoney
.SavingHasMoney:
- readmoney MOMS_MONEY, MEM_BUFFER_0
+ getmoney STRING_BUFFER_3, MOMS_MONEY
farwritetext MomCheckBalanceText
yesorno
iftrue MomPhoneSaveMoneyScript
@@ -98,7 +98,7 @@
jump MomPhoneWontSaveMoneyScript
.HasMoney:
- readmoney MOMS_MONEY, MEM_BUFFER_0
+ getmoney STRING_BUFFER_3, MOMS_MONEY
farwritetext MomYouveSavedText
yesorno
iftrue MomPhoneSaveMoneyScript
--- a/engine/phone/scripts/parry.asm
+++ b/engine/phone/scripts/parry.asm
@@ -1,11 +1,11 @@
ParryPhoneCalleeScript:
- trainertotext HIKER, PARRY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, HIKER, PARRY1
checkflag ENGINE_PARRY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_PARRY_FRIDAY_AFTERNOON
iftrue .WantsRematch
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal FRIDAY, .WantsRematch
checktime DAY
iftrue ParryFridayDay
@@ -14,11 +14,11 @@
farjump ParryBattleWithMe
.WantsBattle:
- landmarktotext ROUTE_45, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_45
farjump ParryHaventYouGottenTo
ParryPhoneCallerScript:
- trainertotext HIKER, PARRY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, HIKER, PARRY1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_PARRY
iftrue .GenericCall
@@ -35,6 +35,6 @@
setflag ENGINE_PARRY_FRIDAY_AFTERNOON
ParryWantsBattle:
- landmarktotext ROUTE_45, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_45
setflag ENGINE_PARRY
farjump PhoneScript_WantsToBattle_Male
--- a/engine/phone/scripts/ralph.asm
+++ b/engine/phone/scripts/ralph.asm
@@ -1,11 +1,11 @@
RalphPhoneCalleeScript:
- trainertotext FISHER, RALPH1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, FISHER, RALPH1
checkflag ENGINE_RALPH
iftrue .Rematch
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_RALPH_WEDNESDAY_MORNING
iftrue .CheckSwarm
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal WEDNESDAY, .CheckSwarm
checktime MORN
iftrue Ralph_WednesdayMorning
@@ -15,15 +15,15 @@
farjump UnknownScript_0xa0940
.Rematch:
- landmarktotext ROUTE_32, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_32
farjump UnknownScript_0xa0a55
.ReportSwarm:
- landmarktotext ROUTE_32, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_32
farjump UnknownScript_0xa0af5
RalphPhoneCallerScript:
- trainertotext FISHER, RALPH1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, FISHER, RALPH1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse .CheckSwarm
@@ -41,7 +41,7 @@
Ralph_WednesdayMorning:
setflag ENGINE_RALPH_WEDNESDAY_MORNING
Ralph_FightMe:
- landmarktotext ROUTE_32, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_32
setflag ENGINE_RALPH
farjump PhoneScript_WantsToBattle_Male
@@ -49,9 +49,9 @@
checkflag ENGINE_FISH_SWARM
iftrue .Generic
setflag ENGINE_FISH_SWARM
- pokenamemem QWILFISH, MEM_BUFFER_1
- landmarktotext ROUTE_32, MEM_BUFFER_2
- writebyte FISHSWARM_QWILFISH
+ getmonname STRING_BUFFER_4, QWILFISH
+ getlandmarkname STRING_BUFFER_5, ROUTE_32
+ setval FISHSWARM_QWILFISH
special ActivateFishingSwarm
farjump UnknownScript_0xa05d6
--- a/engine/phone/scripts/reena.asm
+++ b/engine/phone/scripts/reena.asm
@@ -1,11 +1,11 @@
ReenaPhoneCalleeScript:
- trainertotext COOLTRAINERF, REENA1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, COOLTRAINERF, REENA1
checkflag ENGINE_REENA
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
checkflag ENGINE_REENA_SUNDAY_MORNING
iftrue .NotSunday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal SUNDAY, .NotSunday
checktime MORN
iftrue ReenaSundayMorning
@@ -14,11 +14,11 @@
farjump UnknownScript_0xa0928
.WantsBattle:
- landmarktotext ROUTE_27, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_27
farjump UnknownScript_0xa0a46
ReenaPhoneCallerScript:
- trainertotext COOLTRAINERF, REENA1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, COOLTRAINERF, REENA1
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_REENA
iftrue .Generic
@@ -34,6 +34,6 @@
setflag ENGINE_REENA_SUNDAY_MORNING
ReenaWantsBattle:
- landmarktotext ROUTE_27, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_27
setflag ENGINE_REENA
farjump PhoneScript_WantsToBattle_Female
--- a/engine/phone/scripts/tiffany.asm
+++ b/engine/phone/scripts/tiffany.asm
@@ -1,5 +1,5 @@
TiffanyPhoneCalleeScript:
- trainertotext PICNICKER, TIFFANY3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, TIFFANY3
checkflag ENGINE_TIFFANY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -7,7 +7,7 @@
iftrue .NotTuesday
checkflag ENGINE_TIFFANY_HAS_PINK_BOW
iftrue .HasItem
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal TUESDAY, .NotTuesday
checktime DAY
iftrue TiffanyTuesdayAfternoon
@@ -16,15 +16,15 @@
farjump UnknownScript_0xa09a0
.WantsBattle:
- landmarktotext ROUTE_43, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_43
farjump UnknownScript_0xa0a8c
.HasItem:
- landmarktotext ROUTE_43, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_43
farjump UnknownScript_0xa0ae5
TiffanyPhoneCallerScript:
- trainertotext PICNICKER, TIFFANY3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, TIFFANY3
farscall PhoneScript_Random4
ifequal 0, TiffanysFamilyMembers
farscall PhoneScript_GreetPhone_Female
@@ -52,7 +52,7 @@
setflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
TiffanyWantsBattle:
- landmarktotext ROUTE_43, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_43
setflag ENGINE_TIFFANY
farjump PhoneScript_WantsToBattle_Female
@@ -66,27 +66,27 @@
ifequal 5, .Brother
.Grandma:
- stringtotext GrandmaString, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, GrandmaString
jump .PoorClefairy
.Grandpa:
- stringtotext GrandpaString, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, GrandpaString
jump .PoorClefairy
.Mom:
- stringtotext MomString, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, MomString
jump .PoorClefairy
.Dad:
- stringtotext DadString, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, DadString
jump .PoorClefairy
.Sister:
- stringtotext SisterString, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, SisterString
jump .PoorClefairy
.Brother:
- stringtotext BrotherString, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, BrotherString
jump .PoorClefairy
.PoorClefairy:
@@ -94,5 +94,5 @@
TiffanyHasPinkBow:
setflag ENGINE_TIFFANY_HAS_PINK_BOW
- landmarktotext ROUTE_43, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_43
farjump PhoneScript_FoundItem_Female
--- a/engine/phone/scripts/todd.asm
+++ b/engine/phone/scripts/todd.asm
@@ -1,11 +1,11 @@
ToddPhoneCalleeScript:
- trainertotext CAMPER, TODD1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, CAMPER, TODD1
checkflag ENGINE_TODD
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_TODD_SATURDAY_MORNING
iftrue .NotSaturday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checktime MORN
iftrue ToddSaturdayMorning
@@ -16,7 +16,7 @@
farjump UnknownScript_0xa0958
.WantsBattle:
- landmarktotext ROUTE_34, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_34
farjump UnknownScript_0xa0a64
.SaleOn:
@@ -23,7 +23,7 @@
farjump UnknownScript_0xa0b04
ToddPhoneCallerScript:
- trainertotext CAMPER, TODD1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, CAMPER, TODD1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_TODD
iftrue .TryForSale
@@ -47,7 +47,7 @@
setflag ENGINE_TODD_SATURDAY_MORNING
ToddWantsBattle:
- landmarktotext ROUTE_34, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_34
setflag ENGINE_TODD
farjump PhoneScript_WantsToBattle_Male
--- a/engine/phone/scripts/tully.asm
+++ b/engine/phone/scripts/tully.asm
@@ -1,5 +1,5 @@
TullyPhoneCalleeScript:
- trainertotext FISHER, TULLY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, FISHER, TULLY1
checkflag ENGINE_TULLY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -7,7 +7,7 @@
iftrue .NotSunday
checkflag ENGINE_TULLY_HAS_WATER_STONE
iftrue .WaterStone
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal SUNDAY, .NotSunday
checktime NITE
iftrue TullySundayNight
@@ -16,15 +16,15 @@
farjump UnknownScript_0xa0990
.WantsBattle:
- landmarktotext ROUTE_42, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_42
farjump UnknownScript_0xa0a82
.WaterStone:
- landmarktotext ROUTE_42, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_42
farjump UnknownScript_0xa0add
TullyPhoneCallerScript:
- trainertotext FISHER, TULLY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, FISHER, TULLY1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_TULLY
iftrue .Generic
@@ -50,11 +50,11 @@
setflag ENGINE_TULLY_SUNDAY_NIGHT
TullyWantsBattle:
- landmarktotext ROUTE_42, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_42
setflag ENGINE_TULLY
farjump PhoneScript_WantsToBattle_Male
TullyFoundWaterStone:
setflag ENGINE_TULLY_HAS_WATER_STONE
- landmarktotext ROUTE_42, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_42
farjump PhoneScript_FoundItem_Male
--- a/engine/phone/scripts/vance.asm
+++ b/engine/phone/scripts/vance.asm
@@ -1,11 +1,11 @@
VancePhoneCalleeScript:
- trainertotext BIRD_KEEPER, VANCE1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BIRD_KEEPER, VANCE1
checkflag ENGINE_VANCE
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_VANCE_WEDNESDAY_NIGHT
iftrue .NotWednesday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal WEDNESDAY, .NotWednesday
checktime NITE
iftrue VanceWednesdayNight
@@ -14,11 +14,11 @@
farjump VanceLookingForward
.WantsBattle:
- landmarktotext ROUTE_44, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_44
farjump VanceHurryHurry
VancePhoneCallerScript:
- trainertotext BIRD_KEEPER, VANCE1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BIRD_KEEPER, VANCE1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_VANCE
iftrue .WantsBattle
@@ -35,6 +35,6 @@
setflag ENGINE_VANCE_WEDNESDAY_NIGHT
VanceWantsRematch:
- landmarktotext ROUTE_44, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_44
setflag ENGINE_VANCE
farjump PhoneScript_WantsToBattle_Male
--- a/engine/phone/scripts/wade.asm
+++ b/engine/phone/scripts/wade.asm
@@ -1,5 +1,5 @@
WadePhoneCalleeScript:
- trainertotext BUG_CATCHER, WADE1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BUG_CATCHER, WADE1
checkflag ENGINE_WADE
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -7,7 +7,7 @@
iftrue .NotTuesday
checkflag ENGINE_WADE_HAS_ITEM
iftrue .HasItem
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal TUESDAY, .NotTuesday
checktime NITE
iftrue WadeTuesdayNight
@@ -17,7 +17,7 @@
ifequal 0, .NoContest
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue .NoContest
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal TUESDAY, .ContestToday
ifequal THURSDAY, .ContestToday
ifequal SATURDAY, .ContestToday
@@ -29,21 +29,21 @@
farjump PhoneScript_BugCatchingContest
.WantsBattle:
- landmarktotext ROUTE_31, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_31
farjump UnknownScript_0xa0a50
.HasItem:
- landmarktotext ROUTE_31, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_31
farjump UnknownScript_0xa0ab5
WadePhoneCallerScript:
- trainertotext BUG_CATCHER, WADE1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BUG_CATCHER, WADE1
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
ifequal 0, .NoContest
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue .NoContest
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal TUESDAY, .ContestToday
ifequal THURSDAY, .ContestToday
ifequal SATURDAY, .ContestToday
@@ -74,7 +74,7 @@
setflag ENGINE_WADE_TUESDAY_NIGHT
WadeWantsBattle2:
- landmarktotext ROUTE_31, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_31
setflag ENGINE_WADE
farjump PhoneScript_WantsToBattle_Male
@@ -83,7 +83,7 @@
WadeHasItem2:
setflag ENGINE_WADE_HAS_ITEM
- landmarktotext ROUTE_31, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_31
clearevent EVENT_WADE_HAS_BERRY
clearevent EVENT_WADE_HAS_PSNCUREBERRY
clearevent EVENT_WADE_HAS_PRZCUREBERRY
--- a/engine/phone/scripts/wilton.asm
+++ b/engine/phone/scripts/wilton.asm
@@ -1,5 +1,5 @@
WiltonPhoneCalleeScript:
- trainertotext FISHER, WILTON1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, FISHER, WILTON1
checkflag ENGINE_WILTON
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -7,7 +7,7 @@
iftrue .NotThursday
checkflag ENGINE_WILTON_HAS_ITEM
iftrue .HasItem
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal THURSDAY, .NotThursday
checktime MORN
iftrue WiltonThursdayMorning
@@ -16,15 +16,15 @@
farjump WiltonHaventFoundAnything
.WantsBattle:
- landmarktotext ROUTE_44, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_44
farjump WiltonNotBiting
.HasItem:
- landmarktotext ROUTE_44, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_44
farjump WiltonWantThis
WiltonPhoneCallerScript:
- trainertotext FISHER, WILTON1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, FISHER, WILTON1
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_WILTON
iftrue .GenericCall
@@ -44,13 +44,13 @@
setflag ENGINE_WILTON_THURSDAY_MORNING
WiltonWantsBattle:
- landmarktotext ROUTE_44, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_44
setflag ENGINE_WILTON
farjump PhoneScript_WantsToBattle_Male
WiltonHasItem:
setflag ENGINE_WILTON_HAS_ITEM
- landmarktotext ROUTE_44, MEM_BUFFER_2
+ getlandmarkname STRING_BUFFER_5, ROUTE_44
clearevent EVENT_WILTON_HAS_ULTRA_BALL
clearevent EVENT_WILTON_HAS_GREAT_BALL
clearevent EVENT_WILTON_HAS_POKE_BALL
--- a/macros/legacy.asm
+++ b/macros/legacy.asm
@@ -26,13 +26,62 @@
checktriggers EQUS "checkscene"
dotrigger EQUS "setscene"
-faceperson EQUS "faceobject"
-moveperson EQUS "moveobject"
-writepersonxy EQUS "writeobjectxy"
-spriteface EQUS "turnobject"
-objectface EQUS "turnobject"
+faceperson EQUS "faceobject"
+moveperson EQUS "moveobject"
+writepersonxy EQUS "writeobjectxy"
+spriteface EQUS "turnobject"
+objectface EQUS "turnobject"
+applymovement2 EQUS "applymovementlasttalked"
-RAM2MEM EQUS "vartomem"
+writebyte EQUS "setval"
+addvar EQUS "addval"
+copybytetovar EQUS "readmem"
+copyvartobyte EQUS "writemem"
+checkcode EQUS "readvar"
+writevarcode EQUS "writevar"
+writecode EQUS "loadvar"
+
+MEM_BUFFER_0 EQUS "STRING_BUFFER_3"
+MEM_BUFFER_1 EQUS "STRING_BUFFER_4"
+MEM_BUFFER_2 EQUS "STRING_BUFFER_5"
+
+vartomem EQUS "getnum"
+mapnametotext EQUS "getcurlandmarkname"
+readcoins EQUS "getcoins"
+
+pokenamemem: MACRO
+ getmonname \2, \1
+ENDM
+
+itemtotext: MACRO
+ getitemname \2, \1
+ENDM
+
+landmarktotext: MACRO
+ getlandmarkname \2, \1
+ENDM
+
+trainertotext: MACRO
+ gettrainername \3, \1, \2
+ENDM
+
+trainerclassname: MACRO
+ gettrainerclassname \2, \1
+ENDM
+
+name: MACRO
+ getname \3, \1, \2
+ENDM
+
+stringtotext: MACRO
+ getstring \2, \1
+ENDM
+
+readmoney: MACRO
+ getmoney \2, \1
+ENDM
+
+RAM2MEM EQUS "getnum"
loadfont EQUS "opentext"
loadmenudata EQUS "loadmenu"
loadmenuheader EQUS "loadmenu"
@@ -40,7 +89,7 @@
interpretmenu EQUS "_2dmenu"
interpretmenu2 EQUS "verticalmenu"
battlecheck EQUS "randomwildmon"
-loadtrainerdata EQUS "loadmemtrainer"
+loadtrainerdata EQUS "loadtemptrainer"
loadpokedata EQUS "loadwildmon"
returnafterbattle EQUS "reloadmapafterbattle"
trainerstatus EQUS "trainerflagaction"
@@ -54,6 +103,7 @@
givepokeitem EQUS "givepokemail"
checkpokeitem EQUS "checkpokemail"
passtoengine EQUS "autoinput"
+verbosegiveitem2 EQUS "verbosegiveitemvar"
; macros/scripts/maps.asm
--- a/macros/scripts/events.asm
+++ b/macros/scripts/events.asm
@@ -131,15 +131,15 @@
db \1 ; scene_id
ENDM
- enum writebyte_command ; $15
-writebyte: MACRO
- db writebyte_command
+ enum setval_command ; $15
+setval: MACRO
+ db setval_command
db \1 ; value
ENDM
- enum addvar_command ; $16
-addvar: MACRO
- db addvar_command
+ enum addval_command ; $16
+addval: MACRO
+ db addval_command
db \1 ; value
ENDM
@@ -154,42 +154,47 @@
db checkver_command
ENDM
- enum copybytetovar_command ; $19
-copybytetovar: MACRO
- db copybytetovar_command
+ enum readmem_command ; $19
+readmem: MACRO
+ db readmem_command
dw \1 ; address
ENDM
- enum copyvartobyte_command ; $1a
-copyvartobyte: MACRO
- db copyvartobyte_command
+ enum writemem_command ; $1a
+writemem: MACRO
+ db writemem_command
dw \1 ; address
ENDM
- enum loadvar_command ; $1b
-loadvar: MACRO
- db loadvar_command
+ enum loadmem_command ; $1b
+loadmem: MACRO
+ db loadmem_command
dw \1 ; address
db \2 ; value
ENDM
- enum checkcode_command ; $1c
-checkcode: MACRO
- db checkcode_command
+ enum readvar_command ; $1c
+readvar: MACRO
+ db readvar_command
db \1 ; variable_id
ENDM
- enum writevarcode_command ; $1d
-writevarcode: MACRO
- db writevarcode_command
+ enum writevar_command ; $1d
+writevar: MACRO
+ db writevar_command
db \1 ; variable_id
ENDM
- enum writecode_command ; $1e
-writecode: MACRO
- db writecode_command
+ enum loadvar_command ; $1e
+loadvar: MACRO
+if STRIN("\1", "VAR_") != 1
+; LEGACY: Support for the old name of "loadmem"
+ loadmem \1, \2
+else
+ db loadvar_command
db \1 ; variable_id
db \2 ; value
+endc
ENDM
enum giveitem_command ; $1f
@@ -400,58 +405,58 @@
db \3 ; y
ENDM
- enum readmoney_command ; $3d
-readmoney: MACRO
- db readmoney_command
- db \1 ; account
- db \2 ; memory
+ enum getmoney_command ; $3d
+getmoney: MACRO
+ db getmoney_command
+ db \2 ; account
+ db \1 ; string_buffer
ENDM
- enum readcoins_command ; $3e
-readcoins: MACRO
- db readcoins_command
- db \1 ; memory
+ enum getcoins_command ; $3e
+getcoins: MACRO
+ db getcoins_command
+ db \1 ; string_buffer
ENDM
- enum vartomem_command ; $3f
-vartomem: MACRO
- db vartomem_command
- db \1 ; memory
+ enum getnum_command ; $3f
+getnum: MACRO
+ db getnum_command
+ db \1 ; string_buffer
ENDM
- enum pokenamemem_command ; $40
-pokenamemem: MACRO
- db pokenamemem_command
- db \1 ; pokemon
- db \2 ; memory
+ enum getmonname_command ; $40
+getmonname: MACRO
+ db getmonname_command
+ db \2 ; pokemon
+ db \1 ; string_buffer
ENDM
- enum itemtotext_command ; $41
-itemtotext: MACRO
- db itemtotext_command
- db \1 ; item
- db \2 ; memory
+ enum getitemname_command ; $41
+getitemname: MACRO
+ db getitemname_command
+ db \2 ; item
+ db \1 ; string_buffer
ENDM
- enum mapnametotext_command ; $42
-mapnametotext: MACRO
- db mapnametotext_command
- db \1 ; memory
+ enum getcurlandmarkname_command ; $42
+getcurlandmarkname: MACRO
+ db getcurlandmarkname_command
+ db \1 ; string_buffer
ENDM
- enum trainertotext_command ; $43
-trainertotext: MACRO
- db trainertotext_command
- db \1 ; trainer_id
+ enum gettrainername_command ; $43
+gettrainername: MACRO
+ db gettrainername_command
db \2 ; trainer_group
- db \3 ; memory
+ db \3 ; trainer_id
+ db \1 ; string_buffer
ENDM
- enum stringtotext_command ; $44
-stringtotext: MACRO
- db stringtotext_command
- dw \1 ; text_pointer
- db \2 ; memory
+ enum getstring_command ; $44
+getstring: MACRO
+ db getstring_command
+ dw \2 ; text_pointer
+ db \1 ; string_buffer
ENDM
enum itemnotify_command ; $45
@@ -586,9 +591,9 @@
db randomwildmon_command
ENDM
- enum loadmemtrainer_command ; $5c
-loadmemtrainer: MACRO
- db loadmemtrainer_command
+ enum loadtemptrainer_command ; $5c
+loadtemptrainer: MACRO
+ db loadtemptrainer_command
ENDM
enum loadwildmon_command ; $5d
@@ -624,7 +629,7 @@
enum trainertext_command ; $62
trainertext: MACRO
db trainertext_command
- db \1 ; which_text
+ db \1 ; text_id
ENDM
enum trainerflagaction_command ; $63
@@ -668,9 +673,9 @@
dw \2 ; data
ENDM
- enum applymovement2_command ; $6a
-applymovement2: MACRO
- db applymovement2_command
+ enum applymovementlasttalked_command ; $6a
+applymovementlasttalked: MACRO
+ db applymovementlasttalked_command
dw \1 ; data
ENDM
@@ -765,11 +770,10 @@
db \1 ; param
ENDM
- enum changemap_command ; $79
-changemap: MACRO
- db changemap_command
- db \1 ; map_bank
- dw \2 ; map_data_pointer
+ enum changemapblocks_command ; $79
+changemapblocks: MACRO
+ db changemapblocks_command
+ dba \1 ; map_data_pointer
ENDM
enum changeblock_command ; $7a
@@ -989,9 +993,9 @@
endc
ENDM
- enum verbosegiveitem2_command ; $9f
-verbosegiveitem2: MACRO
- db verbosegiveitem2_command
+ enum verbosegiveitemvar_command ; $9f
+verbosegiveitemvar: MACRO
+ db verbosegiveitemvar_command
db \1 ; item
db \2 ; var
ENDM
@@ -1025,29 +1029,29 @@
enum battletowertext_command ; $a4
battletowertext: MACRO
db battletowertext_command
- db \1 ; memory
+ db \1 ; bttext_id
ENDM
- enum landmarktotext_command ; $a5
-landmarktotext: MACRO
- db landmarktotext_command
- db \1 ; id
- db \2 ; memory
+ enum getlandmarkname_command ; $a5
+getlandmarkname: MACRO
+ db getlandmarkname_command
+ db \2 ; landmark_id
+ db \1 ; string_buffer
ENDM
- enum trainerclassname_command ; $a6
-trainerclassname: MACRO
- db trainerclassname_command
- db \1 ; id
- db \2 ; memory
+ enum gettrainerclassname_command ; $a6
+gettrainerclassname: MACRO
+ db gettrainerclassname_command
+ db \2 ; trainer_group
+ db \1 ; string_buffer
ENDM
- enum name_command ; $a7
-name: MACRO
- db name_command
- db \1 ; type
- db \2 ; id
- db \3 ; memory
+ enum getname_command ; $a7
+getname: MACRO
+ db getname_command
+ db \2 ; type
+ db \3 ; id
+ db \1 ; memory
ENDM
enum wait_command ; $a8
--- a/maps/AzaleaGym.asm
+++ b/maps/AzaleaGym.asm
@@ -30,7 +30,7 @@
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_HIVEBADGE
- checkcode VAR_BADGES
+ readvar VAR_BADGES
scall AzaleaGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM49_FURY_CUTTER
@@ -144,7 +144,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext BUGSY, BUGSY1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, BUGSY, BUGSY1
jumpstd gymstatue2
BugsyText_INeverLose:
--- a/maps/BattleTower1F.asm
+++ b/maps/BattleTower1F.asm
@@ -13,10 +13,10 @@
db 0 ; callbacks
.Scene0:
- writebyte BATTLETOWERACTION_CHECKSAVEFILEISYOURS
+ setval BATTLETOWERACTION_CHECKSAVEFILEISYOURS
special BattleTowerAction
iffalse .SkipEverything
- writebyte BATTLETOWERACTION_GET_CHALLENGE_STATE ; copybytetovar sBattleTowerChallengeState
+ setval BATTLETOWERACTION_GET_CHALLENGE_STATE ; readmem sBattleTowerChallengeState
special BattleTowerAction
ifequal $0, .SkipEverything
ifequal $2, .priorityjump1
@@ -31,9 +31,9 @@
.priorityjump1
priorityjump BattleTower_LeftWithoutSaving
- writebyte BATTLETOWERACTION_CHALLENGECANCELED
+ setval BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
- writebyte BATTLETOWERACTION_06
+ setval BATTLETOWERACTION_06
special BattleTowerAction
.SkipEverything:
setscene SCENE_FINISHED
@@ -52,13 +52,13 @@
end
BattleTower1FReceptionistScript:
- writebyte BATTLETOWERACTION_GET_CHALLENGE_STATE ; copybytetovar sBattleTowerChallengeState
+ setval BATTLETOWERACTION_GET_CHALLENGE_STATE ; readmem sBattleTowerChallengeState
special BattleTowerAction
ifequal $3, Script_BeatenAllTrainers2 ; maps/BattleTowerBattleRoom.asm
opentext
writetext Text_BattleTowerWelcomesYou
buttonsound
- writebyte BATTLETOWERACTION_CHECK_EXPLANATION_READ ; if new save file: bit 1, [sBattleTowerSaveFileFlags]
+ setval BATTLETOWERACTION_CHECK_EXPLANATION_READ ; if new save file: bit 1, [sBattleTowerSaveFileFlags]
special BattleTowerAction
ifnotequal $0, Script_Menu_ChallengeExplanationCancel
jump Script_BattleTowerIntroductionYesNo
@@ -65,7 +65,7 @@
Script_Menu_ChallengeExplanationCancel:
writetext Text_WantToGoIntoABattleRoom
- writebyte TRUE
+ setval TRUE
special Menu_ChallengeExplanationCancel
ifequal 1, Script_ChooseChallenge
ifequal 2, Script_BattleTowerExplanation
@@ -72,7 +72,7 @@
jump Script_BattleTowerHopeToServeYouAgain
Script_ChooseChallenge:
- writebyte BATTLETOWERACTION_RESETDATA ; ResetBattleTowerTrainerSRAM
+ setval BATTLETOWERACTION_RESETDATA ; ResetBattleTowerTrainerSRAM
special BattleTowerAction
special CheckForBattleTowerRules
ifnotequal FALSE, Script_WaitButton
@@ -83,23 +83,23 @@
special TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
setscene SCENE_FINISHED
- writebyte BATTLETOWERACTION_SET_EXPLANATION_READ ; set 1, [sBattleTowerSaveFileFlags]
+ setval BATTLETOWERACTION_SET_EXPLANATION_READ ; set 1, [sBattleTowerSaveFileFlags]
special BattleTowerAction
special BattleTowerRoomMenu
ifequal $a, Script_Menu_ChallengeExplanationCancel
ifnotequal $0, Script_MobileError
- writebyte BATTLETOWERACTION_11
+ setval BATTLETOWERACTION_11
special BattleTowerAction
writetext Text_RightThisWayToYourBattleRoom
waitbutton
closetext
- writebyte BATTLETOWERACTION_CHOOSEREWARD
+ setval BATTLETOWERACTION_CHOOSEREWARD
special BattleTowerAction
jump Script_WalkToBattleTowerElevator
Script_ResumeBattleTowerChallenge:
closetext
- writebyte BATTLETOWERACTION_LOADLEVELGROUP ; load choice of level group
+ setval BATTLETOWERACTION_LOADLEVELGROUP ; load choice of level group
special BattleTowerAction
Script_WalkToBattleTowerElevator:
musicfadeout MUSIC_NONE, 8
@@ -108,7 +108,7 @@
setmapscene BATTLE_TOWER_HALLWAY, SCENE_DEFAULT
follow BATTLETOWER1F_RECEPTIONIST, PLAYER
applymovement BATTLETOWER1F_RECEPTIONIST, MovementData_BattleTower1FWalkToElevator
- writebyte BATTLETOWERACTION_0A
+ setval BATTLETOWERACTION_0A
special BattleTowerAction
warpsound
disappear BATTLETOWER1F_RECEPTIONIST
@@ -118,15 +118,15 @@
end
Script_GivePlayerHisPrize:
- writebyte BATTLETOWERACTION_1C
+ setval BATTLETOWERACTION_1C
special BattleTowerAction
- writebyte BATTLETOWERACTION_GIVEREWARD
+ setval BATTLETOWERACTION_GIVEREWARD
special BattleTowerAction
ifequal POTION, Script_YourPackIsStuffedFull
- itemtotext USE_SCRIPT_VAR, MEM_BUFFER_1
+ getitemname STRING_BUFFER_4, USE_SCRIPT_VAR
giveitem ITEM_FROM_MEM, 5
writetext Text_PlayerGotFive
- writebyte BATTLETOWERACTION_1D
+ setval BATTLETOWERACTION_1D
special BattleTowerAction
closetext
end
@@ -144,7 +144,7 @@
Script_BattleTowerExplanation:
writetext Text_BattleTowerIntroduction_2
Script_BattleTowerSkipExplanation:
- writebyte BATTLETOWERACTION_SET_EXPLANATION_READ
+ setval BATTLETOWERACTION_SET_EXPLANATION_READ
special BattleTowerAction
jump Script_Menu_ChallengeExplanationCancel
@@ -170,7 +170,7 @@
iffalse Script_Menu_ChallengeExplanationCancel
special TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
- writebyte BATTLETOWERACTION_SET_EXPLANATION_READ
+ setval BATTLETOWERACTION_SET_EXPLANATION_READ
special BattleTowerAction
special Function1700ba
ifequal $a, Script_Menu_ChallengeExplanationCancel
@@ -184,15 +184,15 @@
end
UnreferencedScript_0x9e4ea:
- writebyte BATTLETOWERACTION_LEVEL_CHECK
+ setval BATTLETOWERACTION_LEVEL_CHECK
special BattleTowerAction
ifnotequal $0, Script_AMonLevelExceeds
- writebyte BATTLETOWERACTION_UBERS_CHECK
+ setval BATTLETOWERACTION_UBERS_CHECK
special BattleTowerAction
ifnotequal $0, Script_MayNotEnterABattleRoomUnderL70
special CheckForBattleTowerRules
ifnotequal FALSE, Script_WaitButton
- writebyte BATTLETOWERACTION_05
+ setval BATTLETOWERACTION_05
special BattleTowerAction
ifequal $0, .zero
writetext Text_CantBeRegistered_PreviousRecordDeleted
@@ -210,9 +210,9 @@
special TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
setscene SCENE_FINISHED
- writebyte BATTLETOWERACTION_06
+ setval BATTLETOWERACTION_06
special BattleTowerAction
- writebyte BATTLETOWERACTION_12
+ setval BATTLETOWERACTION_12
special BattleTowerAction
writetext Text_RightThisWayToYourBattleRoom
waitbutton
--- a/maps/BattleTowerBattleRoom.asm
+++ b/maps/BattleTowerBattleRoom.asm
@@ -20,7 +20,7 @@
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerWalksIn
; beat all 7 opponents in a row
Script_BattleRoomLoop:
- writebyte BATTLETOWERBATTLEROOM_YOUNGSTER
+ setval BATTLETOWERBATTLEROOM_YOUNGSTER
special LoadOpponentTrainerAndPokemonWithOTSprite
appear BATTLETOWERBATTLEROOM_YOUNGSTER
warpsound
@@ -34,7 +34,7 @@
special FadeOutPalettes
reloadmap
ifnotequal $0, Script_FailedBattleTowerChallenge
- copybytetovar wNrOfBeatenBattleTowerTrainers
+ readmem wNrOfBeatenBattleTowerTrainers
ifequal BATTLETOWER_STREAK_LENGTH, Script_BeatenAllTrainers
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut
warpsound
@@ -65,11 +65,11 @@
writetext Text_SaveAndEndTheSession
yesorno
iffalse Script_DontSaveAndEndTheSession
- writebyte BATTLETOWERACTION_SAVELEVELGROUP ; save level group
+ setval BATTLETOWERACTION_SAVELEVELGROUP ; save level group
special BattleTowerAction
- writebyte BATTLETOWERACTION_SAVEOPTIONS ; choose reward
+ setval BATTLETOWERACTION_SAVEOPTIONS ; choose reward
special BattleTowerAction
- writebyte BATTLETOWERACTION_SAVE_AND_QUIT ; quicksave
+ setval BATTLETOWERACTION_SAVE_AND_QUIT ; quicksave
special BattleTowerAction
playsound SFX_SAVE
waitsfx
@@ -79,9 +79,9 @@
writetext Text_CancelYourBattleRoomChallenge
yesorno
iffalse Script_ContinueAndBattleNextOpponent
- writebyte BATTLETOWERACTION_CHALLENGECANCELED
+ setval BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
- writebyte BATTLETOWERACTION_06
+ setval BATTLETOWERACTION_06
special BattleTowerAction
closetext
special FadeOutPalettes
@@ -93,7 +93,7 @@
pause 60
special BattleTowerFade
warpfacing UP, BATTLE_TOWER_1F, 7, 7
- writebyte BATTLETOWERACTION_CHALLENGECANCELED
+ setval BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
opentext
writetext Text_ThanksForVisiting
@@ -111,7 +111,7 @@
jump Script_GivePlayerHisPrize
UnreferencedScript_0x9f4eb:
- writebyte BATTLETOWERACTION_CHALLENGECANCELED
+ setval BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
opentext
writetext Text_TooMuchTimeElapsedNoRegister
@@ -120,9 +120,9 @@
end
UnreferencedScript_0x9f4f7:
- writebyte BATTLETOWERACTION_CHALLENGECANCELED
+ setval BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
- writebyte BATTLETOWERACTION_06
+ setval BATTLETOWERACTION_06
special BattleTowerAction
opentext
writetext Text_ThanksForVisiting
--- a/maps/BattleTowerElevator.asm
+++ b/maps/BattleTowerElevator.asm
@@ -18,7 +18,7 @@
follow BATTLETOWERELEVATOR_RECEPTIONIST, PLAYER
applymovement BATTLETOWERELEVATOR_RECEPTIONIST, MovementData_BattleTowerElevatorReceptionistWalksIn
applymovement PLAYER, MovementData_BattleTowerElevatorPlayerWalksIn
- writebyte BATTLETOWERACTION_0A
+ setval BATTLETOWERACTION_0A
special BattleTowerAction
playsound SFX_ELEVATOR
earthquake 60
--- a/maps/BillsFamilysHouse.asm
+++ b/maps/BillsFamilysHouse.asm
@@ -19,7 +19,7 @@
writetext BillImCountingOnYouText
buttonsound
waitsfx
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, .NoRoom
writetext ReceivedEeveeText
playsound SFX_CAUGHT_MON
--- a/maps/BlackthornCity.asm
+++ b/maps/BlackthornCity.asm
@@ -21,7 +21,7 @@
return
.Santos:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SATURDAY, .SantosAppears
disappear BLACKTHORNCITY_SANTOS
return
@@ -90,7 +90,7 @@
opentext
checkevent EVENT_GOT_SPELL_TAG_FROM_SANTOS
iftrue .Saturday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal SATURDAY, .NotSaturday
checkevent EVENT_MET_SANTOS_OF_SATURDAY
iftrue .MetSantos
--- a/maps/BlackthornGym1F.asm
+++ b/maps/BlackthornGym1F.asm
@@ -68,7 +68,7 @@
buttonsound
giveitem TM_DRAGONBREATH
iffalse .BagFull
- itemtotext TM_DRAGONBREATH, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, TM_DRAGONBREATH
writetext BlackthornGymText_ReceivedTM24
playsound SFX_ITEM
waitsfx
@@ -144,7 +144,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext CLAIR, CLAIR1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, CLAIR, CLAIR1
jumpstd gymstatue2
ClairIntroText:
--- a/maps/BluesHouse.asm
+++ b/maps/BluesHouse.asm
@@ -9,7 +9,7 @@
DaisyScript:
faceplayer
opentext
- checkcode VAR_HOUR
+ readvar VAR_HOUR
ifequal 15, .ThreePM
writetext DaisyHelloText
waitbutton
--- a/maps/BurnedTowerB1F.asm
+++ b/maps/BurnedTowerB1F.asm
@@ -103,7 +103,7 @@
writetext BurnedTowerB1FEusineText
waitbutton
closetext
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal UP, .Movement2
applymovement BURNEDTOWERB1F_EUSINE, BurnedTowerB1FEusineMovement1
jump .Finish
--- a/maps/CeladonCafe.asm
+++ b/maps/CeladonCafe.asm
@@ -94,7 +94,7 @@
giveitem LEFTOVERS
iffalse .PackFull
opentext
- itemtotext LEFTOVERS, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, LEFTOVERS
writetext FoundLeftoversText
playsound SFX_ITEM
waitsfx
@@ -105,7 +105,7 @@
.PackFull:
opentext
- itemtotext LEFTOVERS, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, LEFTOVERS
writetext FoundLeftoversText
buttonsound
writetext NoRoomForLeftoversText
--- a/maps/CeladonDeptStore6F.asm
+++ b/maps/CeladonDeptStore6F.asm
@@ -42,7 +42,7 @@
giveitem FRESH_WATER
iffalse .NotEnoughSpace
takemoney YOUR_MONEY, CELADONDEPTSTORE6F_FRESH_WATER_PRICE
- itemtotext FRESH_WATER, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, FRESH_WATER
jump .VendItem
.SodaPop:
@@ -51,7 +51,7 @@
giveitem SODA_POP
iffalse .NotEnoughSpace
takemoney YOUR_MONEY, CELADONDEPTSTORE6F_SODA_POP_PRICE
- itemtotext SODA_POP, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, SODA_POP
jump .VendItem
.Lemonade:
@@ -60,7 +60,7 @@
giveitem LEMONADE
iffalse .NotEnoughSpace
takemoney YOUR_MONEY, CELADONDEPTSTORE6F_LEMONADE_PRICE
- itemtotext LEMONADE, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, LEMONADE
jump .VendItem
.VendItem:
--- a/maps/CeladonGameCorner.asm
+++ b/maps/CeladonGameCorner.asm
@@ -58,7 +58,7 @@
iffalse .NoCoinCase
checkcoins MAX_COINS - 1
ifequal HAVE_MORE, .FullCoinCase
- stringtotext .coinname, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, .coinname
scall .GiveCoins
givecoins 18
setevent EVENT_GOT_COINS_FROM_GAMBLER_AT_CELADON
@@ -112,7 +112,7 @@
random 6
ifequal 0, CeladonGameCornerSlotMachineScript
refreshscreen
- writebyte FALSE
+ setval FALSE
special SlotMachine
closetext
end
@@ -119,7 +119,7 @@
CeladonGameCornerSlotMachineScript:
refreshscreen
- writebyte TRUE
+ setval TRUE
special SlotMachine
closetext
end
--- a/maps/CeladonGameCornerPrizeRoom.asm
+++ b/maps/CeladonGameCornerPrizeRoom.asm
@@ -41,7 +41,7 @@
.DoubleTeam:
checkcoins CELADONGAMECORNERPRIZEROOM_TM32_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
- itemtotext TM_DOUBLE_TEAM, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, TM_DOUBLE_TEAM
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
giveitem TM_DOUBLE_TEAM
@@ -52,7 +52,7 @@
.Psychic:
checkcoins CELADONGAMECORNERPRIZEROOM_TM29_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
- itemtotext TM_PSYCHIC_M, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, TM_PSYCHIC_M
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
giveitem TM_PSYCHIC_M
@@ -63,7 +63,7 @@
.HyperBeam:
checkcoins CELADONGAMECORNERPRIZEROOM_TM15_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
- itemtotext TM_HYPER_BEAM, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, TM_HYPER_BEAM
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
giveitem TM_HYPER_BEAM
@@ -142,9 +142,9 @@
.Pikachu:
checkcoins CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
- pokenamemem PIKACHU, MEM_BUFFER_0
+ getmonname STRING_BUFFER_3, PIKACHU
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
waitsfx
@@ -151,7 +151,7 @@
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
waitbutton
- writebyte PIKACHU
+ setval PIKACHU
special GameCornerPrizeMonCheckDex
givepoke PIKACHU, 25
takecoins CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS
@@ -160,9 +160,9 @@
.Porygon:
checkcoins CELADONGAMECORNERPRIZEROOM_PORYGON_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
- pokenamemem PORYGON, MEM_BUFFER_0
+ getmonname STRING_BUFFER_3, PORYGON
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
waitsfx
@@ -169,7 +169,7 @@
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
waitbutton
- writebyte PORYGON
+ setval PORYGON
special GameCornerPrizeMonCheckDex
givepoke PORYGON, 15
takecoins CELADONGAMECORNERPRIZEROOM_PORYGON_COINS
@@ -178,9 +178,9 @@
.Larvitar:
checkcoins CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS
ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
- pokenamemem LARVITAR, MEM_BUFFER_0
+ getmonname STRING_BUFFER_3, LARVITAR
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_CancelPurchaseScript
waitsfx
@@ -187,7 +187,7 @@
playsound SFX_TRANSACTION
writetext CeladonPrizeRoom_HereYouGoText
waitbutton
- writebyte LARVITAR
+ setval LARVITAR
special GameCornerPrizeMonCheckDex
givepoke LARVITAR, 40
takecoins CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS
--- a/maps/CeladonGym.asm
+++ b/maps/CeladonGym.asm
@@ -107,7 +107,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext ERIKA, ERIKA1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, ERIKA, ERIKA1
jumpstd gymstatue2
ErikaBeforeBattleText:
--- a/maps/CeladonMansion3F.asm
+++ b/maps/CeladonMansion3F.asm
@@ -13,7 +13,7 @@
faceplayer
opentext
writetext GameFreakGameDesignerText
- checkcode VAR_DEXCAUGHT
+ readvar VAR_DEXCAUGHT
ifgreater NUM_POKEMON - 2 - 1, .CompletedPokedex ; ignore Mew and Celebi
waitbutton
closetext
--- a/maps/CeladonPokecenter1F.asm
+++ b/maps/CeladonPokecenter1F.asm
@@ -27,7 +27,7 @@
opentext
writetext CeladonEusineText1
buttonsound
- writebyte SUICUNE
+ setval SUICUNE
special MonCheck
iffalse .NoSuicune
special BeastsCheck
@@ -42,7 +42,7 @@
writetext EusineLeavesCeladonText
waitbutton
closetext
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal UP, .Location1
applymovement CELADONPOKECENTER1F_EUSINE, .Movement1
jump .Continue
--- a/maps/CeruleanGym.asm
+++ b/maps/CeruleanGym.asm
@@ -158,7 +158,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext MISTY, MISTY1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, MISTY, MISTY1
jumpstd gymstatue2
CeruleanGymGruntRunsDownMovement:
--- a/maps/CherrygroveCity.asm
+++ b/maps/CherrygroveCity.asm
@@ -67,7 +67,7 @@
opentext
writetext GuideGentGiftText
buttonsound
- stringtotext .mapcardname, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, .mapcardname
scall .JumpstdReceiveItem
setflag ENGINE_MAP_CARD
writetext GotMapCardText
@@ -120,7 +120,7 @@
winlosstext SilverCherrygroveWinText, SilverCherrygroveLossText
setlasttalked CHERRYGROVECITY_SILVER
loadtrainer RIVAL1, RIVAL1_1_TOTODILE
- writecode VAR_BATTLETYPE, BATTLETYPE_CANLOSE
+ loadvar VAR_BATTLETYPE, BATTLETYPE_CANLOSE
startbattle
dontrestartmapmusic
reloadmap
@@ -131,7 +131,7 @@
winlosstext SilverCherrygroveWinText, SilverCherrygroveLossText
setlasttalked CHERRYGROVECITY_SILVER
loadtrainer RIVAL1, RIVAL1_1_CHIKORITA
- writecode VAR_BATTLETYPE, BATTLETYPE_CANLOSE
+ loadvar VAR_BATTLETYPE, BATTLETYPE_CANLOSE
startbattle
dontrestartmapmusic
reloadmap
@@ -142,7 +142,7 @@
winlosstext SilverCherrygroveWinText, SilverCherrygroveLossText
setlasttalked CHERRYGROVECITY_SILVER
loadtrainer RIVAL1, RIVAL1_1_CYNDAQUIL
- writecode VAR_BATTLETYPE, BATTLETYPE_CANLOSE
+ loadvar VAR_BATTLETYPE, BATTLETYPE_CANLOSE
startbattle
dontrestartmapmusic
reloadmap
--- a/maps/CianwoodGym.asm
+++ b/maps/CianwoodGym.asm
@@ -47,7 +47,7 @@
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_STORMBADGE
- checkcode VAR_BADGES
+ readvar VAR_BADGES
scall CianwoodGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM01_DYNAMICPUNCH
@@ -136,7 +136,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext CHUCK, CHUCK1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, CHUCK, CHUCK1
jumpstd gymstatue2
CianwoodGymMovement_ChuckChucksBoulder:
--- a/maps/DayCare.asm
+++ b/maps/DayCare.asm
@@ -28,7 +28,7 @@
writetext DayCareManText_GiveOddEgg
buttonsound
closetext
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, .PartyFull
special GiveOddEgg
opentext
--- a/maps/DragonShrine.asm
+++ b/maps/DragonShrine.asm
@@ -208,7 +208,7 @@
.GiveDratini:
writetext DragonShrineTakeThisDratiniText
waitbutton
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, .PartyFull
writetext DragonShrinePlayerReceivedDratiniText
playsound SFX_CAUGHT_MON
--- a/maps/DragonsDenB1F.asm
+++ b/maps/DragonsDenB1F.asm
@@ -30,7 +30,7 @@
return
.CheckDay:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal TUESDAY, .AppearSilver
ifequal THURSDAY, .AppearSilver
disappear DRAGONSDENB1F_SILVER
@@ -55,7 +55,7 @@
buttonsound
giveitem TM_DRAGONBREATH
iffalse .BagFull
- itemtotext TM_DRAGONBREATH, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, TM_DRAGONBREATH
writetext NotifyReceiveDragonbreath
playsound SFX_ITEM
waitsfx
@@ -132,7 +132,7 @@
iffalse .BagFull
disappear DRAGONSDENB1F_POKE_BALL1
opentext
- itemtotext DRAGON_FANG, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, DRAGON_FANG
writetext Text_FoundDragonFang
playsound SFX_ITEM
waitsfx
@@ -142,7 +142,7 @@
.BagFull:
opentext
- itemtotext DRAGON_FANG, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, DRAGON_FANG
writetext Text_FoundDragonFang
buttonsound
writetext Text_NoRoomForDragonFang
--- a/maps/EcruteakGym.asm
+++ b/maps/EcruteakGym.asm
@@ -39,7 +39,7 @@
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_FOGBADGE
- checkcode VAR_BADGES
+ readvar VAR_BADGES
scall EcruteakGymActivateRockets
setmapscene ECRUTEAK_TIN_TOWER_ENTRANCE, SCENE_FINISHED
setevent EVENT_RANG_CLEAR_BELL_1
@@ -160,7 +160,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext MORTY, MORTY1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, MORTY, MORTY1
jumpstd gymstatue2
EcruteakGymPlayerStepUpMovement:
--- a/maps/ElmsLab.asm
+++ b/maps/ElmsLab.asm
@@ -105,10 +105,10 @@
iftrue ElmGiveEverstoneScript
checkevent EVENT_TOLD_ELM_ABOUT_TOGEPI_OVER_THE_PHONE
iffalse ElmCheckTogepiEgg
- writebyte TOGEPI
+ setval TOGEPI
special FindPartyMonThatSpeciesYourTrainerID
iftrue ShowElmTogepiScript
- writebyte TOGETIC
+ setval TOGETIC
special FindPartyMonThatSpeciesYourTrainerID
iftrue ShowElmTogepiScript
writetext ElmThoughtEggHatchedText
@@ -117,10 +117,10 @@
end
ElmEggHatchedScript:
- writebyte TOGEPI
+ setval TOGEPI
special FindPartyMonThatSpeciesYourTrainerID
iftrue ShowElmTogepiScript
- writebyte TOGETIC
+ setval TOGETIC
special FindPartyMonThatSpeciesYourTrainerID
iftrue ShowElmTogepiScript
jump ElmCheckGotEggAgain
@@ -173,7 +173,7 @@
writetext ChoseStarterText
buttonsound
waitsfx
- pokenamemem CYNDAQUIL, MEM_BUFFER_0
+ getmonname STRING_BUFFER_3, CYNDAQUIL
writetext ReceivedStarterText
playsound SFX_CAUGHT_MON
waitsfx
@@ -180,7 +180,7 @@
buttonsound
givepoke CYNDAQUIL, 5, BERRY
closetext
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal RIGHT, ElmDirectionsScript
applymovement PLAYER, AfterCyndaquilMovement
jump ElmDirectionsScript
@@ -203,7 +203,7 @@
writetext ChoseStarterText
buttonsound
waitsfx
- pokenamemem TOTODILE, MEM_BUFFER_0
+ getmonname STRING_BUFFER_3, TOTODILE
writetext ReceivedStarterText
playsound SFX_CAUGHT_MON
waitsfx
@@ -231,7 +231,7 @@
writetext ChoseStarterText
buttonsound
waitsfx
- pokenamemem CHIKORITA, MEM_BUFFER_0
+ getmonname STRING_BUFFER_3, CHIKORITA
writetext ReceivedStarterText
playsound SFX_CAUGHT_MON
waitsfx
@@ -309,7 +309,7 @@
special StubbedTrainerRankings_Healings
special HealParty
playmusic MUSIC_NONE
- writebyte HEALMACHINE_ELMS_LAB
+ setval HEALMACHINE_ELMS_LAB
special HealMachineAnim
pause 30
special RestartMapMusic
@@ -419,7 +419,7 @@
ElmJumpBackScript1:
closetext
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal DOWN, ElmJumpDownScript
ifequal UP, ElmJumpUpScript
ifequal LEFT, ElmJumpLeftScript
@@ -428,7 +428,7 @@
ElmJumpBackScript2:
closetext
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal DOWN, ElmJumpUpScript
ifequal UP, ElmJumpDownScript
ifequal LEFT, ElmJumpRightScript
@@ -498,7 +498,7 @@
opentext
writetext AideText_GiveYouBalls
buttonsound
- itemtotext POKE_BALL, MEM_BUFFER_1
+ getitemname STRING_BUFFER_4, POKE_BALL
scall AideScript_ReceiveTheBalls
giveitem POKE_BALL, 5
writetext AideText_ExplainBalls
--- a/maps/FastShip1F.asm
+++ b/maps/FastShip1F.asm
@@ -87,7 +87,7 @@
end
.LetThePlayerOut:
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal RIGHT, .YouAreFacingRight
applymovement FASTSHIP1F_SAILOR1, MovementData_0x7520e
applymovement PLAYER, MovementData_0x75235
--- a/maps/FastShipCabins_NNW_NNE_NE.asm
+++ b/maps/FastShipCabins_NNW_NNE_NE.asm
@@ -97,7 +97,7 @@
closetext
setevent EVENT_FAST_SHIP_LAZY_SAILOR
setmapscene FAST_SHIP_B1F, SCENE_FINISHED
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal RIGHT, .Movement2
applymovement FASTSHIPCABINS_NNW_NNE_NE_SAILOR, FastShipLazySailorLeavesMovement1
playsound SFX_EXIT_BUILDING
--- a/maps/FuchsiaGym.asm
+++ b/maps/FuchsiaGym.asm
@@ -214,7 +214,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext JANINE, JANINE1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, JANINE, JANINE1
jumpstd gymstatue2
Movement_NinjaSpin:
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -36,7 +36,7 @@
iffalse .MoveTutorDone
checkitem COIN_CASE
iffalse .MoveTutorDisappear
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal WEDNESDAY, .MoveTutorAppear
ifequal SATURDAY, .MoveTutorAppear
.MoveTutorDisappear:
@@ -72,7 +72,7 @@
jump .Incompatible
.Flamethrower:
- writebyte MOVETUTOR_FLAMETHROWER
+ setval MOVETUTOR_FLAMETHROWER
writetext UnknownText_0x1991cf
special MoveTutor
ifequal FALSE, .TeachMove
@@ -79,7 +79,7 @@
jump .Incompatible
.Thunderbolt:
- writebyte MOVETUTOR_THUNDERBOLT
+ setval MOVETUTOR_THUNDERBOLT
writetext UnknownText_0x1991cf
special MoveTutor
ifequal FALSE, .TeachMove
@@ -86,7 +86,7 @@
jump .Incompatible
.IceBeam:
- writebyte MOVETUTOR_ICE_BEAM
+ setval MOVETUTOR_ICE_BEAM
writetext UnknownText_0x1991cf
special MoveTutor
ifequal FALSE, .TeachMove
@@ -128,7 +128,7 @@
writetext UnknownText_0x19918b
waitbutton
closetext
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal LEFT, .WalkAroundPlayer
applymovement GOLDENRODCITY_MOVETUTOR, MovementData_0x198a5f
jump .GoInside
--- a/maps/GoldenrodDeptStore5F.asm
+++ b/maps/GoldenrodDeptStore5F.asm
@@ -13,7 +13,7 @@
callback MAPCALLBACK_OBJECTS, .CheckIfSunday
.CheckIfSunday:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, .yes
disappear GOLDENRODDEPTSTORE5F_RECEPTIONIST
return
@@ -59,7 +59,7 @@
GoldenrodDeptStore5FReceptionistScript:
faceplayer
opentext
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal SUNDAY, .EventIsOver
checkflag ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN
iftrue .EventIsOver
--- a/maps/GoldenrodDeptStore6F.asm
+++ b/maps/GoldenrodDeptStore6F.asm
@@ -31,7 +31,7 @@
giveitem FRESH_WATER
iffalse .NotEnoughSpace
takemoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_FRESH_WATER_PRICE
- itemtotext FRESH_WATER, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, FRESH_WATER
jump .VendItem
.SodaPop:
@@ -40,7 +40,7 @@
giveitem SODA_POP
iffalse .NotEnoughSpace
takemoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_SODA_POP_PRICE
- itemtotext SODA_POP, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, SODA_POP
jump .VendItem
.Lemonade:
@@ -49,7 +49,7 @@
giveitem LEMONADE
iffalse .NotEnoughSpace
takemoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_LEMONADE_PRICE
- itemtotext LEMONADE, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, LEMONADE
jump .VendItem
.VendItem:
--- a/maps/GoldenrodGameCorner.asm
+++ b/maps/GoldenrodGameCorner.asm
@@ -30,7 +30,7 @@
iffalse .finish
checkitem COIN_CASE
iffalse .move_tutor_inside
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal WEDNESDAY, .move_tutor_outside
ifequal SATURDAY, .move_tutor_outside
.move_tutor_inside
@@ -77,7 +77,7 @@
.Thunder:
checkcoins GOLDENRODGAMECORNER_TM25_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
- itemtotext TM_THUNDER, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, TM_THUNDER
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_THUNDER
@@ -88,7 +88,7 @@
.Blizzard:
checkcoins GOLDENRODGAMECORNER_TM14_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
- itemtotext TM_BLIZZARD, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, TM_BLIZZARD
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_BLIZZARD
@@ -99,7 +99,7 @@
.FireBlast:
checkcoins GOLDENRODGAMECORNER_TM38_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
- itemtotext TM_FIRE_BLAST, MEM_BUFFER_0
+ getitemname STRING_BUFFER_3, TM_FIRE_BLAST
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_FIRE_BLAST
@@ -178,9 +178,9 @@
.Abra:
checkcoins GOLDENRODGAMECORNER_ABRA_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
- pokenamemem ABRA, MEM_BUFFER_0
+ getmonname STRING_BUFFER_3, ABRA
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
waitsfx
@@ -187,7 +187,7 @@
playsound SFX_TRANSACTION
writetext GoldenrodGameCornerPrizeVendorHereYouGoText
waitbutton
- writebyte ABRA
+ setval ABRA
special GameCornerPrizeMonCheckDex
givepoke ABRA, 5
takecoins GOLDENRODGAMECORNER_ABRA_COINS
@@ -196,9 +196,9 @@
.Cubone:
checkcoins GOLDENRODGAMECORNER_CUBONE_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
- pokenamemem CUBONE, MEM_BUFFER_0
+ getmonname STRING_BUFFER_3, CUBONE
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
waitsfx
@@ -205,7 +205,7 @@
playsound SFX_TRANSACTION
writetext GoldenrodGameCornerPrizeVendorHereYouGoText
waitbutton
- writebyte CUBONE
+ setval CUBONE
special GameCornerPrizeMonCheckDex
givepoke CUBONE, 15
takecoins GOLDENRODGAMECORNER_CUBONE_COINS
@@ -214,9 +214,9 @@
.Wobbuffet:
checkcoins GOLDENRODGAMECORNER_WOBBUFFET_COINS
ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
- pokenamemem WOBBUFFET, MEM_BUFFER_0
+ getmonname STRING_BUFFER_3, WOBBUFFET
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
waitsfx
@@ -223,7 +223,7 @@
playsound SFX_TRANSACTION
writetext GoldenrodGameCornerPrizeVendorHereYouGoText
waitbutton
- writebyte WOBBUFFET
+ setval WOBBUFFET
special GameCornerPrizeMonCheckDex
givepoke WOBBUFFET, 15
takecoins GOLDENRODGAMECORNER_WOBBUFFET_COINS
@@ -301,7 +301,7 @@
random 6
ifequal 0, GoldenrodGameCornerLuckySlotsMachineScript
refreshscreen
- writebyte FALSE
+ setval FALSE
special SlotMachine
closetext
end
@@ -308,7 +308,7 @@
GoldenrodGameCornerLuckySlotsMachineScript:
refreshscreen
- writebyte TRUE
+ setval TRUE
special SlotMachine
closetext
end
--- a/maps/GoldenrodGym.asm
+++ b/maps/GoldenrodGym.asm
@@ -59,7 +59,7 @@
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_PLAINBADGE
- checkcode VAR_BADGES
+ readvar VAR_BADGES
scall GoldenrodGymActivateRockets
.GotPlainBadge:
writetext WhitneyPlainBadgeText
@@ -169,7 +169,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext WHITNEY, WHITNEY1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, WHITNEY, WHITNEY1
jumpstd gymstatue2
BridgetWalksUpMovement:
--- a/maps/GoldenrodMagnetTrainStation.asm
+++ b/maps/GoldenrodMagnetTrainStation.asm
@@ -32,7 +32,7 @@
closetext
applymovement GOLDENRODMAGNETTRAINSTATION_OFFICER, MovementData_0x55146
applymovement PLAYER, MovementData_0x5514f
- writebyte FALSE
+ setval FALSE
special MagnetTrain
warpcheck
newloadmap MAPSETUP_TRAIN
--- a/maps/GoldenrodPokecenter1F.asm
+++ b/maps/GoldenrodPokecenter1F.asm
@@ -14,7 +14,7 @@
jumpstd pokecenternurse
GoldenrodPokecenter1F_GSBallSceneLeft:
- writebyte BATTLETOWERACTION_CHECKMOBILEEVENT
+ setval BATTLETOWERACTION_CHECKMOBILEEVENT
special BattleTowerAction
ifequal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
end
@@ -46,7 +46,7 @@
end
GoldenrodPokecenter1F_GSBallSceneRight:
- writebyte BATTLETOWERACTION_CHECKMOBILEEVENT
+ setval BATTLETOWERACTION_CHECKMOBILEEVENT
special BattleTowerAction
ifequal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
end
--- a/maps/GoldenrodUnderground.asm
+++ b/maps/GoldenrodUnderground.asm
@@ -36,8 +36,8 @@
clearevent EVENT_SWITCH_12
clearevent EVENT_SWITCH_13
clearevent EVENT_SWITCH_14
- writebyte 0
- copyvartobyte wUndergroundSwitchPositions
+ setval 0
+ writemem wUndergroundSwitchPositions
return
.CheckBasementKey:
@@ -50,7 +50,7 @@
return
.CheckDayOfWeek:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal MONDAY, .Monday
ifequal TUESDAY, .Tuesday
ifequal WEDNESDAY, .Wednesday
@@ -157,7 +157,7 @@
BitterMerchantScript:
opentext
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, .Open
ifequal SATURDAY, .Open
jump GoldenrodUndergroundScript_ShopClosed
@@ -171,7 +171,7 @@
opentext
checkflag ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
iftrue GoldenrodUndergroundScript_ShopClosed
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal MONDAY, .CheckMorn
jump GoldenrodUndergroundScript_ShopClosed
@@ -184,7 +184,7 @@
OlderHaircutBrotherScript:
opentext
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal TUESDAY, .DoHaircut
ifequal THURSDAY, .DoHaircut
ifequal SATURDAY, .DoHaircut
@@ -267,7 +267,7 @@
YoungerHaircutBrotherScript:
opentext
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, .DoHaircut
ifequal WEDNESDAY, .DoHaircut
ifequal FRIDAY, .DoHaircut
--- a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
+++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
@@ -279,9 +279,9 @@
writetext SwitchRoomText_OffTurnOn
yesorno
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
- copybytetovar wUndergroundSwitchPositions
- addvar 1
- copyvartobyte wUndergroundSwitchPositions
+ readmem wUndergroundSwitchPositions
+ addval 1
+ writemem wUndergroundSwitchPositions
setevent EVENT_SWITCH_1
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
@@ -289,9 +289,9 @@
writetext SwitchRoomText_OnTurnOff
yesorno
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
- copybytetovar wUndergroundSwitchPositions
- addvar -1
- copyvartobyte wUndergroundSwitchPositions
+ readmem wUndergroundSwitchPositions
+ addval -1
+ writemem wUndergroundSwitchPositions
clearevent EVENT_SWITCH_1
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
@@ -304,9 +304,9 @@
writetext SwitchRoomText_OffTurnOn
yesorno
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
- copybytetovar wUndergroundSwitchPositions
- addvar 2
- copyvartobyte wUndergroundSwitchPositions
+ readmem wUndergroundSwitchPositions
+ addval 2
+ writemem wUndergroundSwitchPositions
setevent EVENT_SWITCH_2
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
@@ -314,9 +314,9 @@
writetext SwitchRoomText_OnTurnOff
yesorno
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
- copybytetovar wUndergroundSwitchPositions
- addvar -2
- copyvartobyte wUndergroundSwitchPositions
+ readmem wUndergroundSwitchPositions
+ addval -2
+ writemem wUndergroundSwitchPositions
clearevent EVENT_SWITCH_2
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
@@ -329,9 +329,9 @@
writetext SwitchRoomText_OffTurnOn
yesorno
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
- copybytetovar wUndergroundSwitchPositions
- addvar 3
- copyvartobyte wUndergroundSwitchPositions
+ readmem wUndergroundSwitchPositions
+ addval 3
+ writemem wUndergroundSwitchPositions
setevent EVENT_SWITCH_3
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
@@ -339,9 +339,9 @@
writetext SwitchRoomText_OnTurnOff
yesorno
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
- copybytetovar wUndergroundSwitchPositions
- addvar -3
- copyvartobyte wUndergroundSwitchPositions
+ readmem wUndergroundSwitchPositions
+ addval -3
+ writemem wUndergroundSwitchPositions
clearevent EVENT_SWITCH_3
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
@@ -354,8 +354,8 @@
writetext SwitchRoomText_OffTurnOn
yesorno
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
- writebyte 7
- copyvartobyte wUndergroundSwitchPositions
+ setval 7
+ writemem wUndergroundSwitchPositions
setevent EVENT_EMERGENCY_SWITCH
setevent EVENT_SWITCH_1
setevent EVENT_SWITCH_2
@@ -366,8 +366,8 @@
writetext SwitchRoomText_OnTurnOff
yesorno
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
- writebyte 0
- copyvartobyte wUndergroundSwitchPositions
+ setval 0
+ writemem wUndergroundSwitchPositions
clearevent EVENT_EMERGENCY_SWITCH
clearevent EVENT_SWITCH_1
clearevent EVENT_SWITCH_2
@@ -379,7 +379,7 @@
end
GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors:
- copybytetovar wUndergroundSwitchPositions
+ readmem wUndergroundSwitchPositions
ifequal 0, .Position0
ifequal 1, .Position1
ifequal 2, .Position2
@@ -498,8 +498,8 @@
scall .Set14
reloadmappart
closetext
- writebyte 6
- copyvartobyte wUndergroundSwitchPositions
+ setval 6
+ writemem wUndergroundSwitchPositions
end
.Set4:
--- a/maps/GoldenrodUndergroundWarehouse.asm
+++ b/maps/GoldenrodUndergroundWarehouse.asm
@@ -29,8 +29,8 @@
clearevent EVENT_SWITCH_12
clearevent EVENT_SWITCH_13
clearevent EVENT_SWITCH_14
- writebyte 0
- copyvartobyte wUndergroundSwitchPositions
+ setval 0
+ writemem wUndergroundSwitchPositions
return
TrainerGruntM24:
--- a/maps/HallOfFame.asm
+++ b/maps/HallOfFame.asm
@@ -28,7 +28,7 @@
applymovement PLAYER, HallOfFame_SlowlyApproachMachine
setscene SCENE_FINISHED
pause 15
- writebyte HEALMACHINE_HALL_OF_FAME
+ setval HEALMACHINE_HALL_OF_FAME
special HealMachineAnim
setevent EVENT_BEAT_ELITE_FOUR
setevent EVENT_TELEPORT_GUY
--- a/maps/IlexForest.asm
+++ b/maps/IlexForest.asm
@@ -20,7 +20,7 @@
.FarfetchdCallback:
checkevent EVENT_GOT_HM01_CUT
iftrue .Static
- copybytetovar wFarfetchdPosition
+ readmem wFarfetchdPosition
ifequal 1, .PositionOne
ifequal 2, .PositionTwo
ifequal 3, .PositionThree
@@ -101,7 +101,7 @@
end
IlexForestFarfetchdScript:
- copybytetovar wFarfetchdPosition
+ readmem wFarfetchdPosition
ifequal 1, .Position1
ifequal 2, .Position2
ifequal 3, .Position3
@@ -126,7 +126,7 @@
moveobject ILEXFOREST_FARFETCHD, 15, 25
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 2
+ loadmem wFarfetchdPosition, 2
end
.Position2:
@@ -136,7 +136,7 @@
moveobject ILEXFOREST_FARFETCHD, 20, 24
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 3
+ loadmem wFarfetchdPosition, 3
end
.Position2_Down:
@@ -144,7 +144,7 @@
moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 8
+ loadmem wFarfetchdPosition, 8
end
.Position3:
@@ -154,7 +154,7 @@
moveobject ILEXFOREST_FARFETCHD, 29, 22
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 4
+ loadmem wFarfetchdPosition, 4
end
.Position3_Left:
@@ -162,7 +162,7 @@
moveobject ILEXFOREST_FARFETCHD, 15, 25
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 2
+ loadmem wFarfetchdPosition, 2
end
.Position4:
@@ -172,7 +172,7 @@
moveobject ILEXFOREST_FARFETCHD, 28, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 5
+ loadmem wFarfetchdPosition, 5
end
.Position4_Up:
@@ -180,7 +180,7 @@
moveobject ILEXFOREST_FARFETCHD, 20, 24
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 3
+ loadmem wFarfetchdPosition, 3
end
.Position5:
@@ -192,7 +192,7 @@
moveobject ILEXFOREST_FARFETCHD, 24, 35
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 6
+ loadmem wFarfetchdPosition, 6
end
.Position5_Left:
@@ -200,7 +200,7 @@
moveobject ILEXFOREST_FARFETCHD, 22, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 7
+ loadmem wFarfetchdPosition, 7
end
.Position5_Up:
@@ -208,7 +208,7 @@
moveobject ILEXFOREST_FARFETCHD, 29, 22
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 4
+ loadmem wFarfetchdPosition, 4
end
.Position5_Right:
@@ -216,7 +216,7 @@
moveobject ILEXFOREST_FARFETCHD, 29, 22
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 4
+ loadmem wFarfetchdPosition, 4
end
.Position6:
@@ -226,7 +226,7 @@
moveobject ILEXFOREST_FARFETCHD, 22, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 7
+ loadmem wFarfetchdPosition, 7
end
.Position6_Right:
@@ -234,7 +234,7 @@
moveobject ILEXFOREST_FARFETCHD, 28, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 5
+ loadmem wFarfetchdPosition, 5
end
.Position7:
@@ -245,7 +245,7 @@
moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 8
+ loadmem wFarfetchdPosition, 8
end
.Position7_Left:
@@ -253,7 +253,7 @@
moveobject ILEXFOREST_FARFETCHD, 24, 35
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 6
+ loadmem wFarfetchdPosition, 6
end
.Position7_Down:
@@ -261,7 +261,7 @@
moveobject ILEXFOREST_FARFETCHD, 28, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 5
+ loadmem wFarfetchdPosition, 5
end
.Position8:
@@ -273,7 +273,7 @@
moveobject ILEXFOREST_FARFETCHD, 10, 35
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 9
+ loadmem wFarfetchdPosition, 9
end
.Position8_Right:
@@ -281,7 +281,7 @@
moveobject ILEXFOREST_FARFETCHD, 22, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 7
+ loadmem wFarfetchdPosition, 7
end
.Position8_Up:
@@ -290,7 +290,7 @@
moveobject ILEXFOREST_FARFETCHD, 15, 25
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 2
+ loadmem wFarfetchdPosition, 2
end
.Position9:
@@ -301,7 +301,7 @@
moveobject ILEXFOREST_FARFETCHD, 6, 28
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 10
+ loadmem wFarfetchdPosition, 10
appear ILEXFOREST_BLACK_BELT
setevent EVENT_CHARCOAL_KILN_BOSS
setevent EVENT_HERDED_FARFETCHD
@@ -312,7 +312,7 @@
moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 8
+ loadmem wFarfetchdPosition, 8
end
.Position9_Down:
@@ -320,7 +320,7 @@
moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
- loadvar wFarfetchdPosition, 8
+ loadmem wFarfetchdPosition, 8
end
.Position10:
@@ -339,7 +339,7 @@
cry FARFETCH_D
waitbutton
closetext
- checkcode VAR_FACING
+ readvar VAR_FACING
end
IlexForestCharcoalMasterScript:
--- a/maps/IndigoPlateauPokecenter1F.asm
+++ b/maps/IndigoPlateauPokecenter1F.asm
@@ -46,7 +46,7 @@
iffalse PlateauRivalScriptDone
checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
iftrue PlateauRivalScriptDone
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, PlateauRivalScriptDone
ifequal TUESDAY, PlateauRivalScriptDone
ifequal THURSDAY, PlateauRivalScriptDone
@@ -68,7 +68,7 @@
iffalse PlateauRivalScriptDone
checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
iftrue PlateauRivalScriptDone
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, PlateauRivalScriptDone
ifequal TUESDAY, PlateauRivalScriptDone
ifequal THURSDAY, PlateauRivalScriptDone
--- a/maps/KurtsHouse.asm
+++ b/maps/KurtsHouse.asm
@@ -44,7 +44,7 @@
closetext
special FadeOutMusic
setevent EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal UP, .RunAround
turnobject PLAYER, DOWN
playsound SFX_FLY
@@ -194,7 +194,7 @@
iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
buttonsound
- verbosegiveitem2 LEVEL_BALL, VAR_KURT_APRICORNS
+ verbosegiveitemvar LEVEL_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_RED_APRICORN
jump ._ThatTurnedOutGreat
@@ -204,7 +204,7 @@
iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
buttonsound
- verbosegiveitem2 LURE_BALL, VAR_KURT_APRICORNS
+ verbosegiveitemvar LURE_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_BLU_APRICORN
jump ._ThatTurnedOutGreat
@@ -214,7 +214,7 @@
iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
buttonsound
- verbosegiveitem2 MOON_BALL, VAR_KURT_APRICORNS
+ verbosegiveitemvar MOON_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_YLW_APRICORN
jump ._ThatTurnedOutGreat
@@ -224,7 +224,7 @@
iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
buttonsound
- verbosegiveitem2 FRIEND_BALL, VAR_KURT_APRICORNS
+ verbosegiveitemvar FRIEND_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_GRN_APRICORN
jump ._ThatTurnedOutGreat
@@ -234,7 +234,7 @@
iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
buttonsound
- verbosegiveitem2 FAST_BALL, VAR_KURT_APRICORNS
+ verbosegiveitemvar FAST_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_WHT_APRICORN
jump ._ThatTurnedOutGreat
@@ -244,7 +244,7 @@
iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
buttonsound
- verbosegiveitem2 HEAVY_BALL, VAR_KURT_APRICORNS
+ verbosegiveitemvar HEAVY_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_BLK_APRICORN
jump ._ThatTurnedOutGreat
@@ -254,7 +254,7 @@
iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
buttonsound
- verbosegiveitem2 LOVE_BALL, VAR_KURT_APRICORNS
+ verbosegiveitemvar LOVE_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_PNK_APRICORN
jump ._ThatTurnedOutGreat
@@ -292,7 +292,7 @@
special FadeOutMusic
pause 20
showemote EMOTE_SHOCK, KURTSHOUSE_KURT1, 30
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal UP, .GSBallRunAround
turnobject PLAYER, DOWN
playsound SFX_FLY
--- a/maps/LakeOfRage.asm
+++ b/maps/LakeOfRage.asm
@@ -32,7 +32,7 @@
return
.Wesley:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal WEDNESDAY, .WesleyAppears
disappear LAKEOFRAGE_WESLEY
return
@@ -85,7 +85,7 @@
cry GYARADOS
closetext
loadwildmon GYARADOS, 30
- writecode VAR_BATTLETYPE, BATTLETYPE_SHINY
+ loadvar VAR_BATTLETYPE, BATTLETYPE_SHINY
startbattle
ifequal LOSE, .NotBeaten
disappear LAKEOFRAGE_GYARADOS
@@ -192,7 +192,7 @@
opentext
checkevent EVENT_GOT_BLACKBELT_FROM_WESLEY
iftrue WesleyWednesdayScript
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal WEDNESDAY, WesleyNotWednesdayScript
checkevent EVENT_MET_WESLEY_OF_WEDNESDAY
iftrue .MetWesley
--- a/maps/LakeOfRageMagikarpHouse.asm
+++ b/maps/LakeOfRageMagikarpHouse.asm
@@ -37,7 +37,7 @@
end
.AskedForMagikarp:
- writebyte MAGIKARP
+ setval MAGIKARP
special FindPartyMonThatSpecies
iffalse .ClearedRocketHideout
writetext MagikarpLengthRaterText_YouHaveAMagikarp
--- a/maps/LavRadioTower1F.asm
+++ b/maps/LavRadioTower1F.asm
@@ -34,7 +34,7 @@
.ReturnedMachinePart:
writetext LavRadioTower1FGentlemanText_ReturnedMachinePart
buttonsound
- stringtotext .expncardname, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, .expncardname
scall .receiveitem
setflag ENGINE_EXPN_CARD
.GotExpnCard:
--- a/maps/MahoganyGym.asm
+++ b/maps/MahoganyGym.asm
@@ -30,7 +30,7 @@
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_GLACIERBADGE
- checkcode VAR_BADGES
+ readvar VAR_BADGES
scall MahoganyGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM16_ICY_WIND
@@ -144,7 +144,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext PRYCE, PRYCE1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, PRYCE, PRYCE1
jumpstd gymstatue2
PryceText_Intro:
--- a/maps/MountMoonSquare.asm
+++ b/maps/MountMoonSquare.asm
@@ -25,7 +25,7 @@
ClefairyDance:
checkflag ENGINE_MT_MOON_SQUARE_CLEFAIRY
iftrue .NoDancing
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal MONDAY, .NoDancing
checktime NITE
iffalse .NoDancing
--- a/maps/MountMortarB1F.asm
+++ b/maps/MountMortarB1F.asm
@@ -32,7 +32,7 @@
writetext UnknownText_0x7e2c0
buttonsound
waitsfx
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, .NoRoom
writetext UnknownText_0x7e355
playsound SFX_CAUGHT_MON
--- a/maps/NationalPark.asm
+++ b/maps/NationalPark.asm
@@ -73,7 +73,7 @@
trainer SCHOOLBOY, JACK1, EVENT_BEAT_SCHOOLBOY_JACK, SchoolboyJack1SeenText, SchoolboyJack1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_SCHOOLBOY_JACK
+ loadvar VAR_CALLERID, PHONE_SCHOOLBOY_JACK
endifjustbattled
opentext
checkflag ENGINE_JACK
@@ -94,7 +94,7 @@
askforphonenumber PHONE_SCHOOLBOY_JACK
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext SCHOOLBOY, JACK1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SCHOOLBOY, JACK1
scall .RegisteredNumber
jump .NumberAccepted
@@ -101,7 +101,7 @@
.Rematch:
scall .RematchStd
winlosstext SchoolboyJack1BeatenText, 0
- copybytetovar wJackFightCount
+ readmem wJackFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -123,7 +123,7 @@
loadtrainer SCHOOLBOY, JACK1
startbattle
reloadmapafterbattle
- loadvar wJackFightCount, 1
+ loadmem wJackFightCount, 1
clearflag ENGINE_JACK
end
@@ -131,7 +131,7 @@
loadtrainer SCHOOLBOY, JACK2
startbattle
reloadmapafterbattle
- loadvar wJackFightCount, 2
+ loadmem wJackFightCount, 2
clearflag ENGINE_JACK
end
@@ -139,7 +139,7 @@
loadtrainer SCHOOLBOY, JACK3
startbattle
reloadmapafterbattle
- loadvar wJackFightCount, 3
+ loadmem wJackFightCount, 3
clearflag ENGINE_JACK
end
@@ -147,7 +147,7 @@
loadtrainer SCHOOLBOY, JACK4
startbattle
reloadmapafterbattle
- loadvar wJackFightCount, 4
+ loadmem wJackFightCount, 4
clearflag ENGINE_JACK
end
@@ -201,7 +201,7 @@
trainer POKEFANF, BEVERLY1, EVENT_BEAT_POKEFANF_BEVERLY, PokefanfBeverly1SeenText, PokefanfBeverly1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_POKEFAN_BEVERLY
+ loadvar VAR_CALLERID, PHONE_POKEFAN_BEVERLY
endifjustbattled
opentext
checkflag ENGINE_BEVERLY_HAS_NUGGET
@@ -224,7 +224,7 @@
askforphonenumber PHONE_POKEFAN_BEVERLY
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext POKEFANF, BEVERLY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, POKEFANF, BEVERLY1
scall .RegisteredNumber
jump .NumberAccepted
--- a/maps/OaksLab.asm
+++ b/maps/OaksLab.asm
@@ -23,7 +23,7 @@
buttonsound
setevent EVENT_TALKED_TO_OAK_IN_KANTO
.CheckBadges:
- checkcode VAR_BADGES
+ readvar VAR_BADGES
ifequal NUM_BADGES, .OpenMtSilver
ifequal NUM_JOHTO_BADGES, .Complain
jump .AhGood
--- a/maps/OlivineGym.asm
+++ b/maps/OlivineGym.asm
@@ -25,7 +25,7 @@
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_MINERALBADGE
- checkcode VAR_BADGES
+ readvar VAR_BADGES
scall OlivineGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM23_IRON_TAIL
@@ -89,7 +89,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext JASMINE, JASMINE1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, JASMINE, JASMINE1
jumpstd gymstatue2
Jasmine_SteelTypeIntro:
--- a/maps/OlivineLighthouse2F.asm
+++ b/maps/OlivineLighthouse2F.asm
@@ -22,7 +22,7 @@
trainer SAILOR, HUEY1, EVENT_BEAT_SAILOR_HUEY, SailorHueySeenText, SailorHueyBeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_SAILOR_HUEY
+ loadvar VAR_CALLERID, PHONE_SAILOR_HUEY
endifjustbattled
opentext
checkflag ENGINE_HUEY
@@ -41,7 +41,7 @@
askforphonenumber PHONE_SAILOR_HUEY
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext SAILOR, HUEY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SAILOR, HUEY1
scall .RegisteredNumber
jump .NumberAccepted
@@ -48,7 +48,7 @@
.WantsBattle:
scall .Rematch
winlosstext SailorHueyBeatenText, 0
- copybytetovar wHueyFightCount
+ readmem wHueyFightCount
ifequal 3, .Fight3
ifequal 2, .Fight2
ifequal 1, .Fight1
@@ -66,7 +66,7 @@
loadtrainer SAILOR, HUEY1
startbattle
reloadmapafterbattle
- loadvar wHueyFightCount, 1
+ loadmem wHueyFightCount, 1
clearflag ENGINE_HUEY
end
@@ -74,7 +74,7 @@
loadtrainer SAILOR, HUEY2
startbattle
reloadmapafterbattle
- loadvar wHueyFightCount, 2
+ loadmem wHueyFightCount, 2
clearflag ENGINE_HUEY
end
@@ -82,7 +82,7 @@
loadtrainer SAILOR, HUEY3
startbattle
reloadmapafterbattle
- loadvar wHueyFightCount, 3
+ loadmem wHueyFightCount, 3
clearflag ENGINE_HUEY
end
--- a/maps/OlivineLighthouse6F.asm
+++ b/maps/OlivineLighthouse6F.asm
@@ -67,7 +67,7 @@
closetext
setevent EVENT_JASMINE_RETURNED_TO_GYM
clearevent EVENT_OLIVINE_GYM_JASMINE
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal DOWN, .FacingDown
ifequal RIGHT, .FacingRight
applymovement OLIVINELIGHTHOUSE6F_JASMINE, MovementData_0x60c68
@@ -107,7 +107,7 @@
checkevent EVENT_JASMINE_RETURNED_TO_GYM
iftrue .HealthyNow
writetext AmphyPalPalooText
- writebyte AMPHAROS
+ setval AMPHAROS
special PlaySlowCry
buttonsound
writetext AmphyBreathingLaboredText
--- a/maps/OlivinePort.asm
+++ b/maps/OlivinePort.asm
@@ -82,7 +82,7 @@
opentext
checkevent EVENT_FAST_SHIP_FIRST_TIME
iffalse .FirstTime
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, .NextShipMonday
ifequal SATURDAY, .NextShipMonday
ifequal TUESDAY, .NextShipFriday
@@ -147,7 +147,7 @@
iftrue OlivinePortAlreadyRodeScript
checkevent EVENT_FAST_SHIP_FIRST_TIME
iffalse .FirstTime
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, .NextShipMonday
ifequal SATURDAY, .NextShipMonday
ifequal TUESDAY, .NextShipFriday
@@ -165,7 +165,7 @@
waitbutton
closetext
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal RIGHT, .Right
applymovement PLAYER, MovementData_0x74a3f
jump OlivinePortSailorAtGangwayScript
--- a/maps/PewterGym.asm
+++ b/maps/PewterGym.asm
@@ -70,7 +70,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext BROCK, BROCK1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, BROCK, BROCK1
jumpstd gymstatue2
BrockIntroText:
--- a/maps/PlayersHouse1F.asm
+++ b/maps/PlayersHouse1F.asm
@@ -36,7 +36,7 @@
opentext
writetext ElmsLookingForYouText
buttonsound
- stringtotext GearName, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, GearName
scall PlayersHouse1FReceiveItemStd
setflag ENGINE_POKEGEAR
setflag ENGINE_PHONE_CARD
--- a/maps/Pokecenter2F.asm
+++ b/maps/Pokecenter2F.asm
@@ -93,7 +93,7 @@
writetext Text_PleaseWait
special CheckLinkTimeout
iffalse .LinkTimedOut
- copybytetovar wOtherPlayerLinkMode
+ readmem wOtherPlayerLinkMode
iffalse .LinkedToFirstGen
special CheckBothSelectedSameRoom
iffalse .IncompatibleRooms
@@ -155,17 +155,17 @@
writetext Text_PleaseComeIn2
waitbutton
closetext
- writebyte FALSE
+ setval FALSE
end
.Mobile_DidNotSave:
writetext Text_PleaseComeAgain
closetext
- writebyte TRUE
+ setval TRUE
end
BattleTradeMobile_WalkIn:
- applymovement2 Pokecenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown
+ applymovementlasttalked Pokecenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown
applymovement PLAYER, Pokecenter2FMobileMovementData_PlayerWalksIntoMobileBattleRoom
end
@@ -195,7 +195,7 @@
writetext Text_PleaseWait
special CheckLinkTimeout
iffalse .LinkTimedOut
- copybytetovar wOtherPlayerLinkMode
+ readmem wOtherPlayerLinkMode
iffalse .LinkedToFirstGen
special CheckBothSelectedSameRoom
iffalse .IncompatibleRooms
@@ -259,13 +259,13 @@
writetext Text_PleaseComeIn2
waitbutton
closetext
- writebyte FALSE
+ setval FALSE
end
.Mobile_DidNotSave:
writetext Text_PleaseComeAgain
closetext
- writebyte TRUE
+ setval TRUE
end
.SelectThreeMons:
@@ -281,11 +281,11 @@
waitbutton
.Mobile_DidNotSelect:
closetext
- writebyte FALSE
+ setval FALSE
end
.Mobile_OK:
- writebyte TRUE
+ setval TRUE
end
Script_TimeCapsuleClosed:
@@ -322,7 +322,7 @@
writetext Text_PleaseWait
special CheckLinkTimeout
iffalse .LinkTimedOut
- copybytetovar wOtherPlayerLinkMode
+ readmem wOtherPlayerLinkMode
iffalse .OK
special CheckBothSelectedSameRoom
writetext Text_IncompatibleRooms
@@ -414,18 +414,18 @@
Pokecenter2F_CheckGender:
checkflag ENGINE_PLAYER_IS_FEMALE
iftrue .Female
- applymovement2 Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight
+ applymovementlasttalked Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight
applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesThreeStepsUp
end
.Female:
- applymovement2 Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2
+ applymovementlasttalked Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2
applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsUp
opentext
writetext Text_OhPleaseWait
waitbutton
closetext
- applymovement2 Pokecenter2FMovementData_ReceptionistLooksRight
+ applymovementlasttalked Pokecenter2FMovementData_ReceptionistLooksRight
turnobject PLAYER, LEFT
opentext
writetext Text_ChangeTheLook
@@ -433,7 +433,7 @@
closetext
playsound SFX_TINGLE
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (PAL_NPC_RED << 4)
+ setval (PAL_NPC_RED << 4)
special SetPlayerPalette
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
setflag ENGINE_KRIS_IN_CABLE_CLUB
@@ -460,7 +460,7 @@
clearflag ENGINE_KRIS_IN_CABLE_CLUB
playsound SFX_TINGLE
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (PAL_NPC_BLUE << 4)
+ setval (PAL_NPC_BLUE << 4)
special SetPlayerPalette
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
special ReplaceKrisSprite
@@ -482,7 +482,7 @@
clearflag ENGINE_KRIS_IN_CABLE_CLUB
playsound SFX_TINGLE
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (PAL_NPC_BLUE << 4)
+ setval (PAL_NPC_BLUE << 4)
special SetPlayerPalette
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
special ReplaceKrisSprite
@@ -493,38 +493,38 @@
TimeCapsuleScript_CheckPlayerGender:
checkflag ENGINE_PLAYER_IS_FEMALE
iftrue .Female
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal LEFT, .MaleFacingLeft
ifequal RIGHT, .MaleFacingRight
- applymovement2 Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown
+ applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown
applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsUp_2
end
.MaleFacingLeft:
- applymovement2 Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown
+ applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown
applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksLeftAndUp
end
.MaleFacingRight:
- applymovement2 Pokecenter2FMovementData_ReceptionistStepsRightLooksDown
+ applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsRightLooksDown
applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksRightAndUp
end
.Female:
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal RIGHT, .FemaleFacingRight
ifequal LEFT, .FemaleFacingLeft
- applymovement2 Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2
+ applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2
applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepUp_2
jump .FemaleContinue
.FemaleFacingRight:
- applymovement2 Pokecenter2FMovementData_ReceptionistStepsRightLooksLeft_2
+ applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsRightLooksLeft_2
applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepRight
jump .FemaleContinue
.FemaleFacingLeft:
- applymovement2 Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2
+ applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2
applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepLeft
.FemaleContinue:
opentext
@@ -531,7 +531,7 @@
writetext Text_OhPleaseWait
waitbutton
closetext
- checkcode VAR_FACING
+ readvar VAR_FACING
ifnotequal UP, .FemaleChangeApperance
turnobject PLAYER, LEFT
.FemaleChangeApperance:
@@ -541,7 +541,7 @@
closetext
playsound SFX_TINGLE
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (PAL_NPC_RED << 4)
+ setval (PAL_NPC_RED << 4)
special SetPlayerPalette
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown
faceobject PLAYER, POKECENTER2F_TIME_CAPSULE_RECEPTIONIST
@@ -570,7 +570,7 @@
clearflag ENGINE_KRIS_IN_CABLE_CLUB
playsound SFX_TINGLE
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (PAL_NPC_BLUE << 4)
+ setval (PAL_NPC_BLUE << 4)
special SetPlayerPalette
applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
special ReplaceKrisSprite
--- a/maps/RadioTower1F.asm
+++ b/maps/RadioTower1F.asm
@@ -146,7 +146,7 @@
waitsfx
writetext UnknownText_0x5d37b
buttonsound
- stringtotext .RadioCardText, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, .RadioCardText
scall .ReceiveItem
writetext UnknownText_0x5d3c0
buttonsound
--- a/maps/RadioTower2F.asm
+++ b/maps/RadioTower2F.asm
@@ -106,13 +106,13 @@
iffalse .Introduction
checkflag ENGINE_BUENAS_PASSWORD_2
iftrue .PlayedAlready
- checkcode VAR_HOUR
+ readvar VAR_HOUR
ifless 18, .TooEarly
checkflag ENGINE_BUENAS_PASSWORD
iffalse .TuneIn
checkitem BLUE_CARD
iffalse .NoBlueCard
- checkcode VAR_BLUECARDBALANCE
+ readvar VAR_BLUECARDBALANCE
ifequal 30, .BlueCardCapped0
playmusic MUSIC_BUENAS_PASSWORD
writetext UnknownText_0x5de35
@@ -122,7 +122,7 @@
waitbutton
closetext
turnobject RADIOTOWER2F_BUENA, RIGHT
- checkcode VAR_FACING
+ readvar VAR_FACING
ifnotequal RIGHT, .DontNeedToMove
applymovement PLAYER, MovementData_0x5d921
.DontNeedToMove:
@@ -140,9 +140,9 @@
writetext UnknownText_0x5dfc1
waitbutton
closetext
- checkcode VAR_BLUECARDBALANCE
- addvar 1
- writevarcode VAR_BLUECARDBALANCE
+ readvar VAR_BLUECARDBALANCE
+ addval 1
+ writevar VAR_BLUECARDBALANCE
waitsfx
playsound SFX_TRANSACTION
setflag ENGINE_BUENAS_PASSWORD_2
@@ -155,7 +155,7 @@
special FadeOutMusic
pause 20
special RestartMapMusic
- checkcode VAR_BLUECARDBALANCE
+ readvar VAR_BLUECARDBALANCE
ifequal 30, .BlueCardCapped1
end
--- a/maps/Route16.asm
+++ b/maps/Route16.asm
@@ -5,9 +5,9 @@
callback MAPCALLBACK_NEWMAP, .AlwaysOnBike
.AlwaysOnBike:
- checkcode VAR_YCOORD
+ readvar VAR_YCOORD
ifless 5, .CanWalk
- checkcode VAR_XCOORD
+ readvar VAR_XCOORD
ifgreater 13, .CanWalk
setflag ENGINE_ALWAYS_ON_BIKE
return
--- a/maps/Route26.asm
+++ b/maps/Route26.asm
@@ -28,7 +28,7 @@
trainer COOLTRAINERM, GAVEN3, EVENT_BEAT_COOLTRAINERM_GAVEN, CooltrainermGaven3SeenText, CooltrainermGaven3BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_COOLTRAINERM_GAVEN
+ loadvar VAR_CALLERID, PHONE_COOLTRAINERM_GAVEN
endifjustbattled
opentext
checkflag ENGINE_GAVEN
@@ -49,7 +49,7 @@
askforphonenumber PHONE_COOLTRAINERM_GAVEN
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext COOLTRAINERM, GAVEN3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, COOLTRAINERM, GAVEN3
scall .RegisteredNumber
jump .NumberAccepted
@@ -56,7 +56,7 @@
.WantsBattle:
scall .Rematch
winlosstext CooltrainermGaven3BeatenText, 0
- copybytetovar wGavenFightCount
+ readmem wGavenFightCount
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
@@ -70,7 +70,7 @@
loadtrainer COOLTRAINERM, GAVEN3
startbattle
reloadmapafterbattle
- loadvar wGavenFightCount, 1
+ loadmem wGavenFightCount, 1
clearflag ENGINE_GAVEN
end
@@ -78,7 +78,7 @@
loadtrainer COOLTRAINERM, GAVEN1
startbattle
reloadmapafterbattle
- loadvar wGavenFightCount, 2
+ loadmem wGavenFightCount, 2
clearflag ENGINE_GAVEN
end
@@ -132,7 +132,7 @@
trainer COOLTRAINERF, BETH1, EVENT_BEAT_COOLTRAINERF_BETH, CooltrainerfBeth1SeenText, CooltrainerfBeth1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_COOLTRAINERF_BETH
+ loadvar VAR_CALLERID, PHONE_COOLTRAINERF_BETH
endifjustbattled
opentext
checkflag ENGINE_BETH
@@ -153,7 +153,7 @@
askforphonenumber PHONE_COOLTRAINERF_BETH
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, COOLTRAINERF, BETH1
scall .RegisteredNumber
jump .NumberAccepted
@@ -160,7 +160,7 @@
.WantsBattle:
scall .Rematch
winlosstext CooltrainerfBeth1BeatenText, 0
- copybytetovar wBethFightCount
+ readmem wBethFightCount
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
@@ -174,7 +174,7 @@
loadtrainer COOLTRAINERF, BETH1
startbattle
reloadmapafterbattle
- loadvar wBethFightCount, 1
+ loadmem wBethFightCount, 1
clearflag ENGINE_BETH
end
@@ -182,7 +182,7 @@
loadtrainer COOLTRAINERF, BETH2
startbattle
reloadmapafterbattle
- loadvar wBethFightCount, 2
+ loadmem wBethFightCount, 2
clearflag ENGINE_BETH
end
--- a/maps/Route27.asm
+++ b/maps/Route27.asm
@@ -61,7 +61,7 @@
trainer BIRD_KEEPER, JOSE2, EVENT_BEAT_BIRD_KEEPER_JOSE2, BirdKeeperJose2SeenText, BirdKeeperJose2BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_BIRDKEEPER_JOSE
+ loadvar VAR_CALLERID, PHONE_BIRDKEEPER_JOSE
endifjustbattled
opentext
checkflag ENGINE_JOSE
@@ -84,7 +84,7 @@
askforphonenumber PHONE_BIRDKEEPER_JOSE
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext BIRD_KEEPER, JOSE2, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BIRD_KEEPER, JOSE2
scall .RegisteredNumber
jump .NumberAccepted
@@ -91,7 +91,7 @@
.WantsBattle:
scall .Rematch
winlosstext BirdKeeperJose2BeatenText, 0
- copybytetovar wJoseFightCount
+ readmem wJoseFightCount
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
@@ -105,7 +105,7 @@
loadtrainer BIRD_KEEPER, JOSE2
startbattle
reloadmapafterbattle
- loadvar wJoseFightCount, 1
+ loadmem wJoseFightCount, 1
clearflag ENGINE_JOSE
end
@@ -113,7 +113,7 @@
loadtrainer BIRD_KEEPER, JOSE1
startbattle
reloadmapafterbattle
- loadvar wJoseFightCount, 2
+ loadmem wJoseFightCount, 2
clearflag ENGINE_JOSE
end
@@ -196,7 +196,7 @@
trainer COOLTRAINERF, REENA1, EVENT_BEAT_COOLTRAINERF_REENA, CooltrainerfReenaSeenText, CooltrainerfReenaBeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_COOLTRAINERF_REENA
+ loadvar VAR_CALLERID, PHONE_COOLTRAINERF_REENA
endifjustbattled
opentext
checkflag ENGINE_REENA
@@ -217,7 +217,7 @@
askforphonenumber PHONE_COOLTRAINERF_REENA
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext COOLTRAINERF, REENA1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, COOLTRAINERF, REENA1
scall .RegisteredNumber
jump .NumberAccepted
@@ -224,7 +224,7 @@
.WantsBattle:
scall .Rematch
winlosstext CooltrainerfReenaBeatenText, 0
- copybytetovar wReenaFightCount
+ readmem wReenaFightCount
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
@@ -238,7 +238,7 @@
loadtrainer COOLTRAINERF, REENA1
startbattle
reloadmapafterbattle
- loadvar wReenaFightCount, 1
+ loadmem wReenaFightCount, 1
clearflag ENGINE_REENA
end
@@ -246,7 +246,7 @@
loadtrainer COOLTRAINERF, REENA2
startbattle
reloadmapafterbattle
- loadvar wReenaFightCount, 2
+ loadmem wReenaFightCount, 2
clearflag ENGINE_REENA
end
--- a/maps/Route29.asm
+++ b/maps/Route29.asm
@@ -31,7 +31,7 @@
return
.DoesTuscanyAppear:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal TUESDAY, .TuscanyDisappears
appear ROUTE29_TUSCANY
return
@@ -105,7 +105,7 @@
CatchingTutorialDudeScript:
faceplayer
opentext
- checkcode VAR_BOXSPACE
+ readvar VAR_BOXSPACE
ifequal 0, .BoxFull
checkevent EVENT_LEARNED_TO_CATCH_POKEMON
iftrue .BoxFull
@@ -169,7 +169,7 @@
opentext
checkevent EVENT_GOT_PINK_BOW_FROM_TUSCANY
iftrue TuscanyTuesdayScript
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal TUESDAY, TuscanyNotTuesdayScript
checkevent EVENT_MET_TUSCANY_OF_TUESDAY
iftrue .MetTuscany
--- a/maps/Route30.asm
+++ b/maps/Route30.asm
@@ -40,7 +40,7 @@
trainer YOUNGSTER, JOEY1, EVENT_BEAT_YOUNGSTER_JOEY, YoungsterJoey1SeenText, YoungsterJoey1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_YOUNGSTER_JOEY
+ loadvar VAR_CALLERID, PHONE_YOUNGSTER_JOEY
endifjustbattled
opentext
checkflag ENGINE_JOEY
@@ -61,7 +61,7 @@
askforphonenumber PHONE_YOUNGSTER_JOEY
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext YOUNGSTER, JOEY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, YOUNGSTER, JOEY1
scall .RegisteredNumber
jump .NumberAccepted
@@ -68,7 +68,7 @@
.Rematch:
scall .RematchStd
winlosstext YoungsterJoey1BeatenText, 0
- copybytetovar wJoeyFightCount
+ readmem wJoeyFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -90,7 +90,7 @@
loadtrainer YOUNGSTER, JOEY1
startbattle
reloadmapafterbattle
- loadvar wJoeyFightCount, 1
+ loadmem wJoeyFightCount, 1
clearflag ENGINE_JOEY
end
@@ -98,7 +98,7 @@
loadtrainer YOUNGSTER, JOEY2
startbattle
reloadmapafterbattle
- loadvar wJoeyFightCount, 2
+ loadmem wJoeyFightCount, 2
clearflag ENGINE_JOEY
end
@@ -106,7 +106,7 @@
loadtrainer YOUNGSTER, JOEY3
startbattle
reloadmapafterbattle
- loadvar wJoeyFightCount, 3
+ loadmem wJoeyFightCount, 3
clearflag ENGINE_JOEY
end
@@ -114,7 +114,7 @@
loadtrainer YOUNGSTER, JOEY4
startbattle
reloadmapafterbattle
- loadvar wJoeyFightCount, 4
+ loadmem wJoeyFightCount, 4
clearflag ENGINE_JOEY
end
--- a/maps/Route31.asm
+++ b/maps/Route31.asm
@@ -26,7 +26,7 @@
trainer BUG_CATCHER, WADE1, EVENT_BEAT_BUG_CATCHER_WADE, BugCatcherWade1SeenText, BugCatcherWade1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_BUG_CATCHER_WADE
+ loadvar VAR_CALLERID, PHONE_BUG_CATCHER_WADE
endifjustbattled
opentext
checkflag ENGINE_WADE
@@ -49,7 +49,7 @@
askforphonenumber PHONE_BUG_CATCHER_WADE
ifequal PHONE_CONTACTS_FULL, .PhoneFullSTD
ifequal PHONE_CONTACT_REFUSED, .DeclinedNumberSTD
- trainertotext BUG_CATCHER, WADE1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BUG_CATCHER, WADE1
scall .RegisterNumberSTD
jump .AcceptedNumberSTD
@@ -56,7 +56,7 @@
.WadeRematch:
scall .RematchSTD
winlosstext BugCatcherWade1BeatenText, 0
- copybytetovar wWadeFightCount
+ readmem wWadeFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -78,7 +78,7 @@
loadtrainer BUG_CATCHER, WADE1
startbattle
reloadmapafterbattle
- loadvar wWadeFightCount, 1
+ loadmem wWadeFightCount, 1
clearflag ENGINE_WADE
end
@@ -86,7 +86,7 @@
loadtrainer BUG_CATCHER, WADE2
startbattle
reloadmapafterbattle
- loadvar wWadeFightCount, 2
+ loadmem wWadeFightCount, 2
clearflag ENGINE_WADE
end
@@ -94,7 +94,7 @@
loadtrainer BUG_CATCHER, WADE3
startbattle
reloadmapafterbattle
- loadvar wWadeFightCount, 3
+ loadmem wWadeFightCount, 3
clearflag ENGINE_WADE
end
@@ -102,7 +102,7 @@
loadtrainer BUG_CATCHER, WADE4
startbattle
reloadmapafterbattle
- loadvar wWadeFightCount, 4
+ loadmem wWadeFightCount, 4
clearflag ENGINE_WADE
end
--- a/maps/Route32.asm
+++ b/maps/Route32.asm
@@ -33,7 +33,7 @@
end
.Frieda:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal FRIDAY, .FriedaAppears
disappear ROUTE32_FRIEDA
return
@@ -167,7 +167,7 @@
trainer FISHER, RALPH1, EVENT_BEAT_FISHER_RALPH, FisherRalph1SeenText, FisherRalph1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_FISHER_RALPH
+ loadvar VAR_CALLERID, PHONE_FISHER_RALPH
endifjustbattled
opentext
checkflag ENGINE_RALPH
@@ -190,7 +190,7 @@
askforphonenumber PHONE_FISHER_RALPH
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext FISHER, RALPH1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, FISHER, RALPH1
scall .RegisteredNumber
jump .NumberAccepted
@@ -197,7 +197,7 @@
.Rematch:
scall .RematchStd
winlosstext FisherRalph1BeatenText, 0
- copybytetovar wRalphFightCount
+ readmem wRalphFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -219,7 +219,7 @@
loadtrainer FISHER, RALPH1
startbattle
reloadmapafterbattle
- loadvar wRalphFightCount, 1
+ loadmem wRalphFightCount, 1
clearflag ENGINE_RALPH
end
@@ -227,7 +227,7 @@
loadtrainer FISHER, RALPH2
startbattle
reloadmapafterbattle
- loadvar wRalphFightCount, 2
+ loadmem wRalphFightCount, 2
clearflag ENGINE_RALPH
end
@@ -235,7 +235,7 @@
loadtrainer FISHER, RALPH3
startbattle
reloadmapafterbattle
- loadvar wRalphFightCount, 3
+ loadmem wRalphFightCount, 3
clearflag ENGINE_RALPH
end
@@ -243,7 +243,7 @@
loadtrainer FISHER, RALPH4
startbattle
reloadmapafterbattle
- loadvar wRalphFightCount, 4
+ loadmem wRalphFightCount, 4
clearflag ENGINE_RALPH
end
@@ -303,7 +303,7 @@
trainer PICNICKER, LIZ1, EVENT_BEAT_PICNICKER_LIZ, PicnickerLiz1SeenText, PicnickerLiz1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_PICNICKER_LIZ
+ loadvar VAR_CALLERID, PHONE_PICNICKER_LIZ
endifjustbattled
opentext
checkflag ENGINE_LIZ
@@ -324,7 +324,7 @@
askforphonenumber PHONE_PICNICKER_LIZ
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext PICNICKER, LIZ1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, LIZ1
scall .RegisteredNumber
jump .NumberAccepted
@@ -331,7 +331,7 @@
.Rematch:
scall .RematchStd
winlosstext PicnickerLiz1BeatenText, 0
- copybytetovar wLizFightCount
+ readmem wLizFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -353,7 +353,7 @@
loadtrainer PICNICKER, LIZ1
startbattle
reloadmapafterbattle
- loadvar wLizFightCount, 1
+ loadmem wLizFightCount, 1
clearflag ENGINE_LIZ
end
@@ -361,7 +361,7 @@
loadtrainer PICNICKER, LIZ2
startbattle
reloadmapafterbattle
- loadvar wLizFightCount, 2
+ loadmem wLizFightCount, 2
clearflag ENGINE_LIZ
end
@@ -369,7 +369,7 @@
loadtrainer PICNICKER, LIZ3
startbattle
reloadmapafterbattle
- loadvar wLizFightCount, 3
+ loadmem wLizFightCount, 3
clearflag ENGINE_LIZ
end
@@ -377,7 +377,7 @@
loadtrainer PICNICKER, LIZ4
startbattle
reloadmapafterbattle
- loadvar wLizFightCount, 4
+ loadmem wLizFightCount, 4
clearflag ENGINE_LIZ
end
@@ -454,7 +454,7 @@
opentext
checkevent EVENT_GOT_POISON_BARB_FROM_FRIEDA
iftrue .Friday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checkevent EVENT_MET_FRIEDA_OF_FRIDAY
iftrue .MetFrieda
--- a/maps/Route33.asm
+++ b/maps/Route33.asm
@@ -15,7 +15,7 @@
trainer HIKER, ANTHONY2, EVENT_BEAT_HIKER_ANTHONY, HikerAnthony2SeenText, HikerAnthony2BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_HIKER_ANTHONY
+ loadvar VAR_CALLERID, PHONE_HIKER_ANTHONY
endifjustbattled
opentext
checkflag ENGINE_ANTHONY
@@ -38,7 +38,7 @@
askforphonenumber PHONE_HIKER_ANTHONY
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext HIKER, ANTHONY2, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, HIKER, ANTHONY2
scall .RegisteredNumber
jump .NumberAccepted
@@ -45,7 +45,7 @@
.Rematch:
scall .RematchStd
winlosstext HikerAnthony2BeatenText, 0
- copybytetovar wAnthonyFightCount
+ readmem wAnthonyFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -67,7 +67,7 @@
loadtrainer HIKER, ANTHONY2
startbattle
reloadmapafterbattle
- loadvar wAnthonyFightCount, 1
+ loadmem wAnthonyFightCount, 1
clearflag ENGINE_ANTHONY
end
@@ -75,7 +75,7 @@
loadtrainer HIKER, ANTHONY1
startbattle
reloadmapafterbattle
- loadvar wAnthonyFightCount, 2
+ loadmem wAnthonyFightCount, 2
clearflag ENGINE_ANTHONY
end
@@ -83,7 +83,7 @@
loadtrainer HIKER, ANTHONY3
startbattle
reloadmapafterbattle
- loadvar wAnthonyFightCount, 3
+ loadmem wAnthonyFightCount, 3
clearflag ENGINE_ANTHONY
end
@@ -91,7 +91,7 @@
loadtrainer HIKER, ANTHONY4
startbattle
reloadmapafterbattle
- loadvar wAnthonyFightCount, 4
+ loadmem wAnthonyFightCount, 4
clearflag ENGINE_ANTHONY
end
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -59,7 +59,7 @@
closetext
ifequal TRUE, .end_fail
clearflag ENGINE_DAY_CARE_MAN_HAS_EGG
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal RIGHT, .walk_around_player
applymovement ROUTE34_GRAMPS, Route34MovementData_DayCareManWalksBackInside
playsound SFX_ENTER_DOOR
@@ -89,7 +89,7 @@
trainer CAMPER, TODD1, EVENT_BEAT_CAMPER_TODD, CamperTodd1SeenText, CamperTodd1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_CAMPER_TODD
+ loadvar VAR_CALLERID, PHONE_CAMPER_TODD
endifjustbattled
opentext
checkflag ENGINE_TODD
@@ -112,7 +112,7 @@
askforphonenumber PHONE_CAMPER_TODD
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext CAMPER, TODD1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, CAMPER, TODD1
scall .RegisteredNumber
jump .NumberAccepted
@@ -119,7 +119,7 @@
.Rematch:
scall .RematchStd
winlosstext CamperTodd1BeatenText, 0
- copybytetovar wToddFightCount
+ readmem wToddFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -141,7 +141,7 @@
loadtrainer CAMPER, TODD1
startbattle
reloadmapafterbattle
- loadvar wToddFightCount, 1
+ loadmem wToddFightCount, 1
clearflag ENGINE_TODD
end
@@ -149,7 +149,7 @@
loadtrainer CAMPER, TODD2
startbattle
reloadmapafterbattle
- loadvar wToddFightCount, 2
+ loadmem wToddFightCount, 2
clearflag ENGINE_TODD
end
@@ -157,7 +157,7 @@
loadtrainer CAMPER, TODD3
startbattle
reloadmapafterbattle
- loadvar wToddFightCount, 3
+ loadmem wToddFightCount, 3
clearflag ENGINE_TODD
end
@@ -165,7 +165,7 @@
loadtrainer CAMPER, TODD4
startbattle
reloadmapafterbattle
- loadvar wToddFightCount, 4
+ loadmem wToddFightCount, 4
clearflag ENGINE_TODD
end
@@ -214,7 +214,7 @@
trainer PICNICKER, GINA1, EVENT_BEAT_PICNICKER_GINA, PicnickerGina1SeenText, PicnickerGina1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_PICNICKER_GINA
+ loadvar VAR_CALLERID, PHONE_PICNICKER_GINA
endifjustbattled
opentext
checkflag ENGINE_GINA
@@ -237,7 +237,7 @@
askforphonenumber PHONE_PICNICKER_GINA
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext PICNICKER, GINA1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, GINA1
scall .RegisteredNumber
jump .NumberAccepted
@@ -244,7 +244,7 @@
.Rematch:
scall .RematchStd
winlosstext PicnickerGina1BeatenText, 0
- copybytetovar wGinaFightCount
+ readmem wGinaFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -266,7 +266,7 @@
loadtrainer PICNICKER, GINA1
startbattle
reloadmapafterbattle
- loadvar wGinaFightCount, 1
+ loadmem wGinaFightCount, 1
clearflag ENGINE_GINA
end
@@ -274,7 +274,7 @@
loadtrainer PICNICKER, GINA2
startbattle
reloadmapafterbattle
- loadvar wGinaFightCount, 2
+ loadmem wGinaFightCount, 2
clearflag ENGINE_GINA
end
@@ -282,7 +282,7 @@
loadtrainer PICNICKER, GINA3
startbattle
reloadmapafterbattle
- loadvar wGinaFightCount, 3
+ loadmem wGinaFightCount, 3
clearflag ENGINE_GINA
end
@@ -290,7 +290,7 @@
loadtrainer PICNICKER, GINA4
startbattle
reloadmapafterbattle
- loadvar wGinaFightCount, 4
+ loadmem wGinaFightCount, 4
clearflag ENGINE_GINA
end
--- a/maps/Route35.asm
+++ b/maps/Route35.asm
@@ -31,7 +31,7 @@
trainer JUGGLER, IRWIN1, EVENT_BEAT_JUGGLER_IRWIN, JugglerIrwin1SeenText, JugglerIrwin1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_JUGGLER_IRWIN
+ loadvar VAR_CALLERID, PHONE_JUGGLER_IRWIN
endifjustbattled
opentext
checkcellnum PHONE_JUGGLER_IRWIN
@@ -50,7 +50,7 @@
askforphonenumber PHONE_JUGGLER_IRWIN
ifequal PHONE_CONTACTS_FULL, Route35PhoneFullM
ifequal PHONE_CONTACT_REFUSED, Route35NumberDeclinedM
- trainertotext JUGGLER, IRWIN1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, JUGGLER, IRWIN1
scall Route35RegisteredNumberM
jump Route35NumberAcceptedM
@@ -130,7 +130,7 @@
trainer BUG_CATCHER, ARNIE1, EVENT_BEAT_BUG_CATCHER_ARNIE, BugCatcherArnieSeenText, BugCatcherArnieBeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_BUG_CATCHER_ARNIE
+ loadvar VAR_CALLERID, PHONE_BUG_CATCHER_ARNIE
endifjustbattled
opentext
checkflag ENGINE_ARNIE
@@ -153,7 +153,7 @@
askforphonenumber PHONE_BUG_CATCHER_ARNIE
ifequal PHONE_CONTACTS_FULL, Route35PhoneFullM
ifequal PHONE_CONTACT_REFUSED, Route35NumberDeclinedM
- trainertotext BUG_CATCHER, ARNIE1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BUG_CATCHER, ARNIE1
scall Route35RegisteredNumberM
jump Route35NumberAcceptedM
@@ -160,7 +160,7 @@
.WantsBattle:
scall Route35RematchM
winlosstext BugCatcherArnieBeatenText, 0
- copybytetovar wArnieFightCount
+ readmem wArnieFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -182,7 +182,7 @@
loadtrainer BUG_CATCHER, ARNIE1
startbattle
reloadmapafterbattle
- loadvar wArnieFightCount, 1
+ loadmem wArnieFightCount, 1
clearflag ENGINE_ARNIE
end
@@ -190,7 +190,7 @@
loadtrainer BUG_CATCHER, ARNIE2
startbattle
reloadmapafterbattle
- loadvar wArnieFightCount, 2
+ loadmem wArnieFightCount, 2
clearflag ENGINE_ARNIE
end
@@ -198,7 +198,7 @@
loadtrainer BUG_CATCHER, ARNIE3
startbattle
reloadmapafterbattle
- loadvar wArnieFightCount, 3
+ loadmem wArnieFightCount, 3
clearflag ENGINE_ARNIE
end
@@ -206,7 +206,7 @@
loadtrainer BUG_CATCHER, ARNIE4
startbattle
reloadmapafterbattle
- loadvar wArnieFightCount, 4
+ loadmem wArnieFightCount, 4
clearflag ENGINE_ARNIE
end
--- a/maps/Route35GoldenrodGate.asm
+++ b/maps/Route35GoldenrodGate.asm
@@ -23,7 +23,7 @@
writetext UnknownText_0x69e48
buttonsound
waitsfx
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, .partyfull
writetext UnknownText_0x69eb8
playsound SFX_KEY_ITEM
--- a/maps/Route35NationalParkGate.asm
+++ b/maps/Route35NationalParkGate.asm
@@ -34,7 +34,7 @@
return
.CheckIfContestAvailable:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal TUESDAY, .SetContestOfficer
ifequal THURSDAY, .SetContestOfficer
ifequal SATURDAY, .SetContestOfficer
@@ -55,9 +55,9 @@
applymovement PLAYER, MovementData_0x6a2e2
turnobject ROUTE35NATIONALPARKGATE_OFFICER1, RIGHT
opentext
- checkcode VAR_CONTESTMINUTES
- addvar 1
- vartomem MEM_BUFFER_0
+ readvar VAR_CONTESTMINUTES
+ addval 1
+ getnum STRING_BUFFER_3
writetext UnknownText_0x6a79a
yesorno
iffalse .GoBackToContest
@@ -78,7 +78,7 @@
end
Route35OfficerScriptContest:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, Route35NationalParkGate_NoContestToday
ifequal MONDAY, Route35NationalParkGate_NoContestToday
ifequal WEDNESDAY, Route35NationalParkGate_NoContestToday
@@ -91,7 +91,7 @@
writetext UnknownText_0x6a2eb
yesorno
iffalse Route35NationalParkGate_DeclinedToParticipate
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifgreater 1, Route35NationalParkGate_LeaveTheRestBehind
special ContestDropOffMons
clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
@@ -116,7 +116,7 @@
end
Route35NationalParkGate_EnterContest:
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal LEFT, Route35NationalParkGate_FacingLeft
applymovement PLAYER, MovementData_0x6a2e5
end
@@ -126,9 +126,9 @@
end
Route35NationalParkGate_LeaveTheRestBehind:
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifless PARTY_LENGTH, Route35NationalParkGate_LessThanFullParty
- checkcode VAR_BOXSPACE
+ readvar VAR_BOXSPACE
ifequal 0, Route35NationalParkGate_NoRoomInBox
Route35NationalParkGate_LessThanFullParty:
--- a/maps/Route36.asm
+++ b/maps/Route36.asm
@@ -24,7 +24,7 @@
end
.ArthurCallback:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal THURSDAY, .ArthurAppears
disappear ROUTE36_ARTHUR
return
@@ -106,7 +106,7 @@
waitbutton
closetext
clearevent EVENT_FLORIA_AT_FLOWER_SHOP
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal UP, .Up
applymovement ROUTE36_FLORIA, FloriaMovement1
disappear ROUTE36_FLORIA
@@ -168,7 +168,7 @@
trainer SCHOOLBOY, ALAN1, EVENT_BEAT_SCHOOLBOY_ALAN, SchoolboyAlan1SeenText, SchoolboyAlan1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_SCHOOLBOY_ALAN
+ loadvar VAR_CALLERID, PHONE_SCHOOLBOY_ALAN
endifjustbattled
opentext
checkflag ENGINE_ALAN
@@ -191,7 +191,7 @@
askforphonenumber PHONE_SCHOOLBOY_ALAN
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext SCHOOLBOY, ALAN1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SCHOOLBOY, ALAN1
scall .RegisteredNumber
jump .NumberAccepted
@@ -198,7 +198,7 @@
.ChooseRematch:
scall .Rematch
winlosstext SchoolboyAlan1BeatenText, 0
- copybytetovar wAlanFightCount
+ readmem wAlanFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -220,7 +220,7 @@
loadtrainer SCHOOLBOY, ALAN1
startbattle
reloadmapafterbattle
- loadvar wAlanFightCount, 1
+ loadmem wAlanFightCount, 1
clearflag ENGINE_ALAN
end
@@ -228,7 +228,7 @@
loadtrainer SCHOOLBOY, ALAN2
startbattle
reloadmapafterbattle
- loadvar wAlanFightCount, 2
+ loadmem wAlanFightCount, 2
clearflag ENGINE_ALAN
end
@@ -236,7 +236,7 @@
loadtrainer SCHOOLBOY, ALAN3
startbattle
reloadmapafterbattle
- loadvar wAlanFightCount, 3
+ loadmem wAlanFightCount, 3
clearflag ENGINE_ALAN
end
@@ -244,7 +244,7 @@
loadtrainer SCHOOLBOY, ALAN4
startbattle
reloadmapafterbattle
- loadvar wAlanFightCount, 4
+ loadmem wAlanFightCount, 4
clearflag ENGINE_ALAN
end
@@ -318,7 +318,7 @@
opentext
checkevent EVENT_GOT_HARD_STONE_FROM_ARTHUR
iftrue .AlreadyGotStone
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal THURSDAY, ArthurNotThursdayScript
checkevent EVENT_MET_ARTHUR_OF_THURSDAY
iftrue .MetArthur
--- a/maps/Route36NationalParkGate.asm
+++ b/maps/Route36NationalParkGate.asm
@@ -45,7 +45,7 @@
.CheckIfContestAvailable:
checkevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
iftrue .Return
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal TUESDAY, .SetContestOfficer
ifequal THURSDAY, .SetContestOfficer
ifequal SATURDAY, .SetContestOfficer
@@ -64,9 +64,9 @@
.LeavingContestEarly:
turnobject PLAYER, UP
opentext
- checkcode VAR_CONTESTMINUTES
- addvar 1
- vartomem MEM_BUFFER_0
+ readvar VAR_CONTESTMINUTES
+ addval 1
+ getnum STRING_BUFFER_3
writetext UnknownText_0x6b284
yesorno
iffalse .GoBackToContest
@@ -139,7 +139,7 @@
end
Route36OfficerScriptContest:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, _ContestNotOn
ifequal MONDAY, _ContestNotOn
ifequal WEDNESDAY, _ContestNotOn
@@ -152,7 +152,7 @@
writetext UnknownText_0x6add5
yesorno
iffalse .DecidedNotToJoinContest
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifgreater 1, .LeaveMonsWithOfficer
special ContestDropOffMons
clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
@@ -179,9 +179,9 @@
end
.LeaveMonsWithOfficer:
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifless PARTY_LENGTH, .ContinueLeavingMons
- checkcode VAR_BOXSPACE
+ readvar VAR_BOXSPACE
ifequal 0, .BoxFull
.ContinueLeavingMons:
special CheckFirstMonIsEgg
--- a/maps/Route37.asm
+++ b/maps/Route37.asm
@@ -14,7 +14,7 @@
callback MAPCALLBACK_OBJECTS, .Sunny
.Sunny:
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal SUNDAY, .SunnyAppears
disappear ROUTE37_SUNNY
return
@@ -61,7 +61,7 @@
opentext
checkevent EVENT_GOT_MAGNET_FROM_SUNNY
iftrue SunnySundayScript
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal SUNDAY, SunnyNotSundayScript
checkevent EVENT_MET_SUNNY_OF_SUNDAY
iftrue .MetSunny
--- a/maps/Route38.asm
+++ b/maps/Route38.asm
@@ -38,7 +38,7 @@
trainer LASS, DANA1, EVENT_BEAT_LASS_DANA, LassDana1SeenText, LassDana1BeatenText, 0, .Script
.Script
- writecode VAR_CALLERID, PHONE_LASS_DANA
+ loadvar VAR_CALLERID, PHONE_LASS_DANA
endifjustbattled
opentext
checkflag ENGINE_DANA
@@ -61,7 +61,7 @@
askforphonenumber PHONE_LASS_DANA
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .DeclinedPhoneNumber
- trainertotext LASS, DANA1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, LASS, DANA1
scall .RegisteredPhoneNumber
jump .NumberAccepted
@@ -68,7 +68,7 @@
.DanaRematch:
scall .Rematch
winlosstext LassDana1BeatenText, 0
- copybytetovar wDanaFightCount
+ readmem wDanaFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -90,7 +90,7 @@
loadtrainer LASS, DANA1
startbattle
reloadmapafterbattle
- loadvar wDanaFightCount, 1
+ loadmem wDanaFightCount, 1
clearflag ENGINE_DANA
end
@@ -98,7 +98,7 @@
loadtrainer LASS, DANA2
startbattle
reloadmapafterbattle
- loadvar wDanaFightCount, 2
+ loadmem wDanaFightCount, 2
clearflag ENGINE_DANA
end
@@ -106,7 +106,7 @@
loadtrainer LASS, DANA3
startbattle
reloadmapafterbattle
- loadvar wDanaFightCount, 3
+ loadmem wDanaFightCount, 3
clearflag ENGINE_DANA
end
@@ -114,7 +114,7 @@
loadtrainer LASS, DANA4
startbattle
reloadmapafterbattle
- loadvar wDanaFightCount, 4
+ loadmem wDanaFightCount, 4
clearflag ENGINE_DANA
end
@@ -176,7 +176,7 @@
trainer SCHOOLBOY, CHAD1, EVENT_BEAT_SCHOOLBOY_CHAD, SchoolboyChad1SeenText, SchoolboyChad1BeatenText, 0, .Script
.Script
- writecode VAR_CALLERID, PHONE_SCHOOLBOY_CHAD
+ loadvar VAR_CALLERID, PHONE_SCHOOLBOY_CHAD
endifjustbattled
opentext
checkflag ENGINE_CHAD
@@ -197,7 +197,7 @@
askforphonenumber PHONE_SCHOOLBOY_CHAD
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .SaidNo
- trainertotext SCHOOLBOY, CHAD1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, SCHOOLBOY, CHAD1
scall .RegisteredChad
jump .HaveChadsNumber
@@ -204,7 +204,7 @@
.ChadRematch:
scall .Rematch
winlosstext SchoolboyChad1BeatenText, 0
- copybytetovar wChadFightCount
+ readmem wChadFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
@@ -226,7 +226,7 @@
loadtrainer SCHOOLBOY, CHAD1
startbattle
reloadmapafterbattle
- loadvar wChadFightCount, 1
+ loadmem wChadFightCount, 1
clearflag ENGINE_CHAD
end
@@ -234,7 +234,7 @@
loadtrainer SCHOOLBOY, CHAD2
startbattle
reloadmapafterbattle
- loadvar wChadFightCount, 2
+ loadmem wChadFightCount, 2
clearflag ENGINE_CHAD
end
@@ -242,7 +242,7 @@
loadtrainer SCHOOLBOY, CHAD3
startbattle
reloadmapafterbattle
- loadvar wChadFightCount, 3
+ loadmem wChadFightCount, 3
clearflag ENGINE_CHAD
end
@@ -250,7 +250,7 @@
loadtrainer SCHOOLBOY, CHAD4
startbattle
reloadmapafterbattle
- loadvar wChadFightCount, 4
+ loadmem wChadFightCount, 4
clearflag ENGINE_CHAD
end
--- a/maps/Route39.asm
+++ b/maps/Route39.asm
@@ -27,7 +27,7 @@
trainer POKEFANM, DEREK1, EVENT_BEAT_POKEFANM_DEREK, PokefanmDerekSeenText, PokefanmDerekBeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_POKEFANM_DEREK
+ loadvar VAR_CALLERID, PHONE_POKEFANM_DEREK
endifjustbattled
opentext
checkflag ENGINE_DEREK_HAS_NUGGET
@@ -50,7 +50,7 @@
askforphonenumber PHONE_POKEFANM_DEREK
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext POKEFANM, DEREK1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, POKEFANM, DEREK1
scall .RegisteredNumber
jump .NumberAccepted
--- a/maps/Route39Barn.asm
+++ b/maps/Route39Barn.asm
@@ -49,7 +49,7 @@
checkevent EVENT_HEALED_MOOMOO
iftrue .HappyCow
writetext MoomooWeakMooText
- writebyte MILTANK
+ setval MILTANK
special PlaySlowCry
buttonsound
writetext Route39BarnItsCryIsWeakText
@@ -67,9 +67,9 @@
checkitem BERRY
iffalse .NoBerriesInBag
takeitem BERRY
- copybytetovar wMooMooBerries
- addvar 1
- copyvartobyte wMooMooBerries
+ readmem wMooMooBerries
+ addval 1
+ writemem wMooMooBerries
ifequal 3, .ThreeBerries
ifequal 5, .FiveBerries
ifequal 7, .SevenBerries
--- a/maps/Route40.asm
+++ b/maps/Route40.asm
@@ -20,7 +20,7 @@
.MonicaCallback:
clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal MONDAY, .MonicaAppears
disappear ROUTE40_MONICA
return
@@ -95,7 +95,7 @@
opentext
checkevent EVENT_GOT_SHARP_BEAK_FROM_MONICA
iftrue .Monday
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifnotequal MONDAY, .NotMonday
checkevent EVENT_MET_MONICA_OF_MONDAY
iftrue .MetMonica
--- a/maps/Route42.asm
+++ b/maps/Route42.asm
@@ -38,7 +38,7 @@
trainer FISHER, TULLY1, EVENT_BEAT_FISHER_TULLY, FisherTullySeenText, FisherTullyBeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_FISHER_TULLY
+ loadvar VAR_CALLERID, PHONE_FISHER_TULLY
endifjustbattled
opentext
checkflag ENGINE_TULLY
@@ -61,7 +61,7 @@
askforphonenumber PHONE_FISHER_TULLY
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext FISHER, TULLY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, FISHER, TULLY1
scall .RegisteredNumber
jump .NumberAccepted
@@ -68,7 +68,7 @@
.WantsBattle:
scall .Rematch
winlosstext FisherTullyBeatenText, 0
- copybytetovar wTullyFightCount
+ readmem wTullyFightCount
ifequal 3, .Fight3
ifequal 2, .Fight2
ifequal 1, .Fight1
@@ -86,7 +86,7 @@
loadtrainer FISHER, TULLY1
startbattle
reloadmapafterbattle
- loadvar wTullyFightCount, 1
+ loadmem wTullyFightCount, 1
clearflag ENGINE_TULLY
end
@@ -94,7 +94,7 @@
loadtrainer FISHER, TULLY2
startbattle
reloadmapafterbattle
- loadvar wTullyFightCount, 2
+ loadmem wTullyFightCount, 2
clearflag ENGINE_TULLY
end
@@ -102,7 +102,7 @@
loadtrainer FISHER, TULLY3
startbattle
reloadmapafterbattle
- loadvar wTullyFightCount, 3
+ loadmem wTullyFightCount, 3
clearflag ENGINE_TULLY
end
--- a/maps/Route43.asm
+++ b/maps/Route43.asm
@@ -50,7 +50,7 @@
trainer POKEMANIAC, BRENT1, EVENT_BEAT_POKEMANIAC_BRENT, PokemaniacBrentSeenText, PokemaniacBrentBeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_POKEMANIAC_BRENT
+ loadvar VAR_CALLERID, PHONE_POKEMANIAC_BRENT
endifjustbattled
opentext
checkflag ENGINE_BRENT
@@ -71,7 +71,7 @@
askforphonenumber PHONE_POKEMANIAC_BRENT
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext POKEMANIAC, BRENT1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, POKEMANIAC, BRENT1
scall .RegisteredNumber
jump .NumberAccepted
@@ -78,7 +78,7 @@
.WantsBattle:
scall .Rematch
winlosstext PokemaniacBrentBeatenText, 0
- copybytetovar wBrentFightCount
+ readmem wBrentFightCount
ifequal 3, .Fight3
ifequal 2, .Fight2
ifequal 1, .Fight1
@@ -96,7 +96,7 @@
loadtrainer POKEMANIAC, BRENT1
startbattle
reloadmapafterbattle
- loadvar wBrentFightCount, 1
+ loadmem wBrentFightCount, 1
clearflag ENGINE_BRENT
end
@@ -104,7 +104,7 @@
loadtrainer POKEMANIAC, BRENT2
startbattle
reloadmapafterbattle
- loadvar wBrentFightCount, 2
+ loadmem wBrentFightCount, 2
clearflag ENGINE_BRENT
end
@@ -112,7 +112,7 @@
loadtrainer POKEMANIAC, BRENT3
startbattle
reloadmapafterbattle
- loadvar wBrentFightCount, 3
+ loadmem wBrentFightCount, 3
clearflag ENGINE_BRENT
end
@@ -177,7 +177,7 @@
trainer PICNICKER, TIFFANY3, EVENT_BEAT_PICNICKER_TIFFANY, PicnickerTiffanySeenText, PicnickerTiffanyBeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_PICNICKER_TIFFANY
+ loadvar VAR_CALLERID, PHONE_PICNICKER_TIFFANY
endifjustbattled
opentext
checkflag ENGINE_TIFFANY
@@ -202,7 +202,7 @@
askforphonenumber PHONE_PICNICKER_TIFFANY
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
- trainertotext PICNICKER, TIFFANY3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, TIFFANY3
scall .RegisteredNumber
jump .NumberAccepted
@@ -209,7 +209,7 @@
.WantsBattle:
scall .Rematch
winlosstext PicnickerTiffanyBeatenText, 0
- copybytetovar wTiffanyFightCount
+ readmem wTiffanyFightCount
ifequal 3, .Fight3
ifequal 2, .Fight2
ifequal 1, .Fight1
@@ -227,7 +227,7 @@
loadtrainer PICNICKER, TIFFANY3
startbattle
reloadmapafterbattle
- loadvar wTiffanyFightCount, 1
+ loadmem wTiffanyFightCount, 1
clearflag ENGINE_TIFFANY
end
@@ -235,7 +235,7 @@
loadtrainer PICNICKER, TIFFANY1
startbattle
reloadmapafterbattle
- loadvar wTiffanyFightCount, 2
+ loadmem wTiffanyFightCount, 2
clearflag ENGINE_TIFFANY
end
@@ -243,7 +243,7 @@
loadtrainer PICNICKER, TIFFANY2
startbattle
reloadmapafterbattle
- loadvar wTiffanyFightCount, 3
+ loadmem wTiffanyFightCount, 3
clearflag ENGINE_TIFFANY
end
--- a/maps/Route43Gate.asm
+++ b/maps/Route43Gate.asm
@@ -32,7 +32,7 @@
.RocketTakeover:
playmusic MUSIC_ROCKET_ENCOUNTER
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal DOWN, RocketScript_Southbound
ifequal UP, RocketScript_Northbound
setscene SCENE_FINISHED
--- a/maps/Route44.asm
+++ b/maps/Route44.asm
@@ -20,7 +20,7 @@
trainer BIRD_KEEPER, VANCE1, EVENT_BEAT_BIRD_KEEPER_VANCE, BirdKeeperVance1SeenText, BirdKeeperVance1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_BIRDKEEPER_VANCE
+ loadvar VAR_CALLERID, PHONE_BIRDKEEPER_VANCE
endifjustbattled
opentext
checkflag ENGINE_VANCE
@@ -41,7 +41,7 @@
askforphonenumber PHONE_BIRDKEEPER_VANCE
ifequal PHONE_CONTACTS_FULL, Route44PhoneFullM
ifequal PHONE_CONTACT_REFUSED, Route44NumberDeclinedM
- trainertotext BIRD_KEEPER, VANCE1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BIRD_KEEPER, VANCE1
scall Route44RegisteredNumberM
jump Route44NumberAcceptedM
@@ -48,7 +48,7 @@
.WantsBattle:
scall Route44RematchM
winlosstext BirdKeeperVance1BeatenText, 0
- copybytetovar wVanceFightCount
+ readmem wVanceFightCount
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
@@ -62,7 +62,7 @@
loadtrainer BIRD_KEEPER, VANCE1
startbattle
reloadmapafterbattle
- loadvar wVanceFightCount, 1
+ loadmem wVanceFightCount, 1
clearflag ENGINE_VANCE
end
@@ -70,7 +70,7 @@
loadtrainer BIRD_KEEPER, VANCE2
startbattle
reloadmapafterbattle
- loadvar wVanceFightCount, 2
+ loadmem wVanceFightCount, 2
clearflag ENGINE_VANCE
end
@@ -162,7 +162,7 @@
trainer FISHER, WILTON1, EVENT_BEAT_FISHER_WILTON, FisherWilton1SeenText, FisherWilton1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_FISHER_WILTON
+ loadvar VAR_CALLERID, PHONE_FISHER_WILTON
endifjustbattled
opentext
checkflag ENGINE_WILTON
@@ -185,7 +185,7 @@
askforphonenumber PHONE_FISHER_WILTON
ifequal PHONE_CONTACTS_FULL, Route44PhoneFullM
ifequal PHONE_CONTACT_REFUSED, Route44NumberDeclinedM
- trainertotext FISHER, WILTON1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, FISHER, WILTON1
scall Route44RegisteredNumberM
jump Route44NumberAcceptedM
@@ -192,7 +192,7 @@
.WantsBattle:
scall Route44RematchM
winlosstext FisherWilton1BeatenText, 0
- copybytetovar wWiltonFightCount
+ readmem wWiltonFightCount
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
@@ -206,7 +206,7 @@
loadtrainer FISHER, WILTON1
startbattle
reloadmapafterbattle
- loadvar wWiltonFightCount, 1
+ loadmem wWiltonFightCount, 1
clearflag ENGINE_WILTON
end
@@ -214,7 +214,7 @@
loadtrainer FISHER, WILTON2
startbattle
reloadmapafterbattle
- loadvar wWiltonFightCount, 2
+ loadmem wWiltonFightCount, 2
clearflag ENGINE_WILTON
end
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -22,7 +22,7 @@
trainer BLACKBELT_T, KENJI3, EVENT_BEAT_BLACKBELT_KENJI, BlackbeltKenji3SeenText, BlackbeltKenji3BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_BLACKBELT_KENJI
+ loadvar VAR_CALLERID, PHONE_BLACKBELT_KENJI
endifjustbattled
opentext
checkcellnum PHONE_BLACKBELT_KENJI
@@ -42,12 +42,12 @@
askforphonenumber PHONE_BLACKBELT_KENJI
ifequal PHONE_CONTACTS_FULL, Route45PhoneFullM
ifequal PHONE_CONTACT_REFUSED, Route45NumberDeclinedM
- trainertotext BLACKBELT_T, KENJI3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, BLACKBELT_T, KENJI3
scall Route45RegisteredNumberM
jump Route45NumberAcceptedM
.Registered:
- checkcode VAR_KENJI_BREAK
+ readvar VAR_KENJI_BREAK
ifnotequal 1, Route45NumberAcceptedM
checktime MORN
iftrue .Morning
@@ -148,7 +148,7 @@
trainer HIKER, PARRY3, EVENT_BEAT_HIKER_PARRY, HikerParry3SeenText, HikerParry3BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_HIKER_PARRY
+ loadvar VAR_CALLERID, PHONE_HIKER_PARRY
endifjustbattled
opentext
checkflag ENGINE_PARRY
@@ -169,7 +169,7 @@
askforphonenumber PHONE_HIKER_PARRY
ifequal PHONE_CONTACTS_FULL, Route45PhoneFullM
ifequal PHONE_CONTACT_REFUSED, Route45NumberDeclinedM
- trainertotext HIKER, PARRY1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, HIKER, PARRY1
scall Route45RegisteredNumberM
jump Route45NumberAcceptedM
@@ -176,7 +176,7 @@
.WantsBattle:
scall Route45RematchM
winlosstext HikerParry3BeatenText, 0
- copybytetovar wParryFightCount
+ readmem wParryFightCount
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
@@ -190,7 +190,7 @@
loadtrainer HIKER, PARRY3
startbattle
reloadmapafterbattle
- loadvar wParryFightCount, 1
+ loadmem wParryFightCount, 1
clearflag ENGINE_PARRY
end
@@ -198,7 +198,7 @@
loadtrainer HIKER, PARRY1
startbattle
reloadmapafterbattle
- loadvar wParryFightCount, 2
+ loadmem wParryFightCount, 2
clearflag ENGINE_PARRY
end
--- a/maps/Route46.asm
+++ b/maps/Route46.asm
@@ -26,7 +26,7 @@
trainer PICNICKER, ERIN1, EVENT_BEAT_PICNICKER_ERIN, PicnickerErin1SeenText, PicnickerErin1BeatenText, 0, .Script
.Script:
- writecode VAR_CALLERID, PHONE_PICNICKER_ERIN
+ loadvar VAR_CALLERID, PHONE_PICNICKER_ERIN
endifjustbattled
opentext
checkflag ENGINE_ERIN
@@ -47,7 +47,7 @@
askforphonenumber PHONE_PICNICKER_ERIN
ifequal PHONE_CONTACTS_FULL, Route46PhoneFullF
ifequal PHONE_CONTACT_REFUSED, Route46NumberDeclinedF
- trainertotext PICNICKER, ERIN1, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, PICNICKER, ERIN1
scall Route46RegisteredNumberF
jump Route46NumberAcceptedF
@@ -54,7 +54,7 @@
.WantsBattle:
scall Route46RematchF
winlosstext PicnickerErin1BeatenText, 0
- copybytetovar wErinFightCount
+ readmem wErinFightCount
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
@@ -68,7 +68,7 @@
loadtrainer PICNICKER, ERIN1
startbattle
reloadmapafterbattle
- loadvar wErinFightCount, 1
+ loadmem wErinFightCount, 1
clearflag ENGINE_ERIN
end
@@ -76,7 +76,7 @@
loadtrainer PICNICKER, ERIN2
startbattle
reloadmapafterbattle
- loadvar wErinFightCount, 2
+ loadmem wErinFightCount, 2
clearflag ENGINE_ERIN
end
--- a/maps/RuinsOfAlphAerodactylChamber.asm
+++ b/maps/RuinsOfAlphAerodactylChamber.asm
@@ -47,7 +47,7 @@
RuinsOfAlphAerodactylChamberPuzzle:
refreshscreen
- writebyte UNOWNPUZZLE_AERODACTYL
+ setval UNOWNPUZZLE_AERODACTYL
special UnownPuzzle
closetext
iftrue .PuzzleComplete
@@ -81,7 +81,7 @@
RuinsOfAlphAerodactylChamberWallPatternLeft:
opentext
writetext RuinsOfAlphAerodactylChamberWallPatternLeftText
- writebyte UNOWNWORDS_LIGHT
+ setval UNOWNWORDS_LIGHT
special DisplayUnownWords
closetext
end
@@ -91,7 +91,7 @@
iftrue .WallOpen
opentext
writetext RuinsOfAlphAerodactylChamberWallPatternRightText
- writebyte UNOWNWORDS_LIGHT
+ setval UNOWNWORDS_LIGHT
special DisplayUnownWords
closetext
end
--- a/maps/RuinsOfAlphHoOhChamber.asm
+++ b/maps/RuinsOfAlphHoOhChamber.asm
@@ -48,7 +48,7 @@
RuinsOfAlphHoOhChamberPuzzle:
refreshscreen
- writebyte UNOWNPUZZLE_HO_OH
+ setval UNOWNPUZZLE_HO_OH
special UnownPuzzle
closetext
iftrue .PuzzleComplete
@@ -82,7 +82,7 @@
RuinsOfAlphHoOhChamberWallPatternLeft:
opentext
writetext RuinsOfAlphHoOhChamberWallPatternLeftText
- writebyte UNOWNWORDS_HO_OH
+ setval UNOWNWORDS_HO_OH
special DisplayUnownWords
closetext
end
@@ -92,7 +92,7 @@
iftrue .WallOpen
opentext
writetext RuinsOfAlphHoOhChamberWallPatternRightText
- writebyte UNOWNWORDS_HO_OH
+ setval UNOWNWORDS_HO_OH
special DisplayUnownWords
closetext
end
--- a/maps/RuinsOfAlphKabutoChamber.asm
+++ b/maps/RuinsOfAlphKabutoChamber.asm
@@ -54,7 +54,7 @@
RuinsOfAlphKabutoChamberPuzzle:
refreshscreen
- writebyte UNOWNPUZZLE_KABUTO
+ setval UNOWNPUZZLE_KABUTO
special UnownPuzzle
closetext
iftrue .PuzzleComplete
@@ -83,7 +83,7 @@
RuinsOfAlphKabutoChamberScientistScript:
faceplayer
opentext
- checkcode VAR_UNOWNCOUNT
+ readvar VAR_UNOWNCOUNT
ifequal NUM_UNOWN, .AllUnownCaught
checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
iftrue .WallOpen
@@ -119,7 +119,7 @@
RuinsOfAlphKabutoChamberWallPatternLeft:
opentext
writetext RuinsOfAlphKabutoChamberWallPatternLeftText
- writebyte UNOWNWORDS_ESCAPE
+ setval UNOWNWORDS_ESCAPE
special DisplayUnownWords
closetext
end
@@ -129,7 +129,7 @@
iftrue .WallOpen
opentext
writetext RuinsOfAlphKabutoChamberWallPatternRightText
- writebyte UNOWNWORDS_ESCAPE
+ setval UNOWNWORDS_ESCAPE
special DisplayUnownWords
closetext
end
--- a/maps/RuinsOfAlphOmanyteChamber.asm
+++ b/maps/RuinsOfAlphOmanyteChamber.asm
@@ -48,7 +48,7 @@
RuinsOfAlphOmanyteChamberPuzzle:
refreshscreen
- writebyte UNOWNPUZZLE_OMANYTE
+ setval UNOWNPUZZLE_OMANYTE
special UnownPuzzle
closetext
iftrue .PuzzleComplete
@@ -82,7 +82,7 @@
RuinsOfAlphOmanyteChamberWallPatternLeft:
opentext
writetext RuinsOfAlphOmanyteChamberWallPatternLeftText
- writebyte UNOWNWORDS_WATER
+ setval UNOWNWORDS_WATER
special DisplayUnownWords
closetext
end
@@ -92,7 +92,7 @@
iftrue .WallOpen
opentext
writetext RuinsOfAlphOmanyteChamberWallPatternRightText
- writebyte UNOWNWORDS_WATER
+ setval UNOWNWORDS_WATER
special DisplayUnownWords
closetext
end
--- a/maps/RuinsOfAlphOutside.asm
+++ b/maps/RuinsOfAlphOutside.asm
@@ -27,7 +27,7 @@
jump .NoScientist
.MaybeScientist:
- checkcode VAR_UNOWNCOUNT
+ readvar VAR_UNOWNCOUNT
ifgreater 2, .YesScientist
jump .NoScientist
--- a/maps/RuinsOfAlphResearchCenter.asm
+++ b/maps/RuinsOfAlphResearchCenter.asm
@@ -60,7 +60,7 @@
RuinsOfAlphResearchCenterScientist3Script:
faceplayer
opentext
- checkcode VAR_UNOWNCOUNT
+ readvar VAR_UNOWNCOUNT
ifequal NUM_UNOWN, .PrinterAvailable
writetext RuinsOfAlphResearchCenterScientist3Text
waitbutton
@@ -76,7 +76,7 @@
RuinsOfAlphResearchCenterScientist1Script:
faceplayer
opentext
- checkcode VAR_UNOWNCOUNT
+ readvar VAR_UNOWNCOUNT
ifequal NUM_UNOWN, .GotAllUnown
checkflag ENGINE_UNOWN_DEX
iftrue .GotUnownDex
@@ -109,7 +109,7 @@
RuinsOfAlphResearchCenterScientist2Script:
faceplayer
opentext
- checkcode VAR_UNOWNCOUNT
+ readvar VAR_UNOWNCOUNT
ifequal NUM_UNOWN, .GotAllUnown
checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
iftrue .UnownAppeared
@@ -134,7 +134,7 @@
opentext
checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
iftrue .SkipChecking
- checkcode VAR_UNOWNCOUNT
+ readvar VAR_UNOWNCOUNT
ifequal NUM_UNOWN, .GotAllUnown
.SkipChecking:
writetext RuinsOfAlphResearchCenterComputerText
@@ -152,7 +152,7 @@
opentext
checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
iftrue .SkipChecking
- checkcode VAR_UNOWNCOUNT
+ readvar VAR_UNOWNCOUNT
ifequal NUM_UNOWN, .PrinterAvailable
.SkipChecking:
writetext RuinsOfAlphResearchCenterPrinterText_DoesntWork
--- a/maps/SaffronGym.asm
+++ b/maps/SaffronGym.asm
@@ -109,7 +109,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext SABRINA, SABRINA1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, SABRINA, SABRINA1
jumpstd gymstatue2
SabrinaIntroText:
--- a/maps/SaffronMagnetTrainStation.asm
+++ b/maps/SaffronMagnetTrainStation.asm
@@ -34,7 +34,7 @@
closetext
applymovement SAFFRONMAGNETTRAINSTATION_OFFICER, MovementData_0x18a88f
applymovement PLAYER, MovementData_0x18a898
- writebyte TRUE
+ setval TRUE
special MagnetTrain
warpcheck
newloadmap MAPSETUP_TRAIN
--- a/maps/TeamRocketBaseB1F.asm
+++ b/maps/TeamRocketBaseB1F.asm
@@ -450,7 +450,7 @@
cry VOLTORB
special FadeInPalettes
setlasttalked -1
- writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
+ loadvar VAR_BATTLETYPE, BATTLETYPE_TRAP
loadwildmon VOLTORB, 23
startbattle
end
@@ -460,7 +460,7 @@
cry GEODUDE
special FadeInPalettes
setlasttalked -1
- writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
+ loadvar VAR_BATTLETYPE, BATTLETYPE_TRAP
loadwildmon GEODUDE, 21
startbattle
end
@@ -470,7 +470,7 @@
cry KOFFING
special FadeInPalettes
setlasttalked -1
- writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
+ loadvar VAR_BATTLETYPE, BATTLETYPE_TRAP
loadwildmon KOFFING, 21
startbattle
end
--- a/maps/TeamRocketBaseB2F.asm
+++ b/maps/TeamRocketBaseB2F.asm
@@ -175,7 +175,7 @@
closetext
setscene SCENE_TEAMROCKETBASEB2F_ROCKET_BOSS
setevent EVENT_LANCE_HEALED_YOU_IN_TEAM_ROCKET_BASE
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal RIGHT, .FacingRight
applymovement TEAMROCKETBASEB2F_LANCE, MovementData_0x6d212
disappear TEAMROCKETBASEB2F_LANCE
--- a/maps/TinTower1F.asm
+++ b/maps/TinTower1F.asm
@@ -46,7 +46,7 @@
checkevent EVENT_FOUGHT_SUICUNE
iftrue .FoughtSuicune
appear TINTOWER1F_SUICUNE
- writebyte RAIKOU
+ setval RAIKOU
special MonCheck
iftrue .NoRaikou
appear TINTOWER1F_RAIKOU
@@ -55,7 +55,7 @@
.NoRaikou:
disappear TINTOWER1F_RAIKOU
.CheckEntei:
- writebyte ENTEI
+ setval ENTEI
special MonCheck
iftrue .NoEntei
appear TINTOWER1F_ENTEI
@@ -84,7 +84,7 @@
.SuicuneBattle:
applymovement PLAYER, TinTowerPlayerMovement1
pause 15
- writebyte RAIKOU
+ setval RAIKOU
special MonCheck
iftrue .Next1 ; if player caught Raikou, he doesn't appear in Tin Tower
applymovement TINTOWER1F_RAIKOU, TinTowerRaikouMovement1
@@ -97,7 +97,7 @@
playsound SFX_EXIT_BUILDING
waitsfx
.Next1:
- writebyte ENTEI
+ setval ENTEI
special MonCheck
iftrue .Next2 ; if player caught Entei, he doesn't appear in Tin Tower
applymovement TINTOWER1F_ENTEI, TinTowerEnteiMovement1
@@ -117,7 +117,7 @@
cry SUICUNE
pause 20
loadwildmon SUICUNE, 40
- writecode VAR_BATTLETYPE, BATTLETYPE_SUICUNE
+ loadvar VAR_BATTLETYPE, BATTLETYPE_SUICUNE
startbattle
dontrestartmapmusic
disappear TINTOWER1F_SUICUNE
--- a/maps/TinTowerRoof.asm
+++ b/maps/TinTowerRoof.asm
@@ -30,7 +30,7 @@
pause 15
closetext
setevent EVENT_FOUGHT_HO_OH
- writecode VAR_BATTLETYPE, BATTLETYPE_FORCEITEM
+ loadvar VAR_BATTLETYPE, BATTLETYPE_FORCEITEM
loadwildmon HO_OH, 60
startbattle
disappear TINTOWERROOF_HO_OH
--- a/maps/TrainerHouseB1F.asm
+++ b/maps/TrainerHouseB1F.asm
@@ -20,11 +20,11 @@
buttonsound
special TrainerHouse
iffalse .GetCal3Name
- trainertotext CAL, CAL2, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, CAL, CAL2
jump .GotName
.GetCal3Name:
- trainertotext CAL, CAL3, MEM_BUFFER_0
+ gettrainername STRING_BUFFER_3, CAL, CAL3
.GotName:
writetext TrainerHouseB1FYourOpponentIsText
buttonsound
--- a/maps/UnionCaveB2F.asm
+++ b/maps/UnionCaveB2F.asm
@@ -15,7 +15,7 @@
.Lapras:
checkflag ENGINE_UNION_CAVE_LAPRAS
iftrue .NoAppear
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal FRIDAY, .Appear
.NoAppear:
disappear UNIONCAVEB2F_LAPRAS
--- a/maps/VermilionCity.asm
+++ b/maps/VermilionCity.asm
@@ -52,7 +52,7 @@
pause 15
cry SNORLAX
closetext
- writecode VAR_BATTLETYPE, BATTLETYPE_FORCEITEM
+ loadvar VAR_BATTLETYPE, BATTLETYPE_FORCEITEM
loadwildmon SNORLAX, 50
startbattle
disappear VERMILIONCITY_BIG_SNORLAX
@@ -65,7 +65,7 @@
opentext
checkevent EVENT_GOT_HP_UP_FROM_VERMILION_GUY
iftrue .AlreadyGotItem
- checkcode VAR_BADGES
+ readvar VAR_BADGES
ifequal NUM_BADGES, .AllBadges
ifgreater 13, .MostBadges
ifgreater 9, .SomeBadges
--- a/maps/VermilionGym.asm
+++ b/maps/VermilionGym.asm
@@ -99,7 +99,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext LT_SURGE, LT_SURGE1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, LT_SURGE, LT_SURGE1
jumpstd gymstatue2
LtSurgeIntroText:
--- a/maps/VermilionPort.asm
+++ b/maps/VermilionPort.asm
@@ -84,7 +84,7 @@
iftrue .skip
turnobject PLAYER, LEFT
opentext
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal MONDAY, .NextShipWednesday
ifequal TUESDAY, .NextShipWednesday
ifequal THURSDAY, .NextShipSunday
@@ -146,7 +146,7 @@
opentext
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1
iftrue VermilionPortAlreadyRodeScript
- checkcode VAR_WEEKDAY
+ readvar VAR_WEEKDAY
ifequal MONDAY, .NextShipWednesday
ifequal TUESDAY, .NextShipWednesday
ifequal THURSDAY, .NextShipSunday
--- a/maps/VictoryRoadGate.asm
+++ b/maps/VictoryRoadGate.asm
@@ -26,7 +26,7 @@
opentext
writetext VictoryRoadGateOfficerText
buttonsound
- checkcode VAR_BADGES
+ readvar VAR_BADGES
ifgreater NUM_JOHTO_BADGES - 1, .AllEightBadges
writetext VictoryRoadGateNotEnoughBadgesText
waitbutton
--- a/maps/VioletGym.asm
+++ b/maps/VioletGym.asm
@@ -27,7 +27,7 @@
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_ZEPHYRBADGE
- checkcode VAR_BADGES
+ readvar VAR_BADGES
scall VioletGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM31_MUD_SLAP
@@ -107,7 +107,7 @@
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext FALKNER, FALKNER1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, FALKNER, FALKNER1
jumpstd gymstatue2
FalknerIntroText:
--- a/maps/VioletPokecenter1F.asm
+++ b/maps/VioletPokecenter1F.asm
@@ -22,10 +22,10 @@
.AskTakeEgg:
yesorno
iffalse .RefusedEgg
- checkcode VAR_PARTYCOUNT
+ readvar VAR_PARTYCOUNT
ifequal PARTY_LENGTH, .PartyFull
giveegg TOGEPI, 5
- stringtotext .eggname, MEM_BUFFER_1
+ getstring STRING_BUFFER_4, .eggname
scall .AideGivesEgg
setevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
clearevent EVENT_ELMS_AIDE_IN_LAB
@@ -34,7 +34,7 @@
writetext UnknownText_0x695c5
waitbutton
closetext
- checkcode VAR_FACING
+ readvar VAR_FACING
ifequal UP, .AideWalksAroundPlayer
turnobject PLAYER, DOWN
applymovement VIOLETPOKECENTER1F_SCIENTIST, MovementData_AideWalksStraightOutOfPokecenter
--- a/maps/ViridianGym.asm
+++ b/maps/ViridianGym.asm
@@ -58,7 +58,7 @@
jumpstd gymstatue1
.Beaten:
- trainertotext BLUE, BLUE1, MEM_BUFFER_1
+ gettrainername STRING_BUFFER_4, BLUE, BLUE1
jumpstd gymstatue2
LeaderBlueBeforeText:
--- a/maps/WhirlIslandLugiaChamber.asm
+++ b/maps/WhirlIslandLugiaChamber.asm
@@ -30,7 +30,7 @@
pause 15
closetext
setevent EVENT_FOUGHT_LUGIA
- writecode VAR_BATTLETYPE, BATTLETYPE_FORCEITEM
+ loadvar VAR_BATTLETYPE, BATTLETYPE_FORCEITEM
loadwildmon LUGIA, 60
startbattle
disappear WHIRLISLANDLUGIACHAMBER_LUGIA