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 30, 2014Would this work to copy a list fom a permanent object to an object to work with?
'@ADDLIST @Object2.List @Object1.List'
-
View User Profile
-
Send Message
Posted Nov 25, 2014@KyadCK
Interesting. Thanks for your response. My script is working quite well with the use of <getblocklos:LOC:5> but it requires a serious precission to make sure that you are not shooting through the airspace of an adjacent block that has another sign in it. Otherwise, it could alter the wrong sign.
-
View User Profile
-
Send Message
Posted Nov 24, 2014@AncientTom
That would be because it is a player event, not an interact event. It is made to trigger even if they are targeting air, as per my request when I asked for it to be added.
It is triggered when they click. Period. Not when they click on a block. So the trigger being the player would be correct.
-
View User Profile
-
Send Message
Posted Nov 24, 2014Is there any possibility of, any time soon, geting <triggerloc> working with Click Triggers in ver. 1.3.3.1? Right now, it reports the player's location instead of the location of the trigger block. I am working on a suite of scripts that deals with commerce signs and I am having to use <getblocklos:LOC:5> in stead. The problem with using this is that it returns the location of the first block in the line of sight and not necessarily that of the block your crosshairs are looking on.
-
View User Profile
-
Send Message
Posted Nov 20, 2014@KyadCK
Yes you'll be the first to get a build don't worry! :D
-
View User Profile
-
Send Message
Posted Nov 20, 2014@Lyoko_Firelyte
You should totally give me a build to play with ahead of time so I know what to expect since I'm super special and am listed on the right. :P
-
View User Profile
-
Send Message
Posted Nov 20, 2014@Lyoko_Firelyte
Very good. Looking forward to V2.
-
View User Profile
-
Send Message
Posted Nov 20, 2014I'm getting closer to finishing the build. It's a complete rewrite of my own code & I've been making improvements along the way. The file directory is much more organized as well, and it reformats all of your existing files & scripts automatically. However, if you're currently using a variable name for different data types (example: $some.var = 1 and $some.var = test) all versions under VTV2 treat it as two separate variables. With VTV2 it will be one variable, which means you may need to adjust some of your scripts accordingly. I feel as if this is a better approach and will lead to less confusion overall. All old variables that are duplicates will be dumped into a file for recovery manually, and the string variant will be used in the new format. I apologize in advance if this causes any inconveniences. I should be done with VTV2 within a couple of days, currently I only have a few script commands & area events to handle - everything else is done, along with 10+ new events & over 30 new placeholders.
Edit: For clarification, your scripts will be automatically converted to '@IF $some.var = something' from '@IF s $some.var = something' upon first loadup, to avoid unnecessary script editing.
-
View User Profile
-
Send Message
Posted Nov 20, 2014@Lyoko_Firelyte
I ended up rewriting the script with a ladder of nested @IF statements and it works fine now.
Yes. If everything that returned a string was error-trapped to return a null string in the event the function breaks, there should be no more need to send these error messages to the console and everything should just work.
-
View User Profile
-
Send Message
Posted Nov 20, 2014@AncientTom
Yeah, null will be the default "does not exist" indicator for everything and should work for all datatypes after the cleanup.
As for your switch issues, that was my attempt at blending them in with Lex's @IF code, and there were some issues with nesting.
-
View User Profile
-
Send Message
Posted Nov 20, 2014This is not a big deal but when you get around to cleaning things up, could you fix '@IF s XXXX = null' to work with placeholders also?
If I try '@IF s <cmdline> != null' I get the error, argument 3 must be a [=|!=|>|<|<=|>=|?=].
I load the <cmdline> into a variable and use it and it works but it still throws an error,
"worng number of arguements" to the console when the command line is empty.
-
View User Profile
-
Send Message
Posted Nov 19, 2014Another problem:
I wrote a script today that uses a @SWITCH statement nested inside an @IF statement. The @SWITCH works properly but the @IF condition always performs as if it were unconditionally true. When I remove the @SWITCH, from @SWITCH to the @ENDSWITCH, the @IF statement works as it should.
My @IF wrapper around the @SWITCH is to emulate a @DEFAULT at the end of the switch. It would be wonderful if you could add a @DEFAULT statement to the @SWITCH. This would save from having to use an @IF statement and a half a dozen or so @OR lines before the @SWITCH. (Even if it did work nested like this.)
-
View User Profile
-
Send Message
Posted Nov 19, 2014I have a problem with my scripts trying to deal with integers and command arguements. The player can enter a string, an integer, or nothing as an arguement. I try to test the arguement first with '@IF i <cmdarg:2> > 0' but get a VT error about not being able to test a string as an integer. If I try to set an integer variable with the arguement and it isn't an integer, I get the VT error "You must only use numbers for [INTVALUE]". Would it be possible to instead of throwing the error to the console, that when the error is trapped, a Zero is returned instead so that the script continues to work?
-
View User Profile
-
Send Message
Posted Nov 19, 2014@Lyoko_Firelyte Excellent! That would be perfect.
I have kinda found the same strategy by just setting up a right click event trigger to only register the RightClick event in a variable like your <clicktype> and then use a normal click trigger to start the script.
It's to bad that I have to abandon the use of <signtext::>. It's useless since it doesn't work with a placeholder or variable for coordinates. This would be such a heavily used enhancement if one could.
-
View User Profile
-
Send Message
Posted Nov 18, 2014@H8llfire
The new version will have an event that covers both instead of a different event so that you can't trigger two events at the same time. <clicktype> will be a placeholder so that you can do @IF statements and separate your code that way.
-
View User Profile
-
Send Message
Posted Nov 18, 2014What about the dualclick bug I mention some posts below. Could you add a quick hotfix to it? It's really annoying.
Thank you for your effort!
-
View User Profile
-
Send Message
Posted Nov 18, 2014I have a sign on a wall and am using a ClickTrigger to read it. I am using <signtext:<triggerloc>:1> for this and <triggerloc> is rendering the player's position in stead of the position of the sign. Anyone have any ideas?
Also Is there any way to get <signtext::> to work with a variable coordinate?
-
View User Profile
-
Send Message
Posted Nov 18, 2014@Lyoko_Firelyte
Hey, it's one of my requests. Sweet! :P
-
View User Profile
-
Send Message
Posted Nov 18, 2014@Lyoko_Firelyte
When you port to Sponge please be aware of the importance of Vault. Economy and permissions pass through it. Without Vault, most of my scripts will be rendered useless.
-
View User Profile
-
Send Message
Posted Nov 18, 2014@AncientTom
I don't think you should be worried, the parser itself is async and mining / pvp throw various different events based on what is specifically going on. All of your scripts are loaded on boot and ready to be read, so there's no reading files during runtime (unless you reload triggers), so I don't think you'd notice anything in-game.
As for Sponge, I'll most likely port it over when it becomes available, but I'm sure some features will not be ready right off the bat; especially any hooks to other plugins like Vault.