
Originally Posted by
[b
Quote[/b] ]# Accelerated Time Server build 005, © 2007 Victor Farbau
# Map objects needed: game logic called "Server"
# servertime = continuous count of time in seconds (00:00 is skipped, too much workaround otherwise)
# accel = acceleration factor (24h in 1h = accel 24)
# _hourlist holds an array of scenic starting hours, could also be set to a fix value if desired
# VFserverhours, VFservermin are public variables that contain the server time
?!(local Server): exit
_accel = 24
_taccel = _accel
_onehour = 3600
_oneday = (24 * _onehour) - _accel
_hourlist = [4,5,6,7,12,17,18,19]
_hourcount = (count _hourlist) - 1
_servertime = (_hourlist select (random _hourcount)) * 3600
#tempusfugit
~1
_servertime = _servertime + _taccel
?(_servertime < _onehour): _servertime = _onehour + 1
?(_servertime > _oneday): _servertime = _onehour + 1
VFserverhours = floor(_servertime / 3600)
VFservermin = floor((_servertime MOD 3600) / 60)
publicVariable "VFserverhours"
publicVariable "VFservermin"
?((VFserverhours > 20) OR (VFserverhours < 3)) : _taccel = _accel * 2
?((VFserverhours > 3) AND (VFserverhours < 20)) : _taccel = _accel
goto "tempusfugit"