Jump to content
  • 0

Server time day/night RANDOM on server restart


meester

Question

Hello guys i'm looking for a script that when server restart it choose RANDOM time for Server time 

 

like for exemple

 

Each Server restart is gonna randomly choose between 0-24 in game time  

 

The only thing i see is in HiveExt.ini

 

 

[Time]
;Possible values: Local, Custom, Static
;You cannot use Static on OFFICIAL Hive, it will just revert to Local
Type = Static
;If using Custom type, offset from UTC in hours (can be negative as well)
;Offset = -8
;If using Static type (Hour value always the same on every server start), the value (0-24) to set the Hour to
Hour = 15

 

 i would like to make it random

PLEASE HELP

 

THX 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

To accomplish this you will have to add an additional script in your restart-script that will change the Hour value in your ini-file to a random number.

 

This action could be done with various forms of languages, example Ruby.

 

I did a quick google search and found something that seems to be done with vbscript, which might be the easiest way, as you don't have to install additional stuff on your server:

http://www.robvanderwoude.com/vbstech_files_ini.php

Link to comment
Share on other sites

  • 0

If using a batch file to restart you can use ECHO to append text to a file. Keep a template hivext,ini file somewhere, move it in and then append your Hour = 18 line ? I haven't tested it putting the [TIME] section at the end, can't see why it would be a problem..

 

Have written a c# script to do custom stuff at restarts but this is much simpler..

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...