>>>>> thus on Tue, 11 Aug 1998 21:18:58 EDT, Brett wrote:
> I have longterm spells and skills implemented into my mud. Which is kept
> track by a counter, that is decreased every phase. Similar to
> pulse_violence .. affects all people that are flagged with PLR_ANIMATE,
> PLR_ENCHANT, etc. I was wondering how I might change this counter, into a
> time variable? So it might be easier to display the time to the player.
Since pulses don't exactly match real time, you don't want to store it as a
time variable.
What you can do is take the number of pulses and find out how many pulses
per second.
Let's say you have a new heartbeat function called pulse_affect. It's
operational length is 250000 usec, or .25 of a second. There are 4 of
these per second.
You take the number of affect pulses left on the item and divide by 4 to
get the number of 'RL seconds' left on the affect.
Just find the ratio of pulses to RL seconds.
d.
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST