PK Arena (need help)

From: Nick Stout (cyberman_64@HOTMAIL.COM)
Date: 08/25/98


I did a homemade version of PK. Here's how it goes...

structs.h:
+#define ROOM_PK                 (1 << 16)  /* PK allowed in room */
+#define PLR_PK                  (1 << 17)  /* Plr is flagged PK */

constants.c:
+"PK",

act.informative.c:
+    if (PLR_FLAGGED(wch, PLR_PK))
+      strcat(buf, " (PK!)");

act.movement.c:
+  if (IS_SET(ROOM_FLAGS(ch->in_room), ROOM_PK)) {
+SET_BIT(PLR_FLAGS(ch), PLR_PK);

fight.c:
<In function void check_killer>:
!  if (!PLR_FLAGGED(vict, PLR_KILLER) && !PLR_FLAGGED(vict, PLR_THIEF) !
&& !PLR_FLAGGED(ch, PLR_KILLER) && !IS_NPC(ch) && !IS_NPC(vict) !     &&
(ch != vict)) {
!    char buf[256];
<change to>:
!  if (!PLR_FLAGGED(vict, PLR_KILLER) && !PLR_FLAGGED(vict, PLR_THIEF) !
&& !PLR_FLAGGED(ch, PLR_KILLER) && !PLR_FLAGGED(ch, PLR_PK) &&  !
!IS_NPC(ch) && !IS_NPC(vict) && (ch != vict)) {
!    char buf[256];
<and after line>:
   send_to_char("If you want to be a PLAYER KILLER, so be it...\r\n",
ch);
+  } else if (PLR_FLAGGED(ch, PLR_PK) && !PLR_FLAGGED(ch, PLR_KILLER)) +
return;

<In function void die>:
<After the first REMOVE_BIT>:
+    REMOVE_BIT(PLR_FLAGS(ch), PLR_PK);



Now... The problem is that when i leave the room, the PK flag remains,
as well as the state of PKiller.
Where would i add another remove_bit to take the flag away when you exit
to a room without the pk flag?

Thanks... This has been bugging me for quite a while now.
-CyberMan


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


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