Reign of Kings Automatic wartime on/off

Discussion in 'Plugin Requests' started by Hexu, Jun 16, 2015.

  1. Is it possible to make simple plugin to put ingame command in a certain time of real world? like everyday at 5pm it would turn some mods on by using command and then at 10pm it would turn them off, I would use it with wartime plugin
     
  2. Closest thing to this is probably the wartime mod.
    You could ask the creator of that one if he can do an update. (Is it fraccas?)
    If so, I think he also has his own site, but I believe he charges for mods. :-(
     
  3. Fraccas no longer does RoK plugins. I purchased some plugins from him and he stopped supporting them. I think he said something about getting a summer job.
     
  4. @Scorpyon yeah, im using wartime mod, but I have to type /wartime every single time i want to turn it on or off. I would like to make it automatically on/off in specified intervals
     
  5. I will port my TimedExecute from Rust to Reign of Kings in some days.. but for now i'm waiting for (rok.RunServerCommand) which does not exists ..
     
  6. Any idea how to turn this mod only at realtime night? So that players can go to sleep without worries? :D
     
  7. It is indeed possible to run a timer and check the time. I am going to try and do it but I cant mess with wartime.
     
  8. Why you cant? so maybe just make a plugin that puts specific command (editable in cfg) in specific time? (would it work if server have restarts in every 4h?)

    btw. @Sydney we do have very similar server forums :D http://reignofkings.pl/forum/
     
  9. I have sold a similiar script that works so I prefer to not touch it to prevent issues.
     
  10. This snippet will print to the console every second the current system time.
    ex 3:14 PM

    you could use the DateTime.Now.ToShortTimeString() to compare to a variable then run something

    Code:
    using System.Collections.Generic;
    using System;namespace Oxide.Plugins
    {
        [Info("Timers Test", "SweetLouHD", 0.1)]
        public class Timers : ReignOfKingsPlugin
        {
            void Loaded()
            {
                timer.Repeat(1, 0, () => Puts(DateTime.Now.ToShortTimeString()));
            }
        }
    }
    Additionally
    DateTime.Now.ToString("HHmm");
    will print out military time
    ex. 1339 = 1:39 PM
     
    Last edited by a moderator: Jul 3, 2015
  11. Thank you @SweetLouHD but I have no idea what to do with this code :(
     
  12. Hexo if you still want it I can give you mine version of wartime. It's exactly as you want it.
    Just tell it at which time it should activate wartime and at which time off.
     
  13. Sure I would like you to send it to me, that would be nice. Btw. do you have "OnCubeTakeDamage" error in it?
     
  14. I have absolutely no errors in it and I just tested it while working on it to make it more customizable and userfriendly.