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 Nov 18, 2014@Lyoko_Firelyte
One more question:
Since you are doing a rewrite of VariableTriggers, can I assume that you intend to port VT to Spunge when it becomes available?
-
View User Profile
-
Send Message
Posted Nov 18, 2014@Lyoko_Firelyte
Question about processor time consumption:
If I use RightClick & LeftClick events triggers with a single command line, '@SETSTR $<playername>.LastClick Left/Right' and say, I have a hundred players on line at any given time with at least 10% of them are enguaged in PvP battle and another 50% are swinging a pickaxe, meaning lots of left clicking, what percentage of processing time would you say I should expect. My goal is to use Click triggers for sell and buy signs and I have to know if the sign click was a right or left click.
Should I worry about the use of the LeftClick event with all this action going on?
-
View User Profile
-
Send Message
Posted Nov 17, 2014Here's a code teaser of one of the MANY MANY new features of VT 2.0 I've been working on!
New events are to come! :D
-
View User Profile
-
Send Message
Posted Nov 17, 2014@H8llfire
By the way, you are right. A third tear of a scripting language such as VT is a heavy load to processing speed. I am using VT for almost all my interactions in my game right now as a means for speed of getting my game on line but after I open the game to the public and Spunge is finally available, I will be replacing my VT commands with programming directly through Sponge's APIs.
-
View User Profile
-
Send Message
Posted Nov 17, 2014@H8llfire
Actually, I think I take a very modular approach and not try to do everything in the trigger command lines. That would wreak of a linear programming mentality. I call my 2 line scripts for setting the LastClick variable and call the Click processor script that in turn does all the front end click event processes and then passes the processing on to the proper script based on what was clicked on, or do nothing if no process was required by that click.
-
View User Profile
-
Send Message
Posted Nov 17, 2014@AncientTom
It kills the modularity and simplicity of the code. I'm not talking about processor speed, that boat has sailed along when I installed VT. Not saying that VT has a bad performance, but using it for as much as I do instead of just messing with the BukkitAPI directly (what I am doing too) is already quite bad for overall performance, even though most of it runs async.
-
View User Profile
-
Send Message
Posted Nov 17, 2014@H8llfire
The clicks have to be processed anyway so unless you only have one liner trigger commands to deploy, why not do it in scripts. I don't think that a few microseconds of processor time for a function call is going to mater. The processor time build up will be in the command lines themselves, whether they are in the loaded triggers or in the loaded scripts.
-
View User Profile
-
Send Message
Posted Nov 17, 2014@AncientTom
So instead of just using the CLICK trigger, you use the Interact triggers? Seems like a unnecessare system bloat imo..
-
View User Profile
-
Send Message
Posted Nov 17, 2014@H8llfire
Now that I am getting into my scripts, I think I am working toward the same end as you with left and right click. Here's what I'm doing;
I created a LeftClick and a RightClick Event trigger that calls my Events:LeftClick or an Events:RightClick script. These scripts each set the variable $<playername>.LastClick with either Left or Right. Then, these two scripts call my script Events:ProcessClick which starts processing based on the last value entered into $<playername>.LastClick. No mater how many clicks that happened, right and left, my script will only process the last click entered into the variable before the process starts. At least, this is my plan.
By the way, I can't do a final check of both mouse buttons being clicked because my mouse pad driver phantoms out a center button click when I try it so I get nothing.
-
View User Profile
-
Send Message
Posted Nov 17, 2014@AncientTom
Here is something really, Really strange about my problem with my issue of getting the game's error message each time I right or left click on an item frame. I just happened to click on an item frame with my no permissions test player and I no longer get this error message. I only get it when the frame tries to break now as it should be. The only thing I have done while working is change the left and right click triggers' command by editing line one and then editing it back to calling my test scripts again. ????
-
View User Profile
-
Send Message
Posted Nov 17, 2014@AncientTom
I see what you are doing. Usually my script does that, but some lines later. However, the cooldown is in place and should stop the player from being able to run it a second time. The @COOLDOWN is in the first line.
Also, it is just the Click event. So it shouldn't matter which one you pick.
-
View User Profile
-
Send Message
Posted Nov 17, 2014@H8llfire
I don't think Cooldown is the problem and I could be wrong, but this is probably because they are two different events.
When I write a script, the first lines are almost always '@IF b $<playername>ScriptName.actived != true' '@SETBOOL $<playername>ScriptName.actived true' and the last line before it exits, I use '@DELOBJ $<playername>ScriptName'. This keeps the player from running the script a second time before the script is finished.
You might try a cross script check, something like this; In your LeftClick handler, use '@IF b $<playername>RightClickHandler.actived != true' and in your Right Click Handler use '@IF b $<playername>LeftClickHandler.actived != true'. This should prevent the oposite click handler from working until the triggered handler finishes and clears it's transient object.
-
View User Profile
-
Send Message
Posted Nov 17, 2014Little "bug" about the Clicktriggers: When you right click and left click a clicktrigger at once, it will set them both off before the @COOLDOWN applies. This makes it possible to run two scripts at the same time which are not intended to. Can you add some java internal cooldown that makes sure that this doesn't happen? Should be fairly simple.
I did not post this in the issues because I do not think that these are being checked.
-
View User Profile
-
Send Message
Posted Nov 16, 2014@Lyoko_Firelyte
That's the first thing I checked. I went through every plugin looking for that error message and couldn't find it. I then started to, systematically, disable the possible plugins, one at a time that might be causing it starting with WorldGuard and it's associated .jar files. Still no joy. I even did a grep recursive search through every file in the game directory and didn't find the error. I can only conclude that the same action that reacts to a right click to spin the item and a left click to dislodge the frame is in the game's .jar. I am thinking that it maybe part of the bukkit mod.
-
View User Profile
-
Send Message
Posted Nov 16, 2014@AncientTom
That is another plugin causing that message, nothing is protected in default Minecraft. I'm guessing it's WorldGuard.
-
View User Profile
-
Send Message
Posted Nov 16, 2014@Lyoko_Firelyte
Thanks.
Is there a way to detect a right and left click event from the interact event and is there a way to override Minecraft's response so I don't get the error message of "You don"t have permission for this area"?
What I need to do is be able to detect a left click and a right click on an item frame. If it were a left click, do one thing. If it were a right click, do somthing else and do this without minecraft responding or issuing the error message. Can this be accomplished with VariableTriggers?
-
View User Profile
-
Send Message
Posted Nov 15, 2014@AncientTom
Item frames are entities and call the entity interact event, not the right/left click event, so try using the Interact event :)
-
View User Profile
-
Send Message
Posted Nov 15, 2014I'm trying to get RightClick and LeftClick to work. I created a "/vte RightClick @CALL Events:RightClick" and a "/vte RightClick @CALL Events:RightClick" trigger. I click on a normal block and the triggers work. If I click, right or left, on a frame with an item in it, the minecraft right of left click event handler responds or I get the error message "you don't have that permission for this area before VT's event handler. Is there a way to override this for my script?
-
View User Profile
-
Send Message
Posted Nov 10, 2014@ARCHITECTE90
That would require someone who knows both English and French well enough to do a translation properly. I don't know about Lyoko, but I don't know anyone like that.
If someone wants to volunteer though, by all means.
-
View User Profile
-
Send Message
Posted Nov 10, 2014Hello!
Can you translate (in french if possible) the explanatory pages? Your plugin is very complex, it would be very useful and I can much better understand more things.
Bye!