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 

Auto channel msg

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
vlada
Voice


Joined: 29 Oct 2006
Posts: 5

PostPosted: Mon Oct 30, 2006 12:55 pm    Post subject: Auto channel msg Reply with quote

Hi there, i use this tcl:
Code:
set idx 0
set msgs {"spam 1" "spam 2" "spam 3"}
set chans(0) {#chan1 #chan2} ;# chans for msg1
set chans(1) {#chan3 #chan4} ;# chans for msg2
set chans(2) {#chan5 #chan6} ;# chans for msg3
bind time - * foo
proc foo {m args} {
   if {$m!="08" && $m!="09" && $m%20==0} {
      foreach c $::chans($::idx) {
         puthelp "privmsg $c :[lindex $::msgs $::idx]"
      }
      if {[incr ::idx] == [llength $::msgs]} {set ::idx 0}
   }
}

but this send msg every one hour not 20 min,i need to send every 20 (or 10) min. how to set up this? thanks
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Oct 30, 2006 1:09 pm    Post subject: Reply with quote

BIND:

(37) TIME (stackable)
bind time <flags> <mask> <proc>
proc-name <minute> <hour> <day> <month> <year>

Description: allows you to schedule procedure calls at certain
times. mask matches 5 space separated integers of the form:
"minute hour day month year". minute, hour, day, month have a
zero padding so they are exactly two characters long; year is
four characters. Flags are ignored.
Module: core


Soooo.....

bind time - "10 * * * *"
bind time - "20 * * * *"
bind time - "30 * * * *"
bind time - "40 * * * *"
bind time - "50 * * * *"
bind time - "00 * * * *"

Or just use a timer set to go every 10 or 20 mins..

BTW the rest of your proc makes no sense and will not work.
Back to top
View user's profile Send private message
caesar
Mint Rubber


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

PostPosted: Mon Oct 30, 2006 7:24 pm    Post subject: Reply with quote

bind time - "?0 * * * *" your:proc
_________________
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 Requests 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