Custom Ingame Time/clock

WhiteEagle

New member
Messages
52
Points
0
Emulator
Hey guys, hope you can help me~
I need an ingame time which changes every 2 hours to the next day.
The 2h correspond 24h as day. 
One hour ingame time are:  120min / 24days = 5min
One minute ingame time are: 5min / 60sec = 0.0833333333333333
So the ingame time increases by 1 second in 0.833333333333333 real milliseconds
How do I set the gettimetick, which he calculates per tick 0.0833333333333333 seconds and displays ingame the correct time. Time format: %H:%M:%S - %d.%m.%Y

All those who know the game Aion or World of Warcraft may be able to imagine easier what I mean.

Thanks in advance.

 
I'm not sure if I understood what you want. If you are talking about day/night time durations, there is a configuration somewhere to modify it. But if you are talking about making the time go faster, I think it is not "possible", but you could do it from zero with a NPC controlling it. Since the time you want is 1/12 of the original, maybe a npc that triggers every 83 ms (OnTimer83:) could increase a variable for seconds by 1, then after 3 increases it increase again to avoid desynchronization.

OnTimer83:

++$sec;
++$secsinc;
if($secsinc == 3){

$secsinc = 0;

++$sec;

}

initnpctimer;
 

then do the rest for minutes, hours, etc.

 
Back
Top