Author Topic:  Script Command Documentation  (Read 23709 times)

0 Members and 1 Guest are viewing this topic.

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #15 on: July 12, 2014, 08:55:18 AM »
MoveRegion: Moves all the blocks from one region to another region. All data and settings attached to the blocks are moved to the new region. After a block is moved, it's original position is set to empty air.

MoveRegion [x,y,z] [x,y,z] [x,y,z]

[x,y,z] - The 1st coordinate is the minimum bound of the source region.
[x,y,z] - The 2nd coordinate is the maximum bound of the source region.
[x,y,z] - The 3rd coordinate is the minimum bound of the destination region.

Examples:

MoveRegion [100,200,300] [150,250,350] [10,20,30]
Moves all the blocks and all their associated data from 100,200,300 / 150,250,350 to the location starting at 10,20,30. The final block at 150,250,350 will be moved to 60,70,80.
« Last Edit: July 15, 2014, 08:31:40 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #16 on: July 12, 2014, 08:55:31 AM »
Notify: Creates a notification message (pink messages at top left of screen).

Notify [message[gamertag]] [local|global|admin|clan]

[local] - only players on the same xbox see the message.
[global] - all players on the session see the message.

Supported from version 2.22
[admin] - all admins on the session see the message.
[clan] - all clan members see the message.
« Last Edit: May 28, 2015, 05:53:12 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #17 on: July 12, 2014, 08:55:48 AM »
Paste: Pastes a component

Paste [pack:component] [x,y,z] [facing] [copytype]

Restrictions:
This command only works in Creative worlds.

« Last Edit: April 19, 2015, 08:01:23 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #18 on: July 12, 2014, 08:56:08 AM »
Permission: Manipulates player permissions. Only the permissions of the player who activated the script are affected.

Permission [permission] [on|off]

[permission] - The permission to set. adventure, edit, creative, fly, map, chat, grief, save, admin.

[on|off] - Determines if the permission is to be set on or off.

Examples:

Permission [chat] [off] - sets the chat permission off.
Permission [edit] [on] - sets the edit permission on.
« Last Edit: July 13, 2014, 07:22:04 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #19 on: July 12, 2014, 08:56:24 AM »
ReplaceRegion: Replaces all occurrences of a block in a region with another block.

ReplaceRegion [x,y,z] [x,y,z] [block1] [block2]

[x,y,z] - The 1st coordinate is the minimum bound of the replace region.
[x,y,z] - The 2nd coordinate is the maximum bound of the replace region.

[block1] - The Block to be replaced.
[block2] - The Block to replace with.

Restrictions:
This command only works in Creative worlds.

Examples:

ReplaceRegion [100,200,300] [150,250,350] [Limestone] [Marble]
Replaces all Limestone blocks within the 100,200,300 / 150,250,350 bound with Marble.
« Last Edit: April 19, 2015, 08:01:44 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #20 on: July 12, 2014, 08:56:48 AM »
Rain: Creates a rain weather effect

Rain [x,z] [radius] [duration] [intensity]
Rain [x,z] [radius] [duration] [intensity] [r,g,b]

[x,z] - The surface coordinate for the center of the rain storm.

[radius] - The radius of the rain storm in blocks.

[duration] - The duration of the rain storm in seconds.

[intensity] - The strength the rain storm. Valid values are 1 - 100, with 1 being the weakest and 100 the strongest.

[r,g,b] - The color of the rain drops in rgb format. r = red, g = green, b = blue. rgb are the 3 primary light colors and any color can be created with these 3 components. Possible values for each component are 0 - 255. This parameter may be omitted. If it is omitted, a random translucent bluish gray color is used.

Examples:

Rain [100,200] [100] [20] [50]
Creates a rain storm at surface coordinate 100,200, with a radius of 100 blocks. The storm lasts for 20 seconds and is half strength. A random bluish gray color is used.

Rain [300,800] [70] [120] [75] [200,200,200]
Creates a rain storm at surface coordinate 300,800, with a radius of 70 blocks. The effect lasts for 2 minutes and is 3/4 strength. The color of the hail stones is a light whitish gray.
« Last Edit: July 15, 2014, 08:24:02 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #21 on: July 12, 2014, 08:57:03 AM »
Script: Executes another script.

Script [name]
Script [name] [cancel] [all]
Script [name] [wait] [offset] [x,y,z] [vars:name,name,..] [out:name,name,..]

[name] - The name of the script to execute. Script names support logical folders, so insert forward slashes in your script names where required.

[cancel] - Indicates the script should be cancelled (removed from the execution queue). Only the instance for the current player will be cancelled. If you include the [all] parameter, all instances of the script for all players will be cancelled.

[wait] - Instructs the runtime to halt execution of the calling script until the called script has completed. This parameter is optional, and if omitted, the calling script will continue to execute without waiting on the called scipt. Note, this parameter is automatic if [out:..] is used.

[offset] - Optional offset coordinate. If a script is executed with an offset coordinate, then every coordinate encountered while executing the script has the offset added to it.

[vars:name,name,..] - Optional comma separated list of all variables you wish to pass to the script. These variables are passed by value, that is, if the called script modifies the variables, the calling scripts copies of the variables are unaffected.

[out:name,name,..] - Same as [vars:] except these variables are passed by reference, that is, if the called script modifies the variables, the calling scripts copies of the variables are also modified. This provides a mechanism for the called script to pass information back to it's calling script. If this option is used, the [wait] parameter is automatic.


Examples:

Script [CloseDoor]
Executes the script CloseDoor

Script [Bank\PowerSafe] [offset] [10,11,12]
Executes the script Bank\PowerSafe and adds 10,11,12 to every coordinate encountered in the script.

Script [Magic\AirStrike] [vars:mana]
Executes the script Magic\AirStrike and passes the variable 'mana' (and it's value) to the script.

Script [Magic\AirStrike] [vars:mana,focus,power]
Executes the script Magic\AirStrike and passes the variables 'mana', 'focus' and 'power' (and their values) to the script.

Script [Bank\PowerSafe] [offset] [10,11,12] [vars:keycode]
Executes the script Bank\PowerSafe and adds 10,11,12 to every coordinate encountered in the script. It also passes the variable 'keycode'.

Script [Bank\PowerSafe] [wait] [offset] [10,11,12] [vars:keycode]
Same as above except the calling script will wait for Bank\PowerSafe to complete before it continues execution.

Script [Bank\PowerSafe] [offset] [10,11,12] [vars:keycode] [out:valid]
Same as above except Bank\PowerSafe can modify the value of the variable called 'valid' and the valid variable in the calling script will be updated to match. Note the [wait] parameter is omitted, but automatic if the [out:] parameter is used.

Script [Bank\PowerSafe] [cancel]
Cancel the instance of the script Bank\PowerSafe for the current player.

Script [Bank\PowerSafe] [cancel] [all]
Cancel all instances of the script Bank\PowerSafe.
« Last Edit: August 12, 2016, 04:45:51 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #22 on: July 12, 2014, 08:57:21 AM »
SetBlock: Sets the block at a location.

SetBlock [x,y,z]
SetBlock [x,y,z] [block]
SetBlock [x,y,z] [block] [aux]

[x,y,z] - The coordinate of the block to set.
[block] - The block to set. If this parameter is omitted, then [none] is used.
[aux] - Auxillary data.

Restrictions:
This command only works in Creative worlds.

Examples:

SetBlock [100,200,300] [Limestone]
Sets the block at location 100,200,300 to Limestone.

SetBlock [100,200,300]
Clears the block at location 100,200,300 (Set's it to None).
« Last Edit: April 19, 2015, 08:03:26 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #23 on: July 12, 2014, 08:57:34 AM »
SetPower: Sets the power state of a block.

SetPower [x,y,z] [on|off]

[x,y,z] - The coordinate of the block.
[on|off] - The power state to set.

Examples:

SetPower [100,200,300] [on]
Sets the power state of the block at location 100,200,300 to on (powered).

SetPower [100,200,300] [off]
Sets the power state of the block at location 100,200,300 to off (unpowered).
« Last Edit: July 30, 2014, 08:33:10 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #24 on: July 12, 2014, 08:57:48 AM »
SetRegion: Sets all the block ids in a region.

SetRegion [x,y,z] [x,y,z]
SetRegion [x,y,z] [x,y,z] [block]
SetRegion [x,y,z] [x,y,z] [block] [percent] [seed]

Restrictions:
This command only works in Creative worlds.

« Last Edit: August 12, 2016, 04:48:19 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #25 on: July 12, 2014, 08:58:07 AM »
SetSwitch: Manipulates switches and buttons.

SetSwitch [x,y,z] [on|off|toggle]

[x,y,z] - The coordinate of the switch.
[on|off|toggle] - The state to set.

Examples:

SetSwitch [100,200,300] [on]
Sets the switch at location 100,200,300 to on. This will cause adjacent blocks to be powered.

SetSwitch [100,200,300] [off]
Sets the switch at location 100,200,300 to off. This will cause adjacent blocks to be unpowered (if they are not being powered by another power emitter block).

SetSwitch [100,200,300] [toggle]
Toggles the switch at location 100,200,300. If the switch was on before this command is executed, the switch will be set to off. If the switch was off before this command is executed, the switch will be set on.
« Last Edit: July 30, 2014, 08:35:57 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #26 on: July 12, 2014, 08:58:20 AM »
MobSpawn: Spawns a mob.

MobSpawn [x,y,z] [mobtype]
MobSpawn [x,y,z] [mobtype] [kill=script]
MobSpawn [x,y,z] [mobtype] [loot=[x,y,z][item][item,count][item,count,dropchance]]
MobSpawn [x,y,z] [mobtype] [custom=[attack,50][strenth,70][defence,40]]
MobSpawn [x,y,z] [mobtype] [kill=script] [loot=[x,y,z][item][item,count][item,count,dropchance]]] [custom=[attack,50]]

[x,y,z] - The coordinate in the world where to spawn the mob.
[mobtype] - The type of mob to spawn. Goblin, Spider, Werewolf, Zombie, Dryad, Djinn, Orc, TrollChief, Diablo, Duck, Sheep, Alpaca, AyrshireCow, HighlandCow.
[kill=script] - The name of the script to execute when the mob is killed. This parameter is optional and is only executed if the mob is killed by combat.
[loot=[x,y,z][item][item,count][item,count,dropchance]] - Custom loot drop table.

Examples:

MobSpawn [100,200,300] [Goblin]
Spawns a Goblin at location 100,200,300.

MobSpawn [200,210,300] [Spider] [kill=SpiderKilled]
Spawns a Spider at location 200,210,300.
When this spider is killed, the SpiderKilled script is executed.

MobSpawn [200,210,300] [Spider] [custom=[attack,50][strength,80]]
Spawns a Spider at location 200,210,300.
This spider will have custom stats of attack level 50 and strenght level 80. All stats not specified will remain as default.

MobSpawn [300,220,400] [Werewolf] [loot=[TitaniumKatana][Grass,20][GoldPieces,500,80]]
Spawns a Werewolf at location 300,220,400.
When this Werewolf is killed, it has a 100% chance of dropping a TitaniumKatana, a 100% chance of dropping 20 Grass blocks and an 80% chance of dropping 500 gold pieces.
Specifying a count and percent for loot items is optional. If no count is specified, it will default to 1. If no percent is specified, it will default to 100.

MobSpawn [300,220,400] [Werewolf] [loot=[chance][Grass,20,50]]
Spawns a Werewolf at location 300,220,400.
When this Werewolf is killed, it has a 100% chance of dropping a chance item (standard random loot drop), and 50% chance of dropping 20 Grass blocks.

MobSpawn [300,220,400] [Werewolf] [loot=[100,200,300]]
Spawns a Werewolf at location 300,220,400.
When this Werewolf is killed, it will drop a random item picked from the storage block at [100,200,300].

MobSpawn [300,220,400] [Werewolf] [loot=[100,200,300][chance][Grass,20,50]]
Spawns a Werewolf at location 300,220,400.
When this Werewolf is killed, it's loot is sourced from the storage block located at [100,200,300]. It has a 100% chance of dropping a random item picked from the storage block (specified by the [chance] item) and a 50% chance of dropping 20 Grass blocks picked from the storage block.
Items are removed from the storage block when dropped by the mob.
Sourcing loot from storage blocks is optional in the Creative game mode and mandatory in other game modes.
If no storage block exists at the location or the storage block is empty, the mob will not drop loot.
« Last Edit: August 12, 2016, 04:43:18 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #27 on: July 12, 2014, 08:58:34 AM »
Teleport: Teleports entities.

Teleport [player] [x,y,z]
Teleport the player who activated the script to coordinates [x,y,z]. Relative coordinates are supported.

Teleport [x1,y1,z1] [x2,y2,z2] [x3,y3,z3] [absolute|relative]
Teleport all entities (players and mobs) inside the [x1,y1,z1] [x2,y2,z2] region to the coordinate [x3,y3,z3].

Entities will not be teleported if the destination contains solid blocks (otherwise they'd be stuck inside the block).

Examples:

Teleport [player] [300,201,400]
Teleport the player who activated the script to coordinate 300,201,400. Coordinates 300,201,400 and 300,202,400 must not contain solid blocks.

Teleport [0,1,0] [1023,511,1023] [512,201,512] [absolute]
Teleport all players and mobs in the world to coordinate 512,201,512.

Teleport [100,200,100] [150,201,150] [200,201,200] [relative]
Teleport all players and mobs inside the region [100,200,100] [150,201,150] to [200,201,200]. Each entities relative position to the minimum region corner [100,200,100] will be maintained at the destination. e.g. if the player is at location 110,201,120, they will be teleported to 210,201,220. (110-100,201-201,120-100) + (200,201,200).
« Last Edit: November 02, 2015, 06:46:32 PM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #28 on: July 12, 2014, 08:58:47 AM »
SetText: Sets the text of blocks that have text properties. SetText works on Signs, NPCs and Books.

SetText [x,y,z] [text[gamertag]]
SetText [x,y,z] [text[gamertag]] [name]
SetText [x,y,z] [text[gamertag]] [page]

[x,y,z] - The coordinate of the block to set text for. For NPCs this is the coordinate of the NPCSpawner block.

[text[gamertag] - The desired text. [gamertag] will be substituted with the gamertag of the player who activated the script and it can be placed anywhere within the text itself.

[name] - Indicates that [text] is to name the block. For NPCs [text] will be the NPCs name. For books [text] will be the book title. [name] is not used for sign blocks.

[page] - The page number of the book the text is for. Valid numbers are 1 - 1000. The [page] parameter is not used for NPCs or signs.

Examples:

SetText [100,200,300] [Welcome_to_Rohan]
Sets the text of the block at location 100,200,300. If the block is an NPCSpawner, this command sets the speech of the NPC. If the block is a Book, this command sets the text for page 1.

SetText [100,200,300] [Charlie] [name]
Sets the name of the block at location 100,200,300. If the block is an NPC, the NPC is named Charlie. If the block is a book, the books title is Charlie.

SetText [100,200,300] [Once upon a time] [2]
Sets the text for page 2 of a book at location 100,200,300.
« Last Edit: July 31, 2014, 07:29:32 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6499
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
Re: Script Command Documentation
« Reply #29 on: July 12, 2014, 08:59:12 AM »
SetTexture: Sets the texture for a block that has multiple texture capability. SetTexture can also be used to set a decal on a block that supports decals.

SetTexture [x,y,z] [id]

[x,y,z] - The coordinate of the block whose texture/decal you wish to set.

[id] - The zero based id number of the texture or decal. Valid values are 0 - 15. 0 = the default texture. id numbers go from bottom left (default texture) to top right as you see them on the lower section of the texture select screen. If the id used does not have a texture selected, the default is used.

Examples:

SetTexture [100,200,300] [4]
Sets the texture of the block located at 100,200,300 to the 4th selected texture for that block type.
Sets the decal of the block located at 100,200,300 to the 4th decal.

SetTexture [100,200,300] [0]
Sets the texture of the block located at 100,200,300 to the blocks default texture.
Removes any decal from the block located at 100,200,300.
« Last Edit: November 10, 2015, 05:19:04 PM by Craig »