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 

Hi, help me fix this advert script.

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


Joined: 28 Nov 2007
Posts: 20

PostPosted: Wed Dec 05, 2007 12:41 pm    Post subject: Hi, help me fix this advert script. Reply with quote

Hi, i have a script found in somebodys post in the egghelp forum. The code is:
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- 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 Sad
Back to top
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Thu Dec 06, 2007 11:22 am    Post subject: Reply with quote

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- 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
   }


EDITED: Use it, it should do the trick.
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
Back to top
View user's profile Send private message Visit poster's website
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Sun Dec 28, 2008 6:42 am    Post subject: Reply with quote

Hi, I use this script and i encounter an error at partyline which the bot doesn't advertise on the channel:

Quote:
<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"
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sun Dec 28, 2008 12:30 pm    Post subject: Reply with quote

Code:
set adtext [list "\00300,01Puslapis:\002\00304 http://grigai.lt\002" \
     "\00300,01Forumas:\002\00304 http://forum.grigai.lt\002" \
     "\00300,01Banu Sarasas:\002\00304 http://bans.grigai.lt\002" \
     "\00300,01Statistika:\002\00304 http://stats.grigai.lt\002"]

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.
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
Amr
Halfop


Joined: 14 Sep 2007
Posts: 94
Location: Egypt

PostPosted: Fri Mar 04, 2011 7:36 am    Post subject: Reply with quote

What about making the script to color the advertisements automatically.
Back to top
View user's profile Send private message
spithash
Master


Joined: 12 Jul 2007
Posts: 248
Location: Libera

PostPosted: Sat Mar 05, 2011 2:52 am    Post subject: Reply with quote

uhm, pardon me but, this topic must be moved in the "Scripting Help" category: http://forum.egghelp.org/viewforum.php?f=2

am I right? Question Exclamation Very Happy
_________________
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Sat Mar 05, 2011 3:23 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
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