Re: [code] anti_male/anti_female eqs

From: Mike Carpenter (abram@DELTANET.COM)
Date: 05/30/98


I added the the ITEM_ANTI_MALE/ ITEM_ANTI_FEMALE     flags in
structs.h then in handler.c i located the section that "zapps" the player if
they are the wrong stats.  Look for ITEM_ANTI_EVIL, then just add in another
|| statement like have below.

It works for me.

Enjoy,
Mike(abram@deltanet.com)


if ((IS_OBJ_STAT(obj, ITEM_ANTI_EVIL) && IS_EVIL(ch)) ||
    (IS_OBJ_STAT(obj, ITEM_ANTI_GOOD) && IS_GOOD(ch)) ||
    (IS_OBJ_STAT(obj, ITEM_ANTI_NEUTRAL) && IS_NEUTRAL(ch)) ||
    (IS_OBJ_STAT(obj, ITEM_ANTI_SINGLE) && !IS_MULTI(ch)) ||
    (IS_OBJ_STAT(obj, ITEM_ANTI_DUAL) && IS_MULTI(ch)) ||
    (IS_OBJ_STAT(obj, ITEM_ANTI_MALE) && GET_SEX(ch) == SEX_MALE) ||
    (IS_OBJ_STAT(obj, ITEM_ANTI_FEMALE) && GET_SEX(ch) == SEX_FEMALE) ||
      invalid_class(ch, obj)) {
      act("You are zapped by $p and instantly let go of it.", FALSE, ch,
obj, 0$
      act("$n is zapped by $p and instantly lets go of it.", FALSE, ch, obj,
0,$
      obj_to_char(obj, ch);     /* changed to drop in inventory instead of
                                 * ground */
      return;
  }


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