Raised This Month: $168 Target: $400
 42% 

Chron (updated to 0.2 on 08Aug2006)


Post New Thread Reply   
 
Thread Tools Display Modes
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 08-12-2006 , 12:11   Re: Chron
Reply With Quote #11

Quote:
Originally Posted by Ace Rimmer
Hi L. Duke:

Well I haven't looked closely at this yet but it would be very simple. Something like a cvar for Date Hour Minute Second and possibly a total time since 1970 (I don't know if you're familiar with that concept but it is basically a count in seconds since 1970).

So it would be:

server_var(cron_date) or day or whatever you can add
server_var(cron_hour) -would report the server hour
server_var(cron_munute)
server_var(cron_second)

This way we wouldn't have to add recurring counters in ES or wait fro round starts etc. to check the time.

The server_var(cron_count) could be a a progressive number of seconds as mentioned above.

For example in my clan practise script I have to convert the start time to a number of minutes and the end time to a number of minutes so that I can find the difference between the two.

I hope this makes sense.

I am sorry that my knowledge in this area is limited to event scripts only so what I am asking may be ridiculous.

I must add that I haven't thought this though completely so please don't rush ahead and do it, only for me as it were.

Thanks for your hard work anyway.

:-)
I'm not going to add a cvar that is updated with the time every second as that would add more server load than a plugin like this should be using. If there is a way you could use a con command to request the data I would do that, as then it would only run code when you requested it.
L. Duke is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 08-12-2006 , 23:55   Re: Chron
Reply With Quote #12

Thanks for at least a bit of a status report
FlyingMongoose is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 08-16-2006 , 15:30   Re: Chron
Reply With Quote #13

Plugin has been updated to version 0.2

chron_job2 uses the same format as chron_job, but it runs when the start time occurs and then runs at the beginning of each map (after server.cfg) until the end time is reached.

Type 'chron_help' in the console for more info.
L. Duke is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 08-17-2006 , 01:14   Re: Chron (updated to 0.2 on 08Aug2006)
Reply With Quote #14

Hmm I somehow created an infinite loop...I'll look into what may be causing it...

hehe, executing a config that executes another config with it's same purpose...I should shoot myself... my problem should be fixed.

Last edited by FlyingMongoose; 08-17-2006 at 01:25.
FlyingMongoose is offline
Rebell
Veteran Member
Join Date: Nov 2004
Location: GERMANY
Old 08-17-2006 , 09:28   Re: Chron (updated to 0.2 on 08Aug2006)
Reply With Quote #15

Good job !
__________________
Rebell is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 11-25-2006 , 18:28   Re: Chron (updated to 0.2 on 08Aug2006)
Reply With Quote #16

I finally get my first use of your wonderful plugin....if only there was some way to interface with metaplugins.ini to modify what metamod reads from...it'd then be so freaking ideal for what my clan likes to call "Pirate Night" which is just a whole like 16 hours of nothing but a nifty plugin setup, or just custom maps, or whatever. Get it? What pirate night will be the next time is a secret, so people have to be there or they miss the fun. But oh well, this plugin performs as ideally as it can! And it works great! Thanks lduke!
FlyingMongoose is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 05-10-2007 , 18:42   Re: Chron (updated to 0.2 on 08Aug2006)
Reply With Quote #17

Very useful plugin - been using it for ages but I've noticed weird behaviour with this plugin and I'm not certain it's to do with my configuration.

Code:
chron_job set_reboot 07:12 07:14
chron_job DWP_OFF 07:16 07:17
chron_job2 BOTS 07:17 07:12 1
chron_job2 dust2 07:17 07:12 2
chron_job2 dust2BOTS 07:17 07:12 2
chron_job2 BOTS 07:17 07:12 3
chron_job2 BOTS 07:17 07:12 4
chron_job2 BOTS 07:17 07:12 5
chron_job2 BOTS 07:17 07:12 6
chron_job2 BOTS 07:17 07:12 7
So every day the server's set to reboot at just after 7am
Then a config is loaded to switch off DWP and set the map to de_dust2

On a Monday the server is set to run with dust2 only for 24hrs. (a custom mani.cfg file is loaded accordingly to set the map_cycle / disable voting etc)
The rest of the week the server is set on our 'normal' configuration (a different mani.cfg file is loaded with our 'usual' settings)

The thing is that every night at exactly midnight the map restarts (I don't mean it reloads the map) with all settings reset to as they were when the map first loaded.

Make sense?

Is there any way I can configure things more efficiently to eliminate this issue?
__________________

Last edited by Extreme_One; 05-10-2007 at 18:44.
Extreme_One is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 05-11-2007 , 15:40   Re: Chron (updated to 0.2 on 08Aug2006)
Reply With Quote #18

This plugin shouldn't be able to do anything with restarting the map. The only way I can think of that it could be this plugin is if you one of your cfg files had a "mp_restartgame" line and it was mistakenly running that cfg file at midnight.

I'm assuming that's what you mean by "restarting" not "reloading" anyway.
L. Duke is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 05-12-2007 , 07:07   Re: Chron (updated to 0.2 on 08Aug2006)
Reply With Quote #19

Strange!

I have no mp_restartgame lines in any of the configs. But yes that's the outcome as if an mp_restartgame had been triggered.
__________________
Extreme_One is offline
Chaos Llama
Senior Member
Join Date: Jul 2006
Old 05-12-2007 , 17:13   Re: Chron (updated to 0.2 on 08Aug2006)
Reply With Quote #20

Oddly when i type chron_help my server hard crashes (and needs to be manually rebooted).
Chaos Llama is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:08.


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Theme made by Freecode