###############################################
# 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- 10
set vers "v o.1"
# Chan to advertise in:
set chan "#grigai"
###########Edit add ads inside "\002 HERE \002"############
set adtext {
"0,1 Puslapis:4 http://grigai.lt "
"0,1 Forumas:4 http://forum.grigai.lt "
"0,1 Banu Sarasas:4 http://bans.grigai.lt "
"0,1 Statistika:4 http://stats.grigai.lt "
}
#######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
}
But wtf? i get the random message in 10 min, but in the wrong channel. I need the channel to be #grigai, but i get ir #kz or #mercenaries... Help fix this pls
###############################################
# 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- 10
set vers "v o.1"
# Chan to advertise in:
set chan1 "#grigai"
###########Edit add ads inside "\002 HERE \002"############
set adtext {
"0,1 Puslapis:4 http://grigai.lt "
"0,1 Forumas:4 http://forum.grigai.lt "
"0,1 Banu Sarasas:4 http://bans.grigai.lt "
"0,1 Statistika:4 http://stats.grigai.lt "
}
#######DO NOT EDIT BELOW THESE LINES#######
set notnick "$botnick"
set notnick [string tolower ${nick}]
if {![info exists {ald}]} {
global notnick chan1 ad-at- adtext
set ald 1
timer ${ad-at-} printing
}
proc printing {} {
global notnick chan1 ad-at- adtext
set printochan [lindex $adtext [rand [llength $adtext]]]
putserv "PRIVMSG $chan1 : $printochan"
timer ${ad-at-} printing
}
Hi, I use this script and i encounter an error at partyline which the bot doesn't advertise on the channel:
<Bot> [18:37] Tcl error in script for 'timer576':
<Bot> [18:37] list element in quotes followed by "I" instead of space
<Owner> .set errorInfo
<Bot> [18:37] #Owner# set errorInfo
<Bot> Currently: list element in quotes followed by "I" instead of space
<Bot> Currently: while executing
<Bot> Currently: "llength $adtext"
<Bot> Currently: (procedure "printing" line 3)
<Bot> Currently: invoked from within
<Bot> Currently: "printing"
The script uses embedded control characters and doesn't quite qualify as a perfect tcl list. The above code does qualify as a perfect tcl list, and also uses escape sequences to generate chars rather than embedding them. Use it in place of the original set adtext.
umm, no, I don't think you are. He has a script made by someone else and he needs a few adjustments, thus moved it here rather than Scripting Help.
Anyway, if you consider a topic should be moved to another category you should contact a moderator about it or go directly to slennox if it's really necessarily.
Once the game is over, the king and the pawn go back in the same box.