For anyone that needed them(other than me)here are all of the Pokescript commands.
NOP
Does absolutely nothing
END
Ends the currently running script
RETURN
Returns to the previous script location after the use of CALL or GOSUB
IF <value> goto/call <pointer>
The if statement checks the value of the LASTRESULT variable, which is set by a compare statement or a statement like checkgender. After checking it will perform either a goto or a call function as described above. Alternately you can use the words JUMP and GOSUB
SETVAR <variable> <value>
Sets one of 60,000 odd system variables to a specific value. Can be used to refer to objects on the maps or for processing complex data.
COMPARE [CONSTRUCT]
In it's natural form it compares one of the system variables to any given value. The result is then placed at location &H800D (Defined as LASTRESULT) so you can look at it with the if statement.
It is also possible however to use the keywords var, byte, and farbyte to make comparisons between system variables, byte values and values at a specific pointer.
Therefore valid uses of this command are:
compare <variable> <value>
compare var <variable> var <variable>
compare var <variable> byte <value>
compare var <variable> farbyte <pointer>
compare farbyte <pointer> var <variable>
compare farbyte <pointer> byte <value>
compare farbyte <pointer> farbyte <pointer>
CALL <pointer>
Alias: GOSUB <pointer>
Executes a script at another location, returning to the original script when a RETURN command is called.
GOTO <pointer>
Alias: JUMP<pointer>
Causes script execution to continue at another location but cannot be returned from.
PAUSE <delay>
Pauses script execution to a number of seconds.
SETFLAG <index>
Sets one of 60,000 odd boolean flags that are stored in the players save game file. These can be used to make changes to the game or map that will be kept after the game is turned off.
CLEARFLAG <index>
Clears one of 60,000 odd boolean flags that are stored in the players save game file. These can be used to make changes to the game or map that will be kept after the game is turned off.
CHECKFLAG <index>
Checks the state of one of 60,000 odd Boolean flags that are stored in the players save game file. These can be used to make changes to the game or map that will be kept after the game is turned off.
MESSAGE <pointer>
Alias: msgbox <pointer>
Loads text from a location into memory for displaying on the screen. Usually followed by BOXSET.
BOXSET <type>
Alias: callstd <type>
Displays the text loaded by MSGBOX and updates the screen. Type of boxes are:
0 - 'Find Object'
1 - 'Obtained Object'
2 - 'Recieved Pokemon'
5 - 'Yes/No'
6 - Text Box
Pokemon Commands
These commands are specific to pokemon and the game of pokemon and may change between editions of the game.... Maybe.
JINGLE
Plays a sound effect
CHECKGENDER
Checks the gender of the player and puts the result in LASTRESULT
FACEPLAYER
If script called from an object/person on the map then it causes that person to face the player.
LOCK
If script called from an object/person on the map then it causes any movement for that person to halt.
RELEASE
If script called from an object/person on the map then it restore movement to that person after the use of LOCK.
CRY <bank> <Species>
Plays the cry of a specific pokemon. Mainly used for overworld pokemon.
WARP <map bank> <map no> <warp exit>
Causes the player to be transferred to a warp icon on a specific map.
CHECKITEM <item no>
Checks if an item is in the players inventory.
DELETEITEM <itemno> <count>
Removes x number of specified item.
GIVEITEM <Item> <count>
Gives the player x number of specified item.
APPLYMOVEMENT <sprite no> <Pointer>
Attached the movement data at the pointer location to a specific sprite on the calling map.
PAUSEMOVE <method>
Method is currently not been explored but with a value of 0 this will pause the script until all movement commands have been processed
TRAINERBATTLE <Type> <Trainer> (ptr Intro) <ptr Defeat>
Instigates a trainer battle with the three pointer being the challenge text, defeat text and rebattle text.
Known types are:
0 - Normal Battle
1 - Gym Battle
2 - Normal battle no logging
3 - Gym Battle No logging : Used for re-battle
4 - Dual Battles
5 - Rebattle.
COUNTPOKEMON
Deposits the number of pokemon in your party into address 0x8004. Can be checked with compare or used by namepokemon.
SELECTPOKEMON
Displays the 'Select Pokemon' Dialog and places the location of the selected pokemon in 0x8004.
GIVEPOKEMON <pokemon> <level> <item>
Gives the player a wild pokemon and registers it. Location in party of new pokemon placed in 0x8004
NAMEPOKEMON
Opens the rename dialog effecting the pokemon specified in address 0x8004
POKEMART <pointer>
Opens the pokemart menu using data at the given pointer.
WILDBATTLE <race> <level> <mode>
Cues a wild battle, useful for overworld pokemon such as legendary pokemon.
Mode indicates the appearance of the battle and must be a value between 1 and 4. If ommitted 1 will be used by default.
SETWEATHER <value>
Sets the current weather in preperation for doweather.
DOWEATHER
Causes the newly set weather to take effect.
System Commands
These commands perform graphics and audio effects and are not specific to the game.
FADESCREEN <mode>
Causes the screen to fade in or fade out according to a value (1 or 0)
FADEIN
Causes newly set music to fade into the foreground.
FADEOUT
Causes the currently playing music to fade into the default map music.
FANFARE <song number>
Plays backgroud music
WAITFANFARE <song number>
Waits for music triggered with Fanfare to stop playing
PLAYSOUND <song number>
Plays music.
FADESOUND <song number>
Fades from current song into another.
MOVESPRITE <sprite> <x> <y>
Causes the specified sprite to simply disappear then reappear elsewhere.
SETMAPTILE <x> <y> <tile no> <attributes>
Sets the tile at a position on the current map to a different value and state.
SPECIAL <command>
Calls a special script designed specifically for pokemon, such as the choose pokemon script.
SPECIAL1 <variable> <command>
Similar to SPECIAL but can return a value in the specified variable.
Advanced Commands
I strongly advise not fiddling with these commands. They are strictly for advanced users only and the practical uses of many of them are still questionable.
KILLSCRIPT
Removes a script from a script bank and clear all values, flags and script stuff.
LOADPOINTER <bank> <pointer>
Loads data from a location into a script bank. Can be used for a number of things, including displaying text.
COPYSCRIPTSBANK <bank1> <bank2>
Copy information from one script bank to another.
COPYBYTE <pointer> <pointer>
Copies a byte from location 1 to location 2
COPYVARIFNOTZERO <variable> <Variable>
Copies the data in system variable A to system Variable B
CALLASM <pointer>
Calls a non-standard system routine not represented in this command structure.
WRITEBYTETOOFFSET <byte> <pointer>
LOADBYTEFROMPOINTER <bank> <pointer>