Difference between revisions of "Version 2 Scripts New"
Jianmingyong (talk | contribs) m |
Jianmingyong (talk | contribs) m |
||
| Line 137: | Line 137: | ||
{{ScriptCommandV2|Entity|addtoposition|{{ScriptArgumentV2|entityID|Int|1|False||}},{{ScriptArgumentV2|x|Sng|1|False||}},{{ScriptArgumentV2|y|Sng|2|False||}},{{ScriptArgumentV2|z|Sng|3|False||}}|Adds the given coordinates to the position of the given entity.|{{ScriptArgumentV2|entityID|Int|1|False||Input}}<br />{{ScriptArgumentV2|x|Sng|1|False||Input}}<br />{{ScriptArgumentV2|y|Sng|2|False||Input}}<br />{{ScriptArgumentV2|z|Sng|3|False||Input}}|False}} | {{ScriptCommandV2|Entity|addtoposition|{{ScriptArgumentV2|entityID|Int|1|False||}},{{ScriptArgumentV2|x|Sng|1|False||}},{{ScriptArgumentV2|y|Sng|2|False||}},{{ScriptArgumentV2|z|Sng|3|False||}}|Adds the given coordinates to the position of the given entity.|{{ScriptArgumentV2|entityID|Int|1|False||Input}}<br />{{ScriptArgumentV2|x|Sng|1|False||Input}}<br />{{ScriptArgumentV2|y|Sng|2|False||Input}}<br />{{ScriptArgumentV2|z|Sng|3|False||Input}}|False}} | ||
}} | |||
=== @Environment === | |||
{{ScriptCommandTableV2|Command| | |||
{{ScriptCommandV2|environment|setweather||||False}} | |||
{{ScriptCommandV2|environment|setregionweather||||False}} | |||
{{ScriptCommandV2|environment|setcanfly||||False}} | |||
{{ScriptCommandV2|environment|setcandig||||False}} | |||
{{ScriptCommandV2|environment|setcanteleport||||False}} | |||
{{ScriptCommandV2|environment|setwildpokemongrass||||False}} | |||
{{ScriptCommandV2|environment|setwildpokemonwater||||False}} | |||
{{ScriptCommandV2|environment|setwildpokemoneverywhere||||False}} | |||
{{ScriptCommandV2|environment|setisdark||||False}} | |||
{{ScriptCommandV2|environment|setrenderdistance||||False}} | |||
{{ScriptCommandV2|environment|toggledarkness||||False}} | |||
}} | |||
=== @Item === | |||
{{ScriptCommandTableV2|Command| | |||
{{ScriptCommandV2|item", "give||||False}} | |||
{{ScriptCommandV2|item", "remove||||False}} | |||
{{ScriptCommandV2|item", "clearitem||||False}} | |||
{{ScriptCommandV2|item", "messagegive||||False}} | |||
{{ScriptCommandV2|item", "repel||||False}} | |||
}} | |||
=== @Level === | |||
{{ScriptCommandTableV2|Command| | |||
{{ScriptCommandV2|level", "wait||||False}} | |||
{{ScriptCommandV2|level", "update||||False}} | |||
{{ScriptCommandV2|level", "waitforevents||||False}} | |||
{{ScriptCommandV2|level", "waitforsave||||False}} | |||
{{ScriptCommandV2|level", "reload||||False}} | |||
{{ScriptCommandV2|level", "setsafari||||False}} | |||
}} | }} | ||
| Line 230: | Line 267: | ||
{{ScriptCommandV2|Entity|collision|{{ScriptArgumentV2|entityID|Int|1|False||}}|Returns the collision property of the selected entity.|{{ScriptArgumentV2|entityID|Int|1|False||Input}}|True}} | {{ScriptCommandV2|Entity|collision|{{ScriptArgumentV2|entityID|Int|1|False||}}|Returns the collision property of the selected entity.|{{ScriptArgumentV2|entityID|Int|1|False||Input}}|True}} | ||
}} | |||
=== Environment === | |||
{{ScriptCommandTableV2|Construct| | |||
{{ScriptCommandV2|environment|daytime||||True}} | |||
{{ScriptCommandV2|environment|daytimeID||||True}} | |||
{{ScriptCommandV2|environment|season||||True}} | |||
{{ScriptCommandV2|environment|seasonID||||True}} | |||
{{ScriptCommandV2|environment|day||||True}} | |||
{{ScriptCommandV2|environment|dayofyear||||True}} | |||
{{ScriptCommandV2|environment|dayinformation||||True}} | |||
{{ScriptCommandV2|environment|week||||True}} | |||
{{ScriptCommandV2|environment|year||||True}} | |||
{{ScriptCommandV2|environment|weather||||True}} | |||
{{ScriptCommandV2|environment|mapweather||||True}} | |||
{{ScriptCommandV2|environment|currentmapweather||||True}} | |||
{{ScriptCommandV2|environment|weatherid||||True}} | |||
{{ScriptCommandV2|environment|mapweatherid||||True}} | |||
{{ScriptCommandV2|environment|currentmapweatherid||||True}} | |||
{{ScriptCommandV2|environment|regionweather||||True}} | |||
{{ScriptCommandV2|environment|regionweatherid||||True}} | |||
{{ScriptCommandV2|environment|canfly||||True}} | |||
{{ScriptCommandV2|environment|candig||||True}} | |||
{{ScriptCommandV2|environment|canteleport||||True}} | |||
{{ScriptCommandV2|environment|wildpokemongrass||||True}} | |||
{{ScriptCommandV2|environment|wildpokemonwater||||True}} | |||
{{ScriptCommandV2|environment|wildpokemoneverywhere||||True}} | |||
{{ScriptCommandV2|environment|isdark||||True}} | |||
}} | |||
=== Inventory === | |||
{{ScriptCommandTableV2|Construct| | |||
{{ScriptCommandV2|inventory", "countitem||||True}} | |||
{{ScriptCommandV2|inventory", "countitems||||True}} | |||
{{ScriptCommandV2|inventory", "name||||True}} | |||
{{ScriptCommandV2|inventory", "ID||||True}} | |||
}} | }} | ||
Revision as of 15:46, 10 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 found in game.
- 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. )
- 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 :)
- If you find that any command you found here doesn't work the way you want it to be, it might be a bug. Try report it over here.
Make sure that your title include the game version and state clearly what you are trying to do.
Important info / definition 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 separated by the word "OR" for example "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
|
@Environment
|
@Item
|
@Level
|
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
|
Entity
|
Environment
|
Inventory
|