Author Topic:  Script Command Documentation  (Read 22491 times)

0 Members and 1 Guest are viewing this topic.

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #30 on: July 12, 2014, 08:59:24 AM »
Wait: Pauses the script execution for a time.

Wait [millisecs]

[millisecs] - The number of milliseconds the script should wait.

Examples:

Wait [1000] = wait 1 second.
Wait [100] = wait 1/10th of a second.
Wait [10000] = wait 10 seconds.
Wait [60000] = wait 1 minute.
« Last Edit: August 12, 2016, 04:50:36 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #31 on: July 12, 2014, 08:59:41 AM »
Waypoint: Manipulates the player waypoint. A player can have only one waypoint at a time.

Waypoint [x,z]
Waypoint [delete]

[x,z] - The surface coordinate to set the waypoint.

[delete] - Delete rather than set the waypoint.

Examples:

Waypoint [300,200]
Sets the players waypoint at surface location 300,200.

Waypoint [delete]
Deletes the players waypoint.

« Last Edit: July 15, 2014, 08:39:29 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #32 on: July 12, 2014, 08:59:52 AM »
Zone: Manipulates zones.
Zone [name] [delete]
Zone [name] [x,y,z] [x,y,z] [edit=on|off] [pvp=on|off] [fly=on|off] [mobs=on|off] [entry=script] [exit=script]
« Last Edit: July 17, 2014, 10:43:09 PM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #33 on: July 12, 2014, 09:00:07 AM »
If: Begins a conditional query.

Conditional queries are used to execute different commands in the script based on the result of the query.

Example:

if
   query1
then
   command1
else
   command2
endif

The above script will execute command1 ONLY if query1 is true, otherwise it will execute ONLY command2. Only either command1 OR command2 are executed, not both.


if
   query1
then
   command1
elseif
   query2
then
   command2
else
   command3
endif

The above script executes command1 if query1 is true, otherwise it executes command2 if query2 is true, otherwise it executes command3.

Note: endif is only needed to close the query block if the script contains further commands not related to the queries.
« Last Edit: September 11, 2014, 11:08:48 PM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #34 on: July 12, 2014, 09:00:20 AM »
CanEquip: Queries if the player who activated the script can use an item, based on the items skill requirement.

CanEquip [item] [true|false]

[item] - The item to query
[true|false] - The query. If this parameter is omitted, [true] is used.

Examples:

CanEquip [RubySword]
Returns true if the player has the required skill level to use a RubySword.

CanEquip [RubySword] [true]
Same as above.

CanEquip [RubySword] [false]
Returns true if the player does not have the required skill level to use a RubySword.

CanEquip [Marble]
Returns true if the player can place a marble block.

« Last Edit: July 31, 2014, 07:33:39 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #35 on: July 12, 2014, 09:00:35 AM »
HasAction: Queries if the player has performed an action.

HasAction [item] [action] [true|false]
HasAction [item] [action] [compare] [qty]

[item] - The name of the item to query.
[action] - The type of action to query. Valid actions are Mined, Used, Crafted, Collected.

Examples:

HasAction [WoodSword] [crafted]
Returns true if the player has crafted at least one WoodSword.

HasAction [WoodSword] [crafted] [>] [10]
Returns true if the player has crafted more than 10 WoodSwords.

HasAction [Clay] [mined] [>] [100]
Returns true if the player has mined more than 100 Clay.

HasAction [Limestone] [used] [<] [50]
Returns true if the player has placed less than 50 Limestone.
« Last Edit: June 20, 2016, 08:58:40 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #36 on: July 12, 2014, 09:00:48 AM »
HasHistory: Queries historical records.

HasHistory [name] [player|clan] [true|false]
HasHistory [name] [player|clan] [compare] [count]

[player] - Query player history.
[clan] - Query the players clan history.
Omit these to query system history.

Examples:

HasHistory [Sample]
HasHistory [Sample] [true]
Returns true if system Sample history is not equal to zero.

HasHistory [Sample] [false]
Returns true if there is no system Sample history or it equals zero.

HasHistory [Sample] [player]
HasHistory [Sample] [player] [true]
Returns true if the Sample history for the player is not equal to zero.

HasHistory [Sample] [clan]
HasHistory [Sample] [clan] [true]
Returns true if the Sample history for the players clan is not equal to zero.

HasHistory [Sample] [clan] [>=] [10]
Returns true if the Sample history for the players clan is greater than or equal to 10.

HasHistory [Sample] [player] [<=] [10]
Returns true if the Sample history for the player is less than or equal to 10.

HasHistory [Sample] [=] [10]
Returns true if the system Sample history equals 10.


System generated records:

BookRead\xxx
xxx = the books title. This player record is generated/incremented when you read a book.
example: HasHistory [BookRead\Golems Lore] [player] [true]

NPCTalk\xxx
xxx = Name of NPC. This player record is generated/incremented when you talk to an NPC
example: HasHistory [NPCTalk\John The Elf] [player] [>] [4]

Note: History names support folders so you can use \ in your history names to create logical folders of history.
« Last Edit: June 20, 2016, 08:57:58 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #37 on: July 12, 2014, 09:01:06 AM »
HasInventory: Queries block or entity inventories.
HasInventory [x,y,z] [item] [true|false]
HasInventory [player] [item] [true|false]
HasInventory [x,y,z] [item] [compare] [count]
HasInventory [player] [item] [compare] [count]

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #38 on: July 12, 2014, 09:01:24 AM »
HasMarker: Queries map markers.
HasMarker [name] [true|false]

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #39 on: July 12, 2014, 09:01:43 AM »
HasPermission: Queries player permissions.

HasPermission [permission] [true|false]

Valid permissions:
Adventure, Edit, Creative, Fly, Map, VoiceChat, TextChat, Spectate, Shops, ViewScripts, Grief, Save, Admin.
« Last Edit: June 20, 2016, 08:59:41 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #40 on: July 12, 2014, 09:01:57 AM »
HasSkill: Queries player skill levels.
HasSkill [skill] [compare] [level]

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #41 on: July 12, 2014, 09:02:09 AM »
IsAvatar: Queries what skin the player is currently wearing.
IsAvatar [avatar] [true|false]

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #42 on: July 12, 2014, 09:02:22 AM »
IsBlock: Queries the block id at a location.

IsBlock [x,y,z] [block] [aux] [true|false]

Examples:

IsBlock [150,200,300] [Basalt]
IsBlock [150,200,300] [Basalt] [true]
Returns true if the block at location 150,200,300 is Basalt.

IsBlock [150,200,300] [Basalt] [false]
Returns true if the block at location 150,200,300 is not Basalt.

IsBlock [150,200,300] [Ramp] [3]
IsBlock [150,200,300] [Ramp] [3] [true]
Returns true if the block at location 150,200,300 is a Ramp AND the associated Aux data equals 3.

IsBlock [150,200,300] [Ramp] [3] [false]
Returns true if the block at location 150,200,300 is not a Ramp OR the associated Aux data is not equal to 3.
« Last Edit: June 20, 2016, 09:00:22 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #43 on: July 12, 2014, 09:02:36 AM »
IsCombat: Queries if combat is enabled.
IsCombat [true|false]

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6497
  • 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 #44 on: July 12, 2014, 09:02:49 AM »
IsDistance: Queries the distance between the player and a location.
IsDistance [x,y,z] [compare] [distance]