Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
DarkestBlack
Newbie


Joined: 09 Jun 2004
Posts: 2
Location: Ireland

PostPosted: Thu Jun 10, 2004 2:01 am   

calculating time length
 
Hello,

Basicially ive read the help files etc and cant figure how this is done.

What i want to do is when a specific trigger activates i want a timer to start. Then when another trigger activates it stops the timer and adds the length of time in mins and sec to a variable.

E.G.
trigger pattern:
The Administrator tells you 'Thank you, brave DarkestBlack!'

Will start timer.

second pattern:
The Administrator tells you 'Congratulations DarkestBlack on completing your quest!

Will stop timer and send the length the time was activated to vars called
@min
@sec

Ive seen ppl with scripts like this so im curious how it is done.

Regards,
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jun 10, 2004 2:16 am   
 
#TR {The Administrator tells you 'Thank you, brave DarkestBlack!') {#VAR StartTime {%ctime}
#TR {The Administrator tells you 'Congratulations DarkestBlack on completing your quest!'} {#MATH min {(%ctime-@StartTime)/60};#MATH sec {(%ctime-@StartTime)60}}

Relatively simple tactic. Record the time at the start then do the math at the end.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net