Timed Execute

Execute commands every (x) seconds.

Total Downloads: 3,224 - First Release: May 29, 2016 - Last Update: Jun 5, 2017

5/5, 16 likes
  1. Ive resolved this issue, however, how do i reset the once timer as its not working, ive put it at the start of the argument and it still doesnt work?

    heres what i have....
     

    Attached Files:

  2. You had it twice here is the fix I also fixed the rest if your file
     

    Attached Files:

    Last edited by a moderator: Dec 29, 2016
  3. Legend!
     
  4. i saw that the plugin dont work with server time game any idea if are going to add this? and someone can tell me how much time in minutes are 1 day in game?
     
  5. I cant get it to work. I am using the v0.6 with a fresh config and try to create a 3 hour long resource boost with GatherManager. RealTime-Timer is working. BUT

    When it executes following command
    Code:
    "09:40:01": "gather.rate dispenser Wood 2",
    I get an invalid argument exception
    Code:
    Invalid arguments supplied! Use gather.rate <type:dispenser|pickup|quarry|survey> <resource> <multiplier>
    [Oxide] 09:40 [Info] [Timed Execute] ran CMD: gather.rate || ARGS: dispenser Wood 2
    I also tried
    Code:
    "09:40:01": "gather.rate 'dispenser Wood 2'",
    The command works if i put it directly into the rust console.
    As what i can see here, the arguments are correctly splitted from the command itself, if the output string is not formatted before output.

    Please tell me how i correctly fire a command with multiply arguments.
     
  6. I think i have found the problem.

    In the Plugins Code the command and arguments are seperated correctly but are ran as server command with no space between command and arguments.

    as you can see, i addded a space (+ " " +) when the builded command is fired and it works correctly.
    Code:
    server.Command(SplitCommand(cmd.Key).Key + " " + string.Join(" ", SplitCommand(cmd.Key).Value));
    
    These "Command-String-Builder-Lines" found at Lines 41, 60 and 81

    Please Reply if you can confirm. Thank You. :)
     
  7. Спасибо, работает!
    Thanks It works! :)
     
    Last edited by a moderator: Dec 30, 2016
  8. And what about this? "Sulfur Ore"
    Code:
    "gather.rate dispenser "Sulfur Ore" 2": 2700,
     
  9. PLEASE DISREGARD


    Looking for some coding advice here. What am I doing wrong? Can you not do "true" or "false" setting with this?

    Code:
    {
      "EnabledRealTime-Timer": true,
      "EnableTimerOnce": true,
      "EnableTimerRepeat": true,
      "RealTime-Timer": {
        "16:00:00": "command1 arg",
        "16:30:00": "command2 arg",
        "17:00:00": "command3 arg",
        "18:00:00": "command4 arg"
      },
      "TimerOnce": {
        "server.pve true 'Say PVE Set'": 60,
        "spawns.config townspawn 'Say Spawns Set'": 65,
        "command3 arg": 180,
        "command4 arg": 181
      },
      "TimerRepeat": {
        "oxide.reload CustomLootSpawns": 7200,
        "server.save 'say Server Saved'": 300
      }
    }
     
    Last edited by a moderator: Jan 1, 2017
  10. Code:
    {
      "EnabledRealTime-Timer": true,
      "EnableTimerOnce": true,
      "EnableTimerRepeat": true,
      "RealTime-Timer": {
        "16:00:00": "say Is restarting in 2 hours",
        "17:00:00": "say Is restarting in 1 hour",
        "17:30:00": "say Is restarting in 30 minutes",
        "17:45:00": "say Is restarting in 15 minutes",
        "17:50:00": "say Is restarting in 10 minutes",
        "17:55:00": "say Is restarting in 5 minutes",
        "18:00:01": "say The server is now restarting.",
        "18:00:02": "server.save",
        "18:00:03": "global.restart"
      },
      "TimerOnce": {
        "reset.oncetimer": 66,
        "server.pve true 'Say PVE Set'": 60,
        "spawns.config townspawn 'Say Spawns Set'": 65
      },
      "TimerRepeat": {
        "server.save": 300,
        "oxide.reload CustomLootSpawns": 7200
      }
    }
    All in RealTime-Timer will work
    The first one in TimerOnce will work the others you put not sure
    The first in TimerRepeat will work the 2nd is your not sure if it will

    File below for testing
     

    Attached Files:

    Last edited by a moderator: Jan 2, 2017

  11. Thank you, I got that worked out. Now I need the syntax for adding color. I tried <yellow>###<end> as it is in other plugins but it doesn't work.
     
  12. "server.pve true 'say <color=#0099ff>PVE Set</color>'": 60,
    "spawns.config townspawn 'say <color=#0099ff>Spawns Set</color>'": 65

    You can use a hex code or normal color
    <color=orange>
    <color=red>
    <color=blue>
    <color=yellow>
    <color=green>
     
    Last edited by a moderator: Jan 2, 2017
  13. Ahh awesome. Thank you!!
     
  14. File with colors added I set the first to yellow the other to blue change if you want
     

    Attached Files:

  15. You're awesome! Thank you!
     
  16. What does this mean?

    [DOUBLEPOST=1483342556][/DOUBLEPOST]I mean, what exactly do those command lines do, what do the 66 and 60 and 65 correspond to? Just really curious how to get this configured properly.
    [DOUBLEPOST=1483344123][/DOUBLEPOST]This is how I have my config set, and NOTHING is showing in game, only in console.... HELP! :D

    {
    "EnabledRealTime-Timer": true,
    "EnableTimerOnce": true,
    "EnableTimerRepeat": true,
    "RealTime-Timer": {
    "22:00:00": "say Is restarting in 2 hours",
    "23:00:00": "say Is restarting in 1 hour",
    "23:30:00": "say Is restarting in 30 minutes",
    "23:45:00": "say Is restarting in 15 minutes",
    "23:50:00": "say Is restarting in 10 minutes",
    "23:55:00": "say Is restarting in 5 minutes",
    "23:59:55": "say The server is now restarting.",
    "23:59:56": "server.save"
    },
    "TimerOnce": {
    "command1 'say Like the server? Want to help keep it online? Donate today! send paypal donations to [email protected]'": 300,
    "command2 'say Join the server Teamspeak, and recieve access to a special kit! ts88.gameservers.com:9202'": 400,
    "command3 'say Want a custom Kit? for you, or your clan? Donate today, and we will build it for you! Prices Vary, contact ADMIN for info!'": 500,
    "command4 'say Do not forget, press B for your BACKPACK access! great extra loot storage, while on raids!'": 205
    },
    "TimerRepeat": {
    "command1 arg": 300,
    "command2 'msg'": 300
    }
    }
     
  17. The numbers are secs and what you have in TimerOnce and TimerRepeat is wrong

    Try the file below
     

    Attached Files:

    Last edited by a moderator: Jan 2, 2017
  18. Could you clarify? I grasp the numbers are secs, but how are the ones in TimerOnce and TimerRepeat wrong? Please be specific. Thanks! :D
     
  19. See above post again
     
  20. I tried adding the colors in, but now it's erroring out. Do the color things work at all?

    Code:
    {
      "EnabledRealTime-Timer": true,
      "EnableTimerOnce": true,
      "EnableTimerRepeat": true,
      "RealTime-Timer": { 
        "22:00:00": "say Is restarting in 2 hours",
        "23:00:00": "say Is restarting in 1 hour",
        "23:30:00": "say Is restarting in 30 minutes",
        "23:45:00": "say Is restarting in 15 minutes",
        "23:50:00": "say <color=orange>Is restarting in 10 minutes </color>",
        "23:55:00": "say <color=red>Is restarting in 5 minutes </color>",
        "23:59:58": ""say <color=red>The server is now restarting.</color>",
        "23:59:56": "server.save
      },
      "TimerOnce": {
        "reset.oncetimer": 501,
        "say <color=cyan>Like the server? Want to help keep it online? Donate today! send paypal donations to [email protected]</color>": 400,
        "say <color=green>Join the server Teamspeak, and recieve access to a special kit! ts88.gameservers.com:9202</color>": 600,
        "say <color=yellow>Want a custom Kit? for you, or your clan? Donate today, and we will build it for you! Prices Vary, contact ADMIN for info!</color>": 800,
        "say <color=orange>Do not forget, press B for your BACKPACK access! great extra loot storage, while on raids!</color>": 306
      },
      "TimerRepeat": {
        "server.save": 300
      }
    }
    
    [DOUBLEPOST=1483346565][/DOUBLEPOST]getting this error
    (01:39:41) | [Oxide] 03:39 [Error] TimedExecute v0.6.0: Failed to load config file (is the config file corrupt?) (After parsing a value an unexpected character was encountered: s. Path 'RealTime-Timer.23:59:58', line 12, position 18.)
    [DOUBLEPOST=1483346612][/DOUBLEPOST]Disregard, found the error. An extra "
    [DOUBLEPOST=1483346718][/DOUBLEPOST]ALL ERRORS SOLVED! THANKS!!! :D