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
Reign of Kings Automatic wartime on/off
Discussion in 'Plugin Requests' started by Hexu, Jun 16, 2015.
-
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. :-( -
-
@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
-
-
Any idea how to turn this mod only at realtime night? So that players can go to sleep without worries?
-
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.
-
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 forumshttp://reignofkings.pl/forum/
-
I have sold a similiar script that works so I prefer to not touch it to prevent issues.
-
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())); } } }
DateTime.Now.ToString("HHmm");
will print out military time
ex. 1339 = 1:39 PMLast edited by a moderator: Jul 3, 2015 -
Thank you @SweetLouHD but I have no idea what to do with this code
-
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. -
Sure I would like you to send it to me, that would be nice. Btw. do you have "OnCubeTakeDamage" error in it?
-
I have absolutely no errors in it and I just tested it while working on it to make it more customizable and userfriendly.