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 

can someone help with Simple advertise script please please

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


Joined: 09 Oct 2005
Posts: 26

PostPosted: Sat Oct 15, 2005 7:47 am    Post subject: can someone help with Simple advertise script please please Reply with quote

yeah i know im being a pain but you guys are great and im learning alot from this so thanks for that

anyway the problem is this

[8:19am]<Fox-Info> [17:24] Tcl error in script for 'timer5':
[8:19am]<Fox-Info> [17:24] syntax error in expression ""[strftime %H%M]" <= "[string map {{:} {}} $second]" || "[st...": variable references require preceding $

Code:
####################################
### Simple advertise script v1.0 ###
###       by DeeJay-SpunK        ###
###                  ###
### msn: djs@deejay-spunk.dk     ###
### irc: #DeeJay               ###
####################################
###                              ###
### The script is a advertise    ###
### script to msg a random       ###
### advertisement from a file    ###
### into a channel on certain    ###
### times with a delay between   ###
### the messages. Can be         ###
### configured after your needs  ###
####################################

### If you want the messages only to be shown in a specific timesquare, then put in the times here (20:00 to 21:00 etc, seperate with spaces)
set adv_time "0:00 23:00"

### Should the bot shut up some days? Write them here (Seperate them with spaces)
set adv_days ""

### The file where the advertise messages is stored in. (FILE MUST EXISTS IN THAT FOLDER! Remember to give write access/chmod 755
set adv_file "/home/doc/eggdrop/scripts/advertise.db"

### Channels the advertise message should go to
set adv_chans "#foxs-lair"

### How long time between the messages (In minutes)
set adv_timer "2"

#################################################
### DONT EDIT BELLOW HERE UNLESS YOU HAVE TO! ###
#################################################
timer $adv_timer adv:do
proc adv:do {} {
  global adv_chans adv_timer adv_time
  foreach channel $adv_chans { putquick "PRIVMSG $channel :[advmsg]"}
  timer $adv_timer adv:do
}
proc advmsg {} {
  global adv_file adv_from adv_to
  set first "[lindex [split "$adv_time"] 0]"
  set second "[lindex [split "$adv_time"] 1]"
  if {"[strftime %H%M]" <= "[string map {{:} {}} $second]" || "[strftime %H%M]" >= "[string map {{:} {}} $first]" && !isin "[strftime %A]" [strftime %A]} {
    set f [open $adv_file]
    set l [split [read $f] \n]
    close $f
    set n [rand [llength $l]]
    if {[set x [lindex $l $n]]!=""} {return "$x"}
  }
}
putlog "Advertise script by DeeJay loaded succesfully"
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sat Oct 15, 2005 8:54 am    Post subject: Reply with quote

Quote:
!isin "[strftime %A]" [strftime %A]

whats that supposed to mean? its total nonesense for a boolan expression
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
drfox
Voice


Joined: 09 Oct 2005
Posts: 26

PostPosted: Sat Oct 15, 2005 9:28 am    Post subject: Reply with quote

well i didnt write the script im still learning all new to me
guess thats why it dont work any ideas on how to make it work
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sat Oct 15, 2005 1:55 pm    Post subject: Reply with quote

contact the author, I have no clue what it is supposed to do, the only thing I could do would be removing it, but that would most likely change the intented behavior of that script.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
drfox
Voice


Joined: 09 Oct 2005
Posts: 26

PostPosted: Sat Oct 15, 2005 2:34 pm    Post subject: Reply with quote

ok do you know off another one that spills a random line of text from a text file at a given time span say every 2-5 mins
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