| View previous topic :: View next topic |
| Author |
Message |
whiteshark Halfop
Joined: 12 Jun 2005 Posts: 62 Location: netherlands
|
Posted: Wed Aug 24, 2005 3:11 pm Post subject: Help with this script |
|
|
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 |
|
 |
greenbear Owner
Joined: 24 Sep 2001 Posts: 733 Location: Norway
|
Posted: Wed Aug 24, 2005 4:12 pm Post subject: |
|
|
Replace this line | Code: | | putserv "PRIVMSG $chan : $printochan" | with | Code: | | foreach ch [channels] {putserv "PRIVMSG $ch : $printochan"} |
|
|
| Back to top |
|
 |
whiteshark Halfop
Joined: 12 Jun 2005 Posts: 62 Location: netherlands
|
Posted: Wed Aug 24, 2005 4:29 pm Post subject: |
|
|
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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Aug 24, 2005 5:20 pm Post subject: |
|
|
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 |
|
 |
whiteshark Halfop
Joined: 12 Jun 2005 Posts: 62 Location: netherlands
|
Posted: Wed Aug 24, 2005 5:35 pm Post subject: |
|
|
Thnx but i set the time on 120 minutes  |
|
| Back to top |
|
 |
|