| View previous topic :: View next topic |
| Author |
Message |
Pizza_Guy Voice
Joined: 08 Jun 2008 Posts: 12
|
Posted: Tue Jun 17, 2008 7:13 pm Post subject: ppt timer |
|
|
In a game that i play we have a protection period of 2880 mins. Its also a war game. I am trying to make a PPT system so that we can set it so that we can mark people as being under protection or even our selfs.
I started the following script just not sure how to get it to do the following:
1. set a timer and mark it with the ID of the person we set it with
ex: !ppt 123456
2. sends back timer set, i got this part
3. sends a message to the channel when the timer is down to say 5 mins
What I have so far | Code: | bind pub - !PPT ppt.proc
proc ppt.proc {nick uhost handle chan text} {
set timerid [timer 2880 [args args args args args]]
putserv "PRIVMSG $chan :Timer $timerid started"
} |
i know the 5 args won't work but i not sure what goes in there.
Thanks for the help and advice |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Jun 18, 2008 12:27 pm Post subject: |
|
|
What message do you want to send after 5 minutes? _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Pizza_Guy Voice
Joined: 08 Jun 2008 Posts: 12
|
Posted: Wed Jun 18, 2008 10:26 pm Post subject: |
|
|
someone helped me with this
| Code: | bind pub - !ppt 2870mins
#sets timer for 2875 mins
proc 2870mins { nick host hand chan text } {
putquick "PRIVMSG $chan :PPT timer for $text is set."
timer 600 "last10 $chan $text"
putlog "2870mins for $text."
}
#sets timer for 10 mins
proc last10 { chan text } {
putquick "PRIVMSG $chan :$text has 10 minutes left on PPT."
timer 1 "pptover $chan $text"
putlog "last10 mins for $text."
}
#tells when total time is over
proc pptover { chan text } {
putquick "PRIVMSG $chan :$text is coming off PPT soon!!"
putlog "pptover for $text!"
} |
i am sure that it could be made better. Also is there a way to keep the timers a bit more accurate. The first one is really off some times either fast or slow. The 2nd one is dead on no problems. I am also looking for a way to check the timer in teh channel
the way i am having the people do the timers is
!ppt <account name-ingame ID number>
i was thinking if i could do !check <account name-ingame ID number>
it could give me the time check, is that possable? |
|
| Back to top |
|
 |
|