mIRC Homepage
Posted By: LMN Automatic watch? - 27/01/11 05:27 PM
I want a automatic watch, so I have this script:
Code:
if ($time(nn) == 00) /msg $chan 4Het is nu: 12 $time([HH:nn dd/mm/yyyy])
}

How can I make it work automatically, because now I don't have something like: ON *:ACTION:
Posted By: Riamus2 Re: Automatic watch? - 27/01/11 06:04 PM
If you want it to happen at certain times rather than have it as a timestamp on messages, then you can use a timer.
Posted By: 5618 Re: Automatic watch? - 27/01/11 07:50 PM
Is this for one specific channel on one specific network? If so, you can use this code:
Code:
on *:CONNECT: if ($network == ABCD) startwatch
alias startwatch {
  var %nextHH = $calc($time(HH) +1)
  if (%nextHH == 24) var %nextHH = 0
  .timertimewatch %nextHH $+ :00 1 0 echotime
}
alias echotime { msg #chan 4Het is nu: 12 $time([HH:nn dd/mm/yyyy]) | startwatch }

Of course replace ABCD with your network name (//echo -a $network)
© mIRC Discussion Forums