[MECH] Autorun Commands v3.2.4 - Set custom commands to run automatically [1.5.2-R1.0]

Discussion in 'Archived: Plugin Releases' started by LittleGruz, Oct 24, 2011.

  1. Offline

    LittleGruz

    Autorun Commands - Set custom commands to run automatically
    Version: 3.2.4

    Made in response to this thread.

    Visit the BukkitDev page for more details and downloads.

    Want to execute a command which displays stats just by right clicking the desired player? Or how about giving them a rose or 64 many, many times with ease? Or even make a command run which kicks players if they walk over a certain block? You can do that and more with this plugin!

    Features:
    • Allows the execution of a command simply by right clicking on a player
    • Allows the execution of a command simply by walking over a block
    • Allows the execution of a command simply by pressing a stone button
    • Allows the execution of a command simply by dying
    • Allows the execution of a command simply by respawning
    • Allows the execution of a command at server start up
    • Allows the execution of a command on a regular interval
    • Allows the execution of a command when a player joins
    • Allows the execution of a command when a player first joins
    View the source here.

    Check out my sweet site here.

    Enjoy my mods? Donate here! Dislike my mods? Donate here (and give feedback)! Powers of two are cool (e.g. $1.28, $2.56, etc.).

    Changelog:
    Past versions (open)
    Version 3.2.2:
    • Allow death commands to be set with GLOBAL.
    • Fixed problem of not being able to set OP commands for auto death commands.
    Version 3.2.1:
    • Replaced depreciated code.
    • Fixed some player messages.
    Version 3.2:
    • Option to have a delay for join commands added.
    • Bug fix for OP startup commands.
    Version 3.1.2:
    • Fix for when Multiverse would not load before AutorunCommands.
    Version 3.1.1:
    • Support for the plugin MultiWorld.
    Version 3.1:
    • First join commands.
    • Toggle for first join commands.
    • Multiple join commands executed.
    Version 3.0.3:
    • Fixed bug where respawn commands are executed when player was loading.
    Version 3.0.2:
    • Fixed bug which caused multiple instances of repeat commands to run.
    Version 3.0.1:
    • Fixed bug which occurred if there was no join command.
    Version 3.0:
    • Finally fixed multiworld bug.
    • Added display commands for blocks.
    • Added display commands for repeating tasks.
    • Added display commands for commands.
    • Command blocks can only be destroyed by an OP player.
    • Remembers the time remaining for a repeating task when the server is shutdown.
    • Allows commands to be executed when a player joins.
    Version 2.7.2:
    • Remove repeat command bug fix.
    Version 2.7.1:
    • Bug fix which caused the repeat commands to be saved and read incorrectly.
    Version 2.7:
    • Allows commands to be executed at a set frequency.
    Version 2.6:
    • Allows commands to be executed upon a player's death.
    • A myriad of bug fixes
    Version 2.5:
    • Allows buttons to cause a command to execute.
    • Fixed op command removal.
    Version 2.4.1:
    • Changed event listeners to support the new Bukkit event system.
    Version 2.4:
    • Added op support for command blocks.
    • Added a remove command command.
    Version 2.3:
    • Added ability to set commands to run at server start up.
    Version 2.2:
    • Added the ability to assign commands which are run by an op (console).
    • Allow commands to be executed upon player execution.
    Version 2.1:
    • Made command blocks more responsive.
    Version 2.0:
    • Gave blocks to ability to initiate the execution of a command.
    Version 1.0:
    • Added the ability to have a global command.
    Version 0.1:
    • Release.
     
    sk8r776 and Lextao like this.
  2. Offline

    LittleGruz

    Was post number 93 (3 posts above your first one) too hard to read?
    The commands for repeating (i.e. timed interval) tasks is in the repeating commands spoiler tag in the main post.
     
  3. Offline

    minerscentral

    yes I know how to do that but how do I warp all players to one area? Using /warp from essentials or something similar.
     
  4. Offline

    LittleGruz

    Isn't there a /tp command built into Bukkit? But I believe that only teleports one person. For other teleporting commands from other plugins, you would have to ask the creators of the plugin.

    In other news, I think I should try and apply the 'GLOBAL' user do something for the repeat commands and any others I have missed.
     
  5. Offline

    minerscentral

    Does the global command work? Because I found this plugin that can do this.
    /tpc <x> <y> <z> - Teleports you to these specific <x> <y> <z> coordinates. could i use this to teleport all players to the locations using the global command?​
     
  6. Offline

    mitchb

    hi, will this plugin be able to let me regenerate a mining space by using the following? at the moent it appears to fail i hope you can help me ....
    /addrepeatcommand broadcast MINE RESET IS IMINANT
    /addrepeatcommand region select MINE
    /addrepeatcommand set 90&stone (etc)
    /addrepeatcommand broadcast MINE RESET COMPLETE
    (all followed by the times)
    ~mitch
     
  7. Offline

    LittleGruz

    You need to assign each of those commands to an identifier with /addacommand or /addopcommand (see Command commands spoiler) and then you use the /addrepeatcommand with the identifier you set (plus the repeat interval) from the other mentioned commands (e.g. /addopcommand mine_reset_msg broadcast MINE RESET IS IMINANT; /addrepeatcommand mine_reset_msg 480)

    At the moment, the global name does not do anything with the repeat commands (I have noted that this is unacceptable and is an embarrassment to my family's name). I think the way I will implement it will be as follows:
    • If the repeated command is global it will make every online player execute the command
    • To make the above work, it will only execute the commands that can be run by anyone (i.e. not an OP command)
    So when it is added, I believe that you can have all your online players automatically execute the /tpc command at the desired time interval I have realised adding a global attribute to the repeat commands makes no sense. So disregard what was here. Come on, move along, nothing to see here.
     
  8. Offline

    Inuyasha22

    Hm, can you override op permissions somehow? Server-side killing doesn't work, neither does smite..
     
  9. Offline

    LittleGruz

    Inuyasha22 Could you please elaborate on what you mean by 'override op permissions' (who overrides, with what and/or when?).
     
  10. Offline

    Inuyasha22

    Well, I mean this;
    A player without OP rights needs to execute something that only admins can do (i.e. kill someone/himself, get smitten). Bukkit doesn't seem to like playername based commands ^^'
     
  11. Offline

    LittleGruz

    Inuyasha22
    I see. For security reasons I only allow players with OP rights to create OP commands, but you can get a non-OP player to trigger the OP commands.
    Using /addopcommand to create an identifier for a command and then applying it to a block (for example) will cause the player to trigger the command to run.

    e.g. /addopcommand kill_them kill Inuyasha22
    /setcommandblock kill_them
    *hit block*

    Now when any player walks over the block, it will kill you. If you want it to be the player who stepped on the block, replace "Inuyasha22" with "potato".
     
  12. Offline

    Inuyasha22

    Ehm, are you sure? ^^' Only thing that happened was the console giving out an error /kick <name>
     
  13. Offline

    LittleGruz

    Inuyasha22
    I think so. You have been using /addopcommand to add a command instead of /addacommand right?
     
  14. Offline

    Inuyasha22

    Yeah.. It executed the custom command, too, but all it did was giving out said message ^^'
     
  15. Offline

    LittleGruz

    I think I have found the problem, I will fix it soon.

    EDIT: Thanks for replying with useful information. You would be surprised how many people do not respond after I have asked for clarification. It is awfully frustrating.
     
  16. Offline

    Inuyasha22

    That wasn't sarcastic, was it :p?
     
  17. Offline

    LittleGruz

  18. Offline

    Inuyasha22

    :p I know that feeling.. <3 I'm programmer myself and whenever I ask the players about an error they encounter absolutely nobody is the least bit helpful xD
     
  19. Offline

    Beimeith

    Hello,

    I like your mod, and I have a small bug for you:

    I setup two command blocks to 1) add a repeating command to the server to reset the daytime, and 2) remove the repeating command to allow normal day/night cycle.

    I noticed that if someone runs over the "add repeat command" block more than one time, I get a nice little message saying, "That command is already repeating" but if they run over the "remove repeating command" block more than once, I get this:

    On another note, I have a feature request:

    Can you add the ability to assign multiple commands to a block? I noticed that right now trying to assign a second command overwrites any existing ones.

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

    LittleGruz

    Thanks for the info, it is fixed with version 2.7.2

    I will add it to my TODO list :)
     
  21. Offline

    Zack4TTack

    Feature Request

    A way to display interval time commands snd block commands by typing /displayblockcommand and /displayintervalcommand

    Can you also find a way you can reload your server without losing the commands binded to the blocks or player?

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

    LittleGruz

    I will add that to the growing list of things to do, but before this one I will...
    Fix this bug.
     
  23. Offline

    Beimeith

    I have noticed another issue, but I can't say if it is a problem with your plugin or the server itself as there is no error message.

    The problem is thus:
    As I mentioned in my first post, I created a command block that adds a repeating command, as op, "/time set 0" every 300 seconds. This sets the game time from 6PM -> 6AM, essentially keeping it always day. Since the command is run as op, I see the message every time it runs.

    I have noticed that every so often, maybe once out of every 50 executions, the command will run, (I see the time set message), but the time is not actually reset, and it goes into the normal night cycle. The next time the command should run, all is well and it is reset back to 6AM.

    It is not a major problem, but it is...annoying. :)
     
  24. Offline

    LittleGruz

    My guess would be to pin the tail blame on the donkey Bukkit scheduler that runs the tasks at a later time, just skipping a beat (perhaps there is a high-ish server load at that time).
     
  25. Offline

    MikeMeistro

    Very nice plugin!
    Can you add the feature: Allows the execution of a command when the player joins the server ?
     
  26. Offline

    94miner

    Awesome plugin, is there a way I can have a 'pool' of commands that on death a single command from that pool is executed at random.
     
  27. Offline

    LittleGruz

    Seems reasonable.
    This sounds pretty specialised. If I am to do this one, it will be once I have done all the other ones that have more applications. I assume this request is basically so a random death message can appear. :)

    But for either of these cases (and all the others in the list), they will have to wait for a week or two because paid and uni work gets priority.
     
  28. Offline

    94miner

    the point of having a 'pool' of commands that on death a single command from that pool is executed at random is so that ppl can get teleported to a random world with multiverse 2, it's part of my theme. I'd also like it where they get a certain pool of commands depending on what world they're in? and same for the chat. I want to be able to tp people to a random world in a set of worlds based on the world they're in.
     
  29. Offline

    LittleGruz

    I think making a specialised plugin would work better for that, due to the deep reliance and interactions of the command pool on the worlds and players.
     
  30. Offline

    Dominic

    Great plugin man! Woo. You got some money coming your way for sure!

    However, it seems that the blocklist.txt file fails to load correctly upon a loadup? Or it's set to be empited upon a restart? Is there a way to change this?
    Is this supposed to happen? How can I fix this?
     
  31. Offline

    LittleGruz

    Yay! I like that stuff. It allows for my continuous survival...and electricity!
    Yeah, that seems to be a continuing magical problem for this plugin. I think I may know how to fix that, but it will have to wait (along with the other additions) until after my first exam on this coming Monday.
     

Share This Page