Inactive [MECH/MISC] TriggerCmds v1.2 - 'Link Cmds to buttons/levers' [953]

Discussion in 'Inactive/Unsupported Plugins' started by Sammy, May 9, 2011.

  1. Offline

    Sammy

    TriggerCmds- 'Automation, automation, automation'
    Version: v1.2
    Download :(V1.0) (V1.1) V1.2

    Do you like this plugin ? buy me a beer !!​
    [torch] [​IMG] [torch]
    This was a popular request that made me excited :p

    With tcmds you can link any type of craftbukkit or plugin commands to buttons/levers/plates
    It's simple too use and it has persistence so you can reboot your server without loosing anything =)

    Tutorial:
    Make a trigger:
    1. /tcmds edit TriggerName - Opens/creates the trigger edit
    2. /tcmds cmd $me:/tp $ply $me - Makes you teleport the player that presses the button to you
    3. Left Click on the switch - Regs the switch and closes the edit
    Delete a trigger:
    1. /tcmds edit TriggerName - Opens/creates the trigger edit
    2. /tcmds del - Deletes the trigger from the db
    Delete a Link:
    1. /tcmds edit TriggerName - Opens/creates the trigger edit
    2. Right Click on the switch - Deletes the switch and closes the edit
    Runners:
    • $me: - The cmd will be executed by the trigger maker (only if is online)
    • $ply: - The cmd will be executed by the player that pressed the trigger
    Variables:
    • $me & $ply - Used inside the command you want to declare
    Features:
    • Simple way to link cmds to triggers
    • Works (in theory) with almost any command
    • Uses persistence to save all the triggers
    • Has permissions
    Commands:
    Code:
    commands:
      tcmds:
        aliases: [triggercmds]
        description: TriggerCmds management
        usage: |
            /<command> list - List of your triggers.
            /<command> edit [name] - Starts trigger edit.
            /<command> cmd [cmd] - Command registration/modification.
            /<command> del - Deletes the trigger.
            /<command> help - TriggerCmds Help Page.
    
    Permissions:
    Code:
    triggercmds
    To do:
    • Scripts (multi-commands)
    • onBreak deletes link
    • User groups (I might put it... still not sure) (tks @QuackzMcDuck )
    • Add a fakePlayer to overwrite permissions (tks @QuackzMcDuck )
    • Link the triggers with redstone (I have to find a cool way)
    • Timed commands (maybe!! I guess ^^)
    • Button Cooldown
    • One Time per player buttons (maybe on 1.4/1.5)
    Changelog:

    Version 1.2
    • Added the variables $me and $ply
    • Recoded some parts of the reg
    • Removed redundant cmds
      • /tcmds stop is now automatic when Left Click or Right Click
    • Added pressure plates
    • Reg Trigger Link - Left Click
    • Del Trigger Link - Right Click
    Version 1.1
    • Fixed yml error (sorry about that)
    • Added delete function (never rush a release)
    Version 1.0

    • First release
    !!! Lets give tks to @Cybird and @Jonathan Thorpe for the idea !!!​
     
  2. Offline

    RazorFlint

    Video Would Be Great :D
    I'll Try it out :)
     
  3. Offline

    Sammy

    Sorry everyone, I rushed the release and made some silly errors so I had to release v1.1

    I will not be able to make a video for a while maybe next week... but I need to add more stuff before that
    I think that you'll find it easy enough with the help of the topic
    Cheers
     
  4. Offline

    Jonathan Thorpe

    Superb work! Many thanks for taking on both mine and CyBird's ideas. Just downloaded, gonna play with it now, will feedback later. Hope development continues :)

    Good initial release! Some (minor) issues:

    Triggers an "ebean.properties not found" on server startup. At least I think it does. My server didn't come up with that message before today, and the only thing that's changed is the addition of this plugin. The error occurs immediately after the world is prepared, before other plugins load. I haven't looked into it enough to be sure that TriggerCmds is causing it, but it looks that way on first glance.

    Its a little strange that you have to invoke "/tcmds edit <CommandName>" BEFORE targeting the button you want to link it to. It would perhaps make more sense to check if you have a target upon execution of the edit command, and display a relevant message if no target is found. At the moment you are able to create a command and not have it linked to a button, and therefore not functioning. Editing later may solve this I guess, so it may be a useful "bug" to store commands for later linking, but just seems odd. If this method is to stay, perhaps it needs to be documented that you need to start the edit and then target a button before specifying the command to link.

    From the "stop" argument, I take it that you hope any future releases will be able to handle multiple commands? Otherwise it would make more sense to automatically stop editing once a command has been specified. It could be very easy to forget to "stop" editing and not have a button function correctly for no obvious reason.

    I like the variable support you hope to add, it will make this plugin very useful, as it can then be used in conjunction with pretty much any command-based plugin out there. In a sense, it adds solid automation to a Minecraft world, as the user would be able to carry out a range of complex tasks at the click of a single button. A variable for player names is definitely needed, and the other ones you mentioned could come in useful too. In all fairness, I now think that you could probably get away with a handful of variables that would cater for A LOT of plugins.

    On the whole, great work, considering you only took up this request a few days ago. Looks very promising, this plugin could be huge when its mature enough. Again thanks for looking into it :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  5. Offline

    valdark

    Just found this through the requests thread... limitless potential.... now I can have lightening strike plates, fire buttons etc.
     
  6. Offline

    Cybird

    Thank you Sammy, I will impliment the plugin as soon as possible and give feedback then.

    Here... Have some points :)

    Had a chance to load it onto the old test server. (note to self, avoid issues by keeping this updated :p) Works perfectly, for stationary positions such as commands on wall buttons and such.

    My primary use for this plugin was to have buttons for the move and release commands on vehicles made using movecraft. unfortunatly this does not work as the buttons move location :) For now The vehicles that are 'docked' have a command pannel on the wall for easy activation.

    Is it at all possible to update the location of a button and the command associated to it?

    Still I have boundless uses for this again thank you Sammy, awesome work

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  7. Offline

    Sammy

    Well this is debatable, some may say that it's the plugin developer who have the job of making the ebean.properties file others the server admin
    This is a config file that is "needed" for persistence (Ebean server) I think bukkit team should make it auto generate then the database is used... because you only need to make the file you don't need to add nothing to him
    I'll auto generate it on the next version

    This ISN'T a bug, and I prefer my idea, you're just limiting the command, this way you can save your command and use it later (I'm going to make a command to remove the link and leave the interaction) and maybe making more then one link (doable if I find a way to make database relations work on persistence).
    You don't need to to target the button before you just need to press it

    The stop method let you change the location of the trigger or the cmd if you messed it up and only when you feel like you made all the necessary changes, stop the editing process.
    If you delete the trigger it will auto stops thought !

    Yes I will try and add it until next week
    Thanks for all the support and ideas, if you have more please feel free to tell me :)
     
  8. Offline

    Cybird

    I had no issues with the plugin loading on my test server, which runs a load of various plugins aside from the ones we use on out server. (To check for any conflicts or issues :) ) I'll just keep an eye out just in case.
     
    Sammy likes this.
  9. Offline

    Jonathan Thorpe

    So if I create an empty "ebean.properties" file and place it in the relevant place (plugins directory? server root directory?), this message will go away? The message in itself isn't a problem, it doesn't seem to cause any errors at all, it was just an observation, I wanted to feed it back to you since I assumed it was linked to the plugin somehow.

    Hey, you're the plugin developer, it was just an idea I had at the same time as someone else who wanted something similar... you're free to implement those ideas any way you see fit. I was just saying that from the point of someone who just wants to use the plugin, it seemed odd, but from your perspective, it makes sense. I can live with that :), if that's how the plugin works, that's how the plugin works! It works great insofar as basic commands without the variables, my main use will involve variables, so I'm looking forward to your next release, I'm glad other people see its potential - it really is huge, and once this plugin has been given enough time to mature, I think it will rocket to the top of people's "must-have" plugins lists. Don't get me wrong, there are a LOT of useful plugins out there, but this one will be one of the GREAT plugins with your development :)
     
    Sammy likes this.
  10. Offline

    Sammy

    On the server root, it's a little think that really doesn't make any difference ^^

    Thanks for all the kind works :)
    Well it maybe a little odd but its a 'linux kinda thing' - you open the editor make all the changes you want, the many times you want and then close the editor... and it'll help on the variables and muti-triggers
    Variables I can implement muti triggers I must ask the bukkit developers if there's a way around the Ebean @oneToMany bug
     
  11. Offline

    Jonathan Thorpe

    I took a guess before you replied, and created an empty "ebean.properties" file in the server root, and started the server. No message :)

    Can I ask... by multi-triggers, do you mean stacking multiple commands into a single button? If so, how about using some kind of command-separator, such as a pipe (|) or something similar that is highly unlikely to be used in any command (but at the same time not cause any errors), and have your plugin split, parse and pass on the commands to be executed in sequence?

    Just so people can get an idea of what you can do with this plugin, here are some examples of usage I currently have implemented without the proposed variable support:

    I've built a bank containing multiple buttons to act as serving counters... each button is linked to a BOSEconomy command. Without variables, it is only possible to view your current balance by linking "/econ" to a button. With variables, it would be possible to create buttons to withdraw/transfer set amounts from/to personal bank accounts with commands such as "/econ bank withdraw 500 <playername>".

    I've also created a basic hotel room system, where buttons next to iron doors control access, along with a linked command to deposit 1 coin into a bank account linked to a fictional user who also owns all my RealShop chests. This creates a room that can only be accessed by paying 1 coin to the server. Incidentally, other areas on my server are contained by Turnstile, and the same fictional user owns those, so all money from linked doors, turnstiles, and RealShop chests go into the same BOSEconomy bank account.

    I may also set up a button that can provide players with a "loan"...

    A wonderful example of how this plugin can extend the functions of other plugins out there without actually integrating with them.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  12. Offline

    Sammy

    Well no...
    But I was going to implement multi commands on the next build using someking of regex maybe a ampersand (&) because the pipe (|) is sometimes used has a separator, I forgot to implement that on this version (I rushed the release as I said before :rolleyes:)

    Multi-trigger would be more then one button for the same cmd config, but because of a Ebean bug I don't know how to do it
     
  13. Offline

    QuackzMcDuck

    I have a very good suggestion, well 2. First off make it so you can set it so only a group or player can use the button this can be achieved by something similar to this: /tcmds cmd /time set 0 @registered - That would allow only the registered group to use that button. My second suggestion is you should make a fake user so that a player without permissions for that command can run it as the fake user which you could set as an admin(the plugin CommandSigns does this..I suggest you take a look at it). For example, the registered group doesn't have the /give permission, so I make a triggercmd like so: /*tcmds cmd /give @registered - That would make it so only the registered group could use that button for the command. The * would tell the plugin to use the fake user which would be set admin in your permissions file.
     
  14. Offline

    parkermcg

    Whenever I load the server, it says the triggercmds doesnt have a plugin.yml. Am I doing something wrong, is it a bug, or am I doing something wrong?
     
  15. Offline

    Blazednlovinit

    am i right in thinking its linked directly with a button with no use of redstone? it would be nice if it could be linked with a sign and activated by redstone so you can put delays and logic gates etc with commands as the output. just a suggestion, i've always been waiting for a plugin like this btw. so i'm really greatful. thanks :)
     
  16. Offline

    Sammy

    I like the group idea, I might implement it :)
    I understand the problem of permissions but I don't think it's possible to make a "fake player"

    Well u must be doing something wrong because no one was had that problem yet =/

    Well for that u already have the plugin with signs and commands, this one is a bit different =)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  17. Offline

    QuackzMcDuck

    Yes it is possible to make a fake user, CommandSigns has this feature. For instance, with command signs you put /*group <NAME> groupname - It runs the command as the fake user: '&CommandSigns' so that way it's like adding people to the group. The <NAME> is a variable for the player.
     
  18. Offline

    Sammy

    You are 100% right, Its not implemented on bukkit but its on the minecraft src, I didn't knew that... it's going to be helpful... I will add you idea of a fake player :)
     
  19. Offline

    Blazednlovinit

    no plugin out there that i'm aware of can activate custom commands through redstone
     
  20. Offline

    Tagette

    Umm cant you attach the command to a redstone torch? That way you can hook any kind of power source into the torch and the command will run. For example, a loop circuit that constantly runs a command that gives u an item. So you will never run out of that item. Another example would be a jump quest. When the users get to the top they step onto a pressure plate, the prize is given to them and they are warped back to the bottom. Not sure how hard it would be to find the triggering player but... it could be possible.
     
  21. Offline

    Sammy

    As I'm seeing this is a popular request, I'm going to find a way to link the plugin with redstone
    I'll start coding the new version on the weekend
    Cheers
     
  22. Offline

    HunterAP

    Could you add commands that are executed at a specific time? Or triggered on Startup/shutdown?
     
  23. Offline

    Sammy

    I wasn't going to add this but ok its on the TODO list... maybe I can tackle this one too
     
  24. Offline

    Jonathan Thorpe

    Hope the todo list doesn't get too big and start to complicate things... be good to see a plugin like this become more versatile, but it doesn't have to happen all in one go :)
     
  25. Offline

    Sammy

    That's my fear, I will study the TODO list and try to implement things in a way that doesn't make the plugin difficult to understand nor resource heavy
    So not all things will be added
    Cheers
     
  26. Offline

    Jonathan Thorpe

    Yeah, keep your focus on the things you deem important, keep the functionality high and the frills low for now, add those bits later when the plugin has enough base functions to be attractive and usable. Keep up the good work!
     
  27. Offline

    eRko16

    It's epic! I love it!
     
  28. Offline

    27ace27

    Thank you so much! I had this idea months ago and even considered taking up java to program a Plugin for it, but now that someone else has taken care of it, I won't bother. Kudos, man!
     
  29. Offline

    mbsuperstar1

    I love you <3 :)
    This works great for all my plugins :D
     
  30. Offline

    Sammy

    Hey everyone, I'm doing just a little 'tease' of what I already done:
    • Recoded some things
    • Added a new look and color to the msg
    • ohh and the variables are working rather well:
    /tcmds cmd $me:/tp $ply $me - Every time a user presses the button 'the trigger maker' teleports the user to him

    I hope you like it ;)


    ---> I don't use many plugins so pls give me ideas for variables !!! <---

    Well I'm going to be away for a couple of weeks (maybe less) so v1.2 is out:
    Version 1.2

    • Added the variables $me and $ply
    • Recoded some parts of the reg
    • Removed redundant cmds
      • /tcmds stop is now automatic when Left Click or Right Click
    • Added pressure plates
    • Reg Trigger Link - Left Click
    • Del Trigger Link - Right Click

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
    mbsuperstar1 likes this.

Share This Page