This is the new home of the egghelp.org community forum. 
All data has been migrated (including user logins/passwords) to a new phpBB version.  
 
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message. 
	 
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
			
		
				
			
				
								padyo 							 
						Voice 			
		Posts:  4  		Joined:  Wed Jun 25, 2008 11:39 am 		
		
						
						
		 
		
						
					
													
							
						
									
						Post 
					 
								by padyo   »  Wed Jun 25, 2008 1:09 pm 
			
			
			
			
			
			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
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								user 							 
						  			
		Posts:  1452  		Joined:  Tue Mar 18, 2003 9:58 pm 		
		
											Location:  Norway 
							
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by user   »  Thu Jun 26, 2008 4:47 am 
			
			
			
			
			
			Try this:
Code: Select all 
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"?
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								padyo 							 
						Voice 			
		Posts:  4  		Joined:  Wed Jun 25, 2008 11:39 am 		
		
						
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by padyo   »  Thu Jun 26, 2008 7:19 pm 
			
			
			
			
			
			Awesome! Thank you. Works a charm.