| View previous topic :: View next topic |
| Author |
Message |
d0rk Voice
Joined: 10 Nov 2006 Posts: 9
|
Posted: Thu Mar 29, 2007 5:42 pm Post subject: help with adding time to command |
|
|
| Code: | 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 |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sat Apr 07, 2007 7:09 pm Post subject: |
|
|
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.. |
|
| Back to top |
|
 |
|