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 Sep 27, 2013@teemo321
This plugin works fine on 1.6.2 and 1.6.4. You'll have to specify what "not working" means if you want some help :3
-
View User Profile
-
Send Message
Posted Sep 26, 2013its really good plugin but i have problem its cant working in the 1.6.2
can you update?
-
View User Profile
-
Send Message
Posted Sep 25, 2013@Satyrcyn
Me too, i think lexlaiden does not see how many people are interrested in this plugin.
It's a real one of a kind plugin with unlimited potential. If you make this a stable plugin then it would be the #1 plugin for bukkit.
-
View User Profile
-
Send Message
Posted Sep 25, 2013@lexlaiden:
I will donate to your plugin if you will bring it up to date. There's not a lot of good alternatives for Vtriggers, and nobody wants to write their codes all over again in a different format. The random glitches in RO2 are bad enough, but I'm not looking forward to seeing how the current state of the plugin keeps up with 1.7.1
-
View User Profile
-
Send Message
Posted Sep 24, 2013@Brocodo
Strings usually contain some sort of text. Boolean is strictly true or false.
-
View User Profile
-
Send Message
Posted Sep 24, 2013What's the difference between a String and a Bolean?
-
View User Profile
-
Send Message
Posted Sep 24, 2013@tateschroeder13
Use BB markup to keep new lines please.You were pretty close. You might want to add a permission check too in case people who can't use it type it and lose money. I know you use CMDOP but this is not a proper way to do it.
@IF b <haspermission:essentials.enderchest> = false'
@PLAYER &4You don't have permission to do this!'
@EXIT
@ENDIF
@IF b <takemoney:<playername>:50000> = true'
@CMD enderchest
@ELSE
@PLAYER &c4Sorry, you don''t have enough money to do this.
@EXIT
@ENDIF
-
View User Profile
-
Send Message
Posted Sep 23, 2013So... It's been a few months before I used Variable Triggers. I have lost almost all Info I have on It, I understand the base Idea and the code to go along I just am messing up on spacing. Can someone please look at this and tell me what I'm doing wrong?
Basically I'm wanting to add a price to use a command. When you type /chest It checks to see if a player has a x amount of money, If so It runs the command. Or If you don't have enough money It tells you so.
chest: Override: true Script: - '@IF b <hasmoney:<playername>:$25 >= true' - '@CMDOP <takemoney:<playername>:$25' - '@CMDOP enderchest' - '@ELSE' - '@IF b <hasmoney:<playername>:$25> >= false' - '@PLAYER &4Sorry, you don''t have enough money to preform this command.'
-
View User Profile
-
Send Message
Posted Sep 22, 2013@iMasonite
"Setting the save to $<playername>.teleport is like creating a whole table just to store a few values and where $teleport.<playername> is like a table holding a lot of values, Vt Delobj is the SQL equivalent to DROP TABLE, take this for example, this is a correctly stored data structure that is easy to remove individual values as needed witch will also remove the values from memory." Here I agree with you 110%.
"Using @DELVAR i $temple_tp_ne.flynnherrington would remove only flynnherrington and his int value from the object as where using.. @CMDCON vt delobj temple_tp_ne would remove all players and the object entirely." Agreed here to.
I was just trying to point out that if in fact VT is defining a real Object with the variable as a property, and an instance of that object is declared as a local in a function, when the function is finished running, all memory that the function was running in is released back into the memory pool. VT's variables, however seem to be global. Their instances have to be declared outside of any transient function so they stick around as long as the server is running whether they are being used or not. I believe that the whole reason for /vt delobj is to get rid of objects that are no longer needed so they're no longer occupying memory space.
In each script I write, I differentiate between which variables need to be global in scope and which only have local use by using 2 different script related, unique object declarations, one for each type. At the bottom of my script I use the /vt delobj to take out the trash so to speak. All local variables are hung on that spacific object. And again, you're wright. I should be using @CMDCON for this command.
Anyway, please forgive me for butting in with my two cents.
-
View User Profile
-
Send Message
Posted Sep 21, 2013@iMasonite
Yes i'm familiar with the security hole...
Got attacked by some 'hackers' and they managed to get into my server as me and make themselves owner the first day i got my server to 1.6
I'm not planning on going back to that build, but yes I did install an authentication plugin for all the staff members. It just doesn't feel right to go back to an insecure build, also because a lot of players and people know about my server and got attacked earlier.
And I fear for my donators and players that may get hacked too by other players.
As my server is all about making progress, as it is a RPG/PvP server it can be very valuable to some people.
Thanks anyway.
-
View User Profile
-
Send Message
Posted Sep 20, 2013@Brocodo
If it helps at all, Spigot Build #1056 seems quite stable with VT and has less issues, although if you don't use an Auth plugin like AuthMe for higher level accounts with potentially dangerous permissions or OPs, there is a security hole with 1.6.2 R0.1 where they hackers can gain access to servers as any player they like and be authenticated as an account logged in on minecraft.net. If you use AuthMe though you shouldn't worry about this.
Spigot Build #1057 Changes: "Add more async safeguards" is where a lot of VT errors come from i think and thus having Build #1056 (1.6.2 R0.1) should solve the problem.
I hear you on the separate file idea and your idea is nice, i would more like to see a name-space type feature such as $somefileyml.someobject.somevar so the file would be called somefileyml.yml followed by the usual way that objects and variables are stored. this could cater both needs of a separate file system and a default one, so in using the default you would always stipulate $vardata.someobject.somevar
Using a name-space feature would be good for Array usage seeing as all the values in the saved data files are in Associative Arrays Named:Values rather than NumIndex:Values The lack of support for @CALL somesctiptyml:somesctipt <callvar1> <callvar2> and arrays such as looping values stored in an array is annoying for the moment but lets hope that Lex didn't die and comes back to update us soon.
-
View User Profile
-
Send Message
Posted Sep 20, 2013@iMasonite
I currently use spigot-1.6.2-R0.2, maybe that could cause trouble too.
But I need to use spigot for the Heroes plugin as that is what my whole server is about.
Still im confident that i can't do anything else to fix the lagg spikes. Even when 10 players are on the lagg spikes are there, you just don't notice them in-game. But when there are 60 players on and the VT plugin gets a spike the whole server can freeze up to 5 seconds.
In the past i also had issues with VT and Libigot, so i don't know how this is with Spigot or Bungeecord. Also I think there should be a VARDATA folder, and not 1 file.
For example, if you name an object $teleportcooldowns.<playername> it would make a file in the vardata folder called teleportcooldowns.yml
This way the plugin only loads teleportcooldowns for a script, and not the whole vardata file. I think this could optimise the plugin? Sorry if i'm talking nonsense, i have no experience or knowledge about Java or other coding, but it seems logical to me.
-
View User Profile
-
Send Message
Posted Sep 20, 2013@EMTofficial
I reproduced the same problem and as always with relativeloc it returns doubles such as -741.0,65.0,851.0 0.0 0.0 including yaw and pitch, i can only assume its this causing the problem and reading the 0.0 as your intended line.
-
View User Profile
-
Send Message
Posted Sep 20, 2013@AncientTom
For the scenario presented, if i were to delete the object with vt delobj it would delete all other variables held in the object thus making it work on a rude basis rather than a polite one.
Take my previous example, if i have timers on the 20 second mark i would like it to remain constant for each player rather than a player determining a reset for all players.
Using @DELVAR i $temple_tp_ne.flynnherrington would remove only flynnherrington and his int value from the object as where using.. @CMDCON vt delobj temple_tp_ne would remove all players and the object entirely. I do use @CMDCON vt delobj in some of my scripts as sometime i do want the whole object to be removed but @DELVAR is usefull in the situation where you want to kill just one variable.
(subnote: @CMDCON is better for the end user experience rather than @CMDOP in this case as the end user will not see the notifications about an object being deleted)
About the style of data storage, its not something i have seen documented, but rather the way in witch most programming is done (especially in object oriented programming), an object is created, variables added and then the object is usually consumed by subroutine or function.
Think of it like a single column SQL table, in a SQL you have the table name (in VT lets call this the $obj) and the a row (the VT var) and the data goes in the value field. in this way you store all values pertained to the object in a database fashion. Setting the save to $<playername>.teleport is like creating a whole table just to store a few values and where $teleport.<playername> is like a table holding a lot of values, Vt Delobj is the SQL equivalent to DROP TABLE, take this for example, this is a correctly stored data structure that is easy to remove individual values as needed witch will also remove the values from memory.
@DELVAR i $Statistics.Players_world_factions wold remove the variable and value but @CMDCON vt delobj Statistics would kill the whole lot.
Its late and i hope i am making sense :D
-
View User Profile
-
Send Message
Posted Sep 20, 2013@Brocodo
There are a lot of problems with VT and 1.6.2 R2, if you are willing to risk it, downgrade to 1.6.2 R1. The threads running async for some reason are causing all kinds of issues. I've not looked into it that much yet.
-
View User Profile
-
Send Message
Posted Sep 20, 2013so I was working on this sctript that has a button that changes a sign. simple enough right? sign right below the button.
I used this line: - '@SIGNTEXT <relativeloc:<triggerloc>:0,-1,0> 2 $8'
but I get an error saying: @SIGNTEXT Line must be a number. does anyone know what is going wrong?
- Ed
-
View User Profile
-
Send Message
Posted Sep 20, 2013@iMasonite
Very interesting. In your examples, You are using YAML style declarations for Objects. It was a throwback to me for a few minutes as I didn't know that VT accepted a YAML style of input to declare variables. (If it does please point out the documentation for this.) Then I realized that you were just using this representation in abstract for clarification.
Also, you use @DELVAR for the same reason that I use /vt delobj, to get rid of things that are no longer needed. You might consider that while @DELVAR removes the property from the object, I wouldn't expect that there would be any memory saving since when the instance of the object is declared, memory is assigned for what the whole object needs. Consider using a separate temporary local object for all your temporary variable needs and this can become quite a few in long scripts. At the end of the script, use '@CMDOP vt delobj ScriptTmpObj' to delete the entire object and thus releasing memory back into the memory pool. The down side of this approach is that /vt delobj is very noisy to the console and the chat line.
-
View User Profile
-
Send Message
Posted Sep 20, 2013Found it. I saw a live lagg spike on my server and looked into the server console, and this is what i got. It says something with scripts, so i gues this is from VariableTriggers?
Pastebin: http://pastebin.com/Y1cYpTVR
-
View User Profile
-
Send Message
Posted Sep 20, 2013@iMasonite
Ah thanks, i never tought of the pause thing.
But won't it become a bit messed up if multiple scripts are paused and triggered again at the same time?
Also, i deleted all the cooldown data from the players and my vardata file went from 44.000 lines to 1000 lines. But still, i have those huuge lagg spikes randomly. I can see it when i monitor my server with nolagg. It's just so weird.
-
View User Profile
-
Send Message
Posted Sep 20, 2013@Brocodo An example of my script for some TP function will expire the var. Using the @DELVAR command to remove the variable as its only required for a short period of time.
Formatting your stored variables and objects will help also.
Rather than: $<playername>.teleport Use: $teleport.<playername>
The reason becomes clear when you see this...
Before
Each user has 6 lines
After
Each user has 1 line, ofc there are 5 lines for the initial object that will stay at 5 lines ragardless of the qty of variables.
I hope this helps you :D