Re: Incorporating lifespan in act.informative.c

From: Surgeon (webremedies@home.com)
Date: 12/11/00


Great many thanks,
couple more questions - I know I know, sorry =]
* disclaimer - I am not responsible for any anger stemming from my
posts
*
=] Ok thanks alot to all that posted,
just curious as to how one goes about checking the descriptor to make
sure the zone inwhich they are executing the command has a lifespan.
ie: what I will need to do is, if lifespan excists and is greater then
or equal to 0 and less then 500 I need to increment lifespan, just no
clue as to how one checks to make sure everything is ok.
a for loop? out on a limb on this one.

*so I how do I make sure the zone has an olc structure, from where the
command is being entered by the char, and also what steps should be
taken to change the value of lifespan for instance. *

Thanks

Bill Zaparanuik

Thomas Arp wrote:
>
> From: "Surgeon" <webremedies@home.com>
> > what steps would one take to incorporate the availability to
> > change/modify/compare the lifespan of a zone in act.informative.c,
> > in other words what externs, file includes, local structs would be
> > neccessary to access ie: zone_table[OLC_ZNUM(d)].lifespan.
>
> #include "oasis.h"
>
> extern struct zone_data *zone_table;
> extern zone_rnum top_of_zone_table;
>
> All you really need are the above three lines. Also, you must check if the descriptor has an olc structure before checking on the OLC_ZNUM() - otherwise you'll almost certainly end up with a crash.
>
> You might want to make a macro for quick access to the lifespan:
>
> #define ZONE_LIFE(loc)  (zone_table[(loc)].lifespan)
>
> - add this in utils.h (near ZONE_FLAGS).
>
> NOTE - the above is mailercode - back up your code first.
>
> Welcor of Builder's Academy
>
> --
>    +---------------------------------------------------------------+
>    | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
>    | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
>    +---------------------------------------------------------------+

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT