| View previous topic :: View next topic |
| Author |
Message |
GouroB Voice
Joined: 17 Jan 2005 Posts: 29
|
Posted: Mon Feb 28, 2005 5:04 pm Post subject: timer script ! |
|
|
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  _________________ 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 |
|
| Back to top |
|
 |
^DooM^ Owner

Joined: 26 Aug 2003 Posts: 772 Location: IronForge
|
Posted: Mon Feb 28, 2005 5:10 pm Post subject: |
|
|
Click Me _________________ 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 |
|
| Back to top |
|
 |
greenbear Owner
Joined: 24 Sep 2001 Posts: 733 Location: Norway
|
Posted: Mon Feb 28, 2005 5:12 pm Post subject: |
|
|
| look in the tcl archive, there's dozens of them |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Mon Feb 28, 2005 9:51 pm Post subject: |
|
|
If you want a continued message you can use something like this:
| Code: |
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: |
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.
================================== |
|
| Back to top |
|
 |
evac1K Voice
Joined: 19 Jun 2006 Posts: 7
|
Posted: Mon Jun 19, 2006 7:26 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Tue Jun 20, 2006 10:03 pm Post subject: |
|
|
Use this then:
| Code: |
#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.
================================== |
|
| Back to top |
|
 |
evac1K Voice
Joined: 19 Jun 2006 Posts: 7
|
Posted: Wed Jun 21, 2006 12:10 am Post subject: |
|
|
#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 :\ |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Jun 21, 2006 12:23 am Post subject: |
|
|
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: |
#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.
================================== |
|
| Back to top |
|
 |
evac1K Voice
Joined: 19 Jun 2006 Posts: 7
|
Posted: Wed Jun 21, 2006 12:39 am Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
|