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


Joined: 24 Jul 2009
Posts: 14

PostPosted: Sun Jul 26, 2009 3:50 pm   

Time between the same trigger firing
 
I'm trying to display the time (mm:ss) that has elapsed between a trigger firing. This is what I currently have:

Pattern: * You think your %1 skill has improved

#win Improves %time("hh:mm:ss") %char( 32) %1

I tried to do:

Pattern: * You think your %1 skill has improved

PrevTriggerTime = CurTriggerTime
CurTriggerTime = %time(hh:mm:ss)
#win Improves %time("hh:mm:ss") %char(32) %1 Delay %eval(@CurTriggerTime - @PrevTriggerTime)

However it only returns zero for my value. Can anyone point me in the proper direction?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Jul 26, 2009 6:05 pm   
 
Pattern: You think your (*) skill has improved.$

Script:
$Cur=%eval(%time("(hh*60+mm)*60+ss"))
$Elapsed=($Cur-@PrevTriggerTime)
PrevTriggerTime=@CurTriggerTime
CurTriggerTime=$Cur
#WIN Improves {%1 Delay $Elapsed}

Other:
Turn on the time stamps in your Improves window. You can find it in the Preferences section for the window.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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