Re: Timers on objects

From: Jeff (jfink@csugrad.cs.vt.edu)
Date: 06/14/94


> 
>      Does anyone know if timers work on circle 2.2 objects?  For example
> on some muds a key will fade after so much time, that way it goes back into
> the game and will repop.  Does circle 2.2 support this, and if not then 
> could somsone explain what parts of the code need to be changed to add it.

I believe just about any version of Circle supports it, the problem
is in setting the original timer value.  A while back (a long while) I
mentioned that I had modified my mob files so that optional skill lines
could be added to give mobs skills without adding any new special
procedures.  We did pretty much the same thing with objectss, but added
lines to be able to define more of the object's flags.  One thing that
many people don't realize is that objects have a bitvector so that
they can use the AFF_ bits the same way spells do, i.e. make you invisible
when put on, or give you the detection spells, or anything else that
has an AFF bit.  The code is already there, you just need to set the
affected value to something, since they all default to 0.

Bottom line:  Go into db.c and look at the code where objects are read.
There should be some kind of a check for an 'A' for affected_by stuff,
and just add your own optional flag (like maybe an 'F' for flag) and
have it read in the data.  Ours looked something like:
F affected_by affected_by2 timer
(we had 2 affected_by longs because we ran out of AFF's)

The code that handles how objects deteriorate is in limits.c.  You might want
to check it out.  I seem to recall some problem with mobs having objects
that deteriorated... either the objects did deteriorate and mobs never ended
having the objects by the time PCs got there, or PCs could give the objects
charmed mobs so that the objects wouldn't deteriorate... I forget which.

And on the topic of keys, we decided to give them "charges" just like wands
and staves... once the key ran out, it crumbled to dust.

-Jeff



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