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.

help with adding time to command

Help for those learning Tcl or writing their own scripts.
Post Reply
d
d0rk
Voice
Posts: 9
Joined: Fri Nov 10, 2006 3:01 pm

help with adding time to command

Post by d0rk »

Code: Select all

proc pub_.request {nick uhost hand channel rest} {
proc proctimer {minute hour day month year} { .. } ;
proc addtolist {nick userhost} {global yourlist; lappend yourlist $nick!$userhost}
proc checkthelist {nick userhost} {global yourlist; if {[lsearch -glob $yourlist [stringtopattern $nick]!*]!=-1 || 

[lsearch -glob $yourlist *![stringtopattern $userhost]]!=-1} {return 1} {return 0}}
global botnick
putmsg $channel ".give $nick 200"
putmsg $nick "$nick you can request another 200 words tomorrow from 00:00am GMT"
}
bind time - "" proctimer ;
bind pub - .request "pub_.request"
what i need help with is inserting a timer that will only reset at 00:00am GTM per person so that every one can request $200 to play on the cassino bot per day
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Assuming you have all the players names in a list or some var, you can do something like:

foreach name $whatever {
# reset $name stuff
}

and then bind that into a seperate proc with the bind time command..
Post Reply