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.

Anti-Idle by slennox mod request

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
i
iNFERNiS
Voice
Posts: 13
Joined: Tue Aug 21, 2007 11:03 am

Anti-Idle by slennox mod request

Post by iNFERNiS »

Hiya,

I'd like to have it work for multiple channels.
Also a partyline trigger to set it off manually.

thx in advance :)

Code: Select all

# aidle.tcl v1.1 (28 March 1999) by slennox <slenny@xxxxx.com.au>
# Latest versions can be found at www.ozemail.com.au/~slenny/eggdrop/
#
# Basic anti-idle script, sends random msg's to the specified channel at
# random time intervals.
#
# v1.0 - Initial release
# v1.1 - Stremlined startup timer check, added +1 to utimer

# Channel to send anti-idle messages to
set ai_chan "#channel"

# Maximum time interval between messages (in minutes)
set ai_time 240

# Messages to send
set ai_msgs {
  "blabla"
  "Hi"
 
}


# Don't edit anything below unless you know what you're doing

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] && [onchan $botnick $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

putlog "Loaded aidle.tcl v1.1 by slennox"
Post Reply