Execute command based on player play-time ($10!)

Discussion in 'Archived: Plugin Requests' started by semibreve42, Sep 30, 2011.

  1. Offline

    semibreve42

    I'm hoping someone would be kind enough to write a plugin that allows for a command to be run whenever a user reaches a certain amount of playtime on the server. Playtime could be derived from MCStats, or could be done with a home-grown solution.

    The plugin would check every X number of minutes if any player had crossed the magic number (Y) (this could be easily done by checking if any players playtime fell into the range of X to X+Y). When the answer is yes a command, stored in a config file, would be run. The config file would need to have the option of using the player's username in the command (say by writing {player}).

    The plugin would need to allow for more than one "level" at which a command would be run, for example a command is run at 10 hours, 20 hours, and 40 hours of playtime. Preferably it would also allow more than one command to be run for each level.

    Because this plugin simply runs a command after a set amount of time, I imagine it can be useful for a variety of situations.

    I'm offering $10 for such a plugin. This is a serious offer that will be fulfilled. It would be great if the author would comment the code fully so that, if they are not interested in furthering development or keeping the plugin updated, other developers will be able to.

    Thanks -
     
  2. I can do that, only one question: Should the commandSender be the user or the console (it's because of the permissions the commandSender would have...).
     
  3. Offline

    semibreve42

    Console - most of the time I'm planning on using it to promote users permissions, plus a few other things, so it has to be console.

    Thanks -
     
  4. Offline

    semibreve42

    Any idea on when you'll be able to do this? My users are bugging me about when I'm going to implement some functionality which is dependent on this, and I'd love to give them an eta of some sort (to shut them up for a sec :)

    Thanks again -
     
  5. 2 hours to 2 days... No, really, it's done when it's done but I do my best to get it done fast. :)
     
  6. Offline

    semibreve42

    Thanks - I wasn't trying to bug :)
     
  7. Right now I have the feeling I'm running into a bug - a bukkit function which should return a String returns a Integer... :confused:
     
  8. Offline

    semibreve42

    :-(

    Not something I can really help with - I took a Visual Basic class back in college but... not helpful :)
     
  9. Offline

    MadcowD

    I'll try.

    So here is what the config would be like:
    Code:
    commands:
        changeMe:
            length: 5
            command: say Edit Timedcommand/config.yml!
            superPerm: default
            lengthType: m
        superduperschmuperpuopsfeuper5:
            length: 10
            command: say Superpuperduperschmuperfeuupertimesx
            lengthType: m
            superPerm: schmeupferduper
    configVersion: 1.0
    
    I have it working I just need to add the actual playtime tracking of players. But as you can see I've added a superPerm option which will allow you to assign different timers to different groups, so if you've got certain groups which you don't want the command to activate to, you don't have to force it on them.
    I'll keep you up to date.

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

    MadcowD

    Sorry work week is over, I'm getting back to work.
     
  11. Offline

    semibreve42

    My users are getting... restless. If someone can do this by Friday night, I'll fork over $20. I really appreciate it -
     
  12. Offline

    fragger505

  13. Offline

    semibreve42

    Fyi MadCow V10lator just sent me a plugin - thanks for the interest
     

Share This Page