Jump to content
  • 0
Sign in to follow this  
WhiteEagle

Custom Ingame Time/clock

Question

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.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.