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 

ppt timer

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


Joined: 08 Jun 2008
Posts: 12

PostPosted: Tue Jun 17, 2008 7:13 pm    Post subject: ppt timer Reply with quote

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 Very Happy
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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Jun 18, 2008 12:27 pm    Post subject: Reply with quote

What message do you want to send after 5 minutes?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Pizza_Guy
Voice


Joined: 08 Jun 2008
Posts: 12

PostPosted: Wed Jun 18, 2008 10:26 pm    Post subject: Reply with quote

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
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