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 

advertise script

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
congkai
Voice


Joined: 24 Sep 2005
Posts: 13

PostPosted: Sat Sep 24, 2005 12:33 pm    Post subject: advertise script Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Sep 24, 2005 3:10 pm    Post subject: Reply with quote

Try ad.tcl from TCLScript.com.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
congkai
Voice


Joined: 24 Sep 2005
Posts: 13

PostPosted: Sat Sep 24, 2005 10:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 25, 2005 8:29 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
congkai
Voice


Joined: 24 Sep 2005
Posts: 13

PostPosted: Sun Sep 25, 2005 10:48 am    Post subject: Reply with quote

do u mean i make this

set speaks_chans "[channels]"


and it will work?

sorry i am a noob
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 25, 2005 10:50 am    Post subject: Reply with quote

Yeah, try it.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
congkai
Voice


Joined: 24 Sep 2005
Posts: 13

PostPosted: Sun Sep 25, 2005 11:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 25, 2005 12:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sun Sep 25, 2005 12:17 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
congkai
Voice


Joined: 24 Sep 2005
Posts: 13

PostPosted: Sun Sep 25, 2005 2:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
congkai
Voice


Joined: 24 Sep 2005
Posts: 13

PostPosted: Sun Sep 25, 2005 2:46 pm    Post subject: Reply with quote

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
? Rolling Eyes
Back to top
View user's profile Send private message
congkai
Voice


Joined: 24 Sep 2005
Posts: 13

PostPosted: Sun Sep 25, 2005 3:11 pm    Post subject: Reply with quote

sloved. thanks
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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