# compare with event.inc in the decomp # conditions: # 00 A < B # 01 A = B # 02 A > B # 03 A <= B # 04 A >= B # 05 A != B # memory banks: # There are only 4 banks. Each can store a byte (see setbyte2) or a pointer (see loadpointer). # buffers: # The only buffers are 0, 1, and 2. They can hold strings and numbers. # variables: # Range from 4000 to 40FF, as well as from 8000 to 8015. They can hold two-byte numbers. # Variable references: https://github.com/pret/pokeemerald/blob/3cc68031560b3efcbe3c838a180fe5cad924060b/include/constants/vars.h # https://github.com/pret/pokefirered/blob/master/include/constants/vars.h # https://github.com/pret/pokeruby/blob/master/include/constants/vars.h # RAM: # You can write individual bytes into set locations in the RAM. Examples? # macros: msgbox.npc 0F 00 ptr<""> 09 02 # loadpointer, callstd 2 msgbox.sign 0F 00 ptr<""> 09 03 # loadpointer, callstd 3 msgbox.default 0F 00 ptr<""> 09 04 # loadpointer, callstd 4 msgbox.yesno 0F 00 ptr<""> 09 05 # loadpointer, callstd 5 msgbox.autoclose 0F 00 ptr<""> 09 06 # loadpointer, callstd 6 wild.battle B6 species:data.pokemon.names level. item:data.items.stats B7 # setwildbattle, dowildbattle give.item 1A 00 80 item:data.items.stats 1A 01 80 count: 09 01 # copyvarifnotzero (item and count), callstd 1 npc.item 1A 00 80 item:data.items.stats 1A 01 80 count: 09 00 # copyvarifnotzero (item and count), callstd 0 msgbox.item 0F 00 msg<""> 1A 00 80 item:data.items.stats 1A 01 80 count: 1A 02 80 song:songnames 09 09 # shows a message about a received item, # followed by a standard 'put away' message. # loadpointer, copyvarifnotzero (item, count, song), callstd 9 msgbox.instant.autoclose 6A DB ptr<""> 66 6D 68 6C #Skips the typewriter effect msgbox.instant.npc 6A 5A DB ptr<""> 66 6D 68 6C #Skips the typewriter effect msgbox.instant.default 6A DB ptr<""> 66 6D 6C #Skips the typewriter effect msgbox.fanfare 31 song:songnames 67 ptr<""> 66 32 # fanfare, preparemsg, waitmsg register.matchcall trainer:data.trainers.stats -> register.matchcall 16 04 80 trainer:data.trainers.stats 25 EA 01 1A 00 80 trainer:data.trainers.stats 09 08 # setvar, special 0xEA, copyvarifnotzero, callstd 8 if.compare.goto variable: condition.script_compare value: pointer<`xse`> -> if.compare.goto 21 variable: value: 06 condition.script_compare pointer<`xse`> # compare, if1 if.compare.call variable: condition.script_compare value: pointer<`xse`> -> if.compare.call 21 variable: value: 07 condition.script_compare pointer<`xse`> # compare, if2 if.flag.set.goto 2B flag:|h 06 01 pointer<`xse`> # checkflag, if1 if.flag.set.call 2B flag:|h 07 01 pointer<`xse`> # checkflag, if2 if.flag.clear.goto 2B flag:|h 06 00 pointer<`xse`> # checkflag, if1 if.flag.clear.call 2B flag:|h 07 00 pointer<`xse`> # checkflag, if2 if.trainer.defeated.goto 60 trainer:data.trainers.stats 06 01 pointer<`xse`> # checktrainerflag, if1 if.trainer.defeated.call 60 trainer:data.trainers.stats 07 01 pointer<`xse`> # checktrainerflag, if2 if.trainer.ready.goto 60 trainer:data.trainers.stats 06 00 pointer<`xse`> # checktrainerflag, if1 if.trainer.ready.call 60 trainer:data.trainers.stats 07 00 pointer<`xse`> # checktrainerflag, if2 move.player 4F FF 00 data<`move`> 51 00 00 # Moves the player (NPC object #255) around the map. # This macro assumes using "waitmovement 0" instead of "waitmovement 255". move.camera 4F 7F 00 data<`move`> 51 00 00 # Moves the camera (NPC object #127) around the map. # Requires "special SpawnCameraObject" and "special RemoveCameraObject". move.npc 4F npc: data<`move`> 51 00 00 # Moves an overworld NPC with ID 'npc' according to the specified movement commands in the 'data' pointer. # This macro assumes using "waitmovement 0" instead of "waitmovement npc". # Trainer battle macros (assume a localID (arg) parameter of 0) single.battle 5C 00 trainer:data.trainers.stats 00 00 start<""> playerwin<""> # trainerbattle 00: Default trainer battle command. single.battle.continue.silent 5C 01 trainer:data.trainers.stats 00 00 start<""> playerwin<""> winscript<`xse`> # trainerbattle 01: No intro music. Continues the script after winning. single.battle.continue.music 5C 02 trainer:data.trainers.stats 00 00 start<""> playerwin<""> winscript<`xse`> # trainerbattle 02: Plays the trainer's intro music. Continues the script after winning. single.battle.nointro 5C 03 trainer:data.trainers.stats 00 00 playerwin<""> # trainerbattle 03: No intro music nor intro text. double.battle 5C 04 trainer:data.trainers.stats 00 00 start<""> playerwin<""> needmorepokemonText<""> # trainerbattle 04: Refuses a battle if the player only has 1 Pokémon alive. single.battle.rematch 5C 05 trainer:data.trainers.stats 00 00 start<""> playerwin<""> # trainerbattle 05: Starts a trainer battle rematch. double.battle.continue.music 5C 06 trainer:data.trainers.stats 00 00 start<""> playerwin<""> needmorepokemonText<""> continuescript<`xse`> # trainerbattle 06: Plays the trainer's intro music. Continues the script after winning. The battle can be refused. double.battle.rematch 5C 07 trainer:data.trainers.stats 00 00 start<""> playerwin<""> needmorepokemonText<""> # trainerbattle 07: Starts a trainer battle rematch. The battle can be refused. double.battle.continue.silent 5C 08 trainer:data.trainers.stats 00 00 start<""> playerwin<""> needmorepokemonText<""> continuescript<`xse`> # trainerbattle 08: No intro music. Continues the script after winning. The battle can be refused. [BPRE_BPGE] single.battle.canlose 5C 09 trainer:data.trainers.stats 01 00 playerlose<""> playerwin<""> # trainerbattle 09: Starts a battle where the player can lose. [BPRE_BPGE] tutorial.battle 5C 09 trainer:data.trainers.stats 02 00 playerlose<""> playerwin<""> # trainerbattle 09: Starts a tutorial battle with Prof. Oak interjecting. The player must win. [BPRE_BPGE] tutorial.battle.canlose 5C 09 trainer:data.trainers.stats 03 00 playerlose<""> playerwin<""> # trainerbattle 09: Starts a tutorial battle with Prof. Oak interjecting. The player can lose. [BPEE] pyramid.battle 5C 09 trainer:data.trainers.stats 00 00 start<""> playerwin<""> # trainerbattle 09: Only works when called by Battle Pyramid ASM. [BPEE] setup.battle.A 5C 0A trainer:data.trainers.stats 00 00 start<""> playerwin<""> # trainerbattle 0A: Sets up the 1st trainer for a multi battle. [BPEE] setup.battle.B 5C 0B trainer:data.trainers.stats 00 00 start<""> playerwin<""> # trainerbattle 0B: Sets up the 2nd trainer for a multi battle. [BPEE] trainerhill.battle 5C 0C trainer:data.trainers.stats 00 00 start<""> playerwin<""> # trainerbattle 0C: Only works when called by Trainer Hill ASM. 00 nop # does nothing 01 nop1 # does nothing 02 end # ends the script 03 return # pops back to the last calling command used. 04 call pointer<`xse`> # Continues script execution from another point. Can be returned to. 05 goto pointer<`xse`> # Continues script execution from another point. Cannot return. 06 if1 condition.script_compare pointer<`xse`> # if the last comparison returned a certain value, "goto" to another script 07 if2 condition.script_compare pointer<`xse`> # if the last comparison returned a certain value, "call" to another script 08 gotostd function. # goto a built-in function 09 callstd function. # call a built-in function 0A gotostdif condition.script_compare function. # goto a built in function if the condition is met 0B callstdif condition.script_compare function. # call a built in function if the condition is met 0C jumpram # executes a script from the default RAM location (???) 0D killscript # kill the script, reset script RAM 0E setbyte byte. # sets a predefined address to the specified byte value 0F loadpointer bank.4 pointer<""> # loads a pointer into script RAM so other commands can use it 10 setbyte2 bank.4 value. # sets a memory bank to the specified byte value. 11 writebytetooffset value. offset::|h # store the byte 'value' at the RAM address 'offset' 12 loadbytefrompointer bank.4 pointer::|h # load a byte value from a RAM address into the specified memory bank 13 setfarbyte bank.4 pointer::h # stores the least-significant byte in the bank to a RAM address 14 copyscriptbanks destination.4 source.4 # copies the value in source to destination 15 copybyte destination::|h source::|h # copies the value from the source RAM address to the destination RAM address 16 setvar variable: value: # sets the given variable to the given value 17 addvar variable: value: # variable += value 18 subvar variable: value: # variable -= value 19 copyvar destination: source: # destination = source 1A setorcopyvar destination: source: # Works like the copyvar command if the source field is a variable number; # works like the setvar command if the source field is not a variable number. 1A copyvarifnotzero destination: source: # destination = source (or) destination = *source # (if source isn't a valid variable, it's read as a value) 1B comparebanks bankA.4 bankB.4 # sets the condition variable based on the values in the two banks 1C comparebanktobyte bank.4 value. # sets the condition variable 1D compareBankTofarbyte bank.4 pointer::|h # compares the bank value to the value stored in the RAM address 1E compareFarByteToBank pointer::|h bank.4 # opposite of 1D 1F compareFarByteToByte pointer::|h value. # compares the value at the RAM address to the value 20 compareFarBytes a::|h b::|h # compares the two values at the two RAM addresses 21 compare variable: value: 22 comparevars var1: var2: 23 callasm code<> 24 setcode pointer<> # puts a pointer to some assembly code at a specific place in RAM 25 special function:specials # calls a piece of ASM code from a table 26 special2 variable: function:specials # calls a special and puts the ASM's return value in the variable you listed 27 waitstate # blocks the script until it gets unblocked by a command or some ASM code. 28 pause time: # blocks the script for 'time' ticks 29 setflag flag:|h # flag = 1 2A clearflag flag:|h # flag = 0 2B checkflag flag:|h # compares the flag to the value of 1. Used with !=(5) or =(1) compare values [BPRE_BPGE] 2C nop2C # Only returns a false value. [AXPE_AXVE_BPEE] 2C initclock hour: minute: 2D checkdailyflags # nop in firered. Does some flag checking in R/S/E based on real-time-clock 2E resetvars # sets x8000, x8001, and x8002 to 0 2F sound number:songnames # 0000 mutes the music 30 waitsound # blocks script execution until any playing sounds finish 31 fanfare song:songnames # plays a song from the song list as a fanfare 32 waitfanfare # blocks script execution until any playing fanfair finishes 33 playsong song:songnames mode.songloopoptions # plays a song once or loop 34 playsong2 song:songnames # seems buggy? (saves the background music) 35 fadedefault # fades the music back to the default song 36 fadesong song:songnames # fades the music into the given song 37 fadeout speed. # fades out the current song to silent 38 fadein speed. # fades in the current song from silent 39 warp mapbank. map. warp. x: y: # sends player to mapbank/map at tile 'warp'. If warp is FF, uses x/y instead # does it terminate script execution? 3A warpmuted mapbank. map. warp. x: y: # same as warp, but doesn't play sappy song 0009 3B warpwalk mapbank. map. warp. x: y: # same as warp, but with a walking effect 3C warphole mapbank. map. # hole effect. Sends the player to same X/Y as on the map they started on. 3D warpteleport mapbank. map. warp. x: y: # teleport effect on a warp. Warping to a door/cave opening causes the player to land on the exact same block as it. 3E warp3 mapbank. map. warp. x: y: # Sets the map & coordinates for the player to go to in conjunction with specific "special" commands. 3F setwarpplace mapbank. map. warp. x: y: # sets a variable position (dynamic warp). Go to it with warp 7F 7F 7F 0000 0000 40 warp4 mapbank. map. warp. x: y: # Sets the map & coordinates that the player would go to after using Dive. 41 warp5 mapbank. map. warp. x: y: # Sets the map & coordinates that the player would go to if they fell in a hole. 42 getplayerpos varX: varY: # stores the current player position into varX and varY 43 countPokemon # stores number of pokemon in your party into LASTRESULT (800D) 44 additem item:data.items.stats quantity: # item/quantity can both be either a literal or a variable. # if the operation was succcessful, LASTRESULT (variable 800D) is set to 1. 45 removeitem item:data.items.stats quantity: # opposite of additem. 800D is set to 0 if the removal cannot happen 46 checkitemroom item:data.items.stats quantity: # 800D is set to 1 if additem would succeed 47 checkitem item:data.items.stats quantity: # 800D is set to 1 if removeitem would succeed 48 checkitemtype item:data.items.stats # 800D is set to the bag pocket number of the item 49 addpcitem item:data.items.stats quantity: # adds 'quantity' of 'item' into the PC 4A checkpcitem item:data.items.stats quantity: # 800D is set to 1 if the PC has at least 'quantity' of 'item' 4B adddecoration decoration:data.decorations.stats # adds a decoration to the player's PC in FR/LG, this is a NOP # decoration can be either a literal or a variable 4C removedecoration decoration:data.decorations.stats # removes a decoration to the player's PC in FR/LG, this is a NOP 4D testdecoration decoration:data.decorations.stats # 800D is set to 1 if the PC could store at least 1 more of that decoration (not in FR/LG) 4E checkdecoration decoration:data.decorations.stats # 800D is set to 1 if the PC has at least 1 of that decoration (not in FR/LG) 4F applymovement npc: data<`move`> # has character 'npc' move according to movement data 'data' # npc can be a character number or a variable. # FF is the player, 7F is the camera. 50 applymovement2 npc: data<`move`> # like applymovement, but only uses variables, not literals 51 waitmovement npc: # block further script execution until the npc movement is completed 52 waitmovementpos npc: x. y. # seems bugged. x/y do nothing, only works for FF (the player). Do not use. 53 hidesprite npc: # hides an NPC, but only if they have a Person ID. Doesn't work on the player. 54 hidespritepos npc: x. y. # removes the object at the specified coordinates. Do not use. 55 showsprite npc: # opposite of hidesprite 56 showspritepos npc: x. y. # shows a previously hidden sprite, then moves it to (x,y) 57 movesprite npc: x: y: 58 spritevisible npc: bank. map. # shows the sprite on the given map 59 spriteinvisible npc: bank. map. # hides the sprite on the given map 5A faceplayer # if the script was called by a person event, make that person face the player 5B spriteface npc: direction.directions 5C trainerbattle 00 trainer:data.trainers.stats arg: start<""> playerwin<""> 5C trainerbattle 01 trainer:data.trainers.stats arg: start<""> playerwin<""> winscript<`xse`> # doesn't play encounter music, continues with winscript 5C trainerbattle 02 trainer:data.trainers.stats arg: start<""> playerwin<""> winscript<`xse`> # does play encounter music, continues with winscript 5C trainerbattle 03 trainer:data.trainers.stats arg: playerwin<""> # no intro text 5C trainerbattle 04 trainer:data.trainers.stats arg: start<""> playerwin<""> needmorepokemonText<""> # double battles 5C trainerbattle 05 trainer:data.trainers.stats arg: start<""> playerwin<""> # clone of 0, but with rematch potential 5C trainerbattle 06 trainer:data.trainers.stats arg: start<""> playerwin<""> needmorepokemonText<""> continuescript<`xse`> # double battles, continues the script 5C trainerbattle 07 trainer:data.trainers.stats arg: start<""> playerwin<""> needmorepokemonText<""> # clone of 4, but with rematch potential 5C trainerbattle 08 trainer:data.trainers.stats arg: start<""> playerwin<""> needmorepokemonText<""> continuescript<`xse`> # clone of 6, does not play encounter music 5C trainerbattle 09 trainer:data.trainers.stats arg: start<""> playerwin<""> # tutorial battle (can't lose) (set arg=3 for oak's naration) (Pyramid type for Emerald) 5C trainerbattle other. trainer:data.trainers.stats arg: start<""> playerwin<""> # same as 0 # trainer battle takes different parameters depending on the # 'type', or the first parameter. # 'trainer' is the ID of the trainer battle # start is the text that the character says at the start of the battle # playerwin is the text that the character says when the player wins # rematches are weird. Look into them later. 5D repeattrainerbattle # do the last trainer battle again 5E endtrainerbattle # returns from the trainerbattle screen without starting message (go to after battle script) 5F endtrainerbattle2 # same as 5E? (go to beaten battle script) 60 checktrainerflag trainer:data.trainers.stats # if flag 0x500+trainer is 1, then the trainer has been defeated, set 800D to 1 61 defeatedtrainer trainer:data.trainers.stats # set flag 0x500+trainer to 1. That trainer now counts as defeated. 62 readytrainer trainer:data.trainers.stats # set flag 0x500+trainer to 0. That trainer now counts as active. 63 movesprite2 npc: x: y: # permanently move the npc to the x/y location 64 moveoffscreen npc: # moves the npc to just above the left-top corner of the screen 65 spritebehave npc: behavior. # temporarily changes the movement type of a selected NPC. 66 waitmsg # block script execution until box/text is fully drawn 67 preparemsg text<""> # text can be a pointer to a text pointer, or just a pointer to text # starts displaying text in a textbox. Does not block. Call waitmsg to block. 68 closeonkeypress # keeps the current textbox open until the player presses a button. 69 lockall # don't let characters move 6A lock # stop the movement of the person that called the script 6B releaseall # closes open textboxes and lets characters move freely 6C release # allow the movement of the person that called the script 6D waitkeypress # blocks script execution until the player pushes a button 6E yesnobox x. y. # shows a yes/no dialog, 800D stores 1 if YES was selected. 6F multichoice x. y. list. allowCancel.allowcanceloptions # player selection stored in 800D. If they backed out, 800D=7F 70 multichoice2 x. y. list. default. canCancel.allowcanceloptions # like multichoice, but you can choose which option is selected at the start 71 multichoice3 x. y. list. per_row. canCancel.allowcanceloptions # like multichoice, but shows multiple columns. 72 showbox x. y. width. height. 73 hidebox x. y. width. height. # ruby/sapphire only 74 clearbox x. y. width. height. # clear only a part of a custom box 75 showpokepic species:data.pokemon.names x. y. # show the pokemon in a box. Can be a literal or a variable. 76 hidepokepic # hides all shown pokepics 77 showcontestwinner contest. # nop in FireRed. Shows the painting of a wenner of the given contest. 78 braille text<> # displays a message in braille. The text must be formatted to use braille. 79 givePokemon species:data.pokemon.names level. item:data.items.stats filler. filler:: filler:: # gives the player one of that pokemon. the last 9 bytes are all 00. # 800D=0 if it was added to the party # 800D=1 if it was put in the PC # 800D=2 if there was no room # 4037=? number of the PC box the pokemon was sent to, if it was boxed? 7A giveEgg species:data.pokemon.names 7B setmonmove pokemonSlot. attackSlot. newMove:data.pokemon.moves.names # set a given pokemon in your party to have a specific move. # Slots range 0-4 and 0-3. 7C checkattack move:data.pokemon.moves.names # 800D=n, where n is the index of the pokemon that knows the move. # 800D=6, if no pokemon in your party knows the move # if successful, 8004 is set to the pokemon species 7D bufferPokemon buffer.3 species:data.pokemon.names # species can be a literal or variable. Store the name in the given buffer 7E bufferfirstPokemon buffer.3 # name of your first pokemon gets stored in the given buffer 7F bufferpartyPokemon buffer.3 party: # name of pokemon 'party' from your party gets stored in the buffer 80 bufferitem buffer.3 item:data.items.stats # stores an item name in a buffer 81 bufferdecoration buffer.3 decoration: 82 bufferattack buffer.3 move:data.pokemon.moves.names # species, party, item, decoration, and move can all be literals or variables 83 buffernumber buffer.3 number: # literal or variable gets converted to a string and put in the buffer. 84 bufferstd buffer.3 index: # gets one of the standard strings and pushes it into a buffer 85 bufferstring buffer.3 pointer<> # copies the string into the buffer. 86 pokemart products<`mart`> # products is a list of 2-byte items, terminated with 0000 87 decorationmart products<`decor`> # same as pokemart, but with decorations instead of items 88 decorationmart2 products<`decor`> # near-clone of decorationmart, but with slightly changed dialogue 89 pokecasino index: [BPRE_BPGE] 8A nop8A [AXPE_AXVE_BPEE] 8A setberrytree plantID. berryID.data.items.berry.stats+1 growth. # sets a specific berry-growing spot on the map with the specific berry and growth level. 8B choosecontextpkmn # in FireRed, 03000EA8 = '1'. In R/S/E, prompt for a pokemon to enter contest 8C startcontest # nop in FireRed. Starts a contest. 8D showcontestresults # nop in FireRed. Shows contest results. 8E contestlinktransfer # nop in FireRed. In Emerald, starts a wireless connection contest 8F random high: # returns 0<=number # unknown 9C doanimation animation: # executes field move animation 9D setanimation animation. slot: # which party pokemon to use for the next field animation? 9E checkanimation animation: # if the given animation is playing, pause the script until the animation completes 9F sethealingplace flightspot: # where does the player warp when they die? A0 checkgender # if male, 800D=0. If female, 800D=1 A1 cry species:data.pokemon.names effect: # plays that pokemon's cry. Can use a variable or a literal. what's effect do? A2 setmaptile x: y: tile: isWall: # sets the tile at x/y to be the given tile: with the attribute. # 0 = passable (false), 1 = impassable (true) A3 resetweather # queues a weather change to the map's default weather A4 setweather type: # A5 doweather # actually does the weather change from resetweather or setweather A6 changewalktile method. # used with ash-grass(1), breaking ice(4), and crumbling floor (7). Complicated. A7 setmapfooter footer: # updates the current map's footer. A8 spritelevelup npc: bank. map. unknown. # the chosen npc goes 'up one level' A9 restorespritelevel npc: bank. map. # the chosen npc is restored to its original level AA createsprite sprite. virtualNPC. x: y: behavior. facing. AB spriteface2 virtualNPC. facing. AC setdooropened x: y: # queues the animation, but doesn't do it AD setdoorclosed x: y: # queues the animation, but doesn't do it AE doorchange # runs the animation from the queue AF setdooropened2 x: y: # clone B0 setdoorclosed2 x: y: # clone [AXVE_AXPE] B1 nopB1 # ??? [BPRE_BPGE] B1 nopB1 [BPEE] B1 addelevmenuitem # ??? [AXVE_AXPE] B2 nopB2 [BPRE_BPGE] B2 nopB2 [BPEE] B2 showelevmenu B3 checkcoins output: # your number of coins is stored to the given variable B4 givecoins count: B5 removecoins count: B6 setwildbattle species:data.pokemon.names level. item:data.items.stats B7 dowildbattle # runs a battle setup with setwildbattle B8 setvirtualaddress value:: # some kind of jump? Complicated. B9 virtualgoto destination<> # ??? BA virtualcall destination<> BB virtualgotoif condition. destination<> BC virtualcallif condition. destination<> BD virtualmsgbox text<> BE virtualloadpointer text<> BF virtualbuffer buffer.3 text<> # stores text in a buffer C0 showcoins x. y. C1 hidecoins x. y. C2 updatecoins x. y. C3 incrementhiddenvalue a. # example: pokecenter nurse uses variable 0xF after you pick yes C4 warp6 mapbank. map. warp. x: y: # sets a particular map to warp to upon using an escape rope/teleport C5 waitcry # used after cry, it pauses the script [BPRE_BPGE_BPEE] C6 bufferboxname buffer.3 box: # box can be a variable or a literal [BPRE_BPGE] C7 textcolor color. # 00=blue, 01=red, FF=default, XX=black. Only in FR/LG [BPEE] C7 nopC7 [BPRE_BPGE] C8 helptext pointer<> # something with helptext? Does some tile loading, which can glitch textboxes [BPEE] C8 nopC8 [BPRE_BPGE] C9 helptext2 # related to help-text box that appears in the opened Main Menu [BPEE] C9 nopC9 [BPRE_BPGE] CA signmsg # makes message boxes look like signposts [BPEE] CA nopCA [BPRE_BPGE] CB normalmsg # ends the effect of signmsg. Textboxes look like normal textboxes. [BPEE] CB nopCB [BPRE_BPGE] CC comparehiddenvar a. value:: # compares a hidden value to a given value. [BPEE] CC nopCC [BPRE_BPGE_BPEE] CD setobedience slot: # a pokemon in your party becomes obedient (no longer disobeys) [BPRE_BPGE_BPEE] CE checkobedience slot: # if the pokemon is disobedient, 800D=1. If obedient (or empty), 800D=0 [BPRE_BPGE_BPEE] CF executeram # Tries a wonder card script. [BPRE_BPGE] D0 setworldmapflag flag: # This lets the player fly to a given map, if the map has a flight spot [BPEE] D0 nopD0 # (nop in Emerald) [BPRE_BPGE_BPEE] D1 warpteleport2 bank. map. exit. x: y: # clone of warpteleport, only used in FR/LG and only with specials [BPRE_BPGE_BPEE] D2 setcatchlocation slot: location.data.maps.names # changes the catch location of a pokemon in your party (0-5) [BPEE] D3 moverotatingtileobjects puzzleNumber: [BPRE_BPGE] D3 braillelength pointer<> # sets variable 8004 based on the braille string's length # call this, then special 0x1B2 to make a cursor appear at the end of the text [BPRE_BPGE] D4 bufferitems2 buffer.3 item: quantity: # buffers the item name, but pluralized if quantity is 2 or more [BPEE] D4 turnrotatingtileobjects # there is no D5 in ruby nor firered [BPEE] D5 initrotatingtilepuzzle isTrickHouse: [BPEE] D6 freerotatingtilepuzzle [BPEE] D7 warp7 mapbank. map. warp. x: y: # used in Mossdeep City's gym [BPEE] D8 selectapproachingtrainer # unknown [BPEE] D9 lockfortrainer # unknown [BPEE] DA hidebox2 # hides a displayed Braille textbox. Only for Emerald [BPEE] DB preparemsg3 pointer<""> # shows a text box with text appearing instantaneously. [BPEE] DC fadescreen3 mode.screenfades # fades the screen in or out, swapping buffers. Emerald only. [BPEE] DD buffertrainerclass buffer.3 class:data.trainers.classes.names # stores a trainer class into a specific buffer (Emerald only) [BPEE] DE buffertrainername buffer.3 trainer:data.trainers.stats # stores a trainer name into a specific buffer (Emerald only) [BPEE] DF pokenavcall pointer<> # displays a pokenav call. (Emerald only) [BPEE] E0 warp8 bank. map. exit. x: y: # warps the player while fading the screen to white [BPEE] E1 buffercontesttype buffer.3 contest: # stores the contest type name in a buffer. (Emerald Only) [BPEE] E2 bufferitems2 buffer.3 item:data.items.stats quantity: # stores pluralized item name in a buffer. (Emerald Only) # XX msgbox text<> type. # multicommand, 8 bytes total # XX message text<> type. # XX giveitem item: quantity: message. # multicommand, 12 bytes total # XX giveitem2 item: quantity: song: # multicommand, 17 bytes total (like giveitem, but with fanfare) # XX giveitem3 decoration: # multicommand, 7 bytes # XX wildbattle species: level. item: # multicommand, 7 bytes # setwildbattle species: level. item: # dowildbattle # XX wildbattle2 species: level. item: style. # multicommand, 10 bytes # setwildbattle species: level. item: # (3 bytes?) # dowildbattle # XX registernav trainer: #multicommand, 7 bytes (Emerald Only) # givemoney/paymoney/checkmoney/showmoney/hidemoney/updatemoney # verify which of these have the execution check flag, and which don't # darken/lighten: flashSize different lengths?