2016-09-03 04:51:16 +02:00
@ Does nothing.
2015-10-19 18:42:57 +02:00
.macro snop
.byte 0x00
.endm
2016-09-03 04:51:16 +02:00
@ Does nothing.
2015-10-19 18:42:57 +02:00
.macro snop1
.byte 0x01
.endm
2016-09-03 04:51:16 +02:00
@ Terminates script execution.
2015-10-19 18:42:57 +02:00
.macro end
.byte 0x02
.endm
2016-09-03 04:51:16 +02:00
@ Jumps back to after the last-executed call statement, and continues script execution from there.
2015-10-19 18:42:57 +02:00
.macro return
.byte 0x03
.endm
2016-09-03 04:51:16 +02:00
@ Jumps to destination and continues script execution from there. The location of the calling script is remembered and can be returned to later.
2015-10-19 18:42:57 +02:00
.macro call destination
.byte 0x04
.4byte \ destination
.endm
2016-09-03 04:51:16 +02:00
@ Jumps to destination and continues script execution from there.
2015-10-19 18:42:57 +02:00
.macro jump destination
.byte 0x05
.4byte \ destination
.endm
2016-09-03 04:51:16 +02:00
@ If the result of the last comparison matches condition (see Comparison operators), jumps to destination and continues script execution from there.
2015-10-19 18:42:57 +02:00
.macro jumpif condition, d e s t i n a t i o n
.byte 0x06
.byte \ condition
.4byte \ destination
.endm
2016-09-03 04:51:16 +02:00
@ If the result of the last comparison matches condition (see Comparison operators), calls destination.
2015-10-19 18:42:57 +02:00
.macro callif condition, d e s t i n a t i o n
.byte 0x07
.byte \ condition
.4byte \ destination
.endm
2016-09-03 04:51:16 +02:00
@ Jumps to the standard function at index function.
2015-10-19 18:42:57 +02:00
.macro jumpstd function
.byte 0x08
.byte \ function
.endm
2016-09-03 04:51:16 +02:00
@ Calls the standard function at index function.
2015-10-19 18:42:57 +02:00
.macro callstd function
.byte 0x09
.byte \ function
.endm
2016-09-03 04:51:16 +02:00
@ If the result of the last comparison matches condition (see Comparison operators), jumps to the standard function at index function.
2015-10-19 18:42:57 +02:00
.macro jumpstdif condition, f u n c t i o n
.byte 0x0a
.byte \ condition
.byte \ function
.endm
2016-09-03 04:51:16 +02:00
@ If the result of the last comparison matches condition (see Comparison operators), calls the standard function at index function.
2015-10-19 18:42:57 +02:00
.macro callstdif condition, f u n c t i o n
.byte 0x0b
.byte \ condition
.byte \ function
.endm
2016-09-03 04:51:16 +02:00
@ Executes a script stored in a default RAM location.
2015-10-19 18:42:57 +02:00
.macro jumpram
.byte 0x0c
.endm
2016-09-03 04:51:16 +02:00
@ Terminates script execution and "resets the script RAM".
2015-10-19 18:42:57 +02:00
.macro die
.byte 0x0d
.endm
2016-09-03 04:51:16 +02:00
@ Pads the specified value to a dword, and then writes that dword to a predefined address (0x0203AAA8).
2015-10-19 18:42:57 +02:00
.macro setbyte value
.byte 0x0e
.byte \ value
.endm
2016-09-03 04:51:16 +02:00
@ Sets the specified script bank to value.
2015-10-19 18:42:57 +02:00
.macro loadptr destination, v a l u e
.byte 0x0f
.byte \ destination
.4byte \ value
.endm
2016-09-03 04:51:16 +02:00
@ Sets the specified script bank to value.
2015-10-19 18:42:57 +02:00
.macro setbufferbyte destination, v a l u e
.byte 0x10
.byte \ destination
.byte \ value
.endm
2016-09-03 04:51:16 +02:00
@ Sets the byte at offset to value.
2015-10-19 18:42:57 +02:00
.macro writebytetooffset value, o f f s e t
.byte 0x11
.byte \ value
.4byte \ offset
.endm
2016-09-03 04:51:16 +02:00
@ Copies the byte value at source into the specified script bank.
2015-10-19 18:42:57 +02:00
.macro loadbytefrompointer destination, s o u r c e
.byte 0x12
.byte \ destination
.4byte \ source
.endm
2016-09-03 04:51:16 +02:00
@ Not sure. Judging from XSE's description I think it takes the least-significant byte in bank source and writes it to destination.
2015-10-19 18:42:57 +02:00
.macro setptrbyte source, d e s t i n a t i o n
.byte 0x13
.byte \ source
.4byte \ destination
.endm
2016-09-03 04:51:16 +02:00
@ Copies the contents of bank source into bank destination.
2015-10-19 18:42:57 +02:00
.macro copybuffers destination, s o u r c e
.byte 0x14
.byte \ destination
.byte \ source
.endm
2016-09-03 04:51:16 +02:00
@ Copies the byte at source to destination, replacing whatever byte was previously there.
2015-10-19 18:42:57 +02:00
.macro copybyte destination, s o u r c e
.byte 0x15
.4byte \ destination
.4byte \ source
.endm
2016-09-03 04:51:16 +02:00
@ Changes the value of destination to value.
2015-10-19 18:42:57 +02:00
.macro setvar destination, v a l u e
.byte 0x16
.2byte \ destination
.2byte \ value
.endm
2016-09-03 04:51:16 +02:00
@ Changes the value of destination by adding value to it. Overflow is not prevented (0xFFFF + 1 = 0x0000).
2015-10-19 18:42:57 +02:00
.macro addvar destination, v a l u e
.byte 0x17
.2byte \ destination
.2byte \ value
.endm
2016-09-03 04:51:16 +02:00
@ Changes the value of destination by subtracting value to it. Overflow is not prevented (0x0000 - 1 = 0xFFFF).
2015-10-19 18:42:57 +02:00
.macro subvar destination, v a l u e
.byte 0x18
.2byte \ destination
.2byte \ value
.endm
2016-09-03 04:51:16 +02:00
@ Copies the value of source into destination.
2015-10-19 18:42:57 +02:00
.macro copyvar destination, s o u r c e
.byte 0x19
.2byte \ destination
.2byte \ source
.endm
2016-09-03 04:51:16 +02:00
@ If source is not a variable, then this function acts like setvar. Otherwise, it acts like copyvar.
2015-10-19 18:42:57 +02:00
.macro setorcopyvar destination, s o u r c e
.byte 0x1a
.2byte \ destination
.2byte \ source
.endm
2016-09-03 04:51:16 +02:00
@ Compares the values of script banks a and b, after forcing the values to bytes.
2015-10-19 18:42:57 +02:00
.macro comparebuffers byte1 , b y t e 2
.byte 0x1b
.byte \ byte1
.byte \ byte2
.endm
2016-09-03 04:51:16 +02:00
@ Compares the least-significant byte of the value of script bank a to a fixed byte value (b).
2015-10-19 18:42:57 +02:00
.macro comparebuffertobyte a, b
.byte 0x1c
.byte \ a
.byte \ b
.endm
2016-09-03 04:51:16 +02:00
@ Compares the least-significant byte of the value of script bank a to the byte located at offset b.
2015-10-19 18:42:57 +02:00
.macro comparebuffertoptrbyte a, b
.byte 0x1d
.byte \ a
.4byte \ b
.endm
2016-09-03 04:51:16 +02:00
@ Compares the byte located at offset a to the least-significant byte of the value of script bank b.
2015-10-19 18:42:57 +02:00
.macro compareptrbytetobuffer a, b
.byte 0x1e
.4byte \ a
.byte \ b
.endm
2016-09-03 04:51:16 +02:00
@ Compares the byte located at offset a to a fixed byte value (b).
2015-10-19 18:42:57 +02:00
.macro compareptrbytetobyte a, b
.byte 0x1f
.4byte \ a
.byte \ b
.endm
2016-09-03 04:51:16 +02:00
@ Compares the byte located at offset a to the byte located at offset b.
2015-10-19 18:42:57 +02:00
.macro compareptrbytes a, b
.byte 0x20
.4byte \ a
.4byte \ b
.endm
2016-09-03 04:51:16 +02:00
@ Compares the value of a to a fixed word value (b).
2015-10-19 18:42:57 +02:00
.macro compare a, b
.byte 0x21
.2byte \ a
.2byte \ b
.endm
2016-09-03 04:51:16 +02:00
@ Compares the value of a to the value of b.
2015-10-19 18:42:57 +02:00
.macro comparevars a, b
.byte 0x22
.2byte \ a
.2byte \ b
.endm
2016-09-03 04:51:16 +02:00
@ Calls the ASM routine stored at code. Script execution is blocked until the ASM returns (bx lr, mov pc, lr, etc.). Remember to add 1 to the offset when calling THUMB code.
2015-10-19 18:42:57 +02:00
.macro callasm code
.byte 0x23
.4byte \ code
.endm
2016-09-03 04:51:16 +02:00
@ Replaces a pointer in the script engine RAM with asm_pointer.
2015-10-19 18:42:57 +02:00
.macro jumpasm asm_ p o i n t e r
.byte 0x24
.4byte \ asm_ p o i n t e r
.endm
2016-09-03 04:51:16 +02:00
@ Calls a special function; that is, a piece of ASM code designed for use by scripts and listed in a table of pointers.
2015-10-19 18:42:57 +02:00
.macro special function
.byte 0x25
.2byte \ function
.endm
2016-09-03 04:51:16 +02:00
@ Calls a special function. That function's output (if any) will be written to the variable you specify.
2015-10-19 18:42:57 +02:00
.macro specialval output, f u n c t i o n
.byte 0x26
.2byte \ output
.2byte \ function
.endm
2016-09-03 04:51:16 +02:00
@ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific commands and specials. If this command runs, and a subsequent command or piece of ASM does not unblock state, the script will remain blocked indefinitely (essentially a hang).
2015-10-19 18:42:57 +02:00
.macro waitstate
.byte 0x27
.endm
2016-09-03 04:51:16 +02:00
@ Blocks script execution for time (frames? milliseconds?).
2015-10-19 18:42:57 +02:00
.macro pause time
.byte 0x28
.2byte \ time
.endm
2016-09-03 04:51:16 +02:00
@ Sets a to 1.
2015-10-19 18:42:57 +02:00
.macro setflag a
.byte 0x29
.2byte \ a
.endm
2016-09-03 04:51:16 +02:00
@ Sets a to 0.
2015-10-19 18:42:57 +02:00
.macro clearflag a
.byte 0x2a
.2byte \ a
.endm
2016-09-03 04:51:16 +02:00
@ Compares a to 1.
2015-10-19 18:42:57 +02:00
.macro checkflag a
.byte 0x2b
.2byte \ a
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro compareflags
.byte 0x2c
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro checkdailyflags
.byte 0x2d
.endm
2016-09-03 04:51:16 +02:00
@ Resets the values of variables 0x8000, 0x8001, and 0x8002. Related to RTC in RSE?
2015-10-19 18:42:57 +02:00
.macro resetvars
.byte 0x2e
.endm
2016-09-03 04:51:16 +02:00
@ Plays the specified (sound_number) sound. Only one sound may play at a time, with newer ones interrupting older ones.
2015-10-19 18:42:57 +02:00
.macro playsfx sound_ n u m b e r
.byte 0x2f
.2byte \ sound_ n u m b e r
.endm
2016-09-03 04:51:16 +02:00
@ Blocks script execution until the currently-playing sound (triggered by sound) finishes playing.
2015-10-19 18:42:57 +02:00
.macro checksound
.byte 0x30
.endm
2016-09-03 04:51:16 +02:00
@ Plays the specified (fanfare_number) fanfare.
2015-10-19 18:42:57 +02:00
.macro fanfare fanfare_ n u m b e r
.byte 0x31
.2byte \ fanfare_ n u m b e r
.endm
2016-09-03 04:51:16 +02:00
@ Blocks script execution until all currently-playing fanfares finish.
2015-10-19 18:42:57 +02:00
.macro waitfanfare
.byte 0x32
.endm
2016-09-03 04:51:16 +02:00
@ Plays the specified (song_number) song. The byte is apparently supposed to be 0x00.
2015-10-19 18:42:57 +02:00
.macro playmusic song_ n u m b e r , u n k n o w n
.byte 0x33
.2byte \ song_ n u m b e r
.byte \ unknown
.endm
2016-09-03 04:51:16 +02:00
@ Plays the specified (song_number) song.
2015-10-19 18:42:57 +02:00
.macro playmusicbattle song_ n u m b e r
.byte 0x34
.2byte \ song_ n u m b e r
.endm
2016-09-03 04:51:16 +02:00
@ Crossfades the currently-playing song into the map's default song.
2015-10-19 18:42:57 +02:00
.macro fadedefault
.byte 0x35
.endm
2016-09-03 04:51:16 +02:00
@ Crossfades the currently-playng song into the specified (song_number) song.
2015-10-19 18:42:57 +02:00
.macro fademusic song_ n u m b e r
.byte 0x36
.2byte \ song_ n u m b e r
.endm
2016-09-03 04:51:16 +02:00
@ Fades out the currently-playing song.
2015-10-19 18:42:57 +02:00
.macro fadeout speed
.byte 0x37
.byte \ speed
.endm
2016-09-03 04:51:16 +02:00
@ Fades the currently-playing song back in.
2015-10-19 18:42:57 +02:00
.macro fadein speed
.byte 0x38
.byte \ speed
.endm
2016-09-03 04:51:16 +02:00
@ Sends the player to Warp warp on Map bank.map. If the specified warp is 0xFF, then the player will instead be sent to (X, Y) on the map.
2015-10-19 18:42:57 +02:00
.macro warp bank, m a p , w a r p , X , Y
.byte 0x39
.byte \ bank
.byte \ map
.byte \ warp
.2byte \ X
.2byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Clone of warp that does not play a sound effect.
2015-10-19 18:42:57 +02:00
.macro warpmuted
.byte 0x3a
.endm
2016-09-03 04:51:16 +02:00
@ Clone of warp that uses "a walking effect".
2015-10-19 18:42:57 +02:00
.macro warpwalk
.byte 0x3b
.endm
2016-09-03 04:51:16 +02:00
@ Warps the player to another map using a hole animation.
2015-10-19 18:42:57 +02:00
.macro warphole bank, m a p
.byte 0x3c
.byte \ bank
.byte \ map
.endm
2016-09-03 04:51:16 +02:00
@ Clone of warp that uses a teleport effect. It is apparently only used in R/S/E.[source]
2015-10-19 18:42:57 +02:00
.macro warpteleport
.byte 0x3d
.endm
2016-09-03 04:51:16 +02:00
@ Clone of warp. Used by an (unused?) Safari Zone script to return the player to the gatehouse and end the Safari Game.
2015-10-19 18:42:57 +02:00
.macro warp3
.byte 0x3e
.endm
2016-09-03 04:51:16 +02:00
@ Sets a default warp place. If a warp tries to send the player to Warp 127 on Map 127.127, they will instead be sent here. Useful when a map has warps that need to go to script-controlled locations (i.e. elevators).
2015-10-19 18:42:57 +02:00
.macro warpplace bank, m a p , w a r p , X , Y
.byte 0x3f
.byte \ bank
.byte \ map
.byte \ warp
.2byte \ X
.2byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Clone of warp3, except that this writes data to different offsets...
2015-10-19 18:42:57 +02:00
.macro warp4
.byte 0x40
.endm
2016-09-03 04:51:16 +02:00
@ Clone of warp3, except that this writes data to different offsets...
2015-10-19 18:42:57 +02:00
.macro warp5
.byte 0x41
.endm
2016-09-03 04:51:16 +02:00
@ Retrieves the player's zero-indexed X- and Y-coordinates in the map, and stores them in the specified variables.
2015-10-19 18:42:57 +02:00
.macro getplayerxy X, Y
.byte 0x42
.2byte \ X
.2byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Retrieves the number of Pokmon in the player's party, and stores that number in variable 0x800D (LASTRESULT).
2015-10-19 18:42:57 +02:00
.macro countpokemon
.byte 0x43
.endm
2016-09-03 04:51:16 +02:00
@ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and variable 0x800D (LASTRESULT) will be set to 0x0001; otherwise, LASTRESULT is set to 0x0000.
2015-10-19 18:42:57 +02:00
.macro additem index, q u a n t i t y
.byte 0x44
.2byte \ index
.2byte \ quantity
.endm
2016-09-03 04:51:16 +02:00
@ Removes quantity of item index from the player's Bag.
2015-10-19 18:42:57 +02:00
.macro removeitem index, q u a n t i t y
.byte 0x45
.2byte \ index
.2byte \ quantity
.endm
2016-09-03 04:51:16 +02:00
@ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets variable 0x800D (LASTRESULT) to 0x0001 if there is room, or 0x0000 is there is no room.
2015-10-19 18:42:57 +02:00
.macro checkitemspace index, q u a n t i t y
.byte 0x46
.2byte \ index
.2byte \ quantity
.endm
2016-09-03 04:51:16 +02:00
@ Checks if the player has quantity or more of item index in their Bag. Sets variable 0x800D (LASTRESULT) to 0x0001 if the player has enough of the item, or 0x0000 if they have fewer than quantity of the item.
2015-10-19 18:42:57 +02:00
.macro checkitem index, q u a n t i t y
.byte 0x47
.2byte \ index
.2byte \ quantity
.endm
2016-09-03 04:51:16 +02:00
@ Checks which Bag pocket the specified (index) item belongs in, and writes the value to variable 0x800D (LASTRESULT). This script is used to show the name of the proper Bag pocket when the player receives an item via callstd (simplified to giveitem in XSE).
2015-10-19 18:42:57 +02:00
.macro checkitemtype index
.byte 0x48
.2byte \ index
.endm
2016-09-03 04:51:16 +02:00
@ Adds a quantity amount of item index to the player's PC. Both arguments can be variables.
2015-10-19 18:42:57 +02:00
.macro addpcitem index, q u a n t i t y
.byte 0x49
.2byte \ index
.2byte \ quantity
.endm
2016-09-03 04:51:16 +02:00
@ Checks for quantity amount of item index in the player's PC. Both arguments can be variables.
2015-10-19 18:42:57 +02:00
.macro checkpcitem index, q u a n t i t y
.byte 0x4a
.2byte \ index
.2byte \ quantity
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop. (The argument is read, but not used for anything.)
2015-10-19 18:42:57 +02:00
.macro adddecor a
.byte 0x4b
.2byte \ a
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop. (The argument is read, but not used for anything.)
2015-10-19 18:42:57 +02:00
.macro removedecor a
.byte 0x4c
.2byte \ a
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop. (The argument is read, but not used for anything.)
2015-10-19 18:42:57 +02:00
.macro testdecor a
.byte 0x4d
.2byte \ a
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop. (The argument is read, but not used for anything.)
2015-10-19 18:42:57 +02:00
.macro checkdecor a
.byte 0x4e
.2byte \ a
.endm
2016-09-03 04:51:16 +02:00
@ Applies the movement data at movements to the specified (index) Person event. Also closes any standard message boxes that are still open.
2015-10-19 18:42:57 +02:00
.macro move index, m o v e m e n t s
.byte 0x4f
.2byte \ index
.4byte \ movements
.endm
2016-09-03 04:51:16 +02:00
@ Apparent clone of applymovement. Oddly, it doesn't seem to work at all if applied to any Person other than the player (0xFF), and the X and Y arguments don't seem to do anything.
@ This command in fact uses variables to access the Person event ID. So, for example, if you setvar 0x8000 to 0x3, and then use applymovementpos 0x8000 @move1, Person event 3 will have the movements at @move1 applied to them. Thank you Shiny Quagsire for bringing this to my attention.
2015-10-19 18:42:57 +02:00
.macro movecoords variable, m o v e m e n t s
.byte 0x50
.2byte \ variable
.4byte \ movements
.endm
2016-09-03 04:51:16 +02:00
@ Blocks script execution until the movements being applied to the specified (index) Person event finish. If the specified Person event is 0x0000, then the command will block script execution until all Person events affected by applymovement finish their movements. If the specified Person event is not currently being manipulated with applymovement, then this command does nothing.
2015-10-19 18:42:57 +02:00
.macro waitmove index
.byte 0x51
.2byte \ index
.endm
2016-09-03 04:51:16 +02:00
@ Apparent clone of waitmovement. Oddly, it doesn't seem to work at all if applied to any Person other than the player (0xFF), and the X and Y arguments don't seem to do anything.
2015-10-19 18:42:57 +02:00
.macro waitmovexy index, X , Y
.byte 0x52
.2byte \ index
.byte \ X
.byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Attempts to hide the specified (local_ID, a local ID) Person event on the current map, by setting its visibility flag if it has a valid one. If the Person does not have a valid visibility flag, this command does nothing.
2015-10-19 18:42:57 +02:00
.macro disappear local_ I D
.byte 0x53
.2byte \ local_ I D
.endm
2016-09-03 04:51:16 +02:00
@ Clone of hidesprite that also moves the Person? Test it!
2015-10-19 18:42:57 +02:00
.macro disappearxy index, X , Y
.byte 0x54
.2byte \ index
.byte \ X
.byte \ Y
.endm
.macro reappear word
.byte 0x55
.2byte \ word
.endm
.macro reappearxy word, b y t e 1 , b y t e 2
.byte 0x56
.2byte \ word
.byte \ byte1
.byte \ byte2
.endm
.macro movesprite word1 , w o r d2 , w o r d3
.byte 0x57
.2byte \ word1
.2byte \ word2
.2byte \ word3
.endm
.macro spritevisible word, b y t e 1 , b y t e 2
.byte 0x58
.2byte \ word
.byte \ byte1
.byte \ byte2
.endm
.macro spriteinvisible word, b y t e 1 , b y t e 2
.byte 0x59
.2byte \ word
.byte \ byte1
.byte \ byte2
.endm
2016-09-03 04:51:16 +02:00
@ If the script was called by a Person event, then that Person will turn to face toward the tile that the player is stepping off of.
2015-10-19 18:42:57 +02:00
.macro faceplayer
.byte 0x5a
.endm
.macro spriteface word, b y t e
.byte 0x5b
.2byte \ word
.byte \ byte
.endm
2016-09-03 04:51:16 +02:00
@ If the Trainer flag for Trainer index is not set, this command does absolutely nothing.
2015-10-19 18:42:57 +02:00
.macro trainerbattle byte, w o r d1 , w o r d2 , p o i n t e r1 , p o i n t e r2 , p o i n t e r3 , p o i n t e r4
.byte 0x5c
.byte \ byte
.2byte \ word1
.2byte \ word2
.4byte \ pointer1
.4byte \ pointer2
.4byte \ pointer3
.4byte \ pointer4
.endm
2016-09-03 04:51:16 +02:00
@ Starts a trainer battle using the battle information stored in RAM (usually by trainerbattle, which actually calls this command behind-the-scenes), and blocks script execution until the battle finishes.
2015-10-19 18:42:57 +02:00
.macro reptrainerbattle
.byte 0x5d
.endm
.macro endtrainerbattle
.byte 0x5e
.endm
.macro endtrainerbattle2
.byte 0x5f
.endm
2016-09-03 04:51:16 +02:00
@ Compares Flag (trainer + 0x500) to 1. (If the flag is set, then the trainer has been defeated by the player.)
2015-10-19 18:42:57 +02:00
.macro checktrainerflag trainer
.byte 0x60
.2byte \ trainer
.endm
2016-09-03 04:51:16 +02:00
@ Sets Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.)
2015-10-19 18:42:57 +02:00
.macro cleartrainerflag trainer
.byte 0x61
.2byte \ trainer
.endm
2016-09-03 04:51:16 +02:00
@ Clears Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.)
2015-10-19 18:42:57 +02:00
.macro settrainerflag trainer
.byte 0x62
.2byte \ trainer
.endm
.macro movespriteperm word1 , w o r d2 , w o r d3
.byte 0x63
.2byte \ word1
.2byte \ word2
.2byte \ word3
.endm
.macro moveoffscreen word
.byte 0x64
.2byte \ word
.endm
.macro spritebehave word, b y t e
.byte 0x65
.2byte \ word
.byte \ byte
.endm
2016-09-03 04:51:16 +02:00
@ If a standard message box (or its text) is being drawn on-screen, this command blocks script execution until the box and its text have been fully drawn.
2015-10-19 18:42:57 +02:00
.macro waittext
.byte 0x66
.endm
2016-09-03 04:51:16 +02:00
@ Starts displaying a standard message box containing the specified text. If text is a pointer, then the string at that offset will be loaded and used. If text is script bank 0, then the value of script bank 0 will be treated as a pointer to the text. (You can use loadpointer to place a string pointer in a script bank.)
2015-10-19 18:42:57 +02:00
.macro message text
.byte 0x67
.4byte \ text
.endm
2016-09-03 04:51:16 +02:00
@ Holds the current message box open until the player presses a key. The message box is then closed.
2015-10-19 18:42:57 +02:00
.macro closebutton
.byte 0x68
.endm
2016-09-03 04:51:16 +02:00
@ Ceases movement for all OWs on-screen.
2015-10-19 18:42:57 +02:00
.macro lockall
.byte 0x69
.endm
2016-09-03 04:51:16 +02:00
@ If the script was called by a Person event, then that Person's movement will cease.
2015-10-19 18:42:57 +02:00
.macro lock
.byte 0x6a
.endm
2016-09-03 04:51:16 +02:00
@ Resumes normal movement for all OWs on-screen, and closes any standard message boxes that are still open.
2015-10-19 18:42:57 +02:00
.macro releaseall
.byte 0x6b
.endm
2016-09-03 04:51:16 +02:00
@ If the script was called by a Person event, then that Person's movement will resume. This command also closes any standard message boxes that are still open.
2015-10-19 18:42:57 +02:00
.macro release
.byte 0x6c
.endm
2016-09-03 04:51:16 +02:00
@ Blocks script execution until the player presses any key.
2015-10-19 18:42:57 +02:00
.macro waitbutton
.byte 0x6d
.endm
2016-09-03 04:51:16 +02:00
@ Displays a YES/NO multichoice box at the specified coordinates, and blocks script execution until the user makes a selection. Their selection is stored in variable 0x800D (LASTRESULT); 0x0000 for "NO" or if the user pressed B, and 0x0001 for "YES".
2015-10-19 18:42:57 +02:00
.macro yesnobox X, Y
.byte 0x6e
.byte \ X
.byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. If B is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
2015-10-19 18:42:57 +02:00
.macro multichoice X, Y , l i s t , B
.byte 0x6f
.byte \ X
.byte \ Y
.byte \ list
.byte \ B
.endm
2016-09-03 04:51:16 +02:00
@ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. If B is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
2015-10-19 18:42:57 +02:00
.macro multichoicedef X, Y , l i s t , d e f a u l t , B
.byte 0x70
.byte \ X
.byte \ Y
.byte \ list
.byte \ default
.byte \ B
.endm
2016-09-03 04:51:16 +02:00
@ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The per_row argument determines how many list items will be shown on a single row of the box.
2015-10-19 18:42:57 +02:00
.macro multichoicerow X, Y , l i s t , p e r _ r o w , B
.byte 0x71
.byte \ X
.byte \ Y
.byte \ list
.byte \ per_ r o w
.byte \ B
.endm
.macro showbox byte1 , b y t e 2 , b y t e 3 , b y t e 4
.byte 0x72
.byte \ byte1
.byte \ byte2
.byte \ byte3
.byte \ byte4
.endm
.macro hidebox byte1 , b y t e 2 , b y t e 3 , b y t e 4
.byte 0x73
.byte \ byte1
.byte \ byte2
.byte \ byte3
.byte \ byte4
.endm
.macro clearbox byte1 , b y t e 2 , b y t e 3 , b y t e 4
.byte 0x74
.byte \ byte1
.byte \ byte2
.byte \ byte3
.byte \ byte4
.endm
2016-09-03 04:51:16 +02:00
@ Displays a box containing the front sprite for the specified (species) Pokmon species.
2015-10-19 18:42:57 +02:00
.macro showpokepic species, X , Y
.byte 0x75
.2byte \ species
.byte \ X
.byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Hides all boxes displayed with showpokepic.
2015-10-19 18:42:57 +02:00
.macro hidepokepic
.byte 0x76
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop. (The argument is discarded.)
2015-10-19 18:42:57 +02:00
.macro showcontestwinner a
.byte 0x77
.byte \ a
.endm
2016-09-03 04:51:16 +02:00
@ Displays the string at pointer as braille text in a standard message box. The string must be formatted to use braille characters.
2015-10-19 18:42:57 +02:00
.macro braille text
.byte 0x78
.4byte \ text
.endm
2016-09-03 04:51:16 +02:00
@ Gives the player one of the specified (species) Pokmon at level level holding item. The unknown arguments should all be zeroes.
2015-10-19 18:42:57 +02:00
.macro givepokemon species, l e v e l , i t e m , u n k n o w n 1 , u n k n o w n 2 , u n k n o w n 3
.byte 0x79
.2byte \ species
.byte \ level
.2byte \ item
.4byte \ unknown1
.4byte \ unknown2
.byte \ unknown3
.endm
.macro giveegg word
.byte 0x7a
.2byte \ word
.endm
.macro setpokemove byte1 , b y t e 2 , w o r d
.byte 0x7b
.byte \ byte1
.byte \ byte2
.2byte \ word
.endm
2016-09-03 04:51:16 +02:00
@ Checks if at least one Pokmon in the player's party knows the specified (index) attack. If so, variable 0x800D (LASTRESULT) is set to the (zero-indexed) slot number of the Pokmon that knows the move. If not, LASTRESULT is set to 0x0006.
2015-10-19 18:42:57 +02:00
.macro checkattack index
.byte 0x7c
.2byte \ index
.endm
2016-09-03 04:51:16 +02:00
@ Writes the name of the Pokmon at index species to the specified buffer.
2015-10-19 18:42:57 +02:00
.macro bufferpoke out, s p e c i e s
.byte 0x7d
.byte \ out
.2byte \ species
.endm
2016-09-03 04:51:16 +02:00
@ Writes the name of the first Pokmon in the player's party to the specified buffer.
2015-10-19 18:42:57 +02:00
.macro bufferfirstpoke out
.byte 0x7e
.byte \ out
.endm
2016-09-03 04:51:16 +02:00
@ Writes the name of the Pokmon in slot slot (zero-indexed) of the player's party to the specified buffer. If an empty or invalid slot is specified, ten spaces ("") are written to the buffer.
2015-10-19 18:42:57 +02:00
.macro bufferpartypoke out, s l o t
.byte 0x7f
.byte \ out
.2byte \ slot
.endm
2016-09-03 04:51:16 +02:00
@ Writes the name of the item at index item to the specified buffer. If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead.
2015-10-19 18:42:57 +02:00
.macro bufferitem out, i t e m
.byte 0x80
.byte \ out
.2byte \ item
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop. (The first argument is discarded immediately. The second argument is read, but not used for anything.)
2015-10-19 18:42:57 +02:00
.macro bufferdecor a, b
.byte 0x81
.byte \ a
.2byte \ b
.endm
2016-09-03 04:51:16 +02:00
@ Writes the name of the attack at index attack to the specified buffer.
2015-10-19 18:42:57 +02:00
.macro bufferattack out, a t t a c k
.byte 0x82
.byte \ out
.2byte \ attack
.endm
2016-09-03 04:51:16 +02:00
@ Converts the value of input to a decimal string, and writes that string to the specified buffer.
2015-10-19 18:42:57 +02:00
.macro buffernum out, i n p u t
.byte 0x83
.byte \ out
.2byte \ input
.endm
2016-09-03 04:51:16 +02:00
@ Writes the standard string identified by index to the specified buffer. Specifying an invalid standard string (e.x. 0x2B) can and usually will cause data corruption (I've observed destruction of the stored player name and crashes when entering/exiting certain menu screens).
2015-10-19 18:42:57 +02:00
.macro bufferstd out, i n d e x
.byte 0x84
.byte \ out
.2byte \ index
.endm
2016-09-03 04:51:16 +02:00
@ Copies the string at offset to the specified buffer.
2015-10-19 18:42:57 +02:00
.macro buffertext out, o f f s e t
.byte 0x85
.byte \ out
.4byte \ offset
.endm
2016-09-03 04:51:16 +02:00
@ Opens the Pokemart system, offering the specified products for sale.
2015-10-19 18:42:57 +02:00
.macro pokemart products
.byte 0x86
.4byte \ products
.endm
2016-09-03 04:51:16 +02:00
@ Apparent clone of pokemart.
2015-10-19 18:42:57 +02:00
.macro pokemartdecor products
.byte 0x87
.4byte \ products
.endm
2016-09-03 04:51:16 +02:00
@ Apparent clone of pokemart.
2015-10-19 18:42:57 +02:00
.macro pokemartbp products
.byte 0x88
.4byte \ products
.endm
.macro pokecasino word
.byte 0x89
.2byte \ word
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro event_8a
.byte 0x8a
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command sets the byte at 0x03000EA8 to 0x01. I do not know what that means.
2015-10-19 18:42:57 +02:00
.macro choosecontestpkmn
.byte 0x8b
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro startcontest
.byte 0x8c
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro showcontestresults
.byte 0x8d
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro contestlinktransfer
.byte 0x8e
.endm
2016-09-03 04:51:16 +02:00
@ Stores a random integer between 0 and limit in variable 0x800D (LASTRESULT).
2015-10-19 18:42:57 +02:00
.macro random limit
.byte 0x8f
.2byte \ limit
.endm
2016-09-03 04:51:16 +02:00
@ If check is 0x00, this command adds value to the player's money.
2015-10-19 18:42:57 +02:00
.macro givemoney value, c h e c k
.byte 0x90
.4byte \ value
.byte \ check
.endm
2016-09-03 04:51:16 +02:00
@ If check is 0x00, this command subtracts value from the player's money.
2015-10-19 18:42:57 +02:00
.macro paymoney value, c h e c k
.byte 0x91
.4byte \ value
.byte \ check
.endm
2016-09-03 04:51:16 +02:00
@ If check is 0x00, this command will check if the player has value or more money; script variable 0x800D (LASTRESULT) is set to 0x0001 if the player has enough money, or 0x0000 if the do not.
2015-10-19 18:42:57 +02:00
.macro checkmoney value, c h e c k
.byte 0x92
.4byte \ value
.byte \ check
.endm
2016-09-03 04:51:16 +02:00
@ Spawns a secondary box showing how much money the player has.
2015-10-19 18:42:57 +02:00
.macro showmoney X, Y
.byte 0x93
.byte \ X
.byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Hides the secondary box spawned by showmoney.
2015-10-19 18:42:57 +02:00
.macro hidemoney X, Y
.byte 0x94
.byte \ X
.byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Updates the secondary box spawned by showmoney. (What does it do with its arguments?)
2015-10-19 18:42:57 +02:00
.macro updatemoney X, Y
.byte 0x95
.byte \ X
.byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro event_96
.byte 0x96
.endm
2016-09-03 04:51:16 +02:00
@ Fades the screen to black or back, using the specified effect. Effect 0x00 fades in, and effect 0x01 fades out. I don't know if other effects exist.
2015-10-19 18:42:57 +02:00
.macro fadescreen effect
.byte 0x97
.byte \ effect
.endm
.macro fadescreendelay byte1 , b y t e 2
.byte 0x98
.byte \ byte1
.byte \ byte2
.endm
.macro darken word
.byte 0x99
.2byte \ word
.endm
.macro lighten byte
.byte 0x9a
.byte \ byte
.endm
.macro message2 pointer
.byte 0x9b
.4byte \ pointer
.endm
2016-09-03 04:51:16 +02:00
@ Executes the specified field move animation.
2015-10-19 18:42:57 +02:00
.macro doanimation animation
.byte 0x9c
.2byte \ animation
.endm
2016-09-03 04:51:16 +02:00
@ Tells the game which party Pokmon to use for the next field move animation.
2015-10-19 18:42:57 +02:00
.macro setanimation animation, s l o t
.byte 0x9d
.byte \ animation
.2byte \ slot
.endm
2016-09-03 04:51:16 +02:00
@ Blocks script execution until all playing field move animations complete.
2015-10-19 18:42:57 +02:00
.macro checkanimation animation
.byte 0x9e
.2byte \ animation
.endm
2016-09-03 04:51:16 +02:00
@ Sets which healing place the player will return to if all of the Pokmon in their party faint. A list of available healing places can be found on PokeCommunity.
2015-10-19 18:42:57 +02:00
.macro sethealplace flightspot
.byte 0x9f
.2byte \ flightspot
.endm
2016-09-03 04:51:16 +02:00
@ Checks the player's gender. If male, then 0x0000 is stored in variable 0x800D (LASTRESULT). If female, then 0x0001 is stored in LASTRESULT.
2015-10-19 18:42:57 +02:00
.macro checkgender
.byte 0xa0
.endm
2016-09-03 04:51:16 +02:00
@ Plays the specified (species) Pokmon's cry. You can use waitcry to block script execution until the sound finishes.
2015-10-19 18:42:57 +02:00
.macro pokecry species, e f f e c t
.byte 0xa1
.2byte \ species
.2byte \ effect
.endm
2016-09-03 04:51:16 +02:00
@ Changes the tile at (X, Y) on the current map.
2015-10-19 18:42:57 +02:00
.macro setmaptile X, Y , t i l e _ n u m b e r , t i l e _ a t t r i b
.byte 0xa2
.2byte \ X
.2byte \ Y
.2byte \ tile_ n u m b e r
.2byte \ tile_ a t t r i b
.endm
2016-09-03 04:51:16 +02:00
@ Queues a weather change to the default weather for the map.
2015-10-19 18:42:57 +02:00
.macro resetweather
.byte 0xa3
.endm
2016-09-03 04:51:16 +02:00
@ Queues a weather change to type weather.
2015-10-19 18:42:57 +02:00
.macro setweather type
.byte 0xa4
.2byte \ type
.endm
2016-09-03 04:51:16 +02:00
@ Executes the weather change queued with resetweather or setweather. The current weather will smoothly fade into the queued weather.
2015-10-19 18:42:57 +02:00
.macro doweather
.byte 0xa5
.endm
2016-09-03 04:51:16 +02:00
@ This command manages cases in which maps have tiles that change state when stepped on (specifically, cracked/breakable floors).
2015-10-19 18:42:57 +02:00
.macro tileeffect subroutine
.byte 0xa6
.byte \ subroutine
.endm
.macro setmapfooter word
.byte 0xa7
.2byte \ word
.endm
.macro spritelevelup word, b y t e 1 , b y t e 2 , b y t e 3
.byte 0xa8
.2byte \ word
.byte \ byte1
.byte \ byte2
.byte \ byte3
.endm
.macro restorespritelevel word, b y t e 1 , b y t e 2
.byte 0xa9
.2byte \ word
.byte \ byte1
.byte \ byte2
.endm
.macro createvsprite byte1 , b y t e 2 , w o r d1 , w o r d2 , b y t e 3 , b y t e 4
.byte 0xaa
.byte \ byte1
.byte \ byte2
.2byte \ word1
.2byte \ word2
.byte \ byte3
.byte \ byte4
.endm
.macro vspriteface byte1 , b y t e 2
.byte 0xab
.byte \ byte1
.byte \ byte2
.endm
2016-09-03 04:51:16 +02:00
@ Queues the opening of the door tile at (X, Y) with an animation.
2015-10-19 18:42:57 +02:00
.macro setdooropened X, Y
.byte 0xac
.2byte \ X
.2byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Queues the closing of the door tile at (X, Y) with an animation.
2015-10-19 18:42:57 +02:00
.macro setdoorclosed X, Y
.byte 0xad
.2byte \ X
.2byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Executes the state changes queued with setdooropened, setdoorclosed, setdooropened2, and setdoorclosed2.
2015-10-19 18:42:57 +02:00
.macro doorchange
.byte 0xae
.endm
2016-09-03 04:51:16 +02:00
@ Queues the opening of the door tile at (X, Y) without an animation.
2015-10-19 18:42:57 +02:00
.macro setdooropened2 X, Y
.byte 0xaf
.2byte \ X
.2byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Queues the closing of the door tile at (X, Y) without an animation.
2015-10-19 18:42:57 +02:00
.macro setdoorclosed2 X, Y
.byte 0xb0
.2byte \ X
.2byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro event_b1
.byte 0xb1
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro event_b2
.byte 0xb2
.endm
.macro checkcoins word
.byte 0xb3
.2byte \ word
.endm
.macro givecoins word
.byte 0xb4
.2byte \ word
.endm
.macro removecoins word
.byte 0xb5
.2byte \ word
.endm
2016-09-03 04:51:16 +02:00
@ Prepares to start a wild battle against a species at Level level holding item. Running this command will not affect normal wild battles. You start the prepared battle with dowildbattle.
2015-10-19 18:42:57 +02:00
.macro setwildbattle species, l e v e l , i t e m
.byte 0xb6
.2byte \ species
.byte \ level
.2byte \ item
.endm
2016-09-03 04:51:16 +02:00
@ Starts a wild battle against the Pokmon generated by setwildbattle. Blocks script execution until the battle finishes.
2015-10-19 18:42:57 +02:00
.macro dowildbattle
.byte 0xb7
.endm
.macro setvaddress long, w o r d
.byte 0xb8
.4byte \ long
.2byte \ word
.endm
.macro vjump pointer
.byte 0xb9
.4byte \ pointer
.endm
.macro vcall pointer
.byte 0xba
.4byte \ pointer
.endm
.macro if5 byte, p o i n t e r
.byte 0xbb
.byte \ byte
.4byte \ pointer
.endm
.macro if6 byte, p o i n t e r
.byte 0xbc
.byte \ byte
.4byte \ pointer
.endm
.macro vtext pointer
.byte 0xbd
.4byte \ pointer
.endm
.macro vloadptr pointer
.byte 0xbe
.4byte \ pointer
.endm
.macro vbuffer byte, p o i n t e r
.byte 0xbf
.byte \ byte
.4byte \ pointer
.endm
2016-09-03 04:51:16 +02:00
@ Spawns a secondary box showing how many Coins the player has.
2015-10-19 18:42:57 +02:00
.macro showcoins X, Y
.byte 0xc0
.byte \ X
.byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Hides the secondary box spawned by showcoins. It doesn't appear to use its arguments, but they are still required.
2015-10-19 18:42:57 +02:00
.macro hidecoins X, Y
.byte 0xc1
.byte \ X
.byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Updates the secondary box spawned by showcoins. (What does it do with its arguments?)
2015-10-19 18:42:57 +02:00
.macro updatecoins X, Y
.byte 0xc2
.byte \ X
.byte \ Y
.endm
2016-09-03 04:51:16 +02:00
@ Increases the value of the specified hidden variable by 1. The hidden variable's value will not be allowed to exceed 0x00FFFFFF.
2015-10-19 18:42:57 +02:00
.macro inccounter a
.byte 0xc3
.byte \ a
.endm
2016-09-03 04:51:16 +02:00
@ Clone of warp... Except that it doesn't appear to have any effect when used in some of FireRed's default level scripts. (If it did, Berry Forest would be impossible to enter...)
2015-10-19 18:42:57 +02:00
.macro warp6
.byte 0xc4
.endm
2016-09-03 04:51:16 +02:00
@ Blocks script execution until cry finishes.
2015-10-19 18:42:57 +02:00
.macro waitpokecry
.byte 0xc5
.endm
2016-09-03 04:51:16 +02:00
@ Writes the name of the specified (box) PC box to the specified buffer.
2015-10-19 18:42:57 +02:00
.macro bufferboxname out, b o x
.byte 0xc6
.byte \ out
.2byte \ box
.endm
2016-09-03 04:51:16 +02:00
@ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text, 0xFF resets the color to the default for the current OW's gender, and all other values produce black text.
2015-10-19 18:42:57 +02:00
.macro textcolor color
.byte 0xc7
.byte \ color
.endm
2016-09-03 04:51:16 +02:00
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of the screen when the Main Menu is opened.
2015-10-19 18:42:57 +02:00
.macro loadhelp pointer
.byte 0xc8
.4byte \ pointer
.endm
2016-09-03 04:51:16 +02:00
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of the screen when the Main Menu is opened.
2015-10-19 18:42:57 +02:00
.macro unloadhelp
.byte 0xc9
.endm
2016-09-03 04:51:16 +02:00
@ After using this command, all standard message boxes will use the signpost frame.
2015-10-19 18:42:57 +02:00
.macro signmsg
.byte 0xca
.endm
2016-09-03 04:51:16 +02:00
@ Ends the effects of signmsg, returning message box frames to normal.
2015-10-19 18:42:57 +02:00
.macro normalmsg
.byte 0xcb
.endm
2016-09-03 04:51:16 +02:00
@ Compares the value of a hidden variable to a dword.
2015-10-19 18:42:57 +02:00
.macro comparehiddenvar a, v a l u e
.byte 0xcc
.byte \ a
.4byte \ value
.endm
2016-09-03 04:51:16 +02:00
@ Makes the Pokmon in the specified slot of the player's party obedient. It will not randomly disobey orders in battle.
2015-10-19 18:42:57 +02:00
.macro setobedience slot
.byte 0xcd
.2byte \ slot
.endm
2016-09-03 04:51:16 +02:00
@ Checks if the Pokmon in the specified slot of the player's party is obedient. If the Pokmon is disobedient, 0x0001 is written to script variable 0x800D (LASTRESULT). If the Pokmon is obedient (or if the specified slot is empty or invalid), 0x0000 is written.
2015-10-19 18:42:57 +02:00
.macro checkobedience slot
.byte 0xce
.2byte \ slot
.endm
2016-09-03 04:51:16 +02:00
@ Depending on factors I haven't managed to understand yet, this command may cause script execution to jump to the offset specified by the pointer at 0x020370A4.
2015-10-19 18:42:57 +02:00
.macro execram
.byte 0xcf
.endm
2016-09-03 04:51:16 +02:00
@ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot.
2015-10-19 18:42:57 +02:00
.macro setworldflag worldmapflag
.byte 0xd0
.2byte \ worldmapflag
.endm
2016-09-03 04:51:16 +02:00
@ Clone of warpteleport? It is apparently only used in FR/LG, and only with specials.[source]
2015-10-19 18:42:57 +02:00
.macro warpteleport2
.byte 0xd1
.endm
2016-09-03 04:51:16 +02:00
@ Changes the location where the player caught the Pokmon in the specified slot of their party. A list of valid catch locations can be found on PokeCommunity.
2015-10-19 18:42:57 +02:00
.macro setcatchlocale slot, l o c a t i o n
.byte 0xd2
.2byte \ slot
.byte \ location
.endm
2016-09-03 04:51:16 +02:00
@ Sets variable 0x8004 to a value based on the width of the braille string at text.
2015-10-19 18:42:57 +02:00
.macro braille2 text
.byte 0xd3
.4byte \ text
.endm
2016-09-03 04:51:16 +02:00
@ Writes the name of the specified (item) item to the specified buffer. If the specified item is a Berry (0x85 - 0xAE) or Poke Ball (0x4) and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). If the specified item is the Enigma Berry, I have no idea what this command does (but testing showed no pluralization). If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead.
2015-10-19 18:42:57 +02:00
.macro storeitems out, i t e m , q u a n t i t y
.byte 0xd4
.byte \ out
.2byte \ item
.2byte \ quantity
.endm
2016-09-03 04:51:16 +02:00
@ In FireRed, this command is a nop.
2015-10-19 18:42:57 +02:00
.macro event_d5
.byte 0xd5
.endm
.macro event_d6
.byte 0xd6
.endm
.macro warp7 byte1 , b y t e 2 , b y t e 3 , w o r d1 , w o r d2
.byte 0xd7
.byte \ byte1
.byte \ byte2
.byte \ byte3
.2byte \ word1
.2byte \ word2
.endm
.macro event_d8
.byte 0xd8
.endm
.macro event_d9
.byte 0xd9
.endm
.macro hidebox2
.byte 0xda
.endm
.macro message3 pointer
.byte 0xdb
.4byte \ pointer
.endm
.macro fadescreen3 byte
.byte 0xdc
.byte \ byte
.endm
.macro buffertrainerclass byte, w o r d
.byte 0xdd
.byte \ byte
.2byte \ word
.endm
.macro buffertrainername byte, w o r d
.byte 0xde
.byte \ byte
.2byte \ word
.endm
.macro pokenavcall pointer
.byte 0xdf
.4byte \ pointer
.endm
.macro warp8 byte1 , b y t e 2 , b y t e 3 , w o r d1 , w o r d2
.byte 0xe0
.byte \ byte1
.byte \ byte2
.byte \ byte3
.2byte \ word1
.2byte \ word2
.endm
.macro buffercontesttype byte, w o r d
.byte 0xe1
.byte \ byte
.2byte \ word
.endm
2015-10-20 18:55:59 +02:00
.macro storeitems2 byte, w o r d1 , w o r d2
2015-10-19 18:42:57 +02:00
.byte 0xe2
.byte \ byte
.2byte \ word1
.2byte \ word2
.endm