Re: [CODE] Tick counter

From: Michael Cunningham (malice@exit109.com)
Date: 04/14/99


>    I am trying to setup a tick counter so that when the person is
> sleeping, they get a random dream. How would I start of doing this?

Well, I havent done this yet so this is just speculation, but
I would start in the do_sleep function..

do a random roll..and if they beat the roll then set a dreaming
flag on them.

Then in point_update.. check if they are flagged with the dreaming
flag do another random roll.. to see how fast it takes then to start
dreaming.. if they beat that roll then send them the dream and
either remove the dreaming flag or let it stay on so they might
have further dreams. or instead of the roll you could use a
countdown timer or something that decrements a variable
that you assign in the do_sleep function when the dream
flag is set. When the var = 0 then send the dream...

In update_pos check to see if the position is above sleeping.
if it is then remove the dreaming flag.

I havent seen this dreaming thing in a mud yet.. I would think
it would be a royal pain to come up with enough dreams to keep
it interesting.. but it is creative.

Mike..
--
Speed of Lightning, Roar of Thunder!
Fighting All Who Rob and Plunder...
UnderDog.. Ahhahah UnderDog!


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST