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.

Auto channel msg

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
v
vlada
Voice
Posts: 5
Joined: Sun Oct 29, 2006 9:02 pm

Auto channel msg

Post by vlada »

Hi there, i use this tcl:

Code: Select all

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
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

bind time - "?0 * * * *" your:proc
Once the game is over, the king and the pawn go back in the same box.
Post Reply