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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
trigsandstuff
Newbie


Joined: 09 Jul 2010
Posts: 7

PostPosted: Fri Jul 09, 2010 8:10 pm   

Recording time
 
What would I use to calculate time between lines in a mud.
I have timestamps turned on, but I want a trigger that automatically pastes the results in a new window or a text file.

For instance:

03:24:15p You get in your car and start driving.
03:29:20p You barely avoid a horrible accident, but you still manage to hit a kitteh.
04:01:01p You reach the supermarket and turn the car off.

I want it to fire the trigger when I get in the car and start driving.
When I reach the market, i want the trigger to subtract the two timestamps and then print the result.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Mon Jul 12, 2010 5:28 pm   
 
Code:
#tr {^You get in your car and start driving.} {#var TripStartTime %ctime}
#tr {^You reach the supermarket and turn the car off.} {#var TripEndTime %ctime;#show {%eval(@TripEndTime-@TripStartTIme)}}


Those two triggers will use the predefined variable %ctime to give you a readout of the time in seconds the trip will take as long as you don't disconnect from the mud during the trip.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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