mIRC Homepage
Posted By: sopia time in secs - 02/10/03 10:57 AM
This is what I used :
on *:text:!ping:#: { ctcp $nick ping | set %pingchan $chan }
on *:ctcpreply:*ping*: {
if ($2 = $null) halt { set %pt = $ctime - $2
else if (%pt < 0) set %pt 0 | msg %pingchan 4 $+ $nick Your ping reply was: [12 $+ %pt $+ 4] I'm your Hero.
}
}
The %pt reply was 1sec or 2sec , notice there was no "s" in the 2sec. How to make it appear with an "s" and another thing I need some answers in my earlier post , thanks.
Posted By: Knappen Re: time in secs - 02/10/03 01:04 PM
Code:
  

on *:text:!ping:#:{ ctcp $nick ping | set %pingchan $chan }

on *:ctcpreply:*ping*:{
if ($2 == $null) { halt }
 var %pt = $ctime - $2
if (%pt &lt; 0) { %pt = 0 }
msg %pingchan 4 $+ $nick Your ping reply was: [12 $+ %pt $+ 4] I'm your Hero.
}
Posted By: sopia Re: time in secs - 02/10/03 02:43 PM
it dint work.
Posted By: Iori Re: time in secs - 02/10/03 08:08 PM
Quote:
The %pt reply was 1sec or 2sec
I don't see any "sec" in the code at all smile
However...
[12 $+ $duration(%pt) $+ 4]
Posted By: sopia Re: time in secs - 03/10/03 06:49 AM
Thank Iori, it works and thank all for the help..:)
© mIRC Discussion Forums