VariableTriggers

Make your own plugin like features and more using VariableTriggers
This is a very powerful plugin that has unlimited potential. Create triggers that run lines of script when a player Clicks or Walks on a block (dirt, door, switch, trigger, torch, any block) or Create Event Triggers such as PlayerDeath , EntityDeath, BlockBreak, BlockPlaced, Join, Quit, Respawn, Interact and EntitySpawn that also run scripts. You can define Area Triggers and Command Triggers as well. You can use Dynamic Object variables and conditional IF and ELSE statements in the scripts. You can run any command that a player or OP can run and many speacial built-in commands to Teleport, Spawn Entities, Play Effects Visual or Sound, Set Blocks, Toggle Blocks, Check Players Heath and much more!. The scripts are executed on their own threads to take the strain off of the main server thread.
















-
View User Profile
-
Send Message
Posted Aug 22, 2014Hey. i created following script however outcome is far from what it is supposed to be.
Starting with all clean variables, it decides that killing pig for 200 exp gives me enough exp to level to slayer lvl 1. So it suggests that 200 >= 1000. and so on till i reach lvl 5. Onwards it works perfectly correctly. Any suggestions?
-
View User Profile
-
Send Message
Posted Aug 22, 2014@KyadCK There are some problems in using WalkTriggers and AreaTriggers in Cauldron Server 1.7. When somebody fire a WalkTrigger or a AreaTriggers, it will have a great chance to run several (two, even three or four) same scripts at the same time. But I think the Cauldron Server 1.7 is to blame after doing some tests. So I prefer to use ClickTriggers.
-
View User Profile
-
Send Message
Posted Aug 21, 2014@RaycusMX
Right, so after the update that contains the patch Lyoko_Firelyte just made goes through, you should be able limit these click triggers to only right or left click if you so desire, or even run a different script for each. Should take care of your problem I assume.
Until then I would suggest using Walk triggers or something.
-
View User Profile
-
Send Message
Posted Aug 21, 2014@KyadCK
Done! :D I've added <clicktype> which will return LEFTCLICK or RIGHTCLICK as the replacement.
-
View User Profile
-
Send Message
Posted Aug 21, 2014@Lyoko_Firelyte
If you do not want to modify the timing code then may I suggest <leftclick> and <rightclick> placeholders for the use of the generic interact event for scripts that are sensitive to the issue? Adding an '@IF b <leftclick> = true' would solve his problem just as well, plus allow us to chose if we want right, left, or both for the generic Click Trigger.
-
View User Profile
-
Send Message
Posted Aug 21, 2014@KyadCK
Ah alright that makes sense. I will most likely add the enum values as separate events but also keep in the general event as to not break previous scripts, and if it does not matter if it was a left or a right click.
Edit: After looking at the code that's already done, we are currently listening for a generic interact event, left click, and right click. That means that it is a timing issue, and not a event issue. My suggestion is to just modify your script accordingly - I do not want to delay the events in any way due to the amount of time it takes to process them in the first place - this could have a bad impact on more intensive servers with heavy traffic.
-
View User Profile
-
Send Message
Posted Aug 21, 2014@Lyoko_Firelyte
I think he means the ClickTrigger, not LeftClick or RightClick Events. As in set up a block with a bone and when it is clicked on, do something, not the sever events.
Since as far as I am aware Click Triggers can operate on both Right -or- Left both resulting in the same script, if you are able to set both off before the script reaches the point that it checks for it to be a one-time thing, the script could conceivably run that trigger twice bypassing it since the boolean check would finish before the set boolean. A simple timing issue.
My short term solution would be to use a different trigger, such as Walk or Area, until such time as Click can be "fixed".
My long term solution is to include a 1-tick cooldown on the Click Trigger, not allowing any more (translation: only allow one) block interact from that player to pass (in VT) until the tick is over. At 1/20th of a second, that should be fine It doesn't even need to be that long. Alternatively, we could have a Right and Left Click Trigger instead.
-
View User Profile
-
Send Message
Posted Aug 21, 2014@RaycusMX
I'm still not seeing how you are triggering both at the same time - they are two separate events, so it should trigger a different scripts, not the same one. However, if it is, the only solution is to use pauses or something of that nature, as right and left click events fall under the PlayerInteractEvent, which is getting triggered for both left and right click events. The event you are scripting with is branched from if it was a left or a right click.
-
View User Profile
-
Send Message
Posted Aug 21, 2014@Gaurav1234 That might work. But it still relate to server delay.It's better to fix the root cause of this problem, I think.
-
View User Profile
-
Send Message
Posted Aug 20, 2014@RaycusMX
Oh that's simple. Right about the "IF" statement put "@PAUSE 0.2"
This should stop it because technically no two triggers can occur at the same EXACT time; one happens before the other. That pause should stop it. If not, then try a random pause time so that both triggers will pause for different times; like this
'@PLAYER &6Please wait a few seconds before this thing occurs (whatever it is)'
'@PAUSE <random1to:5>'
-
View User Profile
-
Send Message
Posted Aug 20, 2014@Gaurav1234 But that can cause big problems.For example:
Actually this item can only be droped once. But if I left and right click at the same time, it will be droped twice.
-
View User Profile
-
Send Message
Posted Aug 20, 2014@RaycusMX
Rightclick and Leftclick are two different triggers
-
View User Profile
-
Send Message
Posted Aug 20, 2014Report a BUG. A player can fire a ClickTrigger twice by clicking left and right mouse button at the same time. This can cause many problems just like double reward.
-
View User Profile
-
Send Message
Posted Aug 19, 2014@Den00
Yes, toggle block does not work with Spigot at the moment, but you can script your own toggle block using variables.
-
View User Profile
-
Send Message
Posted Aug 19, 2014Quite important. Also hook more commands to a bone (setting positions with a bone, for example) like @SETBLOCKSAFE
-
View User Profile
-
Send Message
Posted Aug 19, 2014Been using this plugin for over 6 months on and off and finally global player data has been added! Thank you! ( And these left and right click triggers are going to save me alot of time too.. )
-
View User Profile
-
Send Message
Posted Aug 18, 2014@Gaurav1234
You must have a trigger in each world that you want it to take effect in - I'm guessing the player logged in to a world that you don't have a listener in.
Also, @VTSystem.OnlinePlayers automatically keeps track of online players :3
-
View User Profile
-
Send Message
Posted Aug 18, 2014Hey,
I'm using VT 1.3.3.1 and the Join/Quit triggers don't seem to be working properly.
http://pastebin.com/cjrN3pGH
Those are my triggers. There aren't any errors in console; but it doesn't message me "bleh" when a player joins.
EDIT: The same thing seems to be happening with blockbreak and chat; Timer is working fine though (so it's not that all the event triggers don't work)
Thanks,
Gaurav
-
View User Profile
-
Send Message
Posted Aug 18, 2014@tremby90
Are you using a bone?
-
View User Profile
-
Send Message
Posted Aug 18, 2014is this plugin broken?
i type /vt setarea <areanme> then i left click and right click where i want the area then i type /vt definearea <Areaname> and it comes up with position 2 not set, every time