Difference between revisions of "Version 2 Scripts New"
Jianmingyong (talk | contribs) |
Jianmingyong (talk | contribs) m (→@Battle) |
||
| Line 48: | Line 48: | ||
{{ScriptCommandV2|Battle|trainer|{{ScriptArgumentV2|trainerFile|Str|1|False||}}|Initializes a trainer battle.|{{ScriptArgumentV2|trainerFile|Str|1|False||Input}}|False}} | {{ScriptCommandV2|Battle|trainer|{{ScriptArgumentV2|trainerFile|Str|1|False||}}|Initializes a trainer battle.|{{ScriptArgumentV2|trainerFile|Str|1|False||Input}}|False}} | ||
{{ScriptCommandV2|Battle|wild|{{ScriptArgumentV2|pokemonData|PokemonData|1|False||}},{{ScriptArgumentV2|musicloop|Str|1|True||}} | {{ScriptCommandV2|Battle|wild|{{ScriptArgumentV2|pokemonData|PokemonData|1|False||}},{{ScriptArgumentV2|musicloop|Str|1|True||}} OR {{ScriptArgumentV2|pokemonID|Int|1|False||}},{{ScriptArgumentV2|level|Int|2|False||}},{{ScriptArgumentV2|shiny|Int|3|True|-1|}},{{ScriptArgumentV2|musicloop|Str|1|True||}},{{ScriptArgumentV2|introtype|Int|4|True|0-10|}}|Initializes the battle with a wild Pokémon.|{{ScriptArgumentV2|pokemonData|PokemonData|1|False||Input}}<br />{{ScriptArgumentV2|musicloop|Str|1|True||Input}}<br />{{ScriptArgumentV2|pokemonID|Int|1|False||Input}}<br />{{ScriptArgumentV2|level|Int|2|False||Input}}<br />{{ScriptArgumentV2|shiny|Int|3|True|-1|Input}}<br />{{ScriptArgumentV2|introtype|Int|4|True|0-10|Input}}|False}} | ||
{{ScriptCommandV2|Battle|setvar|{{ScriptArgumentV2|varName|Str|1|False||}},{{ScriptArgumentV2|varValue|Str|2|False||}}|Sets a battle value.|{{ScriptArgumentV2|varName|Str|1|False||Input}}<br />{{ScriptArgumentV2|varValue|Str|2|False||Input}}|False}} | {{ScriptCommandV2|Battle|setvar|{{ScriptArgumentV2|varName|Str|1|False||}},{{ScriptArgumentV2|varValue|Str|2|False||}}|Sets a battle value.|{{ScriptArgumentV2|varName|Str|1|False||Input}}<br />{{ScriptArgumentV2|varValue|Str|2|False||Input}}|False}} | ||
}} | }} | ||
=== @Camera === | === @Camera === | ||
Revision as of 10:09, 5 July 2014
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 are written as <construct.subconstruct> and can be used basically everywhere except itself.
A General Note to all GameMode Scripters ( Must Read )
- This list is currently updated as of v0.49.1 Script Library.
- This list is the same as what you can see when typing @help(command). This will avoid too many typo error.
- Please do not blame darkfire as he is not the one who make the new design on this page :D ( Lets blame him somewhere else. )
- Also if you are a GameMode Scripter or trying to be one, you are recommended to download Notepad++ with our special syntax highlighter for checking typo mistake.
- There might be some missing command from the old page as well as the new page. You might want to refer both :)
Important info / defination of certain things before we get started.
By Default, the Argument Types are:
- Str ( Str are define as letters or symbols )
- Int ( Int are define as Integer numbers )
- Sng ( Sng are define as Real numbers )
- ItemCollection ( ItemCollection are define as {itemID|amount|price} )
- Bool ( Bool are define as words such as True, False )
- Rec
- IntArr ( IntArr are define as an array of Integer numbers )
- StrArr ( StrArr are define as an array of letters or symbols )
- SngArr ( SngArr are define as an array of Real numbers )
- BoolArr ( BoolArr are define as an array of words such as True, False )
- PokemonData ( PokemonData are define as Pokemon Code )
- Arr ( Arr are define as an array of something. )
For any Optional Argument, it will be engrave by a individual square bracket for example "[Str1],[Str2],[Str3],..."
For any Rec/Arr Argument, it will be engrave by a grouped square bracket for example "[Str1,Int2,Int3,Int4,Int5],Int6..."
For any Multiple Argument ( Either or ), it will be engrave by a grouped curly bracket for example "EITHER {Str1,Int2,Int3,Int4,Int5} OR {Str1,Int2,Int3}"
Commands
Commands are scripts that tells the game what to do. It comes with @ and usually used with switches.
The table below is split into sections by Command.
You may use the sort feature to make it list according to alphanumeric order.
@Battle
|
@Camera
|
@Chat
|
@Daycare
|
@Entity
|
Constructs
Constructs are script that return a specific values in game. It is used with commands or switches.
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 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.
Battle
|
Camera
|
Daycare
|