mIRC Homepage
Posted By: tweaqer If duration passed certain time then..? - 08/02/05 06:20 PM
Hey all i'm writing a little script but i came across a little
thing that i think is very simple but i just can not get my
head around it.

I have this part of the code calculating the duration:

var %t = $duration($calc($ctime - %time))

this will give: 1hr 53min 32secs for example.
But the thing i want it to say is when its being used and it
turns out to have passed 1hr then it should say:
"Hey he's gone for more then an hour, is he oke?"
and when the duration is under an 1hr:
"dont worry hes not even gone for an hour"

would this be possible in any way?

Thanks all, you the pro's ! laugh
if ($calc($ctime - %time) >= 3600) { gone for more than 1 hour }
else { gone for less than 1 hour }
Posted By: DaveC Re: If duration passed certain time then..? - 08/02/05 07:15 PM
A little correction. ctime is in seconds so....

if ($calc($ctime - %time) >= 3600) { ....
yup .. bad me smile
fixed
© mIRC Discussion Forums