This is my first try of a real mIRC script!
I did not copy and paste it from another snippet.
Leave any comments on how to improve.
How to use:
Go to Commands -> Days Until Christmas
OR
Right clicking on your channel window and pressing Days until Christmas.
Both of them produce the same output so it doesn't matter
;Days until Christmas
;By Tony L (DG)
;DO not reproduce!
;irc.cakeforce.co.uk #darkgamer
menu channel,menubar {
Days until Christmas: {
if ($gettok($date,2,47) <= 11) { set %hcdate Dec 25 00:00:00 $time(yyyy) | msg $chan There is $duration($calc($ctime(%hcdate) - $ctime)) Until Christmas | unset %hcdate | halt }
if ($gettok($date,2,47) == 12) && ($gettok($date,1,47) >= 25) { msg $chan There is $calc(31 - $gettok($date,1,47)) Days $calc(23 - $gettok($asctime(HH:nn:ss),1,58)) Hours $calc(59 - $gettok($asctime(HH:nn:ss),2,58)) Minutes $calc(60 - $gettok($asctime(HH:nn:ss),3,58)) Seconds Till New Years | halt }
else { msg $chan There is $calc(24 - $gettok($date,1,47)) Days $calc(23 - $gettok($asctime(HH:nn:ss),1,58)) Hours $calc(59 - $gettok($asctime(HH:nn:ss),2,58)) Mins $calc(60 - $gettok($asctime(HH:nn:ss),3,58)) Seconds Until Christmas | halt }
}
}