Re: [code][idea][newbie]Special Guards

From: Richard Glover (magik@thegrid.net)
Date: 02/22/99


Pretty easy.  Go into structs.h, search for ROOM_HOUSE, add a new flag to
the list such as:

#define ROOM_NOWIELD    (1 << 17)

Where 17 is whatever is your next room flag.  If you use OasisOLC, edit your
olc.h and increase NUM_ROOM_FLAGS by one.  Then in act.movement.c, find the
do_simple_move function and add a check for ROOM_FLAGGED(IN_ROOM(ch),
ROOM_NOWIELD) and make the player remove the weapon if wielding.

Then in act.item.c, find do_wield and put a check in there about the
ROOM_NOWIELD and disallow wielding in that room.

That should do it.

Rick

-----Original Message-----
From: anthony benjamin <benjamin@POWERWEB.NET>
To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
Date: Monday, February 22, 1999 1:37 PM
Subject: Re:  [code][idea][newbie]Special Guards


>Today in school I had another idea. What if I made a new room flag called
>no_weapons and made it so characters could only fist fight in rooms marked
>that..and they couldn't wield weapons in those zones...the guards would
only
>make them remove the weapons...not take them. So then if the mud crashed,
the
>weapon would be in the char's inventory.... How hard is declaring a new
room
>flag? all I want to do is make it impossible to wield a weapon in certain
>rooms...flagged such...


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