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 

Help with this script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Wed Aug 24, 2005 3:11 pm    Post subject: Help with this script Reply with quote

Hello can somebody edit this script so that the bot it send to all channels.
Thnx a Lot
Code:

###############################################
# iNgADvert.tcl by iNgLiSh                    #
# -adapted from newaidle.tcl by Felipe Tonioli#
# BE SURE TO EDIT WITH PICO or other linux    #
# editor, or else it will all get messed up!  #
# ie. in shell commandline: pico ingadvert.tcl#
# and then ctrl+x to save and close.          #
# Enjoy!!!          -iNgLiSh                  #
###############################################

# How often should it spit out ad:(in minutes ie. set ad-at 5
# would make it advertise every 5 min) :
set ad-at- 5
set vers "v o.1"
# Chan to advertise in:
set chan "trivia.nl"

###########Edit add ads inside "\002 HERE \002"############
 set adtext {

     "\002---------------------Nieuw----------------\002"
     "\002Wil je ook dat ^TriviaBot^ het Nieuws op jouw channel zegt:\002"
     "\002Bijvoorbeeld deze Url's van: Fok,Gamer,CS\002"
     "\002Kom dan naar #trivia.nl en lees daar het topic \002"
     


      }

#######DO NOT EDIT BELOW THESE LINES#######

   set notnick "$botnick"
   set notnick [string tolower ${nick}]
   if {![info exists {ald}]} {
     global notnick chan ad-at- adtext
     set ald 1
     timer ${ad-at-} printing
   }

   proc printing {} {
     global notnick chan ad-at- adtext
     set printochan [lindex $adtext [rand [llength $adtext]]]
      putserv "PRIVMSG $chan : $printochan"
     timer ${ad-at-} printing
   }

   putlog "\002\<ingadvert\> $vers by iNgLiSh is loaded \<ingadvert\>\002"

Back to top
View user's profile Send private message Visit poster's website
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Wed Aug 24, 2005 4:12 pm    Post subject: Reply with quote

Replace this line
Code:
putserv "PRIVMSG $chan : $printochan"
with
Code:
foreach ch [channels] {putserv "PRIVMSG $ch : $printochan"}
Back to top
View user's profile Send private message Send e-mail
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Wed Aug 24, 2005 4:29 pm    Post subject: Reply with quote

thnx but now is the problem the bot shows only one text message
this one "\002Bijvoorbeeld deze Url's van: Fok,Gamer,CS\002"
he show the other message not on the channels.
can you fix it for me .
he must send all the text message ones thogether

Master greenbear
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Aug 24, 2005 5:20 pm    Post subject: Reply with quote

If you want the whole text of $adtext to be shown on all chans, then replace these:
Code:
set printochan [lindex $adtext [rand [llength $adtext]]]
putserv "PRIVMSG $ch : $printochan"

with
Code:
foreach ch [channels] {
 foreach m $adtext {
  puthelp "PRIVMSG $ch :$m"
 }
}

But this might cause a huge lag or even your bot flooding out if it's on alot of chans.

Edit: Changed $chan to $ch (correction)
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts


Last edited by Sir_Fz on Wed Aug 24, 2005 8:11 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Wed Aug 24, 2005 5:35 pm    Post subject: Reply with quote

Thnx but i set the time on 120 minutes Smile
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 Support & Releases 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