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.

Help with this script

Support & discussion of released scripts, and announcements of new releases.
Post Reply
w
whiteshark
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:

Help with this script

Post by whiteshark »

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

Code: Select all

###############################################
# 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"

g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Replace this line

Code: Select all

putserv "PRIVMSG $chan : $printochan" 
with

Code: Select all

foreach ch [channels] {putserv "PRIVMSG $ch : $printochan"}
w
whiteshark
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:

Post by whiteshark »

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
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

If you want the whole text of $adtext to be shown on all chans, then replace these:

Code: Select all

set printochan [lindex $adtext [rand [llength $adtext]]] 
putserv "PRIVMSG $ch : $printochan"
with

Code: Select all

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)
Last edited by Sir_Fz on Wed Aug 24, 2005 8:11 pm, edited 2 times in total.
w
whiteshark
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:

Post by whiteshark »

Thnx but i set the time on 120 minutes :)
Post Reply