Difference between revisions of "Version 2 Scripts"
SpartanW80 (talk | contribs) m (DammitDarkfire) |
|||
Line 44: | Line 44: | ||
|- | |- | ||
| .wild(int1,int2) | | .wild(int1,int2) | ||
| Starts a wild battle against the given | | Starts a wild battle against the given Pokemon. | ||
| int1 - The dex number of the | | int1 - The dex number of the Pokemon to battle.<br />int2 - The level of the Pokemon to battle.<br />The Pokemon can also be defined by inserting the [[Pokemon Code]] between the parentheses. | ||
|- | |- | ||
| .wildshiny(int1,int2) | | .wildshiny(int1,int2) | ||
| Starts a wild battle against a shiny version of the given | | Starts a wild battle against a shiny version of the given Pokemon. | ||
| Same as @battle.wild(). | | Same as @battle.wild(). | ||
|- | |- | ||
Line 336: | Line 336: | ||
|- | |- | ||
| .add(int1,int2,str1,int3,str2,bool,str3) | | .add(int1,int2,str1,int3,str2,bool,str3) | ||
| Adds the given | | Adds the given Pokemon to your party. Only the first 2 parameters are necessary. | ||
| int1 - | | int1 - Pokemon dex number.<br />int2 - Level<br />str1 - Catch Method(defaults to "random reason")<br />int3 - Catch Ball(defaults to Master Ball)<br />str2 - Catch Location(defaults to current location<br />bool - Isegg(defaults to 0(no))<br />str3 - Catch Trainer(defaults to <player.name>) | ||
|- | |- | ||
| .addattack(int1,int2) | | .addattack(int1,int2) | ||
Line 364: | Line 364: | ||
|- | |- | ||
| .cry(int) | | .cry(int) | ||
| Plays the cry of the selected | | Plays the cry of the selected Pokemon. | ||
| int - | | int - Pokemon dex number. | ||
|- | |- | ||
| .evolve(int) | | .evolve(int) | ||
Line 380: | Line 380: | ||
|- | |- | ||
| .hide | | .hide | ||
| Hides the overworld | | Hides the overworld Pokemon. | ||
| None | | None | ||
|- | |- | ||
Line 389: | Line 389: | ||
| .npctrade(int1<nowiki>|</nowiki>int2<nowiki>|</nowiki>int3<nowiki>|</nowiki>int4<nowiki>|</nowiki>intarr<nowiki>|</nowiki>bool<nowiki>|</nowiki>int5<nowiki>|</nowiki><br />str1<nowiki>|</nowiki>int6<nowiki>|</nowiki>int7<nowiki>|</nowiki>str2<nowiki>|</nowiki>str3<nowiki>|</nowiki>str4<nowiki>|</nowiki>str5<nowiki>|</nowiki>str6<nowiki>|</nowiki>str7) | | .npctrade(int1<nowiki>|</nowiki>int2<nowiki>|</nowiki>int3<nowiki>|</nowiki>int4<nowiki>|</nowiki>intarr<nowiki>|</nowiki>bool<nowiki>|</nowiki>int5<nowiki>|</nowiki><br />str1<nowiki>|</nowiki>int6<nowiki>|</nowiki>int7<nowiki>|</nowiki>str2<nowiki>|</nowiki>str3<nowiki>|</nowiki>str4<nowiki>|</nowiki>str5<nowiki>|</nowiki>str6<nowiki>|</nowiki>str7) | ||
| Creates a trade with an npc. | | Creates a trade with an npc. | ||
| int1 - | | int1 - Pokemon wanted by NPC.<br />int2 - Pokemon given by NPC.<br />int3(optional) - Level of Pokemon given by NPC. If blank defaults to own Pokemon's level.<br />int4 - Gender of given Pokemon. -1 = random, 0 = Male, 1 = female, 2 = genderless<br />intarr(optional) - Attack IDs for the given Pokemon.<br />bool(optional) - Defines shininess.<br />int5 - OT ID.<br />str1 - OT Name.<br />int6 - CatchBall.<br />int7(optional) - Held Item.<br />str2 - Catch Location.<br />str3 - CatchMethod<br />str4 - Nickname.<br />str5 - Accept trade message.<br />str6 - Reject trade message.<br />str7 - Register after trade. | ||
|- | |- | ||
| .read(int) | | .read(int) | ||
Line 405: | Line 405: | ||
| .rename(int) | | .rename(int) | ||
| Renames the given party member. | | Renames the given party member. | ||
| int - Party index(0-5).<br />May also be 'last' to choose the last | | int - Party index(0-5).<br />May also be 'last' to choose the last Pokemon in the party. | ||
|- | |- | ||
| .select | | .select | ||
| Opens the party menu to allow the player to choose a | | Opens the party menu to allow the player to choose a Pokemon.<br />Selection is returned with <Pokemon.selected>. | ||
| None | | None | ||
|- | |- | ||
| .selectmove(int) | | .selectmove(int) | ||
| Opens the attack menu to allow the player to choose an attack fromthe given party member.<br />Selection is returned with < | | Opens the attack menu to allow the player to choose an attack fromthe given party member.<br />Selection is returned with <Pokemon.selectedmove>. | ||
| int - Party index(0-5). | | int - Party index(0-5). | ||
|- | |- | ||
| .setadditionalvalue(int,str) | | .setadditionalvalue(int,str) | ||
| Changes the additional value of the given | | Changes the additional value of the given Pokemon. | ||
| int - Party index(0-5).<br />str - New additionalvalue. | | int - Party index(0-5).<br />str - New additionalvalue. | ||
|- | |- | ||
| .setfriendship(int1,int2) | | .setfriendship(int1,int2) | ||
| Changes the friendship value of the given | | Changes the friendship value of the given Pokemon. | ||
| int1 - Party index(0-5).<br />int2 - New friendship value. | | int1 - Party index(0-5).<br />int2 - New friendship value. | ||
|- | |- | ||
| .setnature(int1,int2) | | .setnature(int1,int2) | ||
| Changes the nature of the given | | Changes the nature of the given Pokemon. | ||
| int1 - Party index(0-5).<br />int2 - New Nature. | | int1 - Party index(0-5).<br />int2 - New Nature. | ||
|- | |- | ||
| .setnickname(int,str) | | .setnickname(int,str) | ||
| Changes the nickname of the given | | Changes the nickname of the given Pokemon. | ||
| int - Party index(0-5).<br />str - New Nickname. | | int - Party index(0-5).<br />str - New Nickname. | ||
|- | |- | ||
| .setshiny(int,bool) | | .setshiny(int,bool) | ||
| Changes the shininess of the given | | Changes the shininess of the given Pokemon. | ||
| int - Party index(0-5).<br />bool - Represtens the shininess. | | int - Party index(0-5).<br />bool - Represtens the shininess. | ||
|- | |- | ||
| .setstat(int1,str,int2) | | .setstat(int1,str,int2) | ||
| Changes the given stat of the given | | Changes the given stat of the given Pokemon. | ||
| int1 - Party index(0-5).<br />str - The stat to change. Possible inputs:<br />chp, maxhp, hp, atk, attack, def, defense, spatk, spattack, specialattack, spdef, spdefense, specialdefense, speed<br />int2 - New value for the stat. | | int1 - Party index(0-5).<br />str - The stat to change. Possible inputs:<br />chp, maxhp, hp, atk, attack, def, defense, spatk, spattack, specialattack, spdef, spdefense, specialdefense, speed<br />int2 - New value for the stat. | ||
|- | |- | ||
Line 492: | Line 492: | ||
|- | |- | ||
| .showPokemon(int,bool1,bool2) | | .showPokemon(int,bool1,bool2) | ||
| Displays a box and an image of the given | | Displays a box and an image of the given Pokemon. | ||
| int - A | | int - A Pokemon dex number.<br />bool1 - Determines if the Pokemon is shiny<br />bool2 - Determines if the front(1) or back(0) is shown. | ||
|- | |- | ||
| .storagesystem | | .storagesystem | ||
Line 545: | Line 545: | ||
| .set(str1,str2,str3) | | .set(str1,str2,str3) | ||
| Creates a storage with type of str 1, name of str2, and value of str3. | | Creates a storage with type of str 1, name of str2, and value of str3. | ||
| str1 - the type of value being stored(integer, string, | | str1 - the type of value being stored(integer, string, Pokemon, boolean, item)<br />str2 - The name of the Value.<br />str3 - The Value to be stored. | ||
|- | |- | ||
| colspan="3" | | | colspan="3" | | ||
Line 815: | Line 815: | ||
| .wildPokemongrass | | .wildPokemongrass | ||
| None | | None | ||
| A bool representing if the player can find | | A bool representing if the player can find Pokemon in the grass on the map. | ||
|- | |- | ||
| .wildPokemonwater | | .wildPokemonwater | ||
| None | | None | ||
| A bool representing if the player can find | | A bool representing if the player can find Pokemon in the water on the map. | ||
|- | |- | ||
| .wildPokemoneverywhere | | .wildPokemoneverywhere | ||
| None | | None | ||
| A bool representing if the player can find | | A bool representing if the player can find Pokemon on the map. | ||
|- | |- | ||
| .isdark | | .isdark | ||
Line 986: | Line 986: | ||
|- | |- | ||
| .additionaldata(int) | | .additionaldata(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the additionaldata of the given party member. | | Returns the additionaldata of the given party member. | ||
|- | |- | ||
| .atk(int) | | .atk(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the attack stat of the given party member. | | Returns the attack stat of the given party member. | ||
|- | |- | ||
| .attackname(int1,int2) | | .attackname(int1,int2) | ||
| int1 - Party index of a | | int1 - Party index of a Pokemon(0-5)<br />int2 - Attack index of a Pokemon's attack(0-3). | ||
| Returns the name of the given attack from the given party member. | | Returns the name of the given attack from the given party member. | ||
|- | |- | ||
| .catchball(int) | | .catchball(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the catchball of the given party member. | | Returns the catchball of the given party member. | ||
|- | |- | ||
| .catchlocation(int) | | .catchlocation(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the catchlocation of the given party member. | | Returns the catchlocation of the given party member. | ||
|- | |- | ||
| .catchmethod(int) | | .catchmethod(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the catchmethod of the given party member. | | Returns the catchmethod of the given party member. | ||
|- | |- | ||
| .count | | .count | ||
| None | | None | ||
| Returns the number of | | Returns the number of Pokemon in the party. | ||
|- | |- | ||
| .countattacks(int) | | .countattacks(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the number of attacks on the given party member. | | Returns the number of attacks on the given party member. | ||
|- | |- | ||
| .defense(int) | | .defense(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the defense stat of the given party member. | | Returns the defense stat of the given party member. | ||
|- | |- | ||
Line 1,026: | Line 1,026: | ||
|- | |- | ||
| .friendship(int) | | .friendship(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the friendship value of the given party member. | | Returns the friendship value of the given party member. | ||
|- | |- | ||
| .has(int) | | .has(int) | ||
| int - dex number of a | | int - dex number of a Pokemon | ||
| Returns a bool representing if the given | | Returns a bool representing if the given Pokemon is in the party. | ||
|- | |- | ||
| .hasattack(int1,int2) | | .hasattack(int1,int2) | ||
| int1 - Party index of a | | int1 - Party index of a Pokemon(0-5)<br />int2 - Attack index. | ||
| Returns a bool representing if the given party member has the given attack. | | Returns a bool representing if the given party member has the given attack. | ||
|- | |- | ||
Line 1,042: | Line 1,042: | ||
|- | |- | ||
| .hasfullhp(int) | | .hasfullhp(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns a bool representing if the given party member has full hp. | | Returns a bool representing if the given party member has full hp. | ||
|- | |- | ||
| .hp(int) | | .hp(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the current HP of the given party member. | | Returns the current HP of the given party member. | ||
|- | |- | ||
| .id(int) | | .id(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the dex number of the given party member | | Returns the dex number of the given party member | ||
|- | |- | ||
| .isegg(int) | | .isegg(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns a bool representing if the given party member is an egg. | | Returns a bool representing if the given party member is an egg. | ||
|- | |- | ||
| .islegendary(int) | | .islegendary(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns a bool representing if the given party member is a legendary. | | Returns a bool representing if the given party member is a legendary. | ||
|- | |- | ||
| .isshiny(int) | | .isshiny(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns a bool representing if the given party member is shiny. | | Returns a bool representing if the given party member is shiny. | ||
|- | |- | ||
| .item(int) | | .item(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the name of the item held by the given party member. | | Returns the name of the item held by the given party member. | ||
|- | |- | ||
| .itemid(int) | | .itemid(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the id of the item held by the given party member. | | Returns the id of the item held by the given party member. | ||
|- | |- | ||
| .itemname(int) | | .itemname(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the name of the item held by the given party member. | | Returns the name of the item held by the given party member. | ||
|- | |- | ||
| .level(int) | | .level(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the level of the given party member. | | Returns the level of the given party member. | ||
|- | |- | ||
| .maxhp(int) | | .maxhp(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the max HP of the given party member. | | Returns the max HP of the given party member. | ||
|- | |- | ||
| .maxpartylevel | | .maxpartylevel | ||
| None | | None | ||
| Returns the highest level of among the | | Returns the highest level of among the Pokemon in the player's party. | ||
|- | |- | ||
| .name(int) | | .name(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the name of the given party member. | | Returns the name of the given party member. | ||
|- | |- | ||
| .nature(int) | | .nature(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the nature of the given party member. | | Returns the nature of the given party member. | ||
|- | |- | ||
| .nickname(int) | | .nickname(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the nickname of the given party member. | | Returns the nickname of the given party member. | ||
|- | |- | ||
| .noPokemon | | .noPokemon | ||
| None | | None | ||
| Returns a bool representing if there are no | | Returns a bool representing if there are no Pokemon in the party. | ||
|- | |- | ||
| .number(int) | | .number(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the dex number of the given party member. | | Returns the dex number of the given party member. | ||
|- | |- | ||
| .ot(int) | | .ot(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the ot of the given party member. | | Returns the ot of the given party member. | ||
|- | |- | ||
| .ownPokemon(int) | | .ownPokemon(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns a bool representing if the given party member was caught by the current trainer. | | Returns a bool representing if the given party member was caught by the current trainer. | ||
|- | |- | ||
| .selected | | .selected | ||
| None | | None | ||
| Returns the Party index of the | | Returns the Party index of the Pokemon selected using @Pokemon.select. | ||
|- | |- | ||
| .selectedmove | | .selectedmove | ||
| None | | None | ||
| Returns the index of the | | Returns the index of the Pokemon's attack selected using @Pokemon.selectmove. | ||
|- | |- | ||
| .spatk(int) | | .spatk(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the spec. attack stat of the given party member. | | Returns the spec. attack stat of the given party member. | ||
|- | |- | ||
| .spdef(int) | | .spdef(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the spec. defense stat of the given party member. | | Returns the spec. defense stat of the given party member. | ||
|- | |- | ||
| .speed(int) | | .speed(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the speed stat of the given party member. | | Returns the speed stat of the given party member. | ||
|- | |- | ||
| .trainer(int) | | .trainer(int) | ||
| int - Party index of a | | int - Party index of a Pokemon(0-5) | ||
| Returns the catch trainer of the given party member. | | Returns the catch trainer of the given party member. | ||
|- | |- |
Revision as of 04:58, 16 July 2013
Version 2 scripts were started in version 0.32. Any script in Version 2 must have "version=2" as the first line of the script.
Commands are written as @command.subcommand and are no longer case sensitive. All commands require a subcommand.
Constructs were also expanded to be <construct.subconstruct> and can be used with switches to
Commands
Commands always have a subcommand. All combinations will be listed below.
The table is split into sections by Command.
* Unless otherwise specified a bool can be either 1(on) or 0(off).
** Unless otherwise specified X,Y,Z is a three dimensional position.
*** Unless otherwise specified tradeitem means an array defined as follows: {int1|int2|int3}
- int1 - Item ID.
- int2 - The price of the item. -1 uses the default.
- int3 - The amount of the item available for sale. -1 means infinite.
Subcommand | Job | Inputs |
---|---|---|
@Battle | ||
.resetvars | Resets the battle variables to default. | None |
.setvars(str,bool) | Changes the given variable to the given bool. | str - The variable to change. cancatch, canrun, canblackout int - The value to change the variable to. |
.starttrainer(str) | Starts a trainer battle. | str - The file path of the file to start. |
.trainer(str) | Starts a trainer battle without displaying intro message or checking the register. | str - The file path of the file to start. |
.wild(int1,int2) | Starts a wild battle against the given Pokemon. | int1 - The dex number of the Pokemon to battle. int2 - The level of the Pokemon to battle. The Pokemon can also be defined by inserting the Pokemon Code between the parentheses. |
.wildshiny(int1,int2) | Starts a wild battle against a shiny version of the given Pokemon. | Same as @battle.wild(). |
@Camera | ||
.activatethirdperson | Turns on third person. | None |
.deactivatethirdperson | Turns off third person. | None |
.reset | Sets the camera to its default location. | None |
.set(X,Y,Z,sng1,sng2) | Changes the position of the camera. | X,Y,Z - The new position of the camera. sng1 - The new yaw of the camera. sng2 - The new pitch of the camera. |
.setpitch(sng) | Change the pitch of the camera. | sng - The value to make the pitch. |
.setposition(X,Y,Z) | Changes the position of the camera. | X,Y,Z - The new position for the camera. |
.setx(sng) | Change the X-coordinate of the camera. | sng - The value to make the X-coordinate. |
.sety(sng) | Change the Y-coordinate of the camera. | sng - The value to make the Y-coordinate. |
.setyaw(sng) | Change the yaw of the camera. | sng - The value to make the yaw. |
.setz(sng) | Change the Z-coordinate of the camera. | sng - The value to make the Z-coordinate. |
.togglethirdperson | Switch the camera mode. | None |
@Entity | ||
.remove(int) | Removes the given entity. | int - ID of an entity on the map. |
.setadditionalvalue(int,str) | Changes the additionalvalue of the given entity to the given value. | int - ID of an entity on the map. str - The value to change the additionalvalue to. |
.setcollision(int,bool) | Changes the collision of the given entity to the given bool. | int - ID of an entity on the map. bool - The value to change the collision to. |
.setid(int1,int2) | Changes the ID of the given entity. | int1 - ID of an entity on the map. int2 - The new ID for the entity. |
.setopacity(int1,int2) | Changes the opacity of the given entity to the given value. | int1 - ID of an entity on the map. int2 - The opacity to set the entity to. |
.setscale(int,X,Y,Z) | Changes the scale of the given entity to the given value. | int1 - ID of an entity on the map. X,Y,Z - The value to change the scale to. |
.setvisible(int,bool) | Changes the visibility of the given entity to the given bool. | int - ID of an entity on the map. bool - The value to change the visibility to. |
.showmessagebulb(int|X|Y|Z) | Displays the given message bulb at the given position | int - The type of messagebulb to display. 0=..., 1=!, 2=>:(, 3=?, 4=music note, 5=heart, 6=:(, 7=Pokéball, 8=:D, 9=:) X|Y|Z - The position of the messagebulb. |
.warp(int,X,Y,Z) | Warps the given entity to the given position. | int1 - ID of an entity on the map. X,Y,Z - The new position. |
@Environment | ||
.setcandig(bool) | Changes the candig option for the map to 'bool'. | bool - A bool for candig. |
.setcanfly(bool) | Changes the canfly option for the map to 'bool'. | bool - A bool for canfly. |
.setcanteleport(bool) | Changes the canteleportoption for the map to 'bool'. | bool - A bool for canteleport. |
.setisdark(bool) | Changes the isdark option for the map to 'bool'. | bool - A bool for isdark. |
.setregionweather(int) | Changes the random weather for all of the maps to the given weather. | int - Clear=0, Rain=1, Snow=2, Underwater=3, Sunny=4, Fog=5, Sandstorm=6 |
.setrenderdistance(int\str) | Sets the render distance to the int or str given.) | int - 0-4 str - tiny, small, normal, far, or extreme. |
.setweather(int) | Changes the weather for the map to the given weather. | int - Clear=0, Rain=1, Snow=2, Underwater=3, Sunny=4, Fog=5, Sandstorm=6 |
.setwildPokemoneverywhere(bool) | Turns wild encounters on\off. | bool - A bool for wild encounters. |
.setwildPokemongrass(bool) | Turns wild encounters on\off for grass. | bool - A bool for wild encounters. |
.setwildPokemonwater(bool) | Turns wild encounters on\off for water. | bool - A bool for wild encounters. |
.toggledarkness | Changes the darkness to whatever it isn't. | None |
@Item | ||
.give(int1,int2) | Gives int2 number of int1 items. | int1 - The ID of the item to give. int2 - The amount of the item to give. If not defined it is 1. |
.messagegive(int1,int2) | Displays the message for what @item.give() did. | int1 - The ID of the item to give. int2 - The amount of the item to give. If not defined it is 1. |
.remove(int1,int2) | Removes int2 number of int1 items. | int1 - The ID of the item to remove. int2 - The amount of the item to remove. Must be defined. |
.repel(int) | Adds repel steps based on the item ID of the repel | int - The item ID of a repel. 20 = 100 steps, 42 = 200 steps, 43 = 250 steps |
@Level | ||
.update | Reloads the current map. | None |
.wait(int) | Waits at that command for a given amount of time. | int - Time to wait in hundredths of a second. |
@Music | ||
.play(str) | Plays song 'str' until the song is changed by another script or a new map. | str - The song file to play. |
.setmusicloop(str) | Makes song 'str' the map's song until the player leaves the map or this command is used again. | str - Song file to play. |
@NPC | ||
.move(int1,int2) | Moves the given NPC the given amount of steps. | int1 - The ID of an NPC on the map. int2 - The amount of steps for the NPC to move. |
.position(int,X,Y,Z) | Warps the NPC to the given position. | int - The ID of an NPC on the map. X,Y,Z - The new position. |
.register(str) | Creates a register in the NPC register file of the save. | 0|remove|0) |
.remove(int) | Removes the given NPC from the map. | int - The ID of an NPC on the map. |
.spawn(X,Y,Z,int1,str1,str2,bool,int2,str3,int3,str4) | Creates a new NPC. | X,Y,Z - The position of the new NPC. int1 - The action value of the new NPC. str1 - The additionalvalue of the new NPC. str2 - The skin of the new NPC. bool - The animateidle value of the new NPC. int2 - The rotation of the new NPC. str3 - The Name of the new NPC. int3 - The ID of the new NPC. str4 - The movement type of the new NPC. |
.turn(int1,int2) | Turns the given NPc in the given direction. | int1 - The ID of an NPC on the map. int2 - The direction for the NPC to turn to. |
.unregister(str) | Removes a register in the NPC register file of the save. | 0|remove|0) |
.warp(int,X,Y,Z) | Warps the NPC to the given position. | int - The ID of an NPC on the map. X,Y,Z - The new position. |
.wearskin(int,str) | Changes the skin an NPC is using. | int - The ID of an NPC on the map. str - The name of the skin to change it to. |
@Player | ||
.achieveemblem(str) | Awards the player an emblem. | str - Emblem name. |
.addbp(int) | Give the player Battle Points. | int - Amount of Battle Points to give. |
.getbadge(int) | Given the player the given badge. | int - The badge to give(zephyr=9). |
.hiderod | Removes the fishing rod if activated. | None |
.money(int) | Gives player money. | int - Money to add. |
.move(int) | Moves the player the given number of steps | int - Steps to move |
.receivepokedex | Gives the player the pokedex. | None |
.renamerival | Allows the player to rename their rival. | None |
.showrod | Shows the fishing rod. | None |
.stopmovement | Stops the player. | None |
.turn(int) | Turns the player the given number of rotations. | int - The number of rotations to turn. |
.turnto(int) | Turns the player to the given rotation. | int - The rotation to turn to. |
.warp(str,X,Y,Z,int) | Warps the player. | str(optional) - Map destination file. X,Y,Z - The new position. int - Turns from start. |
.wearskin(str) | Changes the player's skin. | str - Skin to change to. |
@Pokemon | ||
.add(int1,int2,str1,int3,str2,bool,str3) | Adds the given Pokemon to your party. Only the first 2 parameters are necessary. | int1 - Pokemon dex number. int2 - Level str1 - Catch Method(defaults to "random reason") int3 - Catch Ball(defaults to Master Ball) str2 - Catch Location(defaults to current location bool - Isegg(defaults to 0(no)) str3 - Catch Trainer(defaults to <player.name>) |
.addattack(int1,int2) | Adds the given attack to the given party member. | int1 - Party index(0-5). int2 - Attack ID(1-562) |
.addfriendship(int1,int2) | Adds the given amount of friendship to the given party member. | int1 - Party index(0-5). int2 - Amount of friendship to add. |
.calcstats(int) | Recalculates the stats of the given party member. | int - Party index(0-5). |
.changelevel(int1,int2) | Changes the level of the given party member. | int1 - Party index(0-5). int2 - Level to change to. |
.clear | Resets the party. | None |
.clearattacks(int) | Clears the attacks from the selected party member. | int - Party index(0-5). |
.cry(int) | Plays the cry of the selected Pokemon. | int - Pokemon dex number. |
.evolve(int) | Evolves the given party member. | int - Party index(0-5). |
.gainexp(int1,int2) | Adds exp to the given party member. | int - Party index(0-5). |
.heal | Heals the party | None |
.hide | Hides the overworld Pokemon. | None |
.learnattack(int1,int2) | Allows the player to teach the given attack to the given party member. | int1 - Party index(0-5). int2 - Attack ID |
.npctrade(int1|int2|int3|int4|intarr|bool|int5| str1|int6|int7|str2|str3|str4|str5|str6|str7) |
Creates a trade with an npc. | int1 - Pokemon wanted by NPC. int2 - Pokemon given by NPC. int3(optional) - Level of Pokemon given by NPC. If blank defaults to own Pokemon's level. int4 - Gender of given Pokemon. -1 = random, 0 = Male, 1 = female, 2 = genderless intarr(optional) - Attack IDs for the given Pokemon. bool(optional) - Defines shininess. int5 - OT ID. str1 - OT Name. int6 - CatchBall. int7(optional) - Held Item. str2 - Catch Location. str3 - CatchMethod str4 - Nickname. str5 - Accept trade message. str6 - Reject trade message. str7 - Register after trade. |
.read(int) | Determines which stat has more EVs. | int - Party index(0-5). |
.remove(int) | Removes the given party member. | int - Party index(0-5). |
.removeattack(int1,int2) | Removes given attack from the given party member. | int1 - Party index(0-5). int2 - Attack ID. |
.rename(int) | Renames the given party member. | int - Party index(0-5). May also be 'last' to choose the last Pokemon in the party. |
.select | Opens the party menu to allow the player to choose a Pokemon. Selection is returned with <Pokemon.selected>. |
None |
.selectmove(int) | Opens the attack menu to allow the player to choose an attack fromthe given party member. Selection is returned with <Pokemon.selectedmove>. |
int - Party index(0-5). |
.setadditionalvalue(int,str) | Changes the additional value of the given Pokemon. | int - Party index(0-5). str - New additionalvalue. |
.setfriendship(int1,int2) | Changes the friendship value of the given Pokemon. | int1 - Party index(0-5). int2 - New friendship value. |
.setnature(int1,int2) | Changes the nature of the given Pokemon. | int1 - Party index(0-5). int2 - New Nature. |
.setnickname(int,str) | Changes the nickname of the given Pokemon. | int - Party index(0-5). str - New Nickname. |
.setshiny(int,bool) | Changes the shininess of the given Pokemon. | int - Party index(0-5). bool - Represtens the shininess. |
.setstat(int1,str,int2) | Changes the given stat of the given Pokemon. | int1 - Party index(0-5). str - The stat to change. Possible inputs: chp, maxhp, hp, atk, attack, def, defense, spatk, spattack, specialattack, spdef, spdefense, specialdefense, speed int2 - New value for the stat. |
@Register | ||
.register(str) | Registers str in the register file of the save. | str - the string to register |
.unregister(str) | Unregisters str from the register file of the save. | str - the string to unregister |
@Screen | ||
.apricornkurt | Displays the apricorn selection screen. | None |
.blackout | Displays the team was defeated message. | None |
.daycare(int1,int2) | Opens the daycare. | int1 - Daycare to open. int2 - Number of possible slots in the daycare. |
.donation | Displays the list of donators. | None |
.fadein | Fades the screen in from black. | None |
.fadeout | Fades the screen out to black. | None |
.friendhub | Activates the Friend Hub. | None |
.gamejoltlogin | Allows the player to login to gamejolt. | None |
.network | Allows the player to connect to a local network for co-op. | None |
.showPokemon(int,bool1,bool2) | Displays a box and an image of the given Pokemon. | int - A Pokemon dex number. bool1 - Determines if the Pokemon is shiny bool2 - Determines if the front(1) or back(0) is shown. |
.storagesystem | Opens Bill's PC. | None |
.townmap(str) | Opens the given townmap(s) | str - Name of map(s) to view separated by comas. |
.trade(tradeitems,bool1,bool2) | Opens a store with the given items. | tradeitems - A list of tradeitems as defined before this table. bool1 - Allows the player to buy items from this store. bool2 - Allows the player to sell items to this store. |
.globalhub | Activates the Global Hub. | None |
@Script | ||
.run(str) | Does the given commands. | str - Contains the commands to execute. |
.start(str) | Starts the given script. | The file name of the script to start. |
.text(str) | Displays the given text. | str - The text to display. |
@Sound | ||
.play(str) | Play sound str. | str - the sound to play. |
@Storage | ||
.clear | Clears all stored values. | None |
.set(str1,str2,str3) | Creates a storage with type of str 1, name of str2, and value of str3. | str1 - the type of value being stored(integer, string, Pokemon, boolean, item) str2 - The name of the Value. str3 - The Value to be stored. |
@Text | ||
.show(str) | Displays str | str - The text to display. |
@Value | ||
.add(str,int) | Adds int to valuse str. | str - The value to be added to. int - The amount to add to the value. |
.change(str1,str2) | Changes the contents of value str1 to str2. | str1 - The value to be changed. str2 - the content replacing the contents of str1. |
.create(str1,str2) | Create value str1 with contents str2. | str1 - Name of value to be created. str2 - Contents of value to be created. |
.delete(str) | Delete the named value. | str - The name of the value to delete. |
Switches
Switches do a comparison between a given parameter and a construct. Examples:
:if:<Pokemon.level(int)>>3 :if:<register.registered(str)>=true
switches may use multiple parameter as well by using <and> and <or> Examples:
:if:<Pokemon.level(int)><3 <and> <register.registered(str)>=true :if:<Pokemon.level(int)>>=3 <or> <register.registered(str)>=false
:if:
:if: switches start with the line containing
:if:
the next line that follows must be
:then
to switch to the opposite of the condition use, the else statement is not necessary.
:else
to end an if statement use:
:endif
here is an example of the basic layout:
:if:conditions :then scripts to execute if conditions are met. :else scripts to execute if conditions are not met. :endif
:select:
:select: switches begin with a select statement and a condition
:select:<player.position>
- when: is used to switch the script, if the value(s) after the :when: match those returned by the construct it will execute the scripts after it
:when:0,0,0
to end a select statement use
:endwhen
Example:
:select:condition :when:value1 Scripts to execute if value1=condition. :when:value2 Scripts to execute if value2=condition. :endwhen
@options.show()
@options.show(str,str,...) displays up to 10 options at a time for the player to choose from. :when:, and :endwhen are used here similarly to the way they are used in select Example:
@options.show(Yes,No) :when:Yes Scripts to execte when the layer chooses Yes. :when:No Scripts to execte when the layer chooses No. :endwhen
if a choice is not given a coinciding :when: then it will simply skip to the :endwhen
:end
:end is used to end the script.
If an executing script comes to :end the script will cease to execute and control will be returned to the player. Example:
version=2 :if:register.registered(str1)>=true :then :end :endif @text.show(str2) @register.register(str1) :end
In the example above, the player will activate the script without registering str1, so the script will skip past :endif, display str2, register str1, and then end. The next time the player activates the script, str1 will be registered, so the script will begin executing the :if: statement. This will end the script without displaying str2 or registering str1.
If a script does not reach an :end, it will continue looping through itself until it does.
Constructs
Constructs can be used in place of any parameter for command and are used with :if: and :select: statements.
They can even be used in trainer files. Constructs always have a subconstruct. All combinations will be listed below.
Constructs that return numbers such as <Pokemon.level(int)> may be used in math mathematical functions including:
- +: Addition
- -: Subtraction
- /: Division
- *: Multiplication
- ^: Exponent
- %: Percent
- =: Equals
- >: Greater Than
- <: Less Than
- m: Mod (ex. 25m4=1)
- r: Root(ex. 27r3=3)
The table is split into sections by Construct.
* Unless otherwise specified X,Y,Z is a three dimensional position.
** Unless otherwise specified bool is either true or false.
Sub-construct | Inputs | Output |
---|---|---|
Entity | ||
.additionalvalue(int) | int - an Entity ID | The contents of the additionalValue of the given entity. |
.collision(int) | int - an Entity ID | A bool representing the collision of the given entity. |
.opacity(int) | int - an Entity ID | An int representing the percent see through the given entity is. |
.position(int) | int - an Entity ID | The X,Y,Z position of the given entity. |
.scale(int) | int - an Entity ID | The X,Y,Z scale of the given entity |
.visible(int) | int - an Entity ID | A bool representing the visibility of the given entity. |
Environment | ||
.daytime | None | night, morning, day, or evening |
.daytimeid | None | The ID for the time of day. night=0, morning=1, day=2, or evening=3 |
.season | None | winter, spring, summer, or fall |
.seasonid | None | The ID for the season. winter=0, spring=1, summer=2, or fall=3 |
.day | None | Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, or Saturday |
.dayinformation | None | day,daytime |
.week | None | The current week in the year. |
.year | None | The current year(e.g. 2013) |
.weather | None | Returns the Weather effecting the current map. Clear, Rain, Snow, Underwater, Sunny, Fog , Sandstorm |
.mapweather | None | Same as .weather. |
.currentmapweather | None | Same as .weather. |
.regionweather | None | Returns the random weather effecting the whole area. Uses the same names as .weather. |
.weatherid | None | Returns the ID of the Weather effecting the current map. Clear=0, Rain=1, Snow=2, Underwater=3, Sunny=4, Fog=5, Sandstorm=6 |
.mapweatherid | None | Same as .weatherid. |
.currentmapweatherid | None | Same as .weatherid. |
.regionweatherid | None | Returns the ID of random weather effecting the whole area. Uses the same IDs as .weatherid. |
.canfly | None | A bool representing if the player can fly from the map. |
.canteleport | None | A bool representing if the player can teleport from the map. |
.candig | None | A bool representing if the player can dig from the map. |
.wildPokemongrass | None | A bool representing if the player can find Pokemon in the grass on the map. |
.wildPokemonwater | None | A bool representing if the player can find Pokemon in the water on the map. |
.wildPokemoneverywhere | None | A bool representing if the player can find Pokemon on the map. |
.isdark | None | A bool representing the darkness of the map. |
Inventory | ||
.countitem(int) | int- Item ID. | The amount of the given item in the bag. |
.countitems | None | The number of Items in the bag. |
.name(int) | int- Item ID. | The name of the given item. |
Level | ||
.mapfile | None | Returns the file path of the current map relative to the maps folder. |
.levelfile | None | Same as .mapfile. |
.filename | None | Returns the name of the current map file without extension. |
NPC | ||
.action(int) | int - ID of an NPC on the map. | Returns the action value of the given NPC. |
.additionaldata(int) | int - ID of an NPC on the map. | Returns the additionaldata of the given NPC. |
.exists(int) | int - ID of an NPC on the map. | Checks if there is an NPC on the map with that ID. |
.facing(int) | None | Returns the ID of the direction the player is facing. |
.hasmoverectangles(int) | int - ID of an NPC on the map. | Returns a bool reflecting if the given NPC has moverectangles assigned. |
.id(int) | int - ID of an NPC on the map. | Returns the ID of the given NPC. |
.ismoving | int - ID of an NPC on the map. | Returns a bool representing if the player is moving or not. |
.moved(int) | int - ID of an NPC on the map. | Returns the distance moved by that NPC. |
.movement(int) | int - ID of an NPC on the map. | Returns the type of movement used by the given NPC. |
.name(int) | int - ID of an NPC on the map. | Returns the name of the given NPC. |
.position(int) | int - ID of an NPC on the map. | Returns the position of the given NPC. |
.skin(int) | int - ID of an NPC on the map. | Returns the name of the skin used by the given NPC. |
Phone | ||
.callflag | None | Returns calling if you are calling or receiving if someone is calling you. |
.got | None | A bool representing if the player has received the Phone. |
Player | ||
.badges | None | Returns the number of badges obtained. |
.bp | None | Returns the amount of battle points the player has. |
.compass | None | Returns the name of the direction the player is facing. |
.facing | None | Returns the ID of the direction the player is facing. |
.gender | None | Returns 1 if male, 0 if Female. |
.ismoving | None | Returns a bool representing if the player is moving or not. |
.hasbadge(int) | int - A badge ID. | Returns a bool representing if the player has that badge. |
.money | None | Returns the amount of money the player has. |
.name | None | Returns the name of the player. |
.position | None | Returns the player's position. |
.skin | None | Returns the name of the skin used by the player. |
.thirdperson | None | Returns a bool representing if third person mode is on. |
.velocity | None | Returns the velocity of the player. |
Pokemon | ||
.additionaldata(int) | int - Party index of a Pokemon(0-5) | Returns the additionaldata of the given party member. |
.atk(int) | int - Party index of a Pokemon(0-5) | Returns the attack stat of the given party member. |
.attackname(int1,int2) | int1 - Party index of a Pokemon(0-5) int2 - Attack index of a Pokemon's attack(0-3). |
Returns the name of the given attack from the given party member. |
.catchball(int) | int - Party index of a Pokemon(0-5) | Returns the catchball of the given party member. |
.catchlocation(int) | int - Party index of a Pokemon(0-5) | Returns the catchlocation of the given party member. |
.catchmethod(int) | int - Party index of a Pokemon(0-5) | Returns the catchmethod of the given party member. |
.count | None | Returns the number of Pokemon in the party. |
.countattacks(int) | int - Party index of a Pokemon(0-5) | Returns the number of attacks on the given party member. |
.defense(int) | int - Party index of a Pokemon(0-5) | Returns the defense stat of the given party member. |
.freeplaceinparty | None | Returns a bool representing if there is an empty slot in the party. |
.friendship(int) | int - Party index of a Pokemon(0-5) | Returns the friendship value of the given party member. |
.has(int) | int - dex number of a Pokemon | Returns a bool representing if the given Pokemon is in the party. |
.hasattack(int1,int2) | int1 - Party index of a Pokemon(0-5) int2 - Attack index. |
Returns a bool representing if the given party member has the given attack. |
.hasegg | None | Returns a bool representing if there is an egg in the party. |
.hasfullhp(int) | int - Party index of a Pokemon(0-5) | Returns a bool representing if the given party member has full hp. |
.hp(int) | int - Party index of a Pokemon(0-5) | Returns the current HP of the given party member. |
.id(int) | int - Party index of a Pokemon(0-5) | Returns the dex number of the given party member |
.isegg(int) | int - Party index of a Pokemon(0-5) | Returns a bool representing if the given party member is an egg. |
.islegendary(int) | int - Party index of a Pokemon(0-5) | Returns a bool representing if the given party member is a legendary. |
.isshiny(int) | int - Party index of a Pokemon(0-5) | Returns a bool representing if the given party member is shiny. |
.item(int) | int - Party index of a Pokemon(0-5) | Returns the name of the item held by the given party member. |
.itemid(int) | int - Party index of a Pokemon(0-5) | Returns the id of the item held by the given party member. |
.itemname(int) | int - Party index of a Pokemon(0-5) | Returns the name of the item held by the given party member. |
.level(int) | int - Party index of a Pokemon(0-5) | Returns the level of the given party member. |
.maxhp(int) | int - Party index of a Pokemon(0-5) | Returns the max HP of the given party member. |
.maxpartylevel | None | Returns the highest level of among the Pokemon in the player's party. |
.name(int) | int - Party index of a Pokemon(0-5) | Returns the name of the given party member. |
.nature(int) | int - Party index of a Pokemon(0-5) | Returns the nature of the given party member. |
.nickname(int) | int - Party index of a Pokemon(0-5) | Returns the nickname of the given party member. |
.noPokemon | None | Returns a bool representing if there are no Pokemon in the party. |
.number(int) | int - Party index of a Pokemon(0-5) | Returns the dex number of the given party member. |
.ot(int) | int - Party index of a Pokemon(0-5) | Returns the ot of the given party member. |
.ownPokemon(int) | int - Party index of a Pokemon(0-5) | Returns a bool representing if the given party member was caught by the current trainer. |
.selected | None | Returns the Party index of the Pokemon selected using @Pokemon.select. |
.selectedmove | None | Returns the index of the Pokemon's attack selected using @Pokemon.selectmove. |
.spatk(int) | int - Party index of a Pokemon(0-5) | Returns the spec. attack stat of the given party member. |
.spdef(int) | int - Party index of a Pokemon(0-5) | Returns the spec. defense stat of the given party member. |
.speed(int) | int - Party index of a Pokemon(0-5) | Returns the speed stat of the given party member. |
.trainer(int) | int - Party index of a Pokemon(0-5) | Returns the catch trainer of the given party member. |
Register | ||
.count | None | Returns the number of registers. |
.registered(str) | str - A register string. | A bool representing if the string has been registered. |
Storage | ||
.count(str) | str1 - The type of values to count(integer, string, Pokemon, boolean, item). Does not need to be defined. |
Returns the number of different stored values of that type. If str is not defined then it returns a count of all types. |
.get(str1,str2) | str1 - The type of value is stored(integer, string, Pokemon, boolean, item). str2 - the name of the stored value. |
Returns the value stored as str2. |
System | ||
.booltoint(str) | Either "true", "false", or a construct that returns one of those. | Returns 0 for false and 1 for true. |
.calcint(str) | A str representing an integer, or a Construct that returns one. | Returns the str as an integer. |
.calcsng(str) | A str representing a single, or a Construct that returns one. | Returns the str as a single. (A single is a number that is a decimal) |
.dayofyear | None | Returns the day of the year as a number. |
.random(int1,int2) | int1 - If it is the only argument then it is the max of the range, otherwise it is the min. int2 - The max of the range. Does not need to be defined. |
Returns a random integer between the int1 and int2 if both are defined. If int2 is not defined then it chooses from between 1 and int1.(Ranges are inclusive) |
.unixtimestamp | None | Returns the Unix time stamp. (See here for more details.) |
.year | None | Returns the current year. |
Value | ||
.get(str) | str - The name of the stored value. | Returns the value stored as str. |
Game Folder | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Content | ContentPacks | GameModes | Saves | Screenshots | Game Executable | ||||||||||||
Pokemon | Data | ContentPack Folder | GameMode folder | Savegame folder | Version History | ||||||||||||
Data | Maps | Moves | Scripts | Control Files | Content | GameMode.dat | Party.dat | Player.dat | Options.dat | ||||||||
poke | battle | structures | V1 | V2 | trainer | worldmap |