A Clock for mirc which will be displayed in the upper right corner of a channel and query. For those of us who think Timestamps and Windows own clock in the systray just isnt enough :p
Usage: Type /mirc.clock in a channel or query window
type /closeclock to stop updating.
;tnxs KuTsuM for throwing "" in my face and making me code it so it
;works on all channels/queries as originaly it only did it for 1.
alias mirc.clock {
var %w = $iif($1,$iif($window($active).type == channel || $window($active).type == query,$active,$1),$active) ,%m = 0 , %h = 0
if (!$window(@@c)) { window -pfh @@c 1 1 170 170 | window -pfh @@@c 1 1 170 170 }
clear -n @@c
var %m = 0 , %h = 0
if (!$1) {
while (%m <= 354) {
drawdot -nr @@@c 0 1 $circle(70,70,100,%m,1)
drawdot -nr @@@c $rgb(255,0,0) 4 $circle(70,70,100,%h,1)
inc %m 1
inc %h 30
}
drawdot @@@c
}
elseif $1 { drawcopy -n @@@c 0 0 170 170 @@c 0 0 170 170 }
tokenize 58 $time
drawline -nr @@c 0 2 70 70 $circle(70,70,80,$2,6)
drawline -nr @@c 0 5 70 70 $circle(70,70,60,$calc($1 + ($2 / 60)),30)
drawline -nr @@c 0 1 70 70 $circle(70,70,95,$3,6)
drawdot @@c
drawsave @@c $+(",$scriptdirclock.bmp,")
background -p %w $+(",$scriptdirclock.bmp,")
.timerclock -m 1 500 mirc.clock %w
}
alias -l closeclock { timerclock off | window -c @@c | window -c @@@c }
alias -l circle {
var %xx = $calc(($4 * $5) -90) , %x = $calc(((($3 /2) * $cos(%xx).deg)) + $1) , %y = $calc(((($3 /2) * $sin(%xx).deg)) + $2)
return %x %y
}