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 Jul 3, 2014@KyadCK
The arrows are similar in function to the brackets in java, they mark the body of each statement. So instead of
my new script format would look like...
Compare that to
The <- arrow marks the end of the if statement, so you can make it do tons of different lines. And the spaces I put in are just so you can read it better, you don't have to have spaces. I'll try to come up with a way to make it simpler, I just really dislike the current @SOMETHING in a straight line down the page. From a programmer prospective it's really ugly, but easy to work with I suppose.
Here's what it would look like (with my new script) to check if someone is sprinting when they talk.
-
View User Profile
-
Send Message
Posted Jul 3, 2014Is there a way to separately save the precise location and viewing angle of a player as it is done in /vt setloc ?
-
View User Profile
-
Send Message
Posted Jul 3, 2014@Lyoko_Firelyte
Coming from VT's normal YML... It actually looks a little over done, a little complicated.
With YML's parser, everything starts with "- '@COMMAND", and ends with a '. Syntax is contained. One line per command, and optional indenting.
This throws it pretty heavily back into straight up programming by the looks of it. Seemingly arbitrary arrows, extra blank lines, vastly different commands... The arrows and extra lines throw me off the most I think.
I do very much appreciate what the new method allows for if I understand it right. A single login event that covers multiple worlds of your choosing? Very helpful.
I'm honestly more interested in something like an API that other plugins can use to add their commands to VT's @COMMANDS with syntax, allowing for easier integration (and less CMDOP/CMDCON), but I'm sure with enough documentation I could adapt to the new style, or at least be fluent enough to read it.
I would be willing to give it a go, if you had some examples and a test build. I like the current style, but I can try something new.
I do agree with shmancelot though, be careful. Even when using a single dialect of a single language, different styles make it harder to read/use other's code. Another entire dialect can make that much worse.
-
View User Profile
-
Send Message
Posted Jul 2, 2014@Lyoko_Firelyte
My 2 cents: It is important to maintain 1 dialect.
People will become adept at the dialect they feel comfortable with, but that could make it harder to share scripts and help other users who are comfortable with the other dialect.
-
View User Profile
-
Send Message
Posted Jul 2, 2014I've been playing around with alternate ways for VT to accept code, and I came up with the following idea. Let me know if it's something you guys would like. Note that if I work on this, it won't replace the normal scripts, it will just an alternate way.
Preview Idea...
-
View User Profile
-
Send Message
Posted Jul 2, 2014@Silversbane
Well if the autosave is for some reason causing you issues, you can turn it off and just rely on the normal startup / shutdown to save and load variables for you. However if you crash you'll be in trouble, so maybe save manually every now and then if you turn it off.
-
View User Profile
-
Send Message
Posted Jul 2, 2014Kiak I am using both the /vt delobj and @DELVAR actions. That is actually where the problem arises. Example:
After running those if I try to start saving variables too soon after that then those variables seem to not save correctly. But if I wait a sufficient amount of time then everything is fine. I have been noticing this in many other locations of my scripts.
Thanks
-
View User Profile
-
Send Message
Posted Jul 1, 2014@laacis2
As Shmancelot said before me. you could combine VT with another plugin or even a forge mod (in some cases) to get a whole bunch of extra functionality.
I have scripts for worldedit (plugin) and Heroes (plugin) amongst many others. There's a lot more possible than first meets the eye.
vtmasterrace!
-
View User Profile
-
Send Message
Posted Jul 1, 2014@Silversbane
It's really not best practice to be editing the Variable files directly.
Is there a specific reason you're not using the "/vt delobj" / "/vt delvar" or script commanded "@DELVAR" s that variable trigger is packed with?
If you think you have to edit the file directly you MUST either
I always try to Delvar any variable that i don't need to keep within each script as I go. (if perhaps your variable yml is getting to big and hard to keep track of)
What is currently happening to you is that VT is undoing your changes and reloading it's last autosaved back up. (this is particularly confusing if your server runs on a ram drive)
-
View User Profile
-
Send Message
Posted Jun 30, 2014@Silversbane
Try using the save commands after you set the variables
-
View User Profile
-
Send Message
Posted Jun 30, 2014@RaycusMX
Oh, you're right. You should be able to check it without the s. I'll look at the code and see if there's an error.
-
View User Profile
-
Send Message
Posted Jun 29, 2014I am having a very interesting bug that is breaking all my variables saved in (cache) memory. If I delete variables and add some new variables in between auto saves I have noticed that it can cause the new variables I attempted to save to not actually save. I have been running a work around for a while now where I simply set all variables to a new value instead of deleting them. Is there anyway someone could take a look at this. Please message me directly if you need more information.
Thank you
-
View User Profile
-
Send Message
Posted Jun 29, 2014@laacis2
I bet this CustomMobs plugin will work well with @CMDCON
-
View User Profile
-
Send Message
Posted Jun 29, 2014@Lyoko_Firelyte OK... Maybe you could update the instruction of ArrayLists? It says:
Well, my server dosen't tell "[VT] Error @IF: Wrong number of arguments passed." after I add "s", but it still says "YOU ARE NOT IN THE LIST!". I did everything to deal with this problem these days. Now I don't know what to do at all...
-
View User Profile
-
Send Message
Posted Jun 29, 2014Could i request more parameters for @ENTITY? like this @ENTITY <mob type> <display name> <health> <boots> <helmet> <weapon> <body> <legs> <amount> <location> would be useful to summon custom mobs
-
View User Profile
-
Send Message
Posted Jun 28, 2014@RaycusMX
shman is right, you must declare what type of variable it is. So @IF s @playerlist.all ?= <playername>
-
View User Profile
-
Send Message
Posted Jun 28, 2014Is there a placeholder for isonline at all? Is there a way to make it so if i'm online and someone joins it ops the person joining and if i'm not it deops them?
-
View User Profile
-
Send Message
Posted Jun 28, 2014@RaycusMX
@IF is missing type declaration.
Try:
-
View User Profile
-
Send Message
Posted Jun 28, 2014A GREAT plugin! Now I have a problem with ArrayLists... I wrote a ClickTrigger like this:
vardata.yml:
@playerlist.all contains two names, RaycusMX and MrLegend. I'm RaycusMX, but when I clicked the block, it told me that "YOU ARE NOT IN THE LIST". So did MrLegend. And server said:
I use server cauldron-1.7.2-R0.4-forge1098-B86, and VariableTriggers v1.3.2. Maybe it's a bug of ArrayLists? Could you fix it? @Lyoko_Firelyte
-
View User Profile
-
Send Message
Posted Jun 27, 2014@laacis2
ye