VariableTriggers v1.0.9

Details

  • Filename
    VariableTriggers.jar
  • Uploaded by
  • Uploaded
    Jun 25, 2012
  • Size
    101.26 KB
  • Downloads
    412
  • MD5
    94a8c2d102c37c2132fae55faa934e54

Supported Bukkit Versions

  • CB 1.2.5-R4.0

Changelog

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