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.

error in script

Help for those learning Tcl or writing their own scripts.
Post Reply
D
Danik
Halfop
Posts: 49
Joined: Sun Jun 15, 2008 12:59 pm
Location: Moldova
Contact:

error in script

Post by Danik »

does anybody know what is the error in this script ?....

Code: Select all

## Set your channel for Advertize your text messeges ..
## If you want to Advertize in all channel where is your bot parking then use "*"
## other "#Cimislia"

set speaks_chans "#Cimislia"

# Set you want in XXX minute you bot always talk on minute 
set speaks_time "10

## ----------------------------------------------------------------
## --- Don't change anything below here if you don't know how ! ---
## ----------------------------------------------------------------

### Advertizing Messeges are Here ###
# Set the next lines as the random speaks msgs you want to say

set speaks_msg {
" 1,0[ATENTIE] 12,12_8,8_4,4_1,0 #Cimislia FORUM -> wWw.CimisliaIRC.Tk (propuneri/obiectii/divertisment)"
}

if {![string match "*time_speaks*" [timers]]} {
 timer $speaks_time time_speaks
}

proc time_speaks {} {
 global speaks_msg speaks_chans speaks_time
 if {$speaks_chans == "*"} {
  set speaks_temp [channels]
 } else {
  set speaks_temp $speaks_chans
 }
 foreach chan $speaks_temp {
  set speaks_rmsg [lindex $speaks_msg [rand [llength $speaks_msg]]]
 puthelp "PRIVMSG $chan :$speaks_rmsg" 
timer $speaks_time time_speaks
return 1
 }
 }

putlog "Advertizing in Channel loaded Successfuly..."
putlog "Ver 1.0 By NicePaL & Special Thanks for Pulse #DALnetBoT & #EggDrop"
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

Code: Select all

set speaks_time "10
change for

Code: Select all

set speaks_time "10"
:wink:
Post Reply