mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 6
T
tweaqer Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Aug 2004
Posts: 6
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

Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
if ($calc($ctime - %time) >= 3600) { gone for more than 1 hour }
else { gone for less than 1 hour }

Last edited by mIRCManiac; 08/02/05 07:21 PM.
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
A little correction. ctime is in seconds so....

if ($calc($ctime - %time) >= 3600) { ....

Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
yup .. bad me smile
fixed


Link Copied to Clipboard