| View previous topic :: View next topic |
| Author |
Message |
padyo Voice
Joined: 25 Jun 2008 Posts: 4
|
Posted: Wed Jun 25, 2008 1:09 pm Post subject: Radio Countdown |
|
|
Looking for a 3 minute countdown timer to allow the next dj that the next slot is freed up. Currently I have one for mirc, but would like to see something for the eggdrop so a dj could type a command like: !countdown and leave the work up to the bot.
Something that would leave it looking like:
Dj: !countdown
Bot: [3 minute countdown started]
Bot: [2 minutes]
Bot: [1 minute]
Bot: [45 seconds]
Bot: [30 seconds]
Bot: [20 seconds]
Bot: [10 seconds]
Bot: [5 seconds]
Bot: [1 second]
Bot: [GO GO GO]
TIA |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Thu Jun 26, 2008 4:47 am Post subject: |
|
|
Try this:
| Code: | bind pub - !countdown cdn_start
proc cdn_start {n u h c a} {
if {![info exists ::cdntimer($c)]} {
cdn_next $c 0
} else {
# already counting on that channel - ignore request
}
}
proc cdn_next {c i} {
set msgs {
"[3 minute countdown started]"
"[2 minutes]"
"[1 minute]"
"[45 seconds]"
"[30 seconds]"
"[20 seconds]"
"[10 seconds]"
"[5 seconds]"
"[1 second]"
"[GO GO GO]"
}
set times {
60 60 15 15 10 10 5 4 1
}
putquick "PRIVMSG $c :[lindex $msgs $i]"
if {[llength $times]>$i} {
set ::cdntimer($c) [utimer [lindex $times $i] [list cdn_next $c [incr i]]]
} else {
unset ::cdntimer($c)
}
} |
_________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
padyo Voice
Joined: 25 Jun 2008 Posts: 4
|
Posted: Thu Jun 26, 2008 7:19 pm Post subject: |
|
|
| Awesome! Thank you. Works a charm. |
|
| Back to top |
|
 |
|