VariableTriggers v1.2.2

Details

  • Filename
    VariableTriggers.jar
  • Uploaded by
  • Uploaded
    Dec 6, 2012
  • Size
    185.82 KB
  • Downloads
    1,387
  • MD5
    5e3bee5064503c3267dfaf7d85545596

Supported Bukkit Versions

  • CB 1.4.5-R0.2

Changelog

v1.2.2

Fixes

Added - /vt savetriggers, /vt reloadtriggers and /vt reloadscripts now display a message in the chat window to the user when you use one of these commands.

Script Commands

@SOUNDEXThis will let you play all those extra sounds and change the volume and pitch of the sound.
Usage: @SOUNDEX [sound] [volume] [pitch] [location]
sound is the name of the sound to play. See Sounds for a list
volume is a value between 0.0 and 1.0
pitch is a value between 0.5 and 2.0
location is the location the sound will come from. If you do not put a location then you will be prompted to click on a location and it will be added for you.
@WHILEThis is a contitional loop and give you ability to loop based on testing. This is and advanced feature and is turned off by default.
Usage: @WHILE [i|b|s|si] [VALUE] [=|!=|>|<|>=|<=] [VALUE]
@ENDWHILEThis ends a while loop block
Usage: @ENDWHILE

Event Triggers

ChatThis is triggered when a player types in the chat window. The normal placeholders refer to this player and ther are a few specific to this event. <chatline> <chatwordcount> and <chatword:index>
TimerThe timer will exicute any script attached to it once every minute. It is up to you to set and test your variables to decide how often to allow exicution.
Usage: /vtevent Timer [SCRIPTLINE]
One important thing to remember is that this is not triggered by a player and therefore the normal place holders are not valid. <playername> will be 'null' and <playerloc> will be 0,0,0 <health> will be 0 and so on. You may use Functional Place Holders that let you set a player name and must get it from object variables you have saved. You may not use @PLAYER as it asumes the triggering player but you may use @BROADCAST or @TELL

Place Holders Specific to Chat Event

<chatline>Will be replaced with the text that was typed in the chat window by player.
<chatwordcount>Will be replaced with the number of words typed in chat window

Functional Place Holders Specific to Chat Event

<chatword:index>This will return the word typed in the chat line at the index. Index starts at 1. If an index is out of range a 'null' text is returned.

v1.2.1

Fixes

Fixed a problem with the @IF @OR @AND logic flow. This problem was cause by changes to accomidate a new feature a few updates ago. I didn't realize the changes caused this locic flow break untill now.

Fixed an issue with converting int to str and str to int with $obj.var's

Functional Place Holders

<hasitem:PLAYER:ITEMID>This will search the PLAYER's Inventory for ITEMID and return the total quantity found. If item is not found will return 0
<takeitem:PLAYER:ITEMID:QUANTITY>This will search the PLAYER's Inventory for QUANTITY of ITEMIDs and take them if QUANTITY is avalible, If PLAYER does not have enough, ITEMID's are not removed and false is returnd.
<giveitem:PLAYER:ITEMID:QUANTITY>This will give PLAYER QUANTITY of ITEMID's. This returns the amount accually given. Player nay not have enough room in inventory for full quntity.
If you need to specify an ID such as Blue Wool 35:3 then you will need to do it with a variable like @SETSTR $obj.var 35:3 and then <hasitem:<playername>:$obj.var>

- v1.2.0

Fixes

FixedThe script error spamming when you use @AND and @OR in scripts. Though the script still worked fine it would give you a false error.
Fixed<var:$obj.var> not working with @DELVAR

Functional Place Holders

<getchar:string:index>Returns the character at index in string. Index starts at 1. If index is out of bounds a 'null' text is returned.

v1.1.9

Script Commands

@BREAKLOOPThis will allow you to break from a @LOOP block. You would use it in an @IF test inside of a Loop block.
Usage: @BREAKLOOP
Example:
@IF b $some.var = true
@BREAKLOOP
@ENDIF

Functional Place Holders

<var:$Obj.Var>Gets the value of an Object Variable. This will be usefull for dynamicaly modifying variable names for possible array creation and usefull for more dynamic use of @CALL
Example: $varArray.s<var:$some.arrayIndex>
Assuming $some.arrayIndex = 12 then you would end up with an object variable named $varArray.s12

v1.1.8

Fixes

  • Fixed so $Obj.Vars are parsed for color codes with @PLAYER, @BROADCAST and @TELL

Changes

  • Changed Auto Save now only displays one line in console window stating that all triggers and data are saved.
  • Added Config option: AutoSaveDisplay if set to false, no auto save info will be displayed.

Functional Place Holders

<totalexp:optionalarg>Gets a players Total Experience earned so far. Replace optionalarg with the name of a player. If player is not found a 'null' text is returned. If playername is not provided then the triggering players total exp is returned.

v1.1.7

What's been added so far in the up comming release

Fixes

Fixed <cmdarg:index> always returning null. It now works properly and returns the value.

Script Commands

@GETSTRLENGets the length of a text String and stores it in an $Obj.Var
Usage: @GETSTRLEN [$OBJ.VAR] [STRINGTOTEST]

In-Game Commands

/vtclickremoveAdded an optional argument to /vtcr You can now give a location x,y,z
Usage: /vtcr [OPTIONALLOCATION]
This will allow you to remove a trigger from a script. Example:
@CMDOP vtcr <triggerloc>
/vtwalkremoveAdded an optional argument to /vtwr You can now give a location x,y,z
Usage: /vtwr [OPTIONALLOCATION]
This will allow you to remove a trigger from a script. Example:
@CMDOP vtwr <triggerloc>

v1.1.6

Fixes

Fixed@TP issue of periodically causing an exception and leaving player as op. Also added a new config option: TeleportOp: set to false to only use @TP without op. Default will be true and is the current method.
Fixedissue using @COOLDOWN in a called event script.

Functional Place Holders Spacific to Command Triggers

<cmdarg:index>This will return the argument typed in the command line not including the command itself. Index starts at 1. If an index is out of range a 'null' text is returned.

Place Holders Spacific to Command Triggers

<cmdline>this will be replaced with the entire line of text that is typed after ths command.

Functional Place Holders

<hour:>Returns the hour. this is game time not real time and it is 0 to 23 no am or pm. 15 would be 3pm
<min:>Returns the minute. this is game time not real time and it is 00 to 59
<getblocklos:proc:range>This is a Line Of Sight function It usses the line of sight of the triggering player. proc can be LOC, NAME, TYPE, ID, DATA and range is the max range in blocks to test and returns the first block found. Not only is this useful for dealing with blocks but it is a great way to get the location the player is looking at.
This returns different values depending on the :proc argument
LOC - returns the location as x,y,z
NAME - returns the Name of the block
TYPE - returns id:data as in 36:1
ID - returns the block id
DATA - returns the data byte of the block
Returns null text if no block is reached within the range so besure you test for null before using the return.

Script Commands

@LOOPStart a loop block. All lines after @LOOP up to the matching @ENDLOOP will be exicuted count times. Each @LOOP MUST have a matching @ENDLOOP and you cannot criss cross @IF blocks.
Usage: @LOOP [COUNT]
@ENDLOOPEnd of a loop block.
Usage: @ENDLOOP

@LOOP is turned off by default. Read http://dev.bukkit.org/server-mods/variabletriggers/pages/about-loops/ to learn how to turn on loops


v1.1.5

Fixed PlayerChatEvent to be compatible with 1.3.1-R1.0


v1.1.4

Command Triggers

Create triggers that run script when a player types a /command. You can make some extra things happen when players type commands like /heal or you can create your very own commands like /foobar or /setquest

If you are extending the functionality of an existing /command

OverrideShould be false
PermissionShould match whatever permission is neaded for this /command

If you are overideing an existing /command with your own functionallity

OverrideShould be true
PermissionShould match whatever permission is neaded for this /command

If you are creating a new /command of your own

OverrideShould be true
PermissionCan be whatever you want it to be or empty if you want everyone to have access. Be sure to add your permission.node to your Permissions YML or Group YML

In-Game Commands for Command Triggers

/vtcommandAliase - /vtcmd Creates a new Command Trigger or adds script to an existing Command.
Usage: /vtcommand [COMMAND] [SCRIPTLINE]
/vtcommandoverrideAliase - /vtcmdo Set override to true | false.
Usage: /vtcommandoverride [COMMAND] [TRUE|FALSE]
By default the Override is set to false.
If Override is set to true will override an existing /command or if no command exists will let you create your own /command. If it is false the normal ingame command will function as normal.
/vtcommandpermissionAliase - /vtcmdp Set or Remove Permission needed for this Command Trigger.
Usage: /vtcommandpermission [COMMAND] [PERMISION.NODE|REMOVE]
By default the Permission is not set. Anyone can use this command.
If you provide a permission.node then player will need that permission to use this command trigger. To remove the permission.node type Remove as the argument
/vtcommandremoveAliase - /vtcmdr Removes an existing Command Trigger.
Usage: /vtcommandremove [COMMAND]
/vtcommandviewAliase - /vtcmdv Views the script on an existing Command Trigger.
Usage: /vtcommandview [COMMAND]
/vtcommandeditAliase - /vtcmde Edit a line of script on an Command Trigger.
Usage: /vtcommandedit [COMMAND] [LINENUMBER] [NEW SCRIPTLINE]
/vtrigger cmdlistAliase - /vt cmdlist Display a list of Command Triggers.
Usage: /vtrigger cmdlist [OPTIONALNAME]
If no argument is provided, a list of command triggers is displayed. If the name of a command trigger is provided then details on that command is displayed.

Place Holders Specific to Command Triggers

<cmdname>will be replaced with the name of the command used.
<cmdargcount>Will be replaced with the number of arguments typed after the command.
Arguments are words or characters separated by spaces.
<cmdarg1>Will be replaced with the first argument after the command if any
<cmdarg2>Will be replaced with the second argument after the command if any
<cmdarg3>Will be replaced with the third argument after the command if any
<cmdarg4>Will be replaced with the fourth argument after the command if any

In-Game Commans

/vteventeditAliase - /vtee Edit a line of script on an Event Trigger
Usage: /vteventedit [EVENT] [LINENUMBER] [NEW SCRIPTLINE]
/vtareaeditAliase - /vtae Edit a line of script on an Area Trigger
Usage: /vteventedit [AREA] [ENTER|EXIT] [LINENUMBER] [NEW SCRIPTLINE]
/vtrigger arealistAliase - /vt arealist Display a list of Command Triggers.
Usage: /vtrigger arealist [WORLD] [AREA]
If no arguments are provided, a list of areas in all worlds is displayed. If the World is provided a list of areas in that World is displayed. If World and Area are both provided, details on that area are displayed.

Functional Place Holders

<currentloc:optionalarg>This place holder now takes an optional argument of playername
If nor arument is provided it will return the triggering players current location. If a player name is provided it will return the current location of the player provided if player is found online. If player is not online will return null

v1.1.3

Fixes

Fixed problem with @CMDOP occasionally not properly releasing op status.
Fixed /vt delvar (an internal error has occured) when deleting variables.
Fixed @COOLDOWN to work properly with Area Triggers and Event Triggers

Added line numbers to the display of script lines on a trigger view (this has nothing to do with the YML file)

In-Game Commands

/vtclickeditEdit a line of script on a Click Trigger
Usage: /vtclickedit [LINENUMBER] [NEW SCRIPTLINE]
/vtwalkeditEdit a line of script on a Walk Trigger
Usage: /vtwalkedit [LINENUMBER] [NEW SCRIPTLINE]

Give me a chance and I'll get the others.

Script Commands

@SIGNTEXTChange the text on a sign. You can use &0-&f, &l-&r color codes
Usage: @SIGNTEXT [LOCATION] [LINE] [TEXT]
Location is optional. You will be asked to click the sign if location is not provided.
@ADDSTRAdd text to the end of an $Obj.Var String
Usage: @ADDSTR [$OBJECT.VAR] [TEXT]
TEXT is the string to add to the end of an existing $Obj.Var of type string
@MULINTMultiply $Obj.Var by INT
Usage: @MULINT [$OBJECT.VAR] [INTVALUE]
@DIVINTDivide $Obj.Var by INT
Usage: @DIVINT [$OBJECT.VAR] [INTVALUE]

Place Holders

<gamemode>Is replaced with the gamemode of the triggering player at the time the trigger was activated.

Functional Place Holders

<endswith:arg1:arg2>Replace arg1 with a string, replace arg2 with a string to test
this will be replaced with a true | false depending on if arg2 ends with arg1.
<endswith:Laiden:LexLaiden> or <endswith:Laiden:<playername>> or <endswith:$string.var1:$string.var2>
<direction:returntype>returns the current direction of the triggering player.
ReturnType is the type you want returned. Replace with INT or TEXT
INT will return direction as an integer 0-15. 0 = NORTH, 1 = NORTH_NORTH_EAST, 2 = NORTH_EAST and so on...
TEXT will return a string NORTH, NORTH_NORTH_EAST and so on...
<secondticks:arg1>Returns the seconds since January 1970. Replace arg1 with a number you want added to it. 0 if you only whant the accual seconds
Example: <secondcticks:0> will return the actual seconds.
Example: <secondcticks:60> will return the seconds plus 60 seconds
Example: <secondcticks:-30> will return the actual seconds minus 30 seconds.

v1.1.2

Fixes

  • Fixed <this> trigger to work with @TOGGLEBLOCK, @SETBLOCK and @GETBLOCK. This fix changed the fromat of <this> place holder and will break any persistent variables that use it. It will create new variables. This fix was needed.
  • Fixed bug in @DELVAR
  • Fixed @TELL to properly convert &0-&f color codes in displayed text.

Event Triggers

QuitThis is triggerd when a player quits the server. <triggerloc> is the player's location

Area Triggers

You can set two locations to create an area cube and set triggers on it.

EnterRuns a script when player enters the area trigger
ExitRuns a script when player exits the area trigger

Place Holders Specific to Area Triggers

<areaentered>Is replaced with the name of the area that is just entered
<areaexited>Is replaced with the name of the area that is just exited
These to place holders are very usefull to test what area is being triggerd and also in the cases that you enter or exit an area inside another area.

Functional Place Holders

<getarea:arg>Replace arg with the location to get. Returns the area name or null if not in an area
Example: <getarea:<playerloc>> or <getarea:$obj.var>

Script Commands

@QUIETPrevents all chat from being displayed on selected player for the number of seconds.
Usage: @QUIET [PLAYERNAME] [SECONDS]
This can be handy for when you want to display a message to a player and you don't want all the chating to scroll it off screen.

In-Game Commands

/vt delobjDeletes an Object and all Variables on the object.
Usage: /vt delobj [OBJNAME]
/vt runRuns a script.
Usage: /vt run [FILE:SCRIPT] <PLAYERNAME>
File:Script uses the same format as the @CALL command. <PLAYERNAME> is optional. If no player is given then the script is run as if the player typing the command activated script.
/vt setareaPus you in set mode to select two loctaions for an area cube.
Usage: /vt setarea
/vt defineareaDefines an area with the two locations you selected with /vt setarea.
Usage: /vt definearea [AREANAME]
/vt getareaGets the name of the Area you ar currently in or null if not in an area.
Usage: /vt getarea
/vtareaCreates a trigger or adds script line to an existing one on an area.
Usage: /vtarea [AREANAME] [Enter|Exit] [SCRIPTLINE]
/vtareaviewView the script on an existing area trigger.
Usage: /vtareaview [AREANAME] [Enter|Exit] [PAGE]
/vtarearemoveRemoves an Enter|Extit trigger from an area and removes the area if no other Trigger exists on it.
Usage: /vtarearemove[AREANAME] [Enter|Exit]

v1.1.1

Fixes

  • Fixed @TOGGLEBLOCK and @SETBLOCK now lets you click the location when adding to an event trigger
  • Fixed Events BlockBreak & BlockPlaced to only be called if no other plugin has canceled event.

Script Commands

@GETLIGHTSaves the light level at Location to the $Obj.Var for later use
Usage: @GETLIGHT [OBJ.VAR] [LOCATION]
This gets the light level (0 to 15) at the Location reguardless if it is sun, moon or lamp light. Keep in mind that if the location is a solid block this will return 0
@TELLDisplays text only to the specified Player. You may use the minecraft color codes &1-&f and special codes &l, &m, &0, &k, &m in any text that will be displayed to the players.
Usage: @TELL [PLAYERNAME] [TEXT MESSAGE]
@ENTITYNow also spawns Farmer, Librarian, Priest, Blacksmith, Butcher.
@IFAdded si test. [i|b|s|si] String Case Insensative.
@IF si Hello = HELLO would be true.

Events

InteractThis is triggerd when a player right clicks on an entity. <triggerloc> is the location of the clicked entity. Entity can be a Player, Mob or Animal. NPC plugins such as Citizens return type PLAYER so you can use their name to determine what NPC is being interacted with.
EntitySpawnThis is triggerd when an entity is spawned. <triggerloc> is the spawn location of the entity. Entity can be a Mob or Animal. This event is usually called A LOT(20 times a second in some casses) so keep your scripts small or use IF test and only do something under certain conditions.

Place Holders Specific to Interact & EntitySpawn Events

<entitytype>Will be replaced with a the type of entity, such as PLAYER, ZOMBIE, VILLAGER... To be used with Interact & EntitySpawn Events
<entityname>Will be replaced with a the name of the entity, if type is PLAYER then the Players name. For Interact, if type is VILLAGER then name will be their profession (FARMER, BUTCHER...), otherwise name will be the same as type. To be used with Interact & EntitySpawn Events

Place Holders

<biome>This will be replace with the biome at the trigger location. In the case of events such as Respawn it is the biome at the respawn location.
Biomes are all caps with underscores as in EXTREME_HILLS

Functional Place Holders

<distance:arg1:arg2>Replace arg1 with a location, replace arg2 with a location
this will be replaced with an integer representing the distance in blocks between the two locations.
<distance:22,67,123:44,71,153> or <distance:<triggerloc>:<playerloc>> or <distance:$loc.var1:22,67,$temp.z>
<startswith:arg1:arg2>Replace arg1 with a string, replace arg2 with a string to test
this will be replaced with a true | false depending on if arg2 starts with arg1.
<startswith:Lex:LexLaiden> or <startswith:Lex:<playername>> or <startswith:$string.var1:$string.var2>

v1.1.0

Fixes

  • Fixed problem with @TP @SETBLCOCK @TOGGLEBLOCK not asking you to set location when setting or adding an Event Trigger.
  • Fixed problem with @SETBLOCK not correctly setting new block if only data byte changed.

Events Triggers

RespawnThis is triggerd when a player respawns after dying. <triggerloc> is the respawn location of player.
JoinThis is triggerd when a player joins the server. <triggerloc> is the player's location

Script Commands

@DROPITEMDrop an item anywhere. You also may add enchantments.
Usage: @DROPITEM [ITEMNAME] [QUANTITY] [ENCHANTMENTS] [LOCATION]
ENCHANTMENTS must be NONE or Enchantment:Level,Enchantment:Level...
Example @DROPITEM Iron_Sword 1 Sharpness:2,BaneOfArthropods:1 <triggerloc>
Example @DROPITEM Dirt 1 NONE 231,65,-122
Example of Item Names: Dirt, Raw_Beef, Wood_Stairs, Chest, Redstone_Wire,Chainmail_Chestplate, Diamond_Helmet
Example of Enchanment Names( no UnderScores): AquaAffinity, FeatherFalling, Protection, ProjectileProtection
It's up to you to know which enchantments can go on what items and what the max level is. Any level set higher than the max for an enchantment will be set to its max for you.
@GETBLOCKSave the block at location in an $Object.Var
Usage: @GETBLOCK [OBJ.VAR] [LOCATION]
With this you can save a block before you change it and then you can change it back to what it was before

v1.0.9b

Fixes

  • Fixed <@CALL [FILE:SCRIPT] it now also will accept an $Obj.Var for either argument.
  • Fixed $Obj.Var to be used almost anywhere as in <relativeloc:<playerloc>:$some.x,$some.y,$some.z>
  • Fixed <isblocktype:arg1:arg2:arg3> if you don't want to test arg3 (data byte) then use -1 for arg3 it will only test the block id
  • Fixed a rare issue with Vault hooking Chat. We don't need a Chat hook so removed issue.

New Feature

  • Also hook Permissions(optional) through Vault <haspermission:permnode> should work fine for those who do not use vault or if you use vault but don't want VariableTriggers going through Vault for permissions you can set the OnlyUseBukkitSuperPerms: true in the VT config.yml

v1.0.9

New Feature

  • Hooked Vault for Economy support! This is an optional hook. If you don't use vault then you will not be able to use any of the features that require Econom, but everything else will still function as normal.
  • Event Triggers Triggers that are Event based. So far i have added these:
    • PlayerDeath - This is triggered when a Player dies for whatever reason. The normal placeholders refer to this player.
    • EntityDeath - This is triggered when an Entity(other than a player) is killed by a player. The normal placeholder refer to the killing player. <triggerloc> refers to the location of the entity on death.|
    • BlockBreak - This is triggered when a block is broken. The normal placeholders refer to the player . <triggerloc> refers to the location of the broke block.|
    • BlockPlaced - This is triggered when a block is placed. The normal placeholders refer to the player . <triggerloc> refers to the location of the placed block.|

Place Holders for the two Death events

<whodied>Will be replaced with a the name of the player that died or the type of entity if not a player, such as Zombie, Spider, Pig...
<killedbyplayer>Will be replaced with a boolean true | false. Use this before using <killername>
<killername>Will be replaced with a the name of the player that did the killing or blank if not killed by a player.

Place Holders for the Block events

<blockid>Will be replaced with the block ID. As in Blue Wool 35:11
<blockdata>Will be replaced with the block data. As in Blue Wool 35:11
<blocktype>Will be replaced with the block type. As in Blue Wool 35:11

The Scripts for Events; BlockBreak and BlockPlaced are called reguardless of any other block protection. So the block that has just been placed or broke may be cancelled so you need to test for this in your script if you only want your script to run if the event was not cancelled. Since VariableTriggers Script Iterpreter runs on its own thread it starts running the script faster than the other plugins have a chance to cancel the event so start your script for these two events with a pause and test like so:
For BlockBreak:

- '// Pause half a second'
- '@PAUSE 0.5'
- '// Test to see if block was is still there'
- '@IF <isblocktype:<triggerloc>:<blocktype>> = false'
- '// Break was succesfull so continue with script'

For BlockPlaced:

- '// Pause half a second'
- '@PAUSE 0.5'
- '// Test to see if block was is still there'
- '@IF <isblocktype:<triggerloc>:<blocktype>> = true'
- '// Place was succesfull so continue with script'

Fixes

  • Fixed issue where when you are clicking a block to add to an existing click trigger the trigger was being triggerd and running the script that was already on it. Now it will no longer be triggerd while you add more script lines to it.
  • Fixed @IF - to use $obj.vars, <placeholder> and oneword constants for the first and second arg when testing strings.
  • Fixed @TOGGLEBLOCK and @SETBLOCK argument [BLOCKID] now excepts data byte [BLOCKID:DATA] as in 76:5
  • Fixed a few issues with vtrigger permissions

In-Game Commands

/vteventAliases vte Creates a new Event Trigger or adds to an existing one.
Usage: /vtevent [EVENT] [SCRIPT LINE]
Possible Events so far: PlayerDeath, EntityDeath, BlockBreak, BlockPlaced
/vteventremoveAliases vter Removes an Event Trigger.
Usage: /vteventremove [EVENT]
/vteventviewAliases vtev View an Event Trigger script.
Usage: /vteventview [EVENT]
/vtrigger delvarAliases vt delvar Removes an Object variable.
Usage: /vtrigger delvar [i|s|b] [OBJECT] [VARIABLE]

Script Commands

@BROADCASTBroadcast a message to the whole server. Color codes &a-&f, &1-&9 and Special codes &l &n &o &m &r are welcome.
Usage: @BROADCAST [TEXT]
@DELVARDeletes an $Object.Variable from memory.
Usage: @DELVAR [i|s|b] [$Obj.Var] - i=int s=str b=bool

Fuctional Place Holders

<hasmoney:arg1:arg2>Replace arg1 with the name of the player and arg2 with a the amount of money you want to see if player has. Replaces with true | false - depending on success
Requires Vault with Economy support
<givemoney:arg1:arg2>Replace arg1 with name of player and arg2 with a the amount of money you want to give player. Replaced with true | false - depending on success
Requires Vault with Economy support
<takemoney:arg1:arg2>Replace arg1 with name of player and arg2 with a the amount of money you want to take from player. Replaced with true | false - depending on success. If player does not have enough money this returns false and does not take any.
Requires Vault with Economy support
<isblocktype:arg1:arg2:arg3>Replace arg1 with location to check and arg2 with the block id and arg3 with the data byte. Replaced with true | false - depending on if the block at location matches.
Examples: <isblocktype:33,65,122:2:0> or <isblocktype:$Obj.Var:<blocktype>> as long as $Obj.Var is a location or <isblocktype:<triggerloc>:$Obj.Var> as long as the $Obj.Var is of type str in the format of 76:5

v1.0.8

Fixes

  • Fixed Exception Issue that was caused when a player who triggerd a script logged off while script was running.

Added In-Game Commands

/vtrigger savetriggersAliases vt savetriggers Saves only the trigger data to YML files.
Usage /vtrigger savetriggers
/vtrigger reloadtriggersAliases vt reloadtriggers Reloads only the trigger data from YML files.
Usage /vtrigger reloadtriggers
/vtrigger reloadscriptsAliases vt reloadscripts Reloads only the sepatate file.script.yml files.
Usage /vtrigger reloadscripts
/vtrigger autosaveAliases vt autosave Pause or Resume autosaveing of data to YML files.
Usage /vtrigger autosave

Added Script Commands

@LIGHTNINGCreates lightning strike at location, CauseDamage = true | false
Usage: LIGHTNING [CAUSEDAMAGE] [LOCATION]
@EXPLOSIONCreates an explosion at location. power=0.0 to 4.0 A power of 0.0 will give effect but no damage.
Usage: @EXPLOSION [POWER] [LOCATION]
@CALLRuns another script from within a script.
Usage: @CALL [FILE:SCRIPT]
FILE is the file without the .script.yml extension that the script is in. SCRIPT is the name of the script to run
@SETBLOCKSets the location to the sepcified block ID
Usage: @TOGGLEBLOCK [BLOCKID] [LOCATION]

Added Fuctional Place Holders

<relativeloc:arg1:arg2>Replace arg1 with a location, replace arg2 with a relative location
This will be replaced with a new location relative to arg1 by arg2. As an example:
<relativeloc:122,67,-218:5,-2,15> This would be replaced with 127,65,203
<relativeloc:$obj.var:20,0,3> or <relativeloc:<triggerloc>:5,-2,15>

New Feature: Separate Script Files

You can also save scripts in separate files filename.script.yml that are auto loaded at startup. VariableTriggers will search for files with .script.yml extension and load to memory for fast access from the interpreter. This in conjunction with the new <relativeloc:arg1:arg2> will allow you to write reusable scripts relative to the <triggerloc> or <playerloc>

To exicute these additional scripts you will use the script command:
@CALL [filename:script]
from within your scripts to run other scripts. for the filename argument do not use the extension. filename.script.yml This in conjunction with the new <relativeloc:arg1:arg2> will allow you to write reusable scripts relative to the <triggerloc> or <playerloc>

To exicute these additional scripts you will use the script command:
@CALL [filename:script]
from within your scripts to run other scripts. For the filename argument do not use the extension. filename.script.yml

You may call as many scripts from within a script as needed as long as you dont call a depth greater than 20. In other words Calling a script from a scipt is a depth of 1 and if that script calls a script your at depth 2 and so on...

If you call a script that calls a script that calls a script ( depth 3) and that script ends so your back at depth 2 and call another script your only depth 3 again. Get it?


v1.0.7

  • Added Comments
    • Start your line with//
    • - '// This is a comment line and will be ignored.'
  • Added <issprinting> PlaceHolder. Will replace with boolean true or false depending on if the triggering player is sprinting at the moment the trigger was triggered.
  • Added <health> Placeholder. Will replace with an integer of the triggering players health at the moment the trigger was triggered
  • Added New Feature Functional Place Holders These work just like normal placeholders except some may take an argument and the replacement is done at the time in the script that the Functional Place Holder is interpreted.
    • <haspermission:argument> Replace argument with a permission node as in some.node
    • <haspotioneffect:argument> Replace argument with the name of a Potion Effect
    • <currentloc:> No argument
    • <random0to:argument> Replace argument with an integer number
    • <random1to:argument> Replace argument with an integer number
    • <health:> No argument
    • <issneaking:> No argument
    • <issprinting:> No argument

v1.0.6

  • Fixed @SETSTR bug.
  • Fixed issue of the first time you run VariableTriggers and reload server before first auto save. This was causing the loss of trigger data.
  • Fixed @TOGGLEBLOCK to work with $obj.var for location
    • Usage: @TOGGLEBLOCK [itemID] [location]
  • Added the ability to use decimal with @PAUSE and @COOLDOWN
    • @PAUSE 2.5 - will pause f0r 2 1/2 seconds
    • @PAUSE 0.1 - will pause for 1 tenth of a second
  • Added @GETENTITYCOUNT [OBJECTVARIABLE] [ENTITY] [RADIUS]
    • OBJECTVARIABLE - An $object.variable to save the count in
    • ENTITY - The entity you want to get the count of ZOMBIE, CREEPER, COW, PLAYER and so on...
    • RADIUS - The radius in blocks from the triggering player to check
    • Usage: @GETENTITYCOUNT $<this>.count ZOMBIE 10
    • This checks for ZOMBIE's in a 10 block radius of the triggering player and saves the the number of zombies found on the trigger object in a variable named count.
  • Fixed a few other minor bugs .

v1.0.5

  • Added @CMDCON command to scripting - This is in responce to a request about PEX. This will execute a command as if it were type at the server consol.
  • Added MaxBackups option to config.yml - This sets the maximum number of backup files per data type stored in the backup folder.
  • Fixed @POOF, @SMOKE, @FLAMES, @SOUND to work with location variable set with /vtrigger setloc

v1.0.4

  • Added /vtrigger setloc - This will allow the creation of an $Object.Variable that stores the current position and orientation. Can then be used in script as a location as in @TP $loc.warp2 or @ENTITY ZOMBIE 3 $Castle.loc1
  • Added /vtwalkview and /vtclickview - This will allow you to view the script on an existing trigger.
  • Fixed a couple minor permission issues

v1.0.3

  • Fixed some syntax errors

v1.0.2

  • New Release