VariableTriggers v2.0.4.1

Details

  • Filename
    VariableTriggers.jar
  • Uploaded by
  • Uploaded
    Aug 19, 2015
  • Size
    187.37 KB
  • Downloads
    1,722
  • MD5
    fd6c27106c0f6b174e4a1d1720f22e22

Supported Bukkit Versions

  • 1.8.1

Changelog

v2.0.4.1

  • Compiled in Java 7 for those who don't have access to Java 8.
  • You can now use two underscores to indicate a space in @MODIFYPLAYER LISTNAME somenamehere

v2.0.4

  • Scripts no longer randomly stop working
  • Updated to latest Bukkit version
  • Provided support to pull placeholders from PlaceholderAPI
  • Provided support for PlaceholderAPI to pull variables from VT in the future
  • Various bug fixes

v2.0.3

  • @BROADCAST now supports color codes
  • <cmdarg:> works correctly
  • <cmdargcount> returns the correct value now (was one too many before)
  • @COOLDOWN works as intended (was previously set to milliseconds)
  • <var:> replaces the placeholder correctly (previously left "<var:>")
  • Variables in long format now process correctly when doing math (< > != = >= <=)
  • Variables that are strings can be used with operators as it will take the string length.
  • Added @SENDTOSERVER <player> <server> for BungeeCord users. <server> is as you've defined it in the bungee config.
  • <takeitem> works with one item in the inventory (previously ignored less than 2 items)

v2.0.2

  • PlayerChat added under /events/player
  • No more "/vt ?" spam in console!
  • @TP fixed
  • Async-catcher fixes
  • HELDITEM:DISPLAYNAME fixed
  • Other various fixes

v2.0.1

Minor fixes

  • New users can now create files successfully with 1.8+
  • If you mess up a command it will no longer spam you with errors
  • @VTSystem.OnlinePlayers has been temp disabled until I find a suitable workaround
  • Compiled with 1.8 to ensure compatibility
  • Debug mode enabled by default for new/upgrading users
  • Debug mode can be toggled with /vt debug. With debug mode OFF, no errors will be printed in console when an invalid script line is run
  • Right/Left click triggers work now. (e.getBlock() changed to e.getPlayer(). Yeah, that was all that was wrong.)

v2.0

MAJOR UPDATE, PLEASE BACK UP ALL OF YOUR FILES!!!!

I (Lyoko_Firelyte) have coded this entire build from scratch, which means everything runs a little bit differently (and why it took so long). Please report any bugs you find and include as many screenshots as possible to help me resolve the issue with the next build.

I will slowly work on full documentation for VTV2

Your files will be re-adjusted to fit my new format upon first boot. Please do not rename your VariableTriggers jar, or you will never be able to run this build.

New Events / Event Additions

  • Potion Splash
    • <potion:name> <potion:lore:index> <potion:displayname> <potion:enchant:index> returns name_level <potion:amount> <potion:lore:amount> <potion:enchant:amount> <potion:effect:amount> <thrower> <throwername> <affectedentity:amount> <affectedentity:index:type> <affectedentity:index:name> <affectedentity:index:location> <potion:effect:index:type> <potion:effect:index:amplifier> <potion:effect:index:duration>
  • Block Break, Block Place
    • <blockmaterial> <blocklocation> <blockxp>
  • Area Enter / Exit
    • <movetype>
  • Player Death
    • <isprojectile> <killerentitytype> <deathcause>
  • Player Click Air, Player Click Block, Player Trigger Pressure Plate
    • <clicktype> <blockid> <blockdata> <blocktype> <blockmaterial> <blocklocation>
  • Item Despawn
    • <despawneditem:name> <despawneditem:lore:index> <despawneditem:displayname> <despawneditem:enchant:index> returns name_level <despawneditem:amount> <despawneditem:lore:amount> <despawneditem:enchant:amount>
  • Item Spawn
    • <spawneditem:name> <spawneditem:lore:index> <spawneditem:displayname> <spawneditem:enchant:index> returns name_level <spawneditem:amount> <spawneditem:lore:amount> <spawneditem:enchant:amount>
  • Player Enchant
    • <enchanteditem:name> <enchanteditem:lore:index> <enchanteditem:displayname> <enchanteditem:enchant:index> returns name_level <enchanteditem:amount> <enchanteditem:lore:amount> <enchanteditem:enchant:amount>
  • Entity Explode
    • <explodedblock:amount> <explodedblock:index:type> <explodedblock:index:byte> <explodedblock:index:location> <yeild> <entitytype>
  • Entity Create Portal
    • <portaltype> <entitytype>
  • Vehicle Enter
    • <entitytype> <entityname>
  • Bed Enter, Bed Exit
  • Player & Console Command
    • <cmdarg:1> to <cmdarg:infinite>, <cmdarg1> to <cmdarginfinite>
    • Activate a console command with vtcon <name>
  • Entity Death
    • <drops:0> to infinite <droppedexp>
  • Inventory Click
    • <clickeditemenchant:index> <inventorysize>
    • Variables supported inside inventory files
    • Loaded automatically, no need for /vt reloadtriggers
  • Player Join, Player Quit
    • Cancelling this event will not display a default join/leave message, allowing you to make your own
  • Entity Damage
    • <damagedbyplayer> <damageamount> <damagecause>
  • Lightning Strike
  • Bucket Fill, Bucket Empty
    • <waterlocation> <emptylocation>
    • Bonus points if you actually use this event
  • Drop Item
    • <droppeditem:name> <droppeditem:lore:index> <droppeditem:displayname> <droppeditem:enchant:index> returns name_level <droppeditem:amount> <droppeditem:enchant:amount> <droppeditem:lore:amount>
  • Item Hold
    • <oldslot> <newslot>
  • Projectile Hit
    • <projectile> <projectileshooter> <projectileshootername>

New Scripts / Script Changes

  • @MODFIYPLAYER
    • DAMAGE <amount>
    • PLAYERTIME <number>
  • @SETMOTD <motd>
  • @SETCANCELLED <event> <true/false>
  • @WORLDEDIT
    • SETPOS1 <location>
    • SETPOS2 <location>
  • @SCOREBOARD
    • coming soon (next build)
  • @MODIFYINV
    • coming soon (next build)

Functional Placeholders

  • <health:optionalplayer>
  • <maxhealth:optionalplayer>
  • <contains:arg1:arg2>
  • <isop:player>
  • <playerloc:world>
  • <random:from:to>
  • <arraysize:@Some.List>
  • <triggerloc:x>
  • <triggerloc:y>
  • <triggerloc:z>

Other

  • @IF
    • Use @IF = for non-case sensitive, and @IF == for case sensitive
    • No variables needed, simply use @IF $some.var = something
    • Data types are automatically detected for everything, even arrays
  • Arrays
    • Support to use $some.array[index]
    • Use <arraysize> instead of placing it without an index
  • @CALL
    • You can now use @CALL this:name to call another script in the same file
    • All events will call the 'main' function first, and you can call others later.
  • @LOOP removed
  • @WHILE will wait for the while to finish, but run them all in new threads
  • Placeholders order has changed.
    • <holders>, [holders], $some.var, <some:functional>
    • The [placeholder] acts the same as the <placeholder> but is replaced second
    • Variables can be placed inside functional placeholders or next to each other
    • $variable.variable2$some.var will correctly replace both
  • Area Triggers
    • You can no longer edit / delete / add scripts in game, but you can define the areas
    • Instead of the weird way it was before, you can set the priority of regions.
  • <sn:> (super nesting) has been removed
  • @QUIET has been removed
  • @SET is now universal for all data types, no need for @SETSTR or @SETINT.
  • Automatic Spigot detection - will run each line sync if spigot does not allow sync
    • In other words, no more need for @SETBLOCKSAFE and similar commands
  • Added command support for scripts
  • Graphically updated the help menus, starting with /vt ?
  • The file structure is really pretty.
  • Everyone's advanced mode may have been reset. View the documentation on advanced mode to re-activate it.

v1.3.3.1

Tweaks

CPU usage reduced dramatically
@FOR removed until I fix it's resource hogging issue
@DELOBJ added.
@DELOBJ $object
No spam output on this object.
@IF s $obj.var = null
Check if it's empty.
@VTSystem.OnlinePlayers fixed

v1.3.3

Script Commands

@CANCEL [true / false]
Place this on the FIRST LINE of most events and it will prevent or allow the event from happening
@FOR
A loop that cycles through an array list.
@FOR $obj.var in @array.list
$obj.var will be replaced with the current object in the loop.
@ENDFOR
Use this to end the for loop. Without it the loop will go to the end of the page.
@IF
This now supports array list checking directly.
@IF @ array.list ?= something
Please note that the @ takes the place of s/i/b so include the space as noted above.
@STRBUILD
Builds a string with the given critera.
@STRBUILD $obj.var <line> <message>
Places the message args after line into $objvar
@STRBUILD $obj.var 2 Hello there how are you doing would say how are you doing
@MYSQL
Enter your database information in the MYSQL.yml file. You can then use normal java mysql commands.
@MYSQL @obj.var <statement>
The result will be placed in @obj.var for your viewing pleasure.
Example: @MYSQL select * from users;
@FOR $obj2.var in @obj.var
@PLAYER $obj2.var
@ENDFOR
Please note that I'm not responsible for telling you how to use MYSQL syntax, please look it up somewhere.
Also I've not tested making new databases. Worst case you can just make one manually.

System Variables

Introducing System Vars! These are created by the system. They are all array lists.
@VTSystem.OnlinePlayers
Creates an arraylist of every player's name who is online.
@VTSystem.OnlineUUIDs
Same as above but lists the UUIDs instead.

Placholders

<hasitem> now checks your armor
<sn:>
Supernesting. It reads the statement backwards and converts all of the variables into one final string.
Example: <sn:$var.$var2.$var3.$var4.$var5.$var6.var7>
<onlineplayeramount>
Do I have to explain that one?
<signtext:coords:line>
Grabs the sign text on the line at coords. The first line is 0. Coord format is 50,50,50.

Events

LeftClick
Activated when you... left click.
RightClick
Activated when you... right click.

v1.3.2

Events

WorldChange
<worldto> <worldfrom>
You will need the event in the world that you are going to
Sneak
<sneaking> - boolean - true if they entered sneak mode, and false if they went out of it
Sprint
<sprinting> - boolean - true if they started sprinting, false if they stopped
Flight
<flying> - boolean - true if they started flying, false if they landed
WeatherChange
<weather> - boolean - true for stormy, false for sunny
Enable
Triggers when the plugin loads. The world must be set to "VTSYSTEM"
Disable
Triggers when the plugin disables. The world must be set to "VTSYSTEM"

Placeholders

<systemtime:default>
Displays the date and time. You can change default to your preferred format.
See this page for help on formatting.
The default is set at EEEEE, MMMMM dd, H:mm

Fixes

Vault
No longer stops the plugin from being enabled if you don't have a chat plugin
Debug
Some more debug messages have been removed
@MODIFYPLAYER
You can use two underscores to indicate a space for display names and other inputs

Script Commands

@!
Displays helpful-ish debug info, including version, vault hooks, scripts, enable status, etc
Must be run by a player. I recommend making a /debug command to run this.

v1.3.1

An Array of Bug Fixes!

Fixes

Vault HookVault should stop throwing errors for servers with no chat plugin.
Console SpamMost spam has been fixed from old debug code
most.
Timer EventsThey work again!
@PRINTThis now accepts variables.

Additions

<uuid:PLAYER>Obtain an offline player UUID
Example: <uuid:WinneonSword>
<food:PLAYER>Obtain a player's food level
<saturation:PLAYER>Obtain a player's saturation level
/vt savevarsSave all variables to file without waiting for the autosave
/vt sv is a shortcut of this
Array Lists!Sort things into a list.
Related Commands:
@ADDLIST @obj.var something
@REMLIST @obj.var something
@DELLIST @obj.var
@PLAYER @obj.var[index]
@PLAYER @obj.var
Examples:
@ADDLIST @player.list Hugh_Jasses
@ADDLIST @player.list WinneonSword
@PLAYER @player.list[1]
You would see WinneonSword because 1 is the second entry in a list.
Now, if you want to remove WinneonSword from the list...
@REMLIST @player.list WinneonSword
@PLAYER @player.list[0]
We can pull Hugh_Jasses with the index of 0 now. Lastly, to see how many things are in a list...
@PLAYER @player.list
If you do not specify an index, it will display how many items are in there. This would return 1.
You can use variable names for the index as well, such as...
@PLAYER @player.list[<var:$counter.variable>]
This only works with <var:> surrounding the variable.
Also check if something is in the list with @IF @player.list ?= WinneonSword

v1.3

VT 1.3

I've worked very hard on this update, please report any bugs or issues via a ticket! Sorry if your suggestion didn't get in! lyokofirelyte

New Script Commands

@FIREWORKThis has been moved to a safe thread for spigot. You can display pretty fireworks!
Usage: @FIREWORK [color] [type] [location]
Example: @FIREWORK red burst <playerloc>
@PARTICLEAny material can be converted into a particle effect.
Usage: @PARTICLE [material] [location]
Example: @PARTICLE cobblestone <playerloc>
@FALLINGBLOCKThis makes a block fall like sand!
Usage: @FALLINGBLOCK [material] [location]
Example: @FALLINGBLOCK cobblestone 40,40,40
@SETBLOCKSAFEThis is simply @SETBLOCK for Spigot users.
Info: Bukkit users can still use @SETBLOCK for slighty faster performance.
@WORLDTPTeleport to a different world at your current coords.
Usage: @WORLDTP [player] [world]
@CLEARCHATWipes the chat window clean for someone.
Usage: @CLEARCHAT [player]
@PRINTPrints something to console (for debugging?)
Usage: @PRINT [words]
@SWITCH and @CASEIt's like @IF, except better.
Usage: @SWITCH [type] [variable] You can use s, i, and b
Example:
@SWITCH s $object.variable
@CASE red
@PLAYER The object is red!
@CASE blue green orange purple
@PLAYER The object is blue, green, orange, or purple!
@ENDSWITCH
All switches must end with an @ENDSWITCH, but there is not an @ENDCASE, as a @CASE marks the end of the previous one.
@MODIFYPLAYERA whole lot of commands that should allow you to drop some more plugins. #vtmasterrace
Usage: @MODIFYPLAYER [player] [modification] [value]
Example: @MODIFYPLAYER <playername> HEALTH 20
List of modifications:
HEALTH number
FOOD number
SATURATION number
EXP and XP number
WALKSPEED number, please note over 1 is insanely fast; use 0.2 for a little bit of boost.
FLYSPEED number, please note over 1 is insanely fast; use 0.2 for a little bit of boost.
DISPLAYNAME string, you can use color codes like &a
LISTNAME string, you can use colors codes like &a
FLYING boolean
GAMEMODE string, use creative, survival, or adventure
MAXHEALTH number
HELDITEM string, use a valid material, like cobblestone
HELDITEM:MATERIAL string, this keeps the item data and just swaps the material type
HELDITEM:ID string, same as above but in ID form
HELDITEM:META number, used to change the type of something such as white wool to pink wool
HELDITEM:AMOUNT number up to 64
HELDITEM:ENCHANT string, use a valid enchant like damage_all. This will always be a level 1 enchant
HELDITEM:DISPLAYNAME string, keeps data but changes the item name. Color codes work.
HELDITEM:LORE:SET string, sets the lore to that exactly.
HELDITEM:LORE:ADD string, must already have lore to add to
HELDITEM:LORE:REMOVE string, kills all lore
HIDDEN boolean, hides (or unhides) the player from the server (invisible and in tab)
BANNED boolean, this requires advanced mode, and won't kick the player from the server
OPERATOR boolean, this required advanced mode and puts a message in console
@FORKDon't tell Lex about this! :)
@SETVELOCITYPush a player in a direction!
Usage: @SETVELOCITY [player] [x] [y] [z] the numbers for x,y,z are how powerful in that direction to push
Example: @SETVELOCITY <playername> 0 2 0 this would give about 20 blocks of push
@OPENINVOpens an inventory from your InventoryTriggers.yml file
Usage: @OPENINV [name]
Example: @OPENINV teleportInventory
@CLOSEINVForce-closes someone's inventory
Usage: @CLOSEINV [player]

New Placeholders

<playeruuid>Returns the unique identifier of the triggering player.
<playerloc:x>Returns the X coord of the triggering player.
<playerloc:y>Returns the Y coord of the triggering player.
<playerloc:z>Returns the Z coord of the triggering player.
<eval:>Completes the math for the argument.
Usage: <eval:[math]>
Example: <eval:$object.variable%*4*100+10*%object.variable2%+10>
Info: Variables must be separated by "%" symbols so that the script can read them properly.
Example: To say "5 times $object.var plus 7" it would be <eval:5*%$object.var%+7">
<holdingitem:[player]:[material]>Returns true or false if [player] is holding [material]
Example: @IF b <holdingitem:<playername>:cobblestone> = true
<clickedslot>The slot number from an Inventory Event
<clickeditem>The material name of the clicked item in an Inventory Event
<clickeditemname>The display name of the clicked item in an Inventory Event
<inventorytitle>The title of the inventory involved in an Inventory Event To test for spaces, use "_"
<clickeditemlore:index>The lore of the clicked item in an Inventory Event
Example: <clickeditemlore:0> would return the first line of lore

New Test

?=Checks if something contains something.
Example: @IF si $object.var ?= red If this object contains the word red...

New Event

Inventory Click EventFires when you click something in a non-standard inventory and there is a script in that world for it
Script Example: (In EventTriggers file)
  Inventory:
    CoolDown: 0
    Script:
    - '@IF s <inventorytitle> ?= TELEPORTS'
    - '    @SWITCH i <clickedslot>'
    - '        @CASE 0'
    - '            @CMDOP spawn'
    - '        @CASE 1'
    - '            @CMDOP warp <playername> pvp'
    - '        @CASE 2'
    - '            @CMDOP warp <playername> minigames'
    - '    @ENDSWITCH'
    - '@ENDIF'
Creating inventories example (In InventoryTriggers.yml)
teleportInventory:
- 'cancelled: true'
- 'title: TELEPORTS'
- 'slots: 9'
- 'item: wool, meta: 5, amount: 1, name: Spawn, lore: Teleport % &a&ospawn, enchant:
  durability, slot: 0'
- 'item: wool, meta: 6, amount: 1, name: PVP, lore: Teleport % &4&opvp, enchant: durability,
  slot: 1'
- 'item: wool, meta: 7, amount: 1, name: Minigames, lore: Teleport % &3&ominigames,
  enchant: durability, slot: 2'
Specifics:
cancelled: true or false - should we stop the person from taking the item when they click it?
title: inventory title - color codes work!
slots: how many slots? It MUST be in multiples of 9!
item: [material], meta: [number], name: [name], lore: [lore, seperated by % for a new line], enchant: [enchant], slot: [slot]
name, enchant, and lore are optional

New Features

@SIGNTEXTIf you put "%c" for the text, it will clear the line.

Fixes

ENTITIESIf you specify an invalid entity, it will spawn a villager and alert you in console.
SETBLOCKAdded @SETBLOCKSAFE for Spigot users.
FIREWORKMoved @FIREWORK to a safe thread.
FILESExample script should stop throwing errors now.
VAULTVault is once again optional.

Tweaks

CONSOLEConsole messages got a re-work and look prettier.
CONSOLEChanged prefix to [VT] from [VariableTriggers]
SHORTCUT/vt rt can be used for /vt reloadtriggers
SHORTCUT/vt st can be used for /vt savetriggers
SHORTCUT/vt rs can be used for /vt reloadscripts

Tickets

TICKETSPlease include stacktraces & screenshots!

I hope you all enjoy this build :)

v1.2.7

Small Updates

  • Update from lyokofirelyte - Please ensure you delete your old VariableTriggers.jar as this one has a different name!
  • Added <helditemname> to obtain the name of the item in your hand
  • Added <helditemdisplayname> to obtain the display name of the item
  • Added <playerdisplayname> to grab the player display name, works similar to <playername>
  • Added <playerlistname> to obtain the tab list name of a player, similar to <playername>
  • Added <playerprefix> which hooks into Vault to obtain a prefix (Such as PEX Prefix)
  • Added <playersuffix> which hooks into Vault to obtain a suffix (Such as PEX Suffix)
  • Added @FIREWORK <color> <type> <location> to play firework effects (Example, @FIREWORK red burst <playerloc>)
  • Fixed health issues related to 1.7 updating
  • Updated to 1.7.2-R0.1
  • Using Maven for compiling & dependencies
  • Credit to codename_B for firework nms values

SPIGOT USERS: 1.3 will be coming soon which includes a wide array of async fixes, so please be patient!

v1.2.6

Fixes

Addresses the rest of the async errors with script @commands such as @DROPITEM, @EXPLOSION and some other areas. Also removed the delay on @CMDOP, @CMDCON and @CMD I imposed in the last update. I am very hopefull that this will resolve just about all the async issues and a few other smaller issues.

v1.2.5

Fixes

This update addresses async errors with @CMD, @CMPCON, @ENTITY and other concurrent issues with Obj.Vars along with some other issues. I am hopeful that this will also solve the async with Spigot for the above listed commands.

I will be waiting for some feed back on this update from Spigot users

v1.2.4

Fixes

Addresses the concurrent modification issue.

This is only a fix for the issues when @TP, @CMDOP, @SIGNTEXT and @GETENTITYCOUNT So for those having this problem while using these in your scripts this should fix the concurrent modification errors with those. I will be continuing to search out and fix the other major issues before I add new features.

v1.2.2

For bukkit 1.4.6

v1.2.2.Tekkit

This is for the Tekkit users that have been requesting an update top work with Tekkit

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 thi