# Set your channel
set send_chans "#sukoon"
# Set Timer one line after X mins
set send_time "2"
# Set Your Messages. You can insert more messages caz is every X min an random message from the list..
set send_msg {
"Hello"
"How are u"
"what do u do"
"your are only mine"
}
#########################################
#!!!!!!DO NOT EDIT AFTER THIS LINE!!!!!!#
#########################################
if {![string match "*time_send*" [timers]]} {
timer $send_time time_send
}
proc time_send {} {
global send_msg send_chans send_time
if {$send_chans == "*"} {
set send_temp [channels]
} else {
set send_temp $send_chans
}
foreach chan $send_temp {
set send_rmsg [lindex $send_msg [rand [llength $send_msg]]]
puthelp "PRIVMSG $chan :$send_rmsg"
timer $send_time time_send
return 1
}
}
this is ok tcl working fine .. just need litel change on it it's playing msg randomly .. and like to be play by order ..
1st Hello
2nd How Are you
3rd what do u do
4th you are only mine
if any helper can help me for it . i will be so kind for him .
# Set your channel
set send_chans "#sukoon"
# Set Timer one line after X mins
set send_time "2"
# Set Your Messages. You can insert more messages caz is every X min an random message from the list..
set send_msg {
"Hello"
"How are u"
"what do u do"
"your are only mine"
}
#########################################
#!!!!!!DO NOT EDIT AFTER THIS LINE!!!!!!#
#########################################
if {![string match "*time_send*" [timers]]} {
timer $send_time time_send
}
# set a global variable to track the next line to say #
if {![info exists send_next]} { set send_next 0 }
proc time_send {} {
global send_msg send_chans send_time send_next
# save the msg line to say now #
set nextline [lindex $send_msg $send_next]
# and advance the global var to the next msg line number #
incr send_next
if {$send_next >= [llength $send_msg]} { set send_next 0 }
if {$send_chans == "*"} {
set send_temp [channels]
} else {
set send_temp $send_chans
}
foreach chan $send_temp {
puthelp "PRIVMSG $chan :$nextline"
}
# move the timer set and return to outside of the foreach loop #
timer $send_time time_send
return 1
}