View previous topic :: View next topic |
Author |
Message |
congkai Voice
Joined: 24 Sep 2005 Posts: 13
|
Posted: Sat Sep 24, 2005 12:33 pm Post subject: advertise script |
|
|
i found a advertise script. it says to amke all channel in the bot parked advertise i make "*"
but seems when i make "*" (as shown below) i cannot get my bots to adv in all channel but only 1 channel.. which is the main 1st channel. i need a bot which adv in ALL channels..
i provide the part where it ask for timer. below. please let me know where to edit.
Code: |
===============================================
Script here
===============================================
## Set your channel for Advertize your text messeges ..
## If you want to Advertize in all channel where is your bot parking then use "*"
## other "#channel"
set speaks_chans "*"
set speaks_msg {
123123 ADV HERE
}
if {![string match "*time_speaks*" [timers]]} {
timer $speaks_time time_speaks
}
proc time_speaks {} {
global speaks_msg speaks_chans speaks_time
if {$speaks_chans == "*"} {
set speaks_temp [channels]
} else {
set speaks_temp $speaks_chans
}
foreach chan $speaks_temp {
set speaks_rmsg [lindex $speaks_msg [rand [llength $speaks_msg]]]
puthelp "PRIVMSG $chan :$speaks_rmsg"
timer $speaks_time time_speaks
return 1
}
|
|
|
Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
Back to top |
|
 |
congkai Voice
Joined: 24 Sep 2005 Posts: 13
|
Posted: Sat Sep 24, 2005 10:53 pm Post subject: |
|
|
ad.tcl only does 1 channel add. i seen the /msg bot <url here> <ad here>
but the most important is i want it to apper IN ALL CHANNEL.. which it cannot.. can someone tell me how to make it in all channel espicallu the script on top? |
|
Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Sep 25, 2005 8:29 am Post subject: |
|
|
Then add ALL your channels in the script (i.e. "#chan1 #chan2 #chan3") or you can set it to "[channels]". _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
Back to top |
|
 |
congkai Voice
Joined: 24 Sep 2005 Posts: 13
|
Posted: Sun Sep 25, 2005 10:48 am Post subject: |
|
|
do u mean i make this
set speaks_chans "[channels]"
and it will work?
sorry i am a noob |
|
Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
Back to top |
|
 |
congkai Voice
Joined: 24 Sep 2005 Posts: 13
|
Posted: Sun Sep 25, 2005 11:57 am Post subject: |
|
|
i tried puting
set speaks_chans "[channels]"
but it did not post even one channel.
i am sorry i cannot make "#chan1 #chan2 #chan3" because i am running shell, anytime any channel allow me to adv i just ask the bot to join, and the bot can adv in ALL the joined channel.
or is it possible can i have the hounor to ask you, who are a expert, whom i greaty thanked in, to help me make this script postable in ALL the channels? pls? thank you a million. |
|
Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Sep 25, 2005 12:15 pm Post subject: |
|
|
Code: | set Ads {
"advertisement 1"
"advertisement 2"
"advertisement 3"
}
if {[timerexists advertise]==""} {
timer 1 advertise
}
proc advertise {} {
global Ads
foreach chan [channels] {
puthelp "privmsg $chan :[lindex $Ads [rand [llength $Ads]]]"
}
timer 1 advertise
} |
This will send a random ad from Ads to all channels every minute
PS: alltools.tcl should be loaded for the [timerexists] command to work. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sun Sep 25, 2005 12:17 pm Post subject: |
|
|
maybe the original script didnt work because $speaks_msg was no proper list? Just a suggestion, because from the logic setting to * should make the script to load the channels each single execution. however, if a tcl error caused by an improper list interruptes the foreach loop, it wont output more. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
Back to top |
|
 |
congkai Voice
Joined: 24 Sep 2005 Posts: 13
|
Posted: Sun Sep 25, 2005 2:22 pm Post subject: |
|
|
first of all i would like to thank you for giving me this script. Thanks a lot. it works well..
well, i still don't forfilled my wish.. but its enough thanks.. without !addadv command i can also edit the tcl. thanks a lot anyway De Kus! |
|
Back to top |
|
 |
congkai Voice
Joined: 24 Sep 2005 Posts: 13
|
Posted: Sun Sep 25, 2005 2:46 pm Post subject: |
|
|
one more help.. sorry
if {[timerexists advertise]==""} {
timer 1 advertise
}
this is 1min 1 time
i set to 30 but seems i waited 1hrs haven even adv.. is 30min ad in as
timer 30 advertise
?  |
|
Back to top |
|
 |
congkai Voice
Joined: 24 Sep 2005 Posts: 13
|
Posted: Sun Sep 25, 2005 3:11 pm Post subject: |
|
|
sloved. thanks |
|
Back to top |
|
 |
|