egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

aidle.tcl by slennox

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Sat May 08, 2010 11:17 pm    Post subject: aidle.tcl by slennox Reply with quote

Hi it's been long I am out of touch with TCL but need some help from you guys, I am trying to use this aidle script it send msgs randomly from the list but I want it to send text 1 by 1 instead of randomly, it should play in series by the time I set.

like Text 1 goes first then Text 2 then Text n ..

Code:
# aidle.tcl v1.1 (28 March 1999) by slennox <slenny@ozemail.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 "#mychannel"

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

# Messages to send
set ai_msgs {
  "*yawn*"
  "*sigh*"
  "*chuckle*"
  "afk"
  "anyone awake?"
  "anyone here?"
  "anyway"
  "argh"
  "bbiam"
  "la la la"
  "blah"
  "bleh"
  "brb"
  "damn"
  "gawd"
  "haha"
  "hahahaha"
  "heh"
  "hehe"
  "hehehe"
  "hello"
  "hi"
  "hey"
  "ic"
  "idiot"
  "rofl"
}


# 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"


Thank You.
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber