Re: Could someone else please test this...

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 04/16/98


Ok. you are gonna need to add another variable into your zone files.  a
bitvector.

in db.h:struct zone_data:
add a bitvector field for holding these flags
   long bitvector;

in structs.h
add #defines for your different bits.
#define Z_NO_RECALL    (1 << 1) /* a zone that you cannot recall from */
#define Z_NO_SUMMON    (1 << 2) /* a zone that you cannot summon to-from */

in db.c:load_zone()
tinker with the load code to allow you to read in an added integer (long)


create the appropriate menus in zedit.c and defines in olc.h if you have Oasis.
don't forget to save your value.


Where ever you check the room flag NO_SUMMON, also check the zone flag.
for example:
in spells.c:ASPELL(do_summon) add
      if(ROOM_FLAGGED(ch->in_room,ROOM_NO_SUMMON)||
         ROOM_FLAGGED(victim->in_room,ROOM_NO_SUMMON)||
         Z_FLAGGED(ch->in_room,Z_NO_SUMMON)||
         Z_FLAGGED(victim->in_room,Z_NO_SUMMON))
         {
         send_to_char("Something seems to block your magic!!\r\n",ch);
         return;
         }



in utils.h add:
#define  ZONE_FLAGS(i)  (zone_table[(i)].bitvector)
#define  ZONE_FLAGGED(i, flag)  (IS_SET(ZONE_FLAGS((i)), flag))
#define  Z_FLAGGED(loc, flag) (IS_SET(ZONE_FLAGS(world[(loc)].zone), (flag)))


______________________________ Forward Header __________________________________
Subject: Re:      Re:  Could someone else please test this...
Author:  INTERNET:brian@imi-bottling.com at CSERVE
Date:    4/16/98 11:27 AM

-----Original Message-----

>OBCircle: Zone flags are god.  Go use that bitvector in the zone_data
structure
>for all it's worth.  I added a Z_NO_SUMMON, Z_NO_RECALL, and a
Z_NO_TELEPORT
>(very nice to keep those teleporting mortals out.
>--Angus


Can you explain this zone flags a little more?  I've never seen "zone
flags" before... And if what you're saying is what I think it is, it's
allowing you to globally (on a zone by zone basis) make the whole zone
!summon, !recall, etc...

While I've coded roomflags and the associated code, what do I need to do
for zone flags to get it in and where is the associated code placed to
actually work globally to keep them from recalling, being summoned, etc...?

Sounds like a wonderful solution... can't wait for more info! =)

- Brian


     +------------------------------------------------------------+
     | 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