Hello Guys, is there any one who can make a tcl scripts for counting down the christmas & new year day, the bot will announce on the set channel every 10 minutes on #countdown channel.
Example: <@Bot> 6 days, 144hours and 5184000 minutes before Christmas [25th December] and some days, some hours, some minutes before New Year [1st January, 2006]
i want the bot to announce that every 10 minutes on the channel and also to set on the topic how many days only before christmas & new year ... umm... if it can be done, i want the bot to set the topic only once a day, not every 10 minutes .. i hope you guys understand my english ... thanks
bind time - "?0 *" count:down
proc count:down args {
set christmas "[duration [expr {[clock scan 12/25/05] - [clock seconds]}]]"
set newyear "[duration [expr {[clock scan 01/01/06] - [clock seconds]}]]"
puthelp "PRIVMSG #channel :$christmas before Christmas \[25th December\] and $newyear before New Year \[1st January, 2006\]"
}
this will msg #channel every 10 minutes the time left before christmas and new year. As for posting the topic every day, the search function will help you.
Edit: fixed a fragment in my last sentence
Last edited by Sir_Fz on Mon Dec 19, 2005 2:21 pm, edited 2 times in total.
You'll have to figure out what time zone your bot's on and add/subtract hour(s). For example if the bot's timezone is gmt+2, you'll have to subtract 3600 seconds from [clock seconds].
But i'd like to change it, so it only shows days, and not weeks, I have been looking at that manual mentioened earlier, but I have to admit, i'm a bit lost on this one.
Will try and mess around with that, by the way, I was wondering, would it be possible to a public command to show time left until set date?
like !xmas
and bot would respond with the timeleft.