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


Joined: 04 Oct 2005
Posts: 20

PostPosted: Fri Nov 04, 2005 8:02 pm   

Start Timer.. on trigger..
 
How can I start a timer to know how long a spell effect lasts..

START TIMER
You feel blessed.
End Timer
You feel less blessed.

Then I would like to store the value so I know how long until spell affects will last...
Reply with quote
myddrun
Wanderer


Joined: 31 Mar 2005
Posts: 58

PostPosted: Fri Nov 04, 2005 8:10 pm   
 
um a quick way would be to make a alias thats

#add variable 1

to add 1 to it every tick.

set your tick to 1 second and start it on the first line and stop it on the second. So you get the number of seconds.

*shrugs if there's a more elegant way*

to start/stop the timer use #TI
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Nov 07, 2005 1:10 am   
 
A simple 2-condition trigger will do the trick:

#trigger {You feel blessed.} {SpellTimer = %ctime}
#condition {You feel less blessed.} {SpellTimer = %eval(%ctime - @SpellTimer)}
_________________
EDIT: I didn't like my old signature
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