|
DarkestBlack Newbie
Joined: 09 Jun 2004 Posts: 2 Location: Ireland
|
Posted: 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, |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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. |
|
|
|
|
|