Days until christmas script.

By DarkGamer120 on Dec 01, 2012

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 }
  }
}

Comments

Sign in to comment.
dma   -  Oct 31, 2015

nice
its working in 2015

 Respond  
sagargulati   -  Dec 04, 2012

Good Work NyanCat :)

 Respond  
rizons   -  Dec 03, 2012

Great =)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.