|
takke Beginner
Joined: 11 Oct 2002 Posts: 29 Location: Sweden
|
Posted: Sat May 24, 2003 1:34 am
Timer problems |
Hi
I just this trigger to calculate the duration of a skill/spell. I works just fine in zmud 6.16 but now I have upgraded to 6.62 and now it's fucked up. For some reason the counter starts over at 60 sec or earlier and I can figure out why. Can someone plz help me with this problem.
Here is the trigger:
#math current %time( hhmm)*60-%time( hh)*2400+%time( ss)
#if (@wctime <> "OFF") {#math wctime @current-@wc}
#if (@denttime <> "OFF") {#math denttime @current-@dentt}
#if (@iwtime <> "OFF") {#math iwtime @current-@iw}
#if (@paintime <> "OFF") {#math paintime @current-@pain}
#if (@phystime <> "OFF") {#math phystime @current-@phys} |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 24, 2003 4:18 am |
Why this particular formula? You're trying to figure the number of seconds since midnight?
%time(hhmm) * 60 = 60*hh*100 + 60*mm = 6000hh + 60mm
-%time(hh)*2400 = -2400hh
so, that's
6000-2400hh + 60mm = 3600hh + 60mm?
But why not just compute it directly?
(%time( hh) * 3600) + (%time( mm) * 60) + %time( ss)
Anyway, whichever formula you use be sure to evaluate it.
#MATH current %eval((%time( hh) * 3600) + (%time( mm) * 60) + %time( ss))
It would appear that something changed between 6.16 and 6.62 so that #MATH no longer automatically evaluates the %time function.
LightBulb
Advanced Member |
|
|
|
|
|