Timed Execute

Execute commands every (x) seconds.

Total Downloads: 1,252 - First Release: May 30, 2016 - Last Update: Feb 7, 2017

5/5, 11 likes
  1. Danjdunham

    Danjdunham Scavenger

    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....
     
  2. Resistance

    Resistance Grenade Master

    You had it twice here is the fix I also fixed the rest if your file
     
    Last edited: Dec 29, 2016
  3. Danjdunham

    Danjdunham Scavenger

    Legend!
     
  4. servermenta

    servermenta Scavenger

    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. PixelKlatsche

    PixelKlatsche Naked Wanderer

    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 (Text):
    "09:40:01": "gather.rate dispenser Wood 2",
    I get an invalid argument exception
    Code (Text):
    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 (Text):
    "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.
     
    DodgeVik likes this.
  6. PixelKlatsche

    PixelKlatsche Naked Wanderer

    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 (Text):
    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. :)
     
    DodgeVik likes this.
  7. DodgeVik

    DodgeVik Naked Wanderer

    Спасибо, работает!
    Thanks It works! :)
     
    Last edited: Dec 30, 2016
  8. DodgeVik

    DodgeVik Naked Wanderer

    And what about this? "Sulfur Ore"
    Code (Text):
    "gather.rate dispenser "Sulfur Ore" 2": 2700,
     
  9. Rob Dempley

    Rob Dempley Wood Hoarder

    PLEASE DISREGARD


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

    Code (Text):
    {
      "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: Jan 1, 2017
  10. Resistance

    Resistance Grenade Master

    Code (Text):
    {
      "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
     
    Last edited: Jan 2, 2017
  11. Rob Dempley

    Rob Dempley Wood Hoarder


    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. Resistance

    Resistance Grenade Master

    "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: Jan 2, 2017
  13. Rob Dempley

    Rob Dempley Wood Hoarder

    Ahh awesome. Thank you!!
     
  14. Resistance

    Resistance Grenade Master

    File with colors added I set the first to yellow the other to blue change if you want
     
    Rob Dempley likes this.
  15. Rob Dempley

    Rob Dempley Wood Hoarder

    You're awesome! Thank you!
     
    Resistance likes this.
  16. UNSC Trekman

    UNSC Trekman Wood Hoarder

    What does this mean?

    --- Double Post Merged, Jan 2, 2017 ---
    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.
    --- Double Post Merged, Jan 2, 2017 ---
    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 trekmanalpha@hotmail.com'": 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. Resistance

    Resistance Grenade Master

    The numbers are secs and what you have in TimerOnce and TimerRepeat is wrong

    Try the file below
     
    Last edited: Jan 2, 2017
  18. UNSC Trekman

    UNSC Trekman Wood Hoarder

    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. Resistance

    Resistance Grenade Master

    See above post again
     
  20. UNSC Trekman

    UNSC Trekman Wood Hoarder

    I tried adding the colors in, but now it's erroring out. Do the color things work at all?

    Code (Text):
    {
      "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 trekmanalpha@hotmail.com</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
      }
    }
     
    --- Double Post Merged, Jan 2, 2017 ---
    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.)
    --- Double Post Merged, Jan 2, 2017 ---
    Disregard, found the error. An extra "
    --- Double Post Merged, Jan 2, 2017 ---
    ALL ERRORS SOLVED! THANKS!!! :D