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.

timer script !

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
G
GouroB
Voice
Posts: 29
Joined: Mon Jan 17, 2005 3:53 pm
Contact:

timer script !

Post by GouroB »

do any one knows or is there any tcl script that does timer things ... like i want my bot to say some msg ... after 2 mins in a specified channel , is there any tcl for that ? thx in advance for any positive reply :D
http://www.Shunno.co.uk
Get FREE hosting, windows or Linux VPS unix Shells or get your own website in minutes.
www.BanGlaCafe.com/chat.htm
Meet your local singles, chat with friends or just talk to people all over the globe
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

look in the tcl archive, there's dozens of them
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

If you want a continued message you can use something like this:

Code: Select all

timer 2 msg:chan

proc msg:chan {} {
 putserv "PRIVMSG #channel :Message here!"
 timer 2 msg:chan
}
If you want to trigger a proc, but delayed you can use something like this:

Code: Select all

proc my:proc {nick uhost hand chan text} {
  timer 2 [list my:second:proc $nick $uhost $hand $chan $text]
}

Note: It is not necessary to pass all variables to the next proc, you only need to pass only those arguments which are defined in your next proc, and the names cant be different, but the values would be same (since they don't depend upon names, just their positions).
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
e
evac1K
Voice
Posts: 7
Joined: Mon Jun 19, 2006 7:19 pm

Post by evac1K »

awyeah. i dont get that. whats a proc? and what parts do i edit? in your second one. i want to advertise a channel like every 60 seconds.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Use this then:

Code: Select all

#Set the channel to advertise on
set channame "#mychannel"

#Set your advertising message
set advertmsg "Please join #blabla"

timer 60 msg:chan 

proc msg:chan {} {
 global channame advertmsg
 putserv "PRIVMSG $channame :$advertmsg" 
 timer 60 msg:chan 
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
e
evac1K
Voice
Posts: 7
Joined: Mon Jun 19, 2006 7:19 pm

Post by evac1K »

#Set the channel to advertise on
set channame "#findclan"

#Set your advertising message
set advertmsg "8,1#1K15 inviting TOP CAL/CEVO teams"

timer 60 msg:chan

proc msg:chan {} {
global channame advertmsg
putserv "PRIVMSG $channame :$advertmsg"
timer 60 msg:chan
}

not working :\
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Err, sorry I overlooked the previous code I pasted. Actually that will work, but for every 60 MINUTES not 60 SECONDS.

The code pasted below now should execute every 60 seconds:

Code: Select all

#Set the channel to advertise on 
set channame "#mychannel" 

#Set your advertising message 
set advertmsg "Please join #blabla" 

utimer 60 msg:chan 

proc msg:chan {} { 
 global channame advertmsg 
 putserv "PRIVMSG $channame :$advertmsg" 
 utimer 60 msg:chan 
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
e
evac1K
Voice
Posts: 7
Joined: Mon Jun 19, 2006 7:19 pm

Post by evac1K »

that works, is there something u can add where i can PM the bot so it stops it? and then something else to start it again? like .startad .endad
Post Reply