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.

wow.tcl timer

Support & discussion of released scripts, and announcements of new releases.
Post Reply
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

wow.tcl timer

Post by cache »

Can anyone show me what I can add to kill timer when bot jumps server? like on disconnect..

Because when I use this script and the bot jumps server it adds another 30min timer without killing the old timer..

Code: Select all

set wowtime "30"
and

Code: Select all

proc timer:wow {} {
  global botnick wowchan wowtime wowtxt
  if { [onchan $botnick $wowchan] } {
    set wowfile [open $wowtxt r]
    set wowread [split [read $wowfile] \n]
    close $wowfile
    putserv "PRIVMSG $wowchan :[lindex $wowread [rand [llength $wowread]]] "
    timer $wowtime "timer:wow" 
  }
}
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

Just browsing over Tcl docs, you'll likely need to store the ID of the timer.

Code: Select all

set timerID [timer $wowtime "timer:wow"]
killtimer $timerID
set timerID [timer $wowtime "timer:wow"]
Good luck.
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

Post by cache »

Thanks, I got it working... 8)
Post Reply