[ADMIN/CHAT/MEC/RPG] VariableTriggers v1.2.6- Triggers w/scripts & Dynamic Variables [1.5.1-R0.1]

Discussion in 'Archived: Plugin Releases' started by LexLaiden, Jun 2, 2012.

  1. Offline

    LexLaiden

    VariableTriggers - Triggers that run scripts and manipulate dynamic variables​
    Version: v1.2.6

    Make your own plugin like features.

    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 also set Area Triggers and create Command Triggers. You can use dynamic variables and conditional IF and ELSE statements in the scripts. You can run any command that a player or OP can run and run any consol command. The script interpreter has many speacial built-in commands for Teleporting, Spawning Entities, playing Sounds, Visual effects, Lightning, Explosions or test for NearbyEntities. Uses Functional Place Holders to Getting Player Location, Relative Locations, Generate random numbers, Set Blocks, Toggle Blocks, Check Players Heath, Drop Enchanted Items anywhere and so much more! Call separate scripts from within a script. Save scripts as separate files. Write reusable Scripts. The scripts are executed on their own threads to take the strain off of the main server thread.

    Features:
    See Project Page for more indepth discription.


    See Project Page for more indepth discription.

    Get the most recent update

    Changelog:

    See Project Changelog

    Lots of new features.
     
    TheGeekGizmo likes this.
  2. Offline

    kahlilnc

    I think I've seen something similar to this before, so you walk into a room and there is lighting coming form the room itself. May be a feature in this plugin?
     
  3. Offline

    LexLaiden

    This plugin has so much power!
     
  4. Offline

    PoorBoyDrew

    I love it. We downloaded it and can't believe how much power it has. It's kinda like you can create your own type of stuff without having to create your own plugin cause I can't program but this thing is amazing. A+
     
  5. Offline

    LexLaiden

    Its been updated to v1.0.7
     
  6. Offline

    md_5

    Nice, hope it isnt to much of a burden on servers, approved.
     
  7. Offline

    LexLaiden

    Thanks for the approval.
     
  8. Offline

    PoorBoyDrew

  9. Offline

    LexLaiden

    Need a demo video and some tutorial videos for this plugin. I got a couple but i'm no good at making video's So the best demo will become the Official Demo for the plugin and displayed on main project page and a few of the best tutoials will have there own page

    Just updated to v1.0.8

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  10. Offline

    PoorBoyDrew

    I love the Lightning and good job on adding seprate scripts files with @CALL File:Script

    This plugin Rocks!!
     
  11. Offline

    LexLaiden

    Thank You I am tryingto make it one of the best plugins around.
     
  12. Offline

    PoorBoyDrew

    It has my vote!
     
  13. Offline

    rater193

    WOW! this is by far one of the most powerful plugins ever! I LOVE IT! keep it up!
     
  14. Offline

    LexLaiden

  15. Offline

    VivaLaCreeper

    This is seriously probably the greatest plugin I have ever seen, this has saved me so much time on my RPG server. Excellent job!
     
  16. Offline

    PoorBoyDrew

    I agree! I have been following it far a few weeks. I only started a bukkit account because I saw this plugin and was so impressed. and wante dto follow it.
     
  17. Offline

    LexLaiden

    Thanks! Help spread the word.
     
  18. Offline

    bananapie62

    suggestion: can you have it so that it can store a players name as a variable and that can be used for an event instead of using a specific name. if its already possible, can you please tell me how it can automatically grab a persons name when it walks over a block?
     
  19. Offline

    LexLaiden

    I'm not sure I understand your request but here is a couple of possible answers for you depending on what your realy asking.

    Save some value to a player. Use place holder <playername>
    /vtwalk @SETINT $<playername>.value 455

    Sorry I can't give anymore suggestions I realy don't understand your question. Can you repost with more descriptive detail?
     
  20. Offline

    Brassica

    I like this plugin. Just a thought, Java can run JavaScript scripts natively, why don't you add an option for it? I am not sure what your scripting language is based on but JavaScript can take all that work away. And then people like me only need to know how your variables work :) You could pass the script a request object with a map of all the variables (a bit like Servlets/JSP work) and the script can then call your built-in functions and send back values. I think you should keep the existing stuff for casual users, and in that scenario it would do a great job. Hope this helps!
     
  21. Offline

    Brassica

    Here are some code examples of how JavaScript might be implemented (sorry file uploads don't seem to work for me):
    ScriptRunner.java - run a script using a bit of a framework

    package test;

    import java.io.Reader;
    import javax.script.ScriptEngine;
    import javax.script.ScriptEngineManager;
    import javax.script.ScriptException;

    public class ScriptRunnner {

    public static void runScript(ScriptContext ctx, Reader script, String language) {
    ScriptEngineManager mgr = new ScriptEngineManager();
    ScriptEngine jsEngine = mgr.getEngineByName(language);
    jsEngine.put("ctx", ctx);
    try {
    jsEngine.eval(script);
    } catch (ScriptException ex) {
    ctx.getValidationMessages().put("someSortOfKey", ex.getLineNumber() + ":" + ex.getColumnNumber() + " " + ex.getMessage());
    }
    }

    }
    ScriptContext.java - a place to pass around variables, validation and so on

    package test;

    import java.io.Serializable;
    import java.util.HashMap;
    import java.util.Map;

    public class ScriptContext implements Serializable {

    private Map<String, String> data;
    private Map<String, String> validationMessages;

    public ScriptContext(Map<String, String> data) {
    this.data = data;
    validationMessages = new HashMap<String, String>();
    }

    public Map<String, String> getData() {
    return data;
    }

    public void setData(Map<String, String> data) {
    this.data = data;
    }

    public Map<String, String> getValidationMessages() {
    return validationMessages;
    }

    public void setValidationMessages(Map<String, String> validationMessages) {
    this.validationMessages = validationMessages;
    }

    public void addValidationMessage(String key, String message) {
    validationMessages.put(key, message);
    }

    }

    script.js - a minimal example script

    data = ctx.data;
    value1 = data.get('value1');

    if (value1 == null) {
    ctx.validationMessages.put('xyz', 'Value not specified.');
    } else {
    doMyFunkyThing(value1);
    }
     

    Attached Files:

  22. Offline

    LexLaiden

    Your missing the point. If you know java then just write a java plugin.

    This is for everyone, no java or any language required. As far as the scripts, their not a language its just one @COMMAND per line text that lets you use placeholders and functional place holders. Plus if you want you can get some logic going it lets you use IF ELSE ENDIF.

    Put again if you want to write java, just make a plugin.
     
  23. Offline

    Brassica

    OK thanks - I meant JavaScript (which is a lot simpler), and will check out the plugin route.
     
  24. Offline

    bananapie62

    thats what i wanted, thanks
     
  25. Offline

    chief_newgin

    Im a fan of your plugin, its very flexible and it has so much potential. But I still missing some important variables(Places Holders) and TriggerEvents. In my opinion additional Places Holders like <attackingplayer>, <attackedplayer> and <attackedEntity> should be added. So it would be more easy to create events in combat. Futhermore why dont you add some Timer Events, like Day/Night Change or even better a Number of Days or Time to Elapse. With that kind of Events you could very cool survival Challenges at Night(Blood Night). What about -PlayerisAttacking- as TriggerEvent?
     
  26. Offline

    LexLaiden

    Very good ideas. I am adding new events and placeholders as I go. Trying to make it as versitile as possible without overloading it. Be patient and always make sure you have latest update cause I am adding all the time.
     
    chief_newgin likes this.
  27. Offline

    chief_newgin

    Thank you. I am already exited to upload it on our server.
     
  28. Offline

    LexLaiden

  29. Offline

    PoorBoyDrew

    OMG! YES! Thanks.
     
  30. Offline

    LexLaiden

    v1.1.0 is uploaded!

    If you subscripb to VT then you should have it now, if not then you'll have to wait for bukkit staff to approve.
    Enjoy!!

    Still only one entry to video contest. No one wants to make the demo for VariableTriggers?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016

Share This Page