set ai_chan "#daigo"
set ai_time 1
set ai_msgs {
"please watch your step"
"i like cookies"
}
proc ai_start {} {
global ai_time
if {[string match *ai_sendmsg* [timers]]} {return 0}
timer [expr [rand $ai_time] + 1] ai_sendmsg
}
proc ai_sendmsg {} {
global botnick ai_chan ai_msgs ai_time
if {[validchan $ai_chan]} {
puthelp "PRIVMSG $ai_chan :[lindex $ai_msgs [rand [llength $ai_msgs]]]"
}
timer [expr [rand $ai_time] + 1] ai_sendmsg
}
set ai_chan [string tolower $ai_chan]
ai_start
It says one of those 2 random messages I have in my script, at random intervals, with the minimum time lapse of 1 minute. How do I make the timer in seconds instead of minutes so that I can make the script say something at least every 30 seconds instead of at least every 1 minute?