diff -Bbup ../../circle30bpl12/src/act.informative.c ./act.informative.c
--- ../../circle30bpl12/src/act.informative.c	Wed Oct 29 00:16:21 1997
+++ ./act.informative.c	Thu Jan 29 20:26:59 1998
@@ -368,7 +368,7 @@ void look_at_room(struct char_data * ch,
   }
   send_to_char(CCCYN(ch, C_NRM), ch);
   if (PRF_FLAGGED(ch, PRF_ROOMFLAGS)) {
-    sprintbit((long) ROOM_FLAGS(ch->in_room), room_bits, buf);
+    sprintbitarray(ROOM_FLAGS(ch->in_room), room_bits, RF_ARRAY_MAX, buf);
     sprintf(buf2, "[%5d] %s [ %s]", world[ch->in_room].number,
 	    world[ch->in_room].name, buf);
     send_to_char(buf2, ch);
@@ -1493,9 +1493,10 @@ ACMD(do_color)
     send_to_char("Usage: color { Off | Sparse | Normal | Complete }\r\n", ch);
     return;
   }
-  REMOVE_BIT(PRF_FLAGS(ch), PRF_COLOR_1 | PRF_COLOR_2);
-  SET_BIT(PRF_FLAGS(ch), (PRF_COLOR_1 * (tp & 1)) | (PRF_COLOR_2 * (tp & 2) >> 1));
-
+  REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_1);
+  REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_2);
+  if (tp & 1) SET_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_1);
+  if (tp & 2) SET_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_2);
   sprintf(buf, "Your %scolor%s is now %s.\r\n", CCRED(ch, C_SPR),
 	  CCNRM(ch, C_OFF), ctypes[tp]);
   send_to_char(buf, ch);
diff -Bbup ../../circle30bpl12/src/act.movement.c ./act.movement.c
--- ../../circle30bpl12/src/act.movement.c	Sat Apr 13 20:02:07 1996
+++ ./act.movement.c	Thu Jan 29 20:27:04 1998
@@ -113,13 +113,13 @@ int do_simple_move(struct char_data *ch,
 
     return 0;
   }
-  if (IS_SET(ROOM_FLAGS(ch->in_room), ROOM_ATRIUM)) {
+  if (IS_SET_AR(ROOM_FLAGS(ch->in_room), ROOM_ATRIUM)) {
     if (!House_can_enter(ch, world[EXIT(ch, dir)->to_room].number)) {
       send_to_char("That's private property -- no trespassing!\r\n", ch);
       return 0;
     }
   }
-  if (IS_SET(ROOM_FLAGS(EXIT(ch, dir)->to_room), ROOM_TUNNEL) &&
+  if (IS_SET_AR(ROOM_FLAGS(EXIT(ch, dir)->to_room), ROOM_TUNNEL) &&
       num_pc_in_room(&(world[EXIT(ch, dir)->to_room])) > 1) {
     send_to_char("There isn't enough room there for more than one person!\r\n", ch);
     return 0;
@@ -141,7 +141,7 @@ int do_simple_move(struct char_data *ch,
   if (ch->desc != NULL)
     look_at_room(ch, 0);
 
-  if (IS_SET(ROOM_FLAGS(ch->in_room), ROOM_DEATH) && GET_LEVEL(ch) < LVL_IMMORT) {
+  if (IS_SET_AR(ROOM_FLAGS(ch->in_room), ROOM_DEATH) && GET_LEVEL(ch) < LVL_IMMORT) {
     log_death_trap(ch);
     death_cry(ch);
     extract_char(ch);
@@ -447,7 +447,7 @@ ACMD(do_enter)
 	  }
     sprintf(buf2, "There is no %s here.\r\n", buf);
     send_to_char(buf2, ch);
-  } else if (IS_SET(ROOM_FLAGS(ch->in_room), ROOM_INDOORS))
+  } else if (IS_SET_AR(ROOM_FLAGS(ch->in_room), ROOM_INDOORS))
     send_to_char("You are already indoors.\r\n", ch);
   else {
     /* try to locate an entrance */
@@ -455,7 +455,7 @@ ACMD(do_enter)
       if (EXIT(ch, door))
 	if (EXIT(ch, door)->to_room != NOWHERE)
 	  if (!IS_SET(EXIT(ch, door)->exit_info, EX_CLOSED) &&
-	      IS_SET(ROOM_FLAGS(EXIT(ch, door)->to_room), ROOM_INDOORS)) {
+	      IS_SET_AR(ROOM_FLAGS(EXIT(ch, door)->to_room), ROOM_INDOORS)) {
 	    perform_move(ch, door, 1);
 	    return;
 	  }
@@ -468,14 +468,14 @@ ACMD(do_leave)
 {
   int door;
 
-  if (!IS_SET(ROOM_FLAGS(ch->in_room), ROOM_INDOORS))
+  if (!IS_SET_AR(ROOM_FLAGS(ch->in_room), ROOM_INDOORS))
     send_to_char("You are outside.. where do you want to go?\r\n", ch);
   else {
     for (door = 0; door < NUM_OF_DIRS; door++)
       if (EXIT(ch, door))
 	if (EXIT(ch, door)->to_room != NOWHERE)
 	  if (!IS_SET(EXIT(ch, door)->exit_info, EX_CLOSED) &&
-	    !IS_SET(ROOM_FLAGS(EXIT(ch, door)->to_room), ROOM_INDOORS)) {
+	    !IS_SET_AR(ROOM_FLAGS(EXIT(ch, door)->to_room), ROOM_INDOORS)) {
 	    perform_move(ch, door, 1);
 	    return;
 	  }
@@ -685,7 +685,7 @@ ACMD(do_follow)
       }
       if (ch->master)
 	stop_follower(ch);
-      REMOVE_BIT(AFF_FLAGS(ch), AFF_GROUP);
+      REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_GROUP);
       add_follower(ch, leader);
     }
   }
diff -Bbup ../../circle30bpl12/src/act.offensive.c ./act.offensive.c
--- ../../circle30bpl12/src/act.offensive.c	Wed Oct 29 00:16:21 1997
+++ ./act.offensive.c	Thu Jan 29 20:27:08 1998
@@ -253,7 +253,7 @@ ACMD(do_flee)
   for (i = 0; i < 6; i++) {
     attempt = number(0, NUM_OF_DIRS - 1);	/* Select a random direction */
     if (CAN_GO(ch, attempt) &&
-	!IS_SET(ROOM_FLAGS(EXIT(ch, attempt)->to_room), ROOM_DEATH)) {
+	!IS_SET_AR(ROOM_FLAGS(EXIT(ch, attempt)->to_room), ROOM_DEATH)) {
       act("$n panics, and attempts to flee!", TRUE, ch, 0, 0, TO_ROOM);
       if (do_simple_move(ch, attempt, TRUE)) {
 	send_to_char("You flee head over heels.\r\n", ch);
diff -Bbup ../../circle30bpl12/src/act.other.c ./act.other.c
--- ../../circle30bpl12/src/act.other.c	Wed Oct 29 00:16:21 1997
+++ ./act.other.c	Thu Jan 29 20:27:15 1998
@@ -145,14 +145,14 @@ ACMD(do_hide)
   send_to_char("You attempt to hide yourself.\r\n", ch);
 
   if (IS_AFFECTED(ch, AFF_HIDE))
-    REMOVE_BIT(AFF_FLAGS(ch), AFF_HIDE);
+    REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_HIDE);
 
   percent = number(1, 101);	/* 101% is a complete failure */
 
   if (percent > GET_SKILL(ch, SKILL_HIDE) + dex_app_skill[GET_DEX(ch)].hide)
     return;
 
-  SET_BIT(AFF_FLAGS(ch), AFF_HIDE);
+  SET_BIT_AR(AFF_FLAGS(ch), AFF_HIDE);
 }
 
 
@@ -330,7 +330,7 @@ int perform_group(struct char_data *ch, 
   if (IS_AFFECTED(vict, AFF_GROUP) || !CAN_SEE(ch, vict))
     return 0;
 
-  SET_BIT(AFF_FLAGS(vict), AFF_GROUP);
+  SET_BIT_AR(AFF_FLAGS(vict), AFF_GROUP);
   if (ch != vict)
     act("$N is now a member of your group.", FALSE, ch, 0, vict, TO_CHAR);
   act("You are now a member of $n's group.", FALSE, ch, 0, vict, TO_VICT);
@@ -411,7 +411,7 @@ ACMD(do_group)
 	act("$N is no longer a member of your group.", FALSE, ch, 0, vict, TO_CHAR);
       act("You have been kicked out of $n's group!", FALSE, ch, 0, vict, TO_VICT);
       act("$N has been kicked out of $n's group!", FALSE, ch, 0, vict, TO_NOTVICT);
-      REMOVE_BIT(AFF_FLAGS(vict), AFF_GROUP);
+      REMOVE_BIT_AR(AFF_FLAGS(vict), AFF_GROUP);
     }
   }
 }
@@ -435,14 +435,14 @@ ACMD(do_ungroup)
     for (f = ch->followers; f; f = next_fol) {
       next_fol = f->next;
       if (IS_AFFECTED(f->follower, AFF_GROUP)) {
-	REMOVE_BIT(AFF_FLAGS(f->follower), AFF_GROUP);
+	REMOVE_BIT_AR(AFF_FLAGS(f->follower), AFF_GROUP);
 	send_to_char(buf2, f->follower);
         if (!IS_AFFECTED(f->follower, AFF_CHARM))
 	  stop_follower(f->follower);
       }
     }
 
-    REMOVE_BIT(AFF_FLAGS(ch), AFF_GROUP);
+    REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_GROUP);
     send_to_char("You disband the group.\r\n", ch);
     return;
   }
@@ -460,7 +460,7 @@ ACMD(do_ungroup)
     return;
   }
 
-  REMOVE_BIT(AFF_FLAGS(tch), AFF_GROUP);
+  REMOVE_BIT_AR(AFF_FLAGS(tch), AFF_GROUP);
 
   act("$N is no longer a member of your group.", FALSE, ch, 0, tch, TO_CHAR);
   act("You have been kicked out of $n's group!", FALSE, ch, 0, tch, TO_VICT);
@@ -693,20 +693,24 @@ ACMD(do_display)
     return;
   }
   if ((!str_cmp(argument, "on")) || (!str_cmp(argument, "all")))
-    SET_BIT(PRF_FLAGS(ch), PRF_DISPHP | PRF_DISPMANA | PRF_DISPMOVE);
-  else {
-    REMOVE_BIT(PRF_FLAGS(ch), PRF_DISPHP | PRF_DISPMANA | PRF_DISPMOVE);
+  { SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP);
+    SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMANA);
+    SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMOVE);
+  } else {
+    REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP);
+    REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPMANA);
+    REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPMOVE);
 
     for (i = 0; i < strlen(argument); i++) {
       switch (LOWER(argument[i])) {
       case 'h':
-	SET_BIT(PRF_FLAGS(ch), PRF_DISPHP);
+	SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP);
 	break;
       case 'm':
-	SET_BIT(PRF_FLAGS(ch), PRF_DISPMANA);
+	SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMANA);
 	break;
       case 'v':
-	SET_BIT(PRF_FLAGS(ch), PRF_DISPMOVE);
+	SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMOVE);
 	break;
       default:
 	send_to_char("Usage: prompt { { H | M | V } | all | none }\r\n", ch);
@@ -784,8 +788,6 @@ ACMD(do_gen_write)
 
 #define TOG_OFF 0
 #define TOG_ON  1
-
-#define PRF_TOG_CHK(ch,flag) ((TOGGLE_BIT(PRF_FLAGS(ch), (flag))) & (flag))
 
 ACMD(do_gen_tog)
 {
diff -Bbup ../../circle30bpl12/src/act.wizard.c ./act.wizard.c
--- ../../circle30bpl12/src/act.wizard.c	Wed Oct 29 00:16:22 1997
+++ ./act.wizard.c	Thu Jan 29 20:27:33 1998
@@ -348,7 +348,7 @@ void do_stat_room(struct char_data * ch)
 	  CCNRM(ch, C_NRM), ch->in_room, buf2);
   send_to_char(buf, ch);
 
-  sprintbit((long) rm->room_flags, room_bits, buf2);
+  sprintbitarray(rm->room_flags, room_bits, RF_ARRAY_MAX, buf2);
   sprintf(buf, "SpecProc: %s, Flags: %s\r\n",
 	  (rm->func == NULL) ? "None" : "Exists", buf2);
   send_to_char(buf, ch);
@@ -464,17 +464,17 @@ void do_stat_object(struct char_data * c
     send_to_char(strcat(buf, "\r\n"), ch);
   }
   send_to_char("Can be worn on: ", ch);
-  sprintbit(j->obj_flags.wear_flags, wear_bits, buf);
+  sprintbitarray(j->obj_flags.wear_flags, wear_bits, TW_ARRAY_MAX, buf);
   strcat(buf, "\r\n");
   send_to_char(buf, ch);
 
   send_to_char("Set char bits : ", ch);
-  sprintbit(j->obj_flags.bitvector, affected_bits, buf);
+  sprintbitarray(j->obj_flags.bitvector, affected_bits, AF_ARRAY_MAX, buf);
   strcat(buf, "\r\n");
   send_to_char(buf, ch);
 
   send_to_char("Extra flags   : ", ch);
-  sprintbit(GET_OBJ_EXTRA(j), extra_bits, buf);
+  sprintbitarray(GET_OBJ_EXTRA(j), extra_bits, EF_ARRAY_MAX, buf);
   strcat(buf, "\r\n");
   send_to_char(buf, ch);
 
@@ -712,14 +712,14 @@ void do_stat_character(struct char_data 
   send_to_char(buf, ch);
 
   if (IS_NPC(k)) {
-    sprintbit(MOB_FLAGS(k), action_bits, buf2);
+    sprintbitarray(MOB_FLAGS(k), action_bits, PM_ARRAY_MAX, buf2);
     sprintf(buf, "NPC flags: %s%s%s\r\n", CCCYN(ch, C_NRM), buf2, CCNRM(ch, C_NRM));
     send_to_char(buf, ch);
   } else {
-    sprintbit(PLR_FLAGS(k), player_bits, buf2);
+    sprintbitarray(PLR_FLAGS(k), player_bits, PM_ARRAY_MAX, buf2);
     sprintf(buf, "PLR: %s%s%s\r\n", CCCYN(ch, C_NRM), buf2, CCNRM(ch, C_NRM));
     send_to_char(buf, ch);
-    sprintbit(PRF_FLAGS(k), preference_bits, buf2);
+    sprintbitarray(PRF_FLAGS(k), preference_bits, PR_ARRAY_MAX, buf2);
     sprintf(buf, "PRF: %s%s%s\r\n", CCGRN(ch, C_NRM), buf2, CCNRM(ch, C_NRM));
     send_to_char(buf, ch);
   }
@@ -766,7 +766,7 @@ void do_stat_character(struct char_data 
     send_to_char(strcat(buf, "\r\n"), ch);
 
   /* Showing the bitvector */
-  sprintbit(AFF_FLAGS(k), affected_bits, buf2);
+  sprintbitarray(AFF_FLAGS(k), affected_bits, AF_ARRAY_MAX, buf2);
   sprintf(buf, "AFF: %s%s%s\r\n", CCYEL(ch, C_NRM), buf2, CCNRM(ch, C_NRM));
   send_to_char(buf, ch);
 
@@ -786,7 +786,7 @@ void do_stat_character(struct char_data 
 	  strcat(buf, ", sets ");
 	else
 	  strcat(buf, "sets ");
-	sprintbit(aff->bitvector, affected_bits, buf2);
+	strcpy(buf2, affected_bits[aff->bitvector]);
 	strcat(buf, buf2);
       }
       send_to_char(strcat(buf, "\r\n"), ch);
@@ -1175,8 +1175,10 @@ ACMD(do_syslog)
     send_to_char("Usage: syslog { Off | Brief | Normal | Complete }\r\n", ch);
     return;
   }
-  REMOVE_BIT(PRF_FLAGS(ch), PRF_LOG1 | PRF_LOG2);
-  SET_BIT(PRF_FLAGS(ch), (PRF_LOG1 * (tp & 1)) | (PRF_LOG2 * (tp & 2) >> 1));
+  REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_LOG1);
+  REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_LOG2);
+  if (tp & 1) SET_BIT_AR(PRF_FLAGS(ch), PRF_LOG1);
+  if (tp & 2) SET_BIT_AR(PRF_FLAGS(ch), PRF_LOG2);
 
   sprintf(buf, "Your syslog is now %s.\r\n", logtypes[tp]);
   send_to_char(buf, ch);
@@ -1691,7 +1693,8 @@ ACMD(do_wiznet)
   for (d = descriptor_list; d; d = d->next) {
     if ((!d->connected) && (GET_LEVEL(d->character) >= level) &&
 	(!PRF_FLAGGED(d->character, PRF_NOWIZ)) &&
-	(!PLR_FLAGGED(d->character, PLR_WRITING | PLR_MAILING))
+	(!PLR_FLAGGED(d->character, PLR_MAILING) ||
+	 !PLR_FLAGGED(d->character, PLR_WRITING))
 	&& (d != ch->desc || !(PRF_FLAGGED(d->character, PRF_NOREPEAT)))) {
       send_to_char(CCCYN(d->character, C_NRM), d->character);
       if (CAN_SEE(d->character, ch))
@@ -1779,11 +1782,12 @@ ACMD(do_wizutil)
       send_to_char(buf, ch);
       break;
     case SCMD_PARDON:
-      if (!PLR_FLAGGED(vict, PLR_THIEF | PLR_KILLER)) {
+      if (!PLR_FLAGGED(vict, PLR_THIEF) || !PLR_FLAGGED(vict, PLR_KILLER)) {
 	send_to_char("Your victim is not flagged.\r\n", ch);
 	return;
       }
-      REMOVE_BIT(PLR_FLAGS(vict), PLR_THIEF | PLR_KILLER);
+      REMOVE_BIT_AR(PLR_FLAGS(vict), PLR_THIEF);
+      REMOVE_BIT_AR(PLR_FLAGS(vict), PLR_KILLER);
       send_to_char("Pardoned.\r\n", ch);
       send_to_char("You have been pardoned by the Gods!\r\n", vict);
       sprintf(buf, "(GC) %s pardoned by %s", GET_NAME(vict), GET_NAME(ch));
@@ -1814,7 +1818,7 @@ ACMD(do_wizutil)
 	send_to_char("Your victim is already pretty cold.\r\n", ch);
 	return;
       }
-      SET_BIT(PLR_FLAGS(vict), PLR_FROZEN);
+      SET_BIT_AR(PLR_FLAGS(vict), PLR_FROZEN);
       GET_FREEZE_LEV(vict) = GET_LEVEL(ch);
       send_to_char("A bitter wind suddenly rises and drains every erg of heat from your body!\r\nYou feel frozen!\r\n", vict);
       send_to_char("Frozen.\r\n", ch);
@@ -1835,7 +1839,7 @@ ACMD(do_wizutil)
       }
       sprintf(buf, "(GC) %s un-frozen by %s.", GET_NAME(vict), GET_NAME(ch));
       mudlog(buf, BRF, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE);
-      REMOVE_BIT(PLR_FLAGS(vict), PLR_FROZEN);
+      REMOVE_BIT_AR(PLR_FLAGS(vict), PLR_FROZEN);
       send_to_char("A fireball suddenly explodes in front of you, melting the ice!\r\nYou feel thawed.\r\n", vict);
       send_to_char("Thawed.\r\n", ch);
       act("A sudden fireball conjured from nowhere thaws $n!", FALSE, vict, 0, 0, TO_ROOM);
@@ -2016,7 +2020,7 @@ ACMD(do_show)
   case 6:
     strcpy(buf, "Death Traps\r\n-----------\r\n");
     for (i = 0, j = 0; i <= top_of_world; i++)
-      if (IS_SET(ROOM_FLAGS(i), ROOM_DEATH))
+      if (IS_SET_AR(ROOM_FLAGS(i), ROOM_DEATH))
 	sprintf(buf, "%s%2d: [%5d] %s\r\n", buf, ++j,
 		world[i].number, world[i].name);
     send_to_char(buf, ch);
@@ -2052,8 +2056,8 @@ ACMD(do_show)
 #define NUMBER	2
 
 #define SET_OR_REMOVE(flagset, flags) { \
-	if (on) SET_BIT(flagset, flags); \
-	else if (off) REMOVE_BIT(flagset, flags); }
+	if (on) SET_BIT_AR(flagset, flags); \
+	else if (off) REMOVE_BIT_AR(flagset, flags); }
 
 #define RANGE(low, high) (value = MAX((low), MIN((high), (value))))
 
@@ -2372,11 +2376,11 @@ int perform_set(struct char_data *ch, st
     break;
   case 42:
     if (!str_cmp(val_arg, "off")) {
-      REMOVE_BIT(PLR_FLAGS(vict), PLR_LOADROOM);
+      REMOVE_BIT_AR(PLR_FLAGS(vict), PLR_LOADROOM);
     } else if (is_number(val_arg)) {
       value = atoi(val_arg);
       if (real_room(value) != NOWHERE) {
-        SET_BIT(PLR_FLAGS(vict), PLR_LOADROOM);
+        SET_BIT_AR(PLR_FLAGS(vict), PLR_LOADROOM);
 	GET_LOADROOM(vict) = value;
 	sprintf(output, "%s will enter at room #%d.", GET_NAME(vict),
 		GET_LOADROOM(vict));
@@ -2390,7 +2394,8 @@ int perform_set(struct char_data *ch, st
     }
     break;
   case 43:
-    SET_OR_REMOVE(PRF_FLAGS(vict), (PRF_COLOR_1 | PRF_COLOR_2));
+    SET_OR_REMOVE(PRF_FLAGS(vict), PRF_COLOR_1);
+    SET_OR_REMOVE(PRF_FLAGS(vict), PRF_COLOR_2);
     break;
   case 44:
     if (GET_IDNUM(ch) != 1 || !IS_NPC(vict))
diff -Bbup ../../circle30bpl12/src/boards.c ./boards.c
--- ../../circle30bpl12/src/boards.c	Wed Oct 29 00:16:22 1997
+++ ./boards.c	Thu Jan 29 20:27:38 1998
@@ -234,7 +234,7 @@ void Board_write_message(int board_type,
   act("$n starts to write a message.", TRUE, ch, 0, 0, TO_ROOM);
 
   if (!IS_NPC(ch))
-    SET_BIT(PLR_FLAGS(ch), PLR_WRITING);
+    SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
 
   ch->desc->str = &(msg_storage[NEW_MSG_INDEX(board_type).slot_num]);
   ch->desc->max_str = MAX_MESSAGE_LENGTH;
diff -Bbup ../../circle30bpl12/src/castle.c ./castle.c
--- ../../circle30bpl12/src/castle.c	Fri Apr 12 23:39:21 1996
+++ ./castle.c	Thu Jan 29 20:27:45 1998
@@ -279,7 +279,7 @@ int block_way(struct char_data * ch, int
 /* Used by James the Butler and the Cleaning Lady */
 int is_trash(struct obj_data * i)
 {
-  if (IS_SET(i->obj_flags.wear_flags, ITEM_WEAR_TAKE) &&
+  if (IS_SET_AR(i->obj_flags.wear_flags, ITEM_WEAR_TAKE) &&
       ((GET_OBJ_TYPE(i) == ITEM_DRINKCON) || (GET_OBJ_COST(i) <= 10)))
     return TRUE;
   else
diff -Bbup ../../circle30bpl12/src/class.c ./class.c
--- ../../circle30bpl12/src/class.c	Wed Oct 29 00:16:22 1997
+++ ./class.c	Thu Jan 29 20:27:56 1998
@@ -389,7 +389,7 @@ void advance_level(struct char_data * ch
   if (GET_LEVEL(ch) >= LVL_IMMORT) {
     for (i = 0; i < 3; i++)
       GET_COND(ch, i) = (char) -1;
-    SET_BIT(PRF_FLAGS(ch), PRF_HOLYLIGHT);
+    SET_BIT_AR(PRF_FLAGS(ch), PRF_HOLYLIGHT);
   }
 
   save_char(ch, NOWHERE);
diff -Bbup ../../circle30bpl12/src/constants.c ./constants.c
--- ../../circle30bpl12/src/constants.c	Wed Oct 29 00:16:24 1997
+++ ./constants.c	Thu Jan 29 20:28:08 1998
@@ -185,6 +185,7 @@ const char *preference_bits[] = {
 /* AFF_x */
 const char *affected_bits[] =
 {
+  "\0", /* REQUIRED BY 128 BIT */
   "BLIND",
   "INVIS",
   "DET-ALIGN",
diff -Bbup ../../circle30bpl12/src/db.c ./db.c
--- ../../circle30bpl12/src/db.c	Wed Oct 29 00:16:24 1997
+++ ./db.c	Fri Jan 30 00:22:41 1998
@@ -647,7 +647,7 @@ void parse_room(FILE * fl, int virtual_n
 {
   static int room_nr = 0, zone = 0;
   int t[10], i;
-  char line[256], flags[128];
+  char line[256], flags[128], flags2[128], flags3[128], flags4[128];
   struct extra_descr_data *new_descr;
 
   sprintf(buf2, "room #%d", virtual_nr);
@@ -666,12 +666,17 @@ void parse_room(FILE * fl, int virtual_n
   world[room_nr].name = fread_string(fl, buf2);
   world[room_nr].description = fread_string(fl, buf2);
 
-  if (!get_line(fl, line) || sscanf(line, " %d %s %d ", t, flags, t + 2) != 3) {
+  if (!get_line(fl, line) ||
+      sscanf(line, " %d %s %s %s %s %d ", t, flags, flags2, flags3,
+             flags4, t + 2) != 6) {
     fprintf(stderr, "SYSERR: Format error in room #%d\n", virtual_nr);
     exit(1);
   }
   /* t[0] is the zone number; ignored with the zone-file system */
-  world[room_nr].room_flags = asciiflag_conv(flags);
+  world[room_nr].room_flags[0] = asciiflag_conv(flags);
+  world[room_nr].room_flags[1] = asciiflag_conv(flags2);
+  world[room_nr].room_flags[2] = asciiflag_conv(flags3);
+  world[room_nr].room_flags[3] = asciiflag_conv(flags4);
   world[room_nr].sector_type = t[2];
 
   world[room_nr].func = NULL;
@@ -1017,7 +1022,7 @@ void parse_mobile(FILE * mob_f, int nr)
   static int i = 0;
   int j, t[10];
   char line[256], *tmpptr, letter;
-  char f1[128], f2[128];
+  char f1[128], f2[128], f3[128], f4[128], f5[128], f6[128], f7[128], f8[128];
 
   mob_index[i].virtual = nr;
   mob_index[i].number = 0;
@@ -1040,14 +1045,20 @@ void parse_mobile(FILE * mob_f, int nr)
   mob_proto[i].player.title = NULL;
 
   /* *** Numeric data *** */
-  if (!get_line(mob_f, line) || (sscanf(line, "%s %s %d %c", f1, f2, t + 2, &letter) != 4)) {
+  if ((!get_line(mob_f, line)) || (sscanf(line, "%s %s %s %s %s %s %s %s %d %c", f1, f2, f3, f4, f5, f6, f7, f8, t + 2, &letter) != 10)) {
     fprintf(stderr, "SYSERR: Format error after string section of mob #%d\n"
-		    "...expecting line of form '# # # {S | E}'\n", nr);
+		    "...expecting line of form '# # # # # # # # # {S | E}'\n", nr);
     exit(1);
   }
-  MOB_FLAGS(mob_proto + i) = asciiflag_conv(f1);
-  SET_BIT(MOB_FLAGS(mob_proto + i), MOB_ISNPC);
-  AFF_FLAGS(mob_proto + i) = asciiflag_conv(f2);
+  MOB_FLAGS(mob_proto + i)[0] = asciiflag_conv(f1);
+  MOB_FLAGS(mob_proto + i)[1] = asciiflag_conv(f2);
+  MOB_FLAGS(mob_proto + i)[2] = asciiflag_conv(f3);
+  MOB_FLAGS(mob_proto + i)[3] = asciiflag_conv(f4);
+  SET_BIT_AR(MOB_FLAGS(mob_proto + i), MOB_ISNPC);
+  AFF_FLAGS(mob_proto + i)[0] = asciiflag_conv(f5);
+  AFF_FLAGS(mob_proto + i)[1] = asciiflag_conv(f6);
+  AFF_FLAGS(mob_proto + i)[2] = asciiflag_conv(f7);
+  AFF_FLAGS(mob_proto + i)[3] = asciiflag_conv(f8);
   GET_ALIGNMENT(mob_proto + i) = t[2];
 
   switch (UPPER(letter)) {
@@ -1059,8 +1070,10 @@ void parse_mobile(FILE * mob_f, int nr)
     break;
   /* add new mob types here.. */
   default:
+    parse_simple_mob(mob_f, i, nr);
+/* lets see if it works
     fprintf(stderr, "SYSERR: Unsupported mob type '%c' in mob #%d\n", letter, nr);
-    exit(1);
+    exit(1); */
     break;
   }
 
@@ -1085,7 +1098,7 @@ char *parse_object(FILE * obj_f, int nr)
   static char line[256];
   int t[10], j;
   char *tmpptr;
-  char f1[256], f2[256];
+  char f1[256], f2[256], f3[256], f4[256], f5[256], f6[256], f7[256], f8[256];
   struct extra_descr_data *new_descr;
 
   obj_index[i].virtual = nr;
@@ -1116,13 +1129,20 @@ char *parse_object(FILE * obj_f, int nr)
 
   /* *** numeric data *** */
   if (!get_line(obj_f, line) ||
-      (retval = sscanf(line, " %d %s %s", t, f1, f2)) != 3) {
-    fprintf(stderr, "SYSERR: Format error in first numeric line (expecting 3 args, got %d), %s\n", retval, buf2);
+      (retval = sscanf(line, " %d %s %s %s %s %s %s %s %s",
+                  t, f1, f2, f3, f4, f5, f6, f7, f8)) != 9) {
+    fprintf(stderr, "Format error in first numeric line (expecting 9 args, got %d), %s\n", retval, buf2);
     exit(1);
   }
   obj_proto[i].obj_flags.type_flag = t[0];
-  obj_proto[i].obj_flags.extra_flags = asciiflag_conv(f1);
-  obj_proto[i].obj_flags.wear_flags = asciiflag_conv(f2);
+  obj_proto[i].obj_flags.extra_flags[0] = asciiflag_conv(f1);
+  obj_proto[i].obj_flags.extra_flags[1] = asciiflag_conv(f2);
+  obj_proto[i].obj_flags.extra_flags[2] = asciiflag_conv(f3);
+  obj_proto[i].obj_flags.extra_flags[3] = asciiflag_conv(f4);
+  obj_proto[i].obj_flags.wear_flags[0] = asciiflag_conv(f5);
+  obj_proto[i].obj_flags.wear_flags[1] = asciiflag_conv(f6);
+  obj_proto[i].obj_flags.wear_flags[2] = asciiflag_conv(f7);
+  obj_proto[i].obj_flags.wear_flags[3] = asciiflag_conv(f8);
 
   if (!get_line(obj_f, line) ||
       (retval = sscanf(line, "%d %d %d %d", t, t + 1, t + 2, t + 3)) != 4) {
@@ -2274,7 +2294,7 @@ void clear_object(struct obj_data * obj)
 /* initialize a new character only if class is set */
 void init_char(struct char_data * ch)
 {
-  int i;
+  int i, taeller;
 
   /* create a player_special structure */
   if (ch->player_specials == NULL)
@@ -2330,7 +2350,8 @@ void init_char(struct char_data * ch)
       SET_SKILL(ch, i, 100);
   }
 
-  ch->char_specials.saved.affected_by = 0;
+ for(taeller=0; taeller < AF_ARRAY_MAX; taeller++)
+   ch->char_specials.saved.affected_by[taeller] = 0;
 
   for (i = 0; i < 5; i++)
     GET_SAVE(ch, i) = 0;
diff -Bbup ../../circle30bpl12/src/fight.c ./fight.c
--- ../../circle30bpl12/src/fight.c	Wed Oct 29 00:16:24 1997
+++ ./fight.c	Thu Jan 29 20:28:53 1998
@@ -73,7 +73,8 @@ void appear(struct char_data * ch)
   if (affected_by_spell(ch, SPELL_INVISIBLE))
     affect_from_char(ch, SPELL_INVISIBLE);
 
-  REMOVE_BIT(AFF_FLAGS(ch), AFF_INVISIBLE | AFF_HIDE);
+  REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_INVISIBLE);
+  REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_HIDE);
 
   if (GET_LEVEL(ch) < LVL_IMMORT)
     act("$n slowly fades into existence.", FALSE, ch, 0, 0, TO_ROOM);
@@ -167,7 +168,7 @@ void check_killer(struct char_data * ch,
       (ch != vict)) {
     char buf[256];
 
-    SET_BIT(PLR_FLAGS(ch), PLR_KILLER);
+    SET_BIT_AR(PLR_FLAGS(ch), PLR_KILLER);
     sprintf(buf, "PC Killer bit set on %s for initiating attack on %s at %s.",
 	    GET_NAME(ch), GET_NAME(vict), world[vict->in_room].name);
     mudlog(buf, BRF, LVL_IMMORT, TRUE);
@@ -220,7 +221,7 @@ void make_corpse(struct char_data * ch)
 {
   struct obj_data *corpse, *o;
   struct obj_data *money;
-  int i;
+  int i, x, y;
   extern int max_npc_corpse_time, max_pc_corpse_time;
 
   struct obj_data *create_money(int amount);
@@ -238,8 +239,14 @@ void make_corpse(struct char_data * ch)
   corpse->short_description = str_dup(buf2);
 
   GET_OBJ_TYPE(corpse) = ITEM_CONTAINER;
-  GET_OBJ_WEAR(corpse) = ITEM_WEAR_TAKE;
-  GET_OBJ_EXTRA(corpse) = ITEM_NODONATE;
+  for(x = y = 0; x < EF_ARRAY_MAX || y < TW_ARRAY_MAX; x++, y++) {
+     if (x < EF_ARRAY_MAX)
+        GET_OBJ_EXTRA_AR(corpse, x) = 0;
+     if (y < TW_ARRAY_MAX)
+        corpse->obj_flags.wear_flags[y] = 0;
+  }
+  SET_BIT_AR(GET_OBJ_WEAR(corpse), ITEM_WEAR_TAKE);
+  SET_BIT_AR(GET_OBJ_EXTRA(corpse), ITEM_NODONATE);
   GET_OBJ_VAL(corpse, 0) = 0;	/* You can't store stuff in a corpse */
   GET_OBJ_VAL(corpse, 3) = 1;	/* corpse identifier */
   GET_OBJ_WEIGHT(corpse) = GET_WEIGHT(ch) + IS_CARRYING_W(ch);
@@ -326,8 +333,10 @@ void raw_kill(struct char_data * ch)
 void die(struct char_data * ch)
 {
   gain_exp(ch, -(GET_EXP(ch) >> 1));
-  if (!IS_NPC(ch))
-    REMOVE_BIT(PLR_FLAGS(ch), PLR_KILLER | PLR_THIEF);
+  if (!IS_NPC(ch)) {
+    REMOVE_BIT_AR(PLR_FLAGS(ch), PLR_KILLER);
+    REMOVE_BIT_AR(PLR_FLAGS(ch), PLR_THIEF);
+  }
   raw_kill(ch);
 }
 
diff -Bbup ../../circle30bpl12/src/graph.c ./graph.c
--- ../../circle30bpl12/src/graph.c	Fri Apr 12 23:39:21 1996
+++ ./graph.c	Thu Jan 29 20:28:56 1998
@@ -43,9 +43,9 @@ struct bfs_queue_struct {
 static struct bfs_queue_struct *queue_head = 0, *queue_tail = 0;
 
 /* Utility macros */
-#define MARK(room) (SET_BIT(ROOM_FLAGS(room), ROOM_BFS_MARK))
-#define UNMARK(room) (REMOVE_BIT(ROOM_FLAGS(room), ROOM_BFS_MARK))
-#define IS_MARKED(room) (IS_SET(ROOM_FLAGS(room), ROOM_BFS_MARK))
+#define MARK(room) (SET_BIT_AR(ROOM_FLAGS(room), ROOM_BFS_MARK))
+#define UNMARK(room) (REMOVE_BIT_AR(ROOM_FLAGS(room), ROOM_BFS_MARK))
+#define IS_MARKED(room) (IS_SET_AR(ROOM_FLAGS(room), ROOM_BFS_MARK))
 #define TOROOM(x, y) (world[(x)].dir_option[(y)]->to_room)
 #define IS_CLOSED(x, y) (IS_SET(world[(x)].dir_option[(y)]->exit_info, EX_CLOSED))
 
diff -Bbup ../../circle30bpl12/src/handler.c ./handler.c
--- ../../circle30bpl12/src/handler.c	Wed Oct 29 00:16:25 1997
+++ ./handler.c	Fri Jan 30 00:23:26 1998
@@ -80,21 +80,11 @@ int isname(char *str, char *namelist)
 }
 
 
-
-void affect_modify(struct char_data * ch, byte loc, sbyte mod, long bitv,
-		        bool add)
+void aff_apply_modify(struct char_data *ch, byte loc, sbyte mod, char *msg)
 {
   int maxabil;
 
-  if (add) {
-    SET_BIT(AFF_FLAGS(ch), bitv);
-  } else {
-    REMOVE_BIT(AFF_FLAGS(ch), bitv);
-    mod = -mod;
-  }
-
-
-  maxabil = (IS_NPC(ch) ? 25 : 18);
+  maxabil = (IS_NPC(ch) ? 25 : 18); /* Not used, but why remove it ? */
 
   switch (loc) {
   case APPLY_NONE:
@@ -190,13 +180,49 @@ void affect_modify(struct char_data * ch
     break;
 
   default:
-    log("SYSERR: Unknown apply adjust attempt (handler.c, affect_modify).");
+    sprintf(buf, "SYSERR: Unknown apply adjust attempt (handler.c, %s).", msg);
+    log(buf);
     break;
 
   } /* switch */
 }
 
 
+void affect_modify(struct char_data * ch, byte loc, sbyte mod, long bitv,
+		        bool add)
+{
+  if (add) {
+    SET_BIT_AR(AFF_FLAGS(ch), bitv);
+  } else {
+    REMOVE_BIT_AR(AFF_FLAGS(ch), bitv);
+    mod = -mod;
+  }
+
+  aff_apply_modify(ch, loc, mod, "affect_modify");
+}
+
+
+void affect_modify_ar(struct char_data * ch, byte loc, sbyte mod, int bitv[],
+		        bool add)
+{
+  int i , j;
+
+  if (add) {
+    for(i = 0; i < AF_ARRAY_MAX; i++)
+      for(j = 0; j < 32; j++)
+        if(IS_SET_AR(bitv, (i*32)+j))
+          SET_BIT_AR(AFF_FLAGS(ch), (i*32)+j);
+  } else {
+    for(i = 0; i < AF_ARRAY_MAX; i++)
+      for(j = 0; j < 32; j++)
+        if(IS_SET_AR(bitv, (i*32)+j))
+          REMOVE_BIT_AR(AFF_FLAGS(ch), (i*32)+j);
+    mod = -mod;
+  }
+
+  aff_apply_modify(ch, loc, mod, "affect_modify_ar");
+}
+
 
 /* This updates a character by subtracting everything he is affected by */
 /* restoring original abilities, and then affecting all again           */
@@ -208,7 +234,7 @@ void affect_total(struct char_data * ch)
   for (i = 0; i < NUM_WEARS; i++) {
     if (GET_EQ(ch, i))
       for (j = 0; j < MAX_OBJ_AFFECT; j++)
-	affect_modify(ch, GET_EQ(ch, i)->affected[j].location,
+	affect_modify_ar(ch, GET_EQ(ch, i)->affected[j].location,
 		      GET_EQ(ch, i)->affected[j].modifier,
 		      GET_EQ(ch, i)->obj_flags.bitvector, FALSE);
   }
@@ -222,7 +248,7 @@ void affect_total(struct char_data * ch)
   for (i = 0; i < NUM_WEARS; i++) {
     if (GET_EQ(ch, i))
       for (j = 0; j < MAX_OBJ_AFFECT; j++)
-	affect_modify(ch, GET_EQ(ch, i)->affected[j].location,
+	affect_modify_ar(ch, GET_EQ(ch, i)->affected[j].location,
 		      GET_EQ(ch, i)->affected[j].modifier,
 		      GET_EQ(ch, i)->obj_flags.bitvector, TRUE);
   }
@@ -405,7 +431,7 @@ void obj_to_char(struct obj_data * objec
     IS_CARRYING_N(ch)++;
 
     /* set flag for crash-save system */
-    SET_BIT(PLR_FLAGS(ch), PLR_CRASH);
+    SET_BIT_AR(PLR_FLAGS(ch), PLR_CRASH);
   } else
     log("SYSERR: NULL obj or char passed to obj_to_char");
 }
@@ -423,7 +449,7 @@ void obj_from_char(struct obj_data * obj
   REMOVE_FROM_LIST(object, object->carried_by->carrying, next_content);
 
   /* set flag for crash-save system */
-  SET_BIT(PLR_FLAGS(object->carried_by), PLR_CRASH);
+  SET_BIT_AR(PLR_FLAGS(object->carried_by), PLR_CRASH);
 
   IS_CARRYING_W(object->carried_by) -= GET_OBJ_WEIGHT(object);
   IS_CARRYING_N(object->carried_by)--;
@@ -511,7 +537,7 @@ void equip_char(struct char_data * ch, s
     log("SYSERR: ch->in_room = NOWHERE when equipping char.");
 
   for (j = 0; j < MAX_OBJ_AFFECT; j++)
-    affect_modify(ch, obj->affected[j].location,
+    affect_modify_ar(ch, obj->affected[j].location,
 		  obj->affected[j].modifier,
 		  obj->obj_flags.bitvector, TRUE);
 
@@ -545,7 +571,7 @@ struct obj_data *unequip_char(struct cha
   GET_EQ(ch, pos) = NULL;
 
   for (j = 0; j < MAX_OBJ_AFFECT; j++)
-    affect_modify(ch, obj->affected[j].location,
+    affect_modify_ar(ch, obj->affected[j].location,
 		  obj->affected[j].modifier,
 		  obj->obj_flags.bitvector, FALSE);
 
@@ -654,7 +680,7 @@ void obj_to_room(struct obj_data * objec
     object->in_room = room;
     object->carried_by = NULL;
     if (ROOM_FLAGGED(room, ROOM_HOUSE))
-      SET_BIT(ROOM_FLAGS(room), ROOM_HOUSE_CRASH);
+      SET_BIT_AR(ROOM_FLAGS(room), ROOM_HOUSE_CRASH);
   }
 }
 
@@ -672,7 +698,7 @@ void obj_from_room(struct obj_data * obj
   REMOVE_FROM_LIST(object, world[object->in_room].contents, next_content);
 
   if (ROOM_FLAGGED(object->in_room, ROOM_HOUSE))
-    SET_BIT(ROOM_FLAGS(object->in_room), ROOM_HOUSE_CRASH);
+    SET_BIT_AR(ROOM_FLAGS(object->in_room), ROOM_HOUSE_CRASH);
   object->in_room = NOWHERE;
   object->next_content = NULL;
 }
@@ -1080,6 +1106,7 @@ char *money_desc(int amount)
 
 struct obj_data *create_money(int amount)
 {
+  int y;
   struct obj_data *obj;
   struct extra_descr_data *new_descr;
   char buf[200];
@@ -1125,7 +1152,9 @@ struct obj_data *create_money(int amount
   obj->ex_description = new_descr;
 
   GET_OBJ_TYPE(obj) = ITEM_MONEY;
-  GET_OBJ_WEAR(obj) = ITEM_WEAR_TAKE;
+  for(y = 0; y < TW_ARRAY_MAX; y++)
+    obj->obj_flags.wear_flags[y] = 0;
+  SET_BIT_AR(GET_OBJ_WEAR(obj), ITEM_WEAR_TAKE);
   GET_OBJ_VAL(obj, 0) = amount;
   GET_OBJ_COST(obj) = amount;
   obj->item_number = NOTHING;
diff -Bbup ../../circle30bpl12/src/house.c ./house.c
--- ../../circle30bpl12/src/house.c	Wed Oct 29 00:16:26 1997
+++ ./house.c	Thu Jan 29 20:44:54 1998
@@ -135,7 +135,7 @@ void House_crashsave(room_vnum vnum)
   }
   fclose(fp);
   House_restore_weight(world[rnum].contents);
-  REMOVE_BIT(ROOM_FLAGS(rnum), ROOM_HOUSE_CRASH);
+  REMOVE_BIT_AR(ROOM_FLAGS(rnum), ROOM_HOUSE_CRASH);
 }
 
 
@@ -274,8 +274,9 @@ void House_boot(void)
 
     house_control[num_of_houses++] = temp_house;
 
-    SET_BIT(ROOM_FLAGS(real_house), ROOM_HOUSE | ROOM_PRIVATE);
-    SET_BIT(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
+    SET_BIT_AR(ROOM_FLAGS(real_house), ROOM_HOUSE);
+    SET_BIT_AR(ROOM_FLAGS(real_house), ROOM_PRIVATE);
+    SET_BIT_AR(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
     House_load(temp_house.vnum);
   }
 
@@ -420,8 +421,9 @@ void hcontrol_build_house(struct char_da
 
   house_control[num_of_houses++] = temp_house;
 
-  SET_BIT(ROOM_FLAGS(real_house), ROOM_HOUSE | ROOM_PRIVATE);
-  SET_BIT(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
+  SET_BIT_AR(ROOM_FLAGS(real_house), ROOM_HOUSE);
+  SET_BIT_AR(ROOM_FLAGS(real_house), ROOM_PRIVATE);
+  SET_BIT_AR(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
   House_crashsave(virt_house);
 
   send_to_char("House built.  Mazel tov!\r\n", ch);
@@ -446,13 +448,15 @@ void hcontrol_destroy_house(struct char_
   if ((real_atrium = real_room(house_control[i].atrium)) < 0)
     log("SYSERR: House had invalid atrium!");
   else
-    REMOVE_BIT(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
+    REMOVE_BIT_AR(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
 
   if ((real_house = real_room(house_control[i].vnum)) < 0)
     log("SYSERR: House had invalid vnum!");
-  else
-    REMOVE_BIT(ROOM_FLAGS(real_house),
-	       ROOM_HOUSE | ROOM_PRIVATE | ROOM_HOUSE_CRASH);
+  else {
+    REMOVE_BIT_AR(ROOM_FLAGS(real_house), ROOM_HOUSE);
+    REMOVE_BIT_AR(ROOM_FLAGS(real_house), ROOM_PRIVATE);
+    REMOVE_BIT_AR(ROOM_FLAGS(real_house), ROOM_HOUSE_CRASH);
+  }
 
   House_delete_file(house_control[i].vnum);
 
@@ -471,7 +475,7 @@ void hcontrol_destroy_house(struct char_
    */
   for (i = 0; i < num_of_houses; i++)
     if ((real_atrium = real_room(house_control[i].atrium)) >= 0)
-      SET_BIT(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
+      SET_BIT_AR(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
 }
 
 
@@ -522,7 +526,7 @@ ACMD(do_house)
 
   one_argument(argument, arg);
 
-  if (!IS_SET(ROOM_FLAGS(ch->in_room), ROOM_HOUSE))
+  if (!IS_SET_AR(ROOM_FLAGS(ch->in_room), ROOM_HOUSE))
     send_to_char("You must be in your house to set guests.\r\n", ch);
   else if ((i = find_house(world[ch->in_room].number)) < 0)
     send_to_char("Um.. this house seems to be screwed up.\r\n", ch);
@@ -569,7 +573,7 @@ void House_save_all(void)
 
   for (i = 0; i < num_of_houses; i++)
     if ((real_house = real_room(house_control[i].vnum)) != NOWHERE)
-      if (IS_SET(ROOM_FLAGS(real_house), ROOM_HOUSE_CRASH))
+      if (IS_SET_AR(ROOM_FLAGS(real_house), ROOM_HOUSE_CRASH))
 	House_crashsave(house_control[i].vnum);
 }
 
diff -Bbup ../../circle30bpl12/src/interpreter.c ./interpreter.c
--- ../../circle30bpl12/src/interpreter.c	Wed Oct 29 00:16:27 1997
+++ ./interpreter.c	Thu Jan 29 20:29:21 1998
@@ -570,7 +570,7 @@ void command_interpreter(struct char_dat
   extern int no_specials;
   char *line;
 
-  REMOVE_BIT(AFF_FLAGS(ch), AFF_HIDE);
+  REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_HIDE);
 
   /* just drop to next line for hitting CR */
   skip_spaces(&argument);
@@ -1221,7 +1221,8 @@ int perform_dupe_check(struct descriptor
   d->character->desc = d;
   d->original = NULL;
   d->character->char_specials.timer = 0;
-  REMOVE_BIT(PLR_FLAGS(d->character), PLR_MAILING | PLR_WRITING);
+  REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_MAILING);
+  REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_WRITING);
   STATE(d) = CON_PLAYING;
 
   switch (mode) {
@@ -1307,8 +1308,9 @@ void nanny(struct descriptor_data *d, ch
 	  STATE(d) = CON_NAME_CNFRM;
 	} else {
 	  /* undo it just in case they are set */
-	  REMOVE_BIT(PLR_FLAGS(d->character),
-		     PLR_WRITING | PLR_MAILING | PLR_CRYO);
+	  REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_WRITING);
+	  REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_MAILING);
+	  REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_CRYO);
 
 	  SEND_TO_Q("Password: ", d);
 	  echo_off(d);
@@ -1663,7 +1665,7 @@ void nanny(struct descriptor_data *d, ch
 	return;
       }
       if (GET_LEVEL(d->character) < LVL_GRGOD)
-	SET_BIT(PLR_FLAGS(d->character), PLR_DELETED);
+	SET_BIT_AR(PLR_FLAGS(d->character), PLR_DELETED);
       save_char(d->character, NOWHERE);
       Crash_delete_file(GET_NAME(d->character));
       sprintf(buf, "Character '%s' deleted!\r\n"
diff -Bbup ../../circle30bpl12/src/magic.c ./magic.c
--- ../../circle30bpl12/src/magic.c	Wed Oct 29 00:16:27 1997
+++ ./magic.c	Thu Jan 29 20:45:22 1998
@@ -899,7 +899,7 @@ void mag_summons(int level, struct char_
     char_to_room(mob, ch->in_room);
     IS_CARRYING_W(mob) = 0;
     IS_CARRYING_N(mob) = 0;
-    SET_BIT(AFF_FLAGS(mob), AFF_CHARM);
+    SET_BIT_AR(AFF_FLAGS(mob), AFF_CHARM);
     add_follower(mob, ch);
     act(mag_summon_msgs[fmsg], FALSE, ch, 0, mob, TO_ROOM);
     if (spellnum == SPELL_CLONE) {
@@ -1006,13 +1006,13 @@ void mag_alter_objs(int level, struct ch
     case SPELL_BLESS:
       if (!IS_OBJ_STAT(obj, ITEM_BLESS) &&
 	  (GET_OBJ_WEIGHT(obj) <= 5 * GET_LEVEL(ch))) {
-	SET_BIT(GET_OBJ_EXTRA(obj), ITEM_BLESS);
+	SET_BIT_AR(GET_OBJ_EXTRA(obj), ITEM_BLESS);
 	to_char = "$p glows briefly.";
       }
       break;
     case SPELL_CURSE:
       if (!IS_OBJ_STAT(obj, ITEM_NODROP)) {
-	SET_BIT(GET_OBJ_EXTRA(obj), ITEM_NODROP);
+	SET_BIT_AR(GET_OBJ_EXTRA(obj), ITEM_NODROP);
 	if (GET_OBJ_TYPE(obj) == ITEM_WEAPON)
 	  GET_OBJ_VAL(obj, 2)--;
 	to_char = "$p briefly glows red.";
@@ -1020,7 +1020,7 @@ void mag_alter_objs(int level, struct ch
       break;
     case SPELL_INVISIBLE:
       if (!IS_OBJ_STAT(obj, ITEM_NOINVIS | ITEM_INVISIBLE)) {
-        SET_BIT(obj->obj_flags.extra_flags, ITEM_INVISIBLE);
+        SET_BIT_AR(obj->obj_flags.extra_flags, ITEM_INVISIBLE);
         to_char = "$p vanishes.";
       }
       break;
@@ -1034,7 +1034,7 @@ void mag_alter_objs(int level, struct ch
       break;
     case SPELL_REMOVE_CURSE:
       if (IS_OBJ_STAT(obj, ITEM_NODROP)) {
-        REMOVE_BIT(obj->obj_flags.extra_flags, ITEM_NODROP);
+        REMOVE_BIT_AR(obj->obj_flags.extra_flags, ITEM_NODROP);
         if (GET_OBJ_TYPE(obj) == ITEM_WEAPON)
           GET_OBJ_VAL(obj, 2)++;
         to_char = "$p briefly glows blue.";
diff -Bbup ../../circle30bpl12/src/mail.c ./mail.c
--- ../../circle30bpl12/src/mail.c	Fri Apr 12 23:39:21 1996
+++ ./mail.c	Thu Jan 29 20:29:33 1998
@@ -472,7 +472,8 @@ void postmaster_send_mail(struct char_da
 
   act(buf, FALSE, mailman, 0, ch, TO_VICT);
   GET_GOLD(ch) -= STAMP_PRICE;
-  SET_BIT(PLR_FLAGS(ch), PLR_MAILING | PLR_WRITING);
+  SET_BIT_AR(PLR_FLAGS(ch), PLR_MAILING);
+  SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
 
   ch->desc->mail_to = recipient;
   ch->desc->str = (char **) malloc(sizeof(char *));
@@ -498,6 +499,7 @@ void postmaster_receive_mail(struct char
 			  int cmd, char *arg)
 {
   char buf[256];
+  int y;
   struct obj_data *obj;
 
   if (!has_mail(GET_IDNUM(ch))) {
@@ -513,7 +515,10 @@ void postmaster_receive_mail(struct char
     obj->description = str_dup("Someone has left a piece of mail here.");
 
     GET_OBJ_TYPE(obj) = ITEM_NOTE;
-    GET_OBJ_WEAR(obj) = ITEM_WEAR_TAKE | ITEM_WEAR_HOLD;
+    for(y = 0; y < TW_ARRAY_MAX; y++)
+      obj->obj_flags.wear_flags[y] = 0;
+    SET_BIT_AR(GET_OBJ_WEAR(obj), ITEM_WEAR_TAKE);
+    SET_BIT_AR(GET_OBJ_WEAR(obj), ITEM_WEAR_HOLD);
     GET_OBJ_WEIGHT(obj) = 1;
     GET_OBJ_COST(obj) = 30;
     GET_OBJ_RENT(obj) = 10;
diff -Bbup ../../circle30bpl12/src/mobact.c ./mobact.c
--- ../../circle30bpl12/src/mobact.c	Wed Oct 29 00:16:27 1997
+++ ./mobact.c	Thu Jan 29 20:29:36 1998
@@ -51,7 +51,7 @@ void mobile_activity(void)
 	sprintf(buf, "SYSERR: %s (#%d): Attempting to call non-existing mob func",
 		GET_NAME(ch), GET_MOB_VNUM(ch));
 	log(buf);
-	REMOVE_BIT(MOB_FLAGS(ch), MOB_SPEC);
+	REMOVE_BIT_AR(MOB_FLAGS(ch), MOB_SPEC);
       } else {
 	if ((mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, ""))
 	  continue;		/* go to next char */
@@ -82,14 +82,15 @@ void mobile_activity(void)
     /* Mob Movement */
     if (!MOB_FLAGGED(ch, MOB_SENTINEL) && (GET_POS(ch) == POS_STANDING) &&
 	((door = number(0, 18)) < NUM_OF_DIRS) && CAN_GO(ch, door) &&
-	!ROOM_FLAGGED(EXIT(ch, door)->to_room, ROOM_NOMOB | ROOM_DEATH) &&
+	(!ROOM_FLAGGED(EXIT(ch, door)->to_room, ROOM_NOMOB) ||
+	 !ROOM_FLAGGED(EXIT(ch, door)->to_room, ROOM_DEATH)) &&
 	(!MOB_FLAGGED(ch, MOB_STAY_ZONE) ||
 	 (world[EXIT(ch, door)->to_room].zone == world[ch->in_room].zone))) {
       perform_move(ch, door, 1);
     }
 
     /* Aggressive Mobs */
-    if (MOB_FLAGGED(ch, MOB_AGGRESSIVE | MOB_AGGR_TO_ALIGN)) {
+    if (MOB_FLAGGED(ch, MOB_AGGRESSIVE) || MOB_FLAGGED(ch, MOB_AGGR_TO_ALIGN)) {
       found = FALSE;
       for (vict = world[ch->in_room].people; vict && !found; vict = vict->next_in_room) {
 	if (IS_NPC(vict) || !CAN_SEE(ch, vict) || PRF_FLAGGED(vict, PRF_NOHASSLE))
diff -Bbup ../../circle30bpl12/src/modify.c ./modify.c
--- ../../circle30bpl12/src/modify.c	Wed Oct 29 00:16:28 1997
+++ ./modify.c	Thu Jan 29 20:29:40 1998
@@ -95,8 +95,10 @@ void string_add(struct descriptor_data *
       free(*d->str);
       free(d->str);
       SEND_TO_Q("Message sent!\r\n", d);
-      if (!IS_NPC(d->character))
-	REMOVE_BIT(PLR_FLAGS(d->character), PLR_MAILING | PLR_WRITING);
+      if (!IS_NPC(d->character)) {
+	REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_MAILING);
+	REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_WRITING);
+      }
     }
     d->str = NULL;
 
@@ -109,7 +111,7 @@ void string_add(struct descriptor_data *
       d->connected = CON_MENU;
     }
     if (!d->connected && d->character && !IS_NPC(d->character))
-      REMOVE_BIT(PLR_FLAGS(d->character), PLR_WRITING);
+      REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_WRITING);
   } else
     strcat(*d->str, "\r\n");
 }
diff -Bbup ../../circle30bpl12/src/objsave.c ./objsave.c
--- ../../circle30bpl12/src/objsave.c	Wed Oct 29 00:16:28 1997
+++ ./objsave.c	Thu Jan 29 20:29:50 1998
@@ -41,7 +41,7 @@ SPECIAL(cryogenicist);
 struct obj_data *Obj_from_store(struct obj_file_elem object)
 {
   struct obj_data *obj;
-  int j;
+  int j, taeller;
 
   if (real_object(object.item_number) > -1) {
     obj = read_object(object.item_number, VIRTUAL);
@@ -49,10 +49,12 @@ struct obj_data *Obj_from_store(struct o
     GET_OBJ_VAL(obj, 1) = object.value[1];
     GET_OBJ_VAL(obj, 2) = object.value[2];
     GET_OBJ_VAL(obj, 3) = object.value[3];
-    GET_OBJ_EXTRA(obj) = object.extra_flags;
+    for(taeller = 0; taeller < EF_ARRAY_MAX; taeller++)
+      obj->obj_flags.extra_flags[taeller] = object.extra_flags[taeller];
     GET_OBJ_WEIGHT(obj) = object.weight;
     GET_OBJ_TIMER(obj) = object.timer;
-    obj->obj_flags.bitvector = object.bitvector;
+    for(taeller = 0; taeller < AF_ARRAY_MAX; taeller++)
+      obj->obj_flags.bitvector[taeller] = object.bitvector[taeller];
 
     for (j = 0; j < MAX_OBJ_AFFECT; j++)
       obj->affected[j] = object.affected[j];
@@ -66,7 +68,7 @@ struct obj_data *Obj_from_store(struct o
 
 int Obj_to_store(struct obj_data * obj, FILE * fl)
 {
-  int j;
+  int j, taeller;
   struct obj_file_elem object;
 
   object.item_number = GET_OBJ_VNUM(obj);
@@ -74,10 +76,12 @@ int Obj_to_store(struct obj_data * obj, 
   object.value[1] = GET_OBJ_VAL(obj, 1);
   object.value[2] = GET_OBJ_VAL(obj, 2);
   object.value[3] = GET_OBJ_VAL(obj, 3);
-  object.extra_flags = GET_OBJ_EXTRA(obj);
+  for(taeller = 0; taeller < EF_ARRAY_MAX; taeller++)
+    object.extra_flags[taeller] = obj->obj_flags.extra_flags[taeller];
   object.weight = GET_OBJ_WEIGHT(obj);
   object.timer = GET_OBJ_TIMER(obj);
-  object.bitvector = obj->obj_flags.bitvector;
+  for(taeller = 0; taeller < AF_ARRAY_MAX; taeller++)
+    object.bitvector[taeller] = obj->obj_flags.bitvector[taeller];
   for (j = 0; j < MAX_OBJ_AFFECT; j++)
     object.affected[j] = obj->affected[j];
 
@@ -505,7 +509,7 @@ void Crash_crashsave(struct char_data * 
       Crash_restore_weight(GET_EQ(ch, j));
     }
   fclose(fp);
-  REMOVE_BIT(PLR_FLAGS(ch), PLR_CRASH);
+  REMOVE_BIT_AR(PLR_FLAGS(ch), PLR_CRASH);
 }
 
 
@@ -645,7 +649,7 @@ void Crash_cryosave(struct char_data * c
   fclose(fp);
 
   Crash_extract_objs(ch->carrying);
-  SET_BIT(PLR_FLAGS(ch), PLR_CRYO);
+  SET_BIT_AR(PLR_FLAGS(ch), PLR_CRYO);
 }
 
 
@@ -825,7 +829,7 @@ int gen_receptionist(struct char_data * 
 	  FALSE, recep, 0, ch, TO_VICT);
       Crash_cryosave(ch, cost);
       sprintf(buf, "%s has cryo-rented.", GET_NAME(ch));
-      SET_BIT(PLR_FLAGS(ch), PLR_CRYO);
+      SET_BIT_AR(PLR_FLAGS(ch), PLR_CRYO);
     }
 
     mudlog(buf, NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE);
@@ -861,7 +865,7 @@ void Crash_save_all(void)
       if (PLR_FLAGGED(d->character, PLR_CRASH)) {
 	Crash_crashsave(d->character);
 	save_char(d->character, NOWHERE);
-	REMOVE_BIT(PLR_FLAGS(d->character), PLR_CRASH);
+	REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_CRASH);
       }
     }
   }
diff -Bbup ../../circle30bpl12/src/shop.c ./shop.c
--- ../../circle30bpl12/src/shop.c	Wed Oct 29 00:16:28 1997
+++ ./shop.c	Thu Jan 29 20:29:59 1998
@@ -215,7 +215,7 @@ int evaluate_expression(struct obj_data 
 	name[ptr - end] = 0;
 	for (index = 0; *extra_bits[index] != '\n'; index++)
 	  if (!str_cmp(name, extra_bits[index])) {
-	    push(&vals, IS_SET(GET_OBJ_EXTRA(obj), 1 << index));
+	    push(&vals, IS_SET_AR(GET_OBJ_EXTRA(obj), index));
 	    break;
 	  }
 	if (*extra_bits[index] == '\n')
@@ -283,7 +283,10 @@ int same_obj(struct obj_data * obj1, str
   if (GET_OBJ_COST(obj1) != GET_OBJ_COST(obj2))
     return (FALSE);
 
-  if (GET_OBJ_EXTRA(obj1) != GET_OBJ_EXTRA(obj2))
+  if (GET_OBJ_EXTRA_AR(obj1, 0) != GET_OBJ_EXTRA_AR(obj2, 0) ||
+      GET_OBJ_EXTRA_AR(obj1, 1) != GET_OBJ_EXTRA_AR(obj2, 1) ||
+      GET_OBJ_EXTRA_AR(obj1, 2) != GET_OBJ_EXTRA_AR(obj2, 2) ||
+      GET_OBJ_EXTRA_AR(obj1, 3) != GET_OBJ_EXTRA_AR(obj2, 3))
     return (FALSE);
 
   for (index = 0; index < MAX_OBJ_AFFECT; index++)
diff -Bbup ../../circle30bpl12/src/spec_assign.c ./spec_assign.c
--- ../../circle30bpl12/src/spec_assign.c	Fri Apr 12 23:39:22 1996
+++ ./spec_assign.c	Thu Jan 29 20:30:04 1998
@@ -301,6 +301,6 @@ void assign_rooms(void)
 
   if (dts_are_dumps)
     for (i = 0; i < top_of_world; i++)
-      if (IS_SET(ROOM_FLAGS(i), ROOM_DEATH))
+      if (IS_SET_AR(ROOM_FLAGS(i), ROOM_DEATH))
 	world[i].func = dump;
 }
diff -Bbup ../../circle30bpl12/src/spec_procs.c ./spec_procs.c
--- ../../circle30bpl12/src/spec_procs.c	Fri Apr 12 23:39:22 1996
+++ ./spec_procs.c	Thu Jan 29 20:30:15 1998
@@ -576,7 +576,7 @@ SPECIAL(cityguard)
   evil = 0;
 
   for (tch = world[ch->in_room].people; tch; tch = tch->next_in_room) {
-    if (!IS_NPC(tch) && CAN_SEE(ch, tch) && IS_SET(PLR_FLAGS(tch), PLR_KILLER)) {
+    if (!IS_NPC(tch) && CAN_SEE(ch, tch) && IS_SET_AR(PLR_FLAGS(tch), PLR_KILLER)) {
       act("$n screams 'HEY!!!  You're one of those PLAYER KILLERS!!!!!!'", FALSE, ch, 0, 0, TO_ROOM);
       hit(ch, tch, TYPE_UNDEFINED);
       return (TRUE);
@@ -584,7 +584,7 @@ SPECIAL(cityguard)
   }
 
   for (tch = world[ch->in_room].people; tch; tch = tch->next_in_room) {
-    if (!IS_NPC(tch) && CAN_SEE(ch, tch) && IS_SET(PLR_FLAGS(tch), PLR_THIEF)){
+    if (!IS_NPC(tch) && CAN_SEE(ch, tch) && IS_SET_AR(PLR_FLAGS(tch), PLR_THIEF)){
       act("$n screams 'HEY!!!  You're one of those PLAYER THIEVES!!!!!!'", FALSE, ch, 0, 0, TO_ROOM);
       hit(ch, tch, TYPE_UNDEFINED);
       return (TRUE);
@@ -644,7 +644,7 @@ SPECIAL(pet_shops)
 
     pet = read_mobile(GET_MOB_RNUM(pet), REAL);
     GET_EXP(pet) = 0;
-    SET_BIT(AFF_FLAGS(pet), AFF_CHARM);
+    SET_BIT_AR(AFF_FLAGS(pet), AFF_CHARM);
 
     if (*pet_name) {
       sprintf(buf, "%s %s", pet->player.name, pet_name);
diff -Bbup ../../circle30bpl12/src/spell_parser.c ./spell_parser.c
--- ../../circle30bpl12/src/spell_parser.c	Wed Oct 29 00:16:29 1997
+++ ./spell_parser.c	Thu Jan 29 20:30:23 1998
@@ -331,7 +331,7 @@ int call_magic(struct char_data * caster
     act("$n's magic fizzles out and dies.", FALSE, caster, 0, 0, TO_ROOM);
     return 0;
   }
-  if (IS_SET(ROOM_FLAGS(caster->in_room), ROOM_PEACEFUL) &&
+  if (IS_SET_AR(ROOM_FLAGS(caster->in_room), ROOM_PEACEFUL) &&
       (SINFO.violent || IS_SET(SINFO.routines, MAG_DAMAGE))) {
     send_to_char("A flash of white light fills the room, dispelling your "
 		 "violent magic!\r\n", caster);
diff -Bbup ../../circle30bpl12/src/spells.c ./spells.c
--- ../../circle30bpl12/src/spells.c	Wed Oct 29 00:16:29 1997
+++ ./spells.c	Thu Jan 29 20:30:27 1998
@@ -111,8 +111,8 @@ ASPELL(spell_teleport)
 
   do {
     to_room = number(0, top_of_world);
-  } while (ROOM_FLAGGED(to_room, ROOM_PRIVATE | ROOM_DEATH));
-
+  } while (ROOM_FLAGGED(to_room, ROOM_PRIVATE) ||
+           ROOM_FLAGGED(to_room, ROOM_DEATH));
   act("$n slowly fades out of existence and is gone.",
       FALSE, victim, 0, 0, TO_ROOM);
   char_from_room(victim);
@@ -265,8 +265,8 @@ ASPELL(spell_charm)
 
     act("Isn't $n just such a nice fellow?", FALSE, ch, 0, victim, TO_VICT);
     if (IS_NPC(victim)) {
-      REMOVE_BIT(MOB_FLAGS(victim), MOB_AGGRESSIVE);
-      REMOVE_BIT(MOB_FLAGS(victim), MOB_SPEC);
+      REMOVE_BIT_AR(MOB_FLAGS(victim), MOB_AGGRESSIVE);
+      REMOVE_BIT_AR(MOB_FLAGS(victim), MOB_SPEC);
     }
   }
 }
@@ -297,12 +297,12 @@ ASPELL(spell_identify)
 
     if (obj->obj_flags.bitvector) {
       send_to_char("Item will give you following abilities:  ", ch);
-      sprintbit(obj->obj_flags.bitvector, affected_bits, buf);
+      sprintbitarray(obj->obj_flags.bitvector, affected_bits, AF_ARRAY_MAX, buf);
       strcat(buf, "\r\n");
       send_to_char(buf, ch);
     }
     send_to_char("Item is: ", ch);
-    sprintbit(GET_OBJ_EXTRA(obj), extra_bits, buf);
+    sprintbitarray(GET_OBJ_EXTRA(obj), extra_bits, EF_ARRAY_MAX, buf);
     strcat(buf, "\r\n");
     send_to_char(buf, ch);
 
@@ -391,13 +391,13 @@ ASPELL(spell_enchant_weapon)
     return;
 
   if ((GET_OBJ_TYPE(obj) == ITEM_WEAPON) &&
-      !IS_SET(GET_OBJ_EXTRA(obj), ITEM_MAGIC)) {
+      !IS_SET_AR(GET_OBJ_EXTRA(obj), ITEM_MAGIC)) {
 
     for (i = 0; i < MAX_OBJ_AFFECT; i++)
       if (obj->affected[i].location != APPLY_NONE)
 	return;
 
-    SET_BIT(GET_OBJ_EXTRA(obj), ITEM_MAGIC);
+    SET_BIT_AR(GET_OBJ_EXTRA(obj), ITEM_MAGIC);
 
     obj->affected[0].location = APPLY_HITROLL;
     obj->affected[0].modifier = 1 + (level >= 18);
@@ -406,10 +406,10 @@ ASPELL(spell_enchant_weapon)
     obj->affected[1].modifier = 1 + (level >= 20);
 
     if (IS_GOOD(ch)) {
-      SET_BIT(GET_OBJ_EXTRA(obj), ITEM_ANTI_EVIL);
+      SET_BIT_AR(GET_OBJ_EXTRA(obj), ITEM_ANTI_EVIL);
       act("$p glows blue.", FALSE, ch, obj, 0, TO_CHAR);
     } else if (IS_EVIL(ch)) {
-      SET_BIT(GET_OBJ_EXTRA(obj), ITEM_ANTI_GOOD);
+      SET_BIT_AR(GET_OBJ_EXTRA(obj), ITEM_ANTI_GOOD);
       act("$p glows red.", FALSE, ch, obj, 0, TO_CHAR);
     } else {
       act("$p glows yellow.", FALSE, ch, obj, 0, TO_CHAR);
diff -Bbup ../../circle30bpl12/src/structs.h ./structs.h
--- ../../circle30bpl12/src/structs.h	Wed Oct 29 00:16:29 1997
+++ ./structs.h	Fri Jan 30 00:15:13 1998
@@ -33,29 +33,29 @@
 
 /* Room flags: used in room_data.room_flags */
 /* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
-#define ROOM_DARK		(1 << 0)   /* Dark			*/
-#define ROOM_DEATH		(1 << 1)   /* Death trap		*/
-#define ROOM_NOMOB		(1 << 2)   /* MOBs not allowed		*/
-#define ROOM_INDOORS		(1 << 3)   /* Indoors			*/
-#define ROOM_PEACEFUL		(1 << 4)   /* Violence not allowed	*/
-#define ROOM_SOUNDPROOF		(1 << 5)   /* Shouts, gossip blocked	*/
-#define ROOM_NOTRACK		(1 << 6)   /* Track won't go through	*/
-#define ROOM_NOMAGIC		(1 << 7)   /* Magic not allowed		*/
-#define ROOM_TUNNEL		(1 << 8)   /* room for only 1 pers	*/
-#define ROOM_PRIVATE		(1 << 9)   /* Can't teleport in		*/
-#define ROOM_GODROOM		(1 << 10)  /* LVL_GOD+ only allowed	*/
-#define ROOM_HOUSE		(1 << 11)  /* (R) Room is a house	*/
-#define ROOM_HOUSE_CRASH	(1 << 12)  /* (R) House needs saving	*/
-#define ROOM_ATRIUM		(1 << 13)  /* (R) The door to a house	*/
-#define ROOM_OLC		(1 << 14)  /* (R) Modifyable/!compress	*/
-#define ROOM_BFS_MARK		(1 << 15)  /* (R) breath-first srch mrk	*/
+#define ROOM_DARK		0   /* Dark			*/
+#define ROOM_DEATH	1   /* Death trap		*/
+#define ROOM_NOMOB	2   /* MOBs not allowed		*/
+#define ROOM_INDOORS	3   /* Indoors			*/
+#define ROOM_PEACEFUL	4   /* Violence not allowed	*/
+#define ROOM_SOUNDPROOF	5   /* Shouts, gossip blocked	*/
+#define ROOM_NOTRACK	6   /* Track won't go through	*/
+#define ROOM_NOMAGIC	7   /* Magic not allowed		*/
+#define ROOM_TUNNEL	8   /* room for only 1 pers	*/
+#define ROOM_PRIVATE	9   /* Can't teleport in		*/
+#define ROOM_GODROOM	10  /* LVL_GOD+ only allowed	*/
+#define ROOM_HOUSE	11  /* (R) Room is a house	*/
+#define ROOM_HOUSE_CRASH 12 /* (R) House needs saving	*/
+#define ROOM_ATRIUM	13  /* (R) The door to a house	*/
+#define ROOM_OLC		14  /* (R) Modifyable/!compress	*/
+#define ROOM_BFS_MARK	15  /* (R) breath-first srch mrk	*/
 
 
 /* Exit info: used in room_data.dir_option.exit_info */
-#define EX_ISDOOR		(1 << 0)   /* Exit is a door		*/
-#define EX_CLOSED		(1 << 1)   /* The door is closed	*/
-#define EX_LOCKED		(1 << 2)   /* The door is locked	*/
-#define EX_PICKPROOF		(1 << 3)   /* Lock can't be picked	*/
+#define EX_ISDOOR		0   /* Exit is a door		*/
+#define EX_CLOSED		1   /* The door is closed	*/
+#define EX_LOCKED		2   /* The door is locked	*/
+#define EX_PICKPROOF	3   /* Lock can't be picked	*/
 
 
 /* Sector types: used in room_data.sector_type */
@@ -111,94 +111,95 @@
 
 
 /* Player flags: used by char_data.char_specials.act */
-#define PLR_KILLER	(1 << 0)   /* Player is a player-killer		*/
-#define PLR_THIEF	(1 << 1)   /* Player is a player-thief		*/
-#define PLR_FROZEN	(1 << 2)   /* Player is frozen			*/
-#define PLR_DONTSET     (1 << 3)   /* Don't EVER set (ISNPC bit)	*/
-#define PLR_WRITING	(1 << 4)   /* Player writing (board/mail/olc)	*/
-#define PLR_MAILING	(1 << 5)   /* Player is writing mail		*/
-#define PLR_CRASH	(1 << 6)   /* Player needs to be crash-saved	*/
-#define PLR_SITEOK	(1 << 7)   /* Player has been site-cleared	*/
-#define PLR_NOSHOUT	(1 << 8)   /* Player not allowed to shout/goss	*/
-#define PLR_NOTITLE	(1 << 9)   /* Player not allowed to set title	*/
-#define PLR_DELETED	(1 << 10)  /* Player deleted - space reusable	*/
-#define PLR_LOADROOM	(1 << 11)  /* Player uses nonstandard loadroom	*/
-#define PLR_NOWIZLIST	(1 << 12)  /* Player shouldn't be on wizlist	*/
-#define PLR_NODELETE	(1 << 13)  /* Player shouldn't be deleted	*/
-#define PLR_INVSTART	(1 << 14)  /* Player should enter game wizinvis	*/
-#define PLR_CRYO	(1 << 15)  /* Player is cryo-saved (purge prog)	*/
+#define PLR_KILLER	0   /* Player is a player-killer		*/
+#define PLR_THIEF		1   /* Player is a player-thief		*/
+#define PLR_FROZEN	2   /* Player is frozen			*/
+#define PLR_DONTSET     3   /* Don't EVER set (ISNPC bit)	*/
+#define PLR_WRITING	4   /* Player writing (board/mail/olc)	*/
+#define PLR_MAILING	5   /* Player is writing mail		*/
+#define PLR_CRASH		6   /* Player needs to be crash-saved	*/
+#define PLR_SITEOK	7   /* Player has been site-cleared	*/
+#define PLR_NOSHOUT	8   /* Player not allowed to shout/goss	*/
+#define PLR_NOTITLE	9   /* Player not allowed to set title	*/
+#define PLR_DELETED	10  /* Player deleted - space reusable	*/
+#define PLR_LOADROOM	11  /* Player uses nonstandard loadroom	*/
+#define PLR_NOWIZLIST	12  /* Player shouldn't be on wizlist	*/
+#define PLR_NODELETE	13  /* Player shouldn't be deleted	*/
+#define PLR_INVSTART	14  /* Player should enter game wizinvis	*/
+#define PLR_CRYO		15  /* Player is cryo-saved (purge prog)	*/
 
 
 /* Mobile flags: used by char_data.char_specials.act */
-#define MOB_SPEC         (1 << 0)  /* Mob has a callable spec-proc	*/
-#define MOB_SENTINEL     (1 << 1)  /* Mob should not move		*/
-#define MOB_SCAVENGER    (1 << 2)  /* Mob picks up stuff on the ground	*/
-#define MOB_ISNPC        (1 << 3)  /* (R) Automatically set on all Mobs	*/
-#define MOB_AWARE	 (1 << 4)  /* Mob can't be backstabbed		*/
-#define MOB_AGGRESSIVE   (1 << 5)  /* Mob hits players in the room	*/
-#define MOB_STAY_ZONE    (1 << 6)  /* Mob shouldn't wander out of zone	*/
-#define MOB_WIMPY        (1 << 7)  /* Mob flees if severely injured	*/
-#define MOB_AGGR_EVIL	 (1 << 8)  /* auto attack evil PC's		*/
-#define MOB_AGGR_GOOD	 (1 << 9)  /* auto attack good PC's		*/
-#define MOB_AGGR_NEUTRAL (1 << 10) /* auto attack neutral PC's		*/
-#define MOB_MEMORY	 (1 << 11) /* remember attackers if attacked	*/
-#define MOB_HELPER	 (1 << 12) /* attack PCs fighting other NPCs	*/
-#define MOB_NOCHARM	 (1 << 13) /* Mob can't be charmed		*/
-#define MOB_NOSUMMON	 (1 << 14) /* Mob can't be summoned		*/
-#define MOB_NOSLEEP	 (1 << 15) /* Mob can't be slept		*/
-#define MOB_NOBASH	 (1 << 16) /* Mob can't be bashed (e.g. trees)	*/
-#define MOB_NOBLIND	 (1 << 17) /* Mob can't be blinded		*/
+#define MOB_SPEC         0  /* Mob has a callable spec-proc	*/
+#define MOB_SENTINEL     1  /* Mob should not move		*/
+#define MOB_SCAVENGER    2  /* Mob picks up stuff on the ground	*/
+#define MOB_ISNPC        3  /* (R) Automatically set on all Mobs	*/
+#define MOB_AWARE	 	 4  /* Mob can't be backstabbed		*/
+#define MOB_AGGRESSIVE   5  /* Mob hits players in the room	*/
+#define MOB_STAY_ZONE    6  /* Mob shouldn't wander out of zone	*/
+#define MOB_WIMPY        7  /* Mob flees if severely injured	*/
+#define MOB_AGGR_EVIL	 8  /* auto attack evil PC's		*/
+#define MOB_AGGR_GOOD	 9  /* auto attack good PC's		*/
+#define MOB_AGGR_NEUTRAL 10 /* auto attack neutral PC's		*/
+#define MOB_MEMORY	 11 /* remember attackers if attacked	*/
+#define MOB_HELPER	 12 /* attack PCs fighting other NPCs	*/
+#define MOB_NOCHARM	 13 /* Mob can't be charmed		*/
+#define MOB_NOSUMMON	 14 /* Mob can't be summoned		*/
+#define MOB_NOSLEEP	 15 /* Mob can't be slept		*/
+#define MOB_NOBASH	 16 /* Mob can't be bashed (e.g. trees)	*/
+#define MOB_NOBLIND	 17 /* Mob can't be blinded		*/
 
 
 /* Preference flags: used by char_data.player_specials.pref */
-#define PRF_BRIEF       (1 << 0)  /* Room descs won't normally be shown	*/
-#define PRF_COMPACT     (1 << 1)  /* No extra CRLF pair before prompts	*/
-#define PRF_DEAF	(1 << 2)  /* Can't hear shouts			*/
-#define PRF_NOTELL	(1 << 3)  /* Can't receive tells		*/
-#define PRF_DISPHP	(1 << 4)  /* Display hit points in prompt	*/
-#define PRF_DISPMANA	(1 << 5)  /* Display mana points in prompt	*/
-#define PRF_DISPMOVE	(1 << 6)  /* Display move points in prompt	*/
-#define PRF_AUTOEXIT	(1 << 7)  /* Display exits in a room		*/
-#define PRF_NOHASSLE	(1 << 8)  /* Aggr mobs won't attack		*/
-#define PRF_QUEST	(1 << 9)  /* On quest				*/
-#define PRF_SUMMONABLE	(1 << 10) /* Can be summoned			*/
-#define PRF_NOREPEAT	(1 << 11) /* No repetition of comm commands	*/
-#define PRF_HOLYLIGHT	(1 << 12) /* Can see in dark			*/
-#define PRF_COLOR_1	(1 << 13) /* Color (low bit)			*/
-#define PRF_COLOR_2	(1 << 14) /* Color (high bit)			*/
-#define PRF_NOWIZ	(1 << 15) /* Can't hear wizline			*/
-#define PRF_LOG1	(1 << 16) /* On-line System Log (low bit)	*/
-#define PRF_LOG2	(1 << 17) /* On-line System Log (high bit)	*/
-#define PRF_NOAUCT	(1 << 18) /* Can't hear auction channel		*/
-#define PRF_NOGOSS	(1 << 19) /* Can't hear gossip channel		*/
-#define PRF_NOGRATZ	(1 << 20) /* Can't hear grats channel		*/
-#define PRF_ROOMFLAGS	(1 << 21) /* Can see room flags (ROOM_x)	*/
+#define PRF_BRIEF       0  /* Room descs won't normally be shown	*/
+#define PRF_COMPACT     1  /* No extra CRLF pair before prompts	*/
+#define PRF_DEAF		2  /* Can't hear shouts			*/
+#define PRF_NOTELL	3  /* Can't receive tells		*/
+#define PRF_DISPHP	4  /* Display hit points in prompt	*/
+#define PRF_DISPMANA	5  /* Display mana points in prompt	*/
+#define PRF_DISPMOVE	6  /* Display move points in prompt	*/
+#define PRF_AUTOEXIT	7  /* Display exits in a room		*/
+#define PRF_NOHASSLE	8  /* Aggr mobs won't attack		*/
+#define PRF_QUEST		9  /* On quest				*/
+#define PRF_SUMMONABLE	10 /* Can be summoned			*/
+#define PRF_NOREPEAT	11 /* No repetition of comm commands	*/
+#define PRF_HOLYLIGHT	12 /* Can see in dark			*/
+#define PRF_COLOR_1	13 /* Color (low bit)			*/
+#define PRF_COLOR_2	14 /* Color (high bit)			*/
+#define PRF_NOWIZ		15 /* Can't hear wizline			*/
+#define PRF_LOG1		16 /* On-line System Log (low bit)	*/
+#define PRF_LOG2		17 /* On-line System Log (high bit)	*/
+#define PRF_NOAUCT	18 /* Can't hear auction channel		*/
+#define PRF_NOGOSS	19 /* Can't hear gossip channel		*/
+#define PRF_NOGRATZ	20 /* Can't hear grats channel		*/
+#define PRF_ROOMFLAGS	21 /* Can see room flags (ROOM_x)	*/
 
 
 /* Affect bits: used in char_data.char_specials.saved.affected_by */
 /* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
-#define AFF_BLIND             (1 << 0)	   /* (R) Char is blind		*/
-#define AFF_INVISIBLE         (1 << 1)	   /* Char is invisible		*/
-#define AFF_DETECT_ALIGN      (1 << 2)	   /* Char is sensitive to align*/
-#define AFF_DETECT_INVIS      (1 << 3)	   /* Char can see invis chars  */
-#define AFF_DETECT_MAGIC      (1 << 4)	   /* Char is sensitive to magic*/
-#define AFF_SENSE_LIFE        (1 << 5)	   /* Char can sense hidden life*/
-#define AFF_WATERWALK	      (1 << 6)	   /* Char can walk on water	*/
-#define AFF_SANCTUARY         (1 << 7)	   /* Char protected by sanct.	*/
-#define AFF_GROUP             (1 << 8)	   /* (R) Char is grouped	*/
-#define AFF_CURSE             (1 << 9)	   /* Char is cursed		*/
-#define AFF_INFRAVISION       (1 << 10)	   /* Char can see in dark	*/
-#define AFF_POISON            (1 << 11)	   /* (R) Char is poisoned	*/
-#define AFF_PROTECT_EVIL      (1 << 12)	   /* Char protected from evil  */
-#define AFF_PROTECT_GOOD      (1 << 13)	   /* Char protected from good  */
-#define AFF_SLEEP             (1 << 14)	   /* (R) Char magically asleep	*/
-#define AFF_NOTRACK	      (1 << 15)	   /* Char can't be tracked	*/
-#define AFF_UNUSED16	      (1 << 16)	   /* Room for future expansion	*/
-#define AFF_UNUSED17	      (1 << 17)	   /* Room for future expansion	*/
-#define AFF_SNEAK             (1 << 18)	   /* Char can move quietly	*/
-#define AFF_HIDE              (1 << 19)	   /* Char is hidden		*/
-#define AFF_UNUSED20	      (1 << 20)	   /* Room for future expansion	*/
-#define AFF_CHARM             (1 << 21)	   /* Char is charmed		*/
+#define AFF_DONTUSE		0	/* DON'T USE! */
+#define AFF_BLIND             1	   /* (R) Char is blind		*/
+#define AFF_INVISIBLE         2	   /* Char is invisible		*/
+#define AFF_DETECT_ALIGN      3	   /* Char is sensitive to align*/
+#define AFF_DETECT_INVIS      4	   /* Char can see invis chars  */
+#define AFF_DETECT_MAGIC      5	   /* Char is sensitive to magic*/
+#define AFF_SENSE_LIFE        6	   /* Char can sense hidden life*/
+#define AFF_WATERWALK	      7	   /* Char can walk on water	*/
+#define AFF_SANCTUARY         8	   /* Char protected by sanct.	*/
+#define AFF_GROUP             9	   /* (R) Char is grouped	*/
+#define AFF_CURSE             10	   /* Char is cursed		*/
+#define AFF_INFRAVISION       11	   /* Char can see in dark	*/
+#define AFF_POISON            12	   /* (R) Char is poisoned	*/
+#define AFF_PROTECT_EVIL      13	   /* Char protected from evil  */
+#define AFF_PROTECT_GOOD      14	   /* Char protected from good  */
+#define AFF_SLEEP             15	   /* (R) Char magically asleep	*/
+#define AFF_NOTRACK	      16	   /* Char can't be tracked	*/
+#define AFF_UNUSED16	      17	   /* Room for future expansion	*/
+#define AFF_UNUSED17	      18	   /* Room for future expansion	*/
+#define AFF_SNEAK             19	   /* Char can move quietly	*/
+#define AFF_HIDE              20	   /* Char is hidden		*/
+#define AFF_UNUSED20	      21	   /* Room for future expansion	*/
+#define AFF_CHARM             22	   /* Char is charmed		*/
 
 
 /* Modes of connectedness: used by descriptor_data.state */
@@ -276,41 +277,41 @@
 
 
 /* Take/Wear flags: used by obj_data.obj_flags.wear_flags */
-#define ITEM_WEAR_TAKE		(1 << 0)  /* Item can be takes		*/
-#define ITEM_WEAR_FINGER	(1 << 1)  /* Can be worn on finger	*/
-#define ITEM_WEAR_NECK		(1 << 2)  /* Can be worn around neck 	*/
-#define ITEM_WEAR_BODY		(1 << 3)  /* Can be worn on body 	*/
-#define ITEM_WEAR_HEAD		(1 << 4)  /* Can be worn on head 	*/
-#define ITEM_WEAR_LEGS		(1 << 5)  /* Can be worn on legs	*/
-#define ITEM_WEAR_FEET		(1 << 6)  /* Can be worn on feet	*/
-#define ITEM_WEAR_HANDS		(1 << 7)  /* Can be worn on hands	*/
-#define ITEM_WEAR_ARMS		(1 << 8)  /* Can be worn on arms	*/
-#define ITEM_WEAR_SHIELD	(1 << 9)  /* Can be used as a shield	*/
-#define ITEM_WEAR_ABOUT		(1 << 10) /* Can be worn about body 	*/
-#define ITEM_WEAR_WAIST 	(1 << 11) /* Can be worn around waist 	*/
-#define ITEM_WEAR_WRIST		(1 << 12) /* Can be worn on wrist 	*/
-#define ITEM_WEAR_WIELD		(1 << 13) /* Can be wielded		*/
-#define ITEM_WEAR_HOLD		(1 << 14) /* Can be held		*/
+#define ITEM_WEAR_TAKE		0  /* Item can be takes		*/
+#define ITEM_WEAR_FINGER	1  /* Can be worn on finger	*/
+#define ITEM_WEAR_NECK		2  /* Can be worn around neck 	*/
+#define ITEM_WEAR_BODY		3  /* Can be worn on body 	*/
+#define ITEM_WEAR_HEAD		4  /* Can be worn on head 	*/
+#define ITEM_WEAR_LEGS		5  /* Can be worn on legs	*/
+#define ITEM_WEAR_FEET		6  /* Can be worn on feet	*/
+#define ITEM_WEAR_HANDS		7  /* Can be worn on hands	*/
+#define ITEM_WEAR_ARMS		8  /* Can be worn on arms	*/
+#define ITEM_WEAR_SHIELD	9  /* Can be used as a shield	*/
+#define ITEM_WEAR_ABOUT		10 /* Can be worn about body 	*/
+#define ITEM_WEAR_WAIST 	11 /* Can be worn around waist 	*/
+#define ITEM_WEAR_WRIST		12 /* Can be worn on wrist 	*/
+#define ITEM_WEAR_WIELD		13 /* Can be wielded		*/
+#define ITEM_WEAR_HOLD		14 /* Can be held		*/
 
 
 /* Extra object flags: used by obj_data.obj_flags.extra_flags */
-#define ITEM_GLOW          (1 << 0)	/* Item is glowing		*/
-#define ITEM_HUM           (1 << 1)	/* Item is humming		*/
-#define ITEM_NORENT        (1 << 2)	/* Item cannot be rented	*/
-#define ITEM_NODONATE      (1 << 3)	/* Item cannot be donated	*/
-#define ITEM_NOINVIS	   (1 << 4)	/* Item cannot be made invis	*/
-#define ITEM_INVISIBLE     (1 << 5)	/* Item is invisible		*/
-#define ITEM_MAGIC         (1 << 6)	/* Item is magical		*/
-#define ITEM_NODROP        (1 << 7)	/* Item is cursed: can't drop	*/
-#define ITEM_BLESS         (1 << 8)	/* Item is blessed		*/
-#define ITEM_ANTI_GOOD     (1 << 9)	/* Not usable by good people	*/
-#define ITEM_ANTI_EVIL     (1 << 10)	/* Not usable by evil people	*/
-#define ITEM_ANTI_NEUTRAL  (1 << 11)	/* Not usable by neutral people	*/
-#define ITEM_ANTI_MAGIC_USER (1 << 12)	/* Not usable by mages		*/
-#define ITEM_ANTI_CLERIC   (1 << 13)	/* Not usable by clerics	*/
-#define ITEM_ANTI_THIEF	   (1 << 14)	/* Not usable by thieves	*/
-#define ITEM_ANTI_WARRIOR  (1 << 15)	/* Not usable by warriors	*/
-#define ITEM_NOSELL	   (1 << 16)	/* Shopkeepers won't touch it	*/
+#define ITEM_GLOW          0	/* Item is glowing		*/
+#define ITEM_HUM           1	/* Item is humming		*/
+#define ITEM_NORENT        2	/* Item cannot be rented	*/
+#define ITEM_NODONATE      3	/* Item cannot be donated	*/
+#define ITEM_NOINVIS	   4	/* Item cannot be made invis	*/
+#define ITEM_INVISIBLE     5	/* Item is invisible		*/
+#define ITEM_MAGIC         6	/* Item is magical		*/
+#define ITEM_NODROP        7	/* Item is cursed: can't drop	*/
+#define ITEM_BLESS         8	/* Item is blessed		*/
+#define ITEM_ANTI_GOOD     9	/* Not usable by good people	*/
+#define ITEM_ANTI_EVIL     10	/* Not usable by evil people	*/
+#define ITEM_ANTI_NEUTRAL  11	/* Not usable by neutral people	*/
+#define ITEM_ANTI_MAGIC_USER 12	/* Not usable by mages		*/
+#define ITEM_ANTI_CLERIC   13	/* Not usable by clerics	*/
+#define ITEM_ANTI_THIEF	   14	/* Not usable by thieves	*/
+#define ITEM_ANTI_WARRIOR  15	/* Not usable by warriors	*/
+#define ITEM_NOSELL	   16	/* Shopkeepers won't touch it	*/
 
 
 /* Modifier constants used with obj affects ('A' fields) */
@@ -342,10 +343,10 @@
 
 
 /* Container flags - value[1] */
-#define CONT_CLOSEABLE      (1 << 0)	/* Container can be closed	*/
-#define CONT_PICKPROOF      (1 << 1)	/* Container is pickproof	*/
-#define CONT_CLOSED         (1 << 2)	/* Container is closed		*/
-#define CONT_LOCKED         (1 << 3)	/* Container is locked		*/
+#define CONT_CLOSEABLE      0	/* Container can be closed	*/
+#define CONT_PICKPROOF      1	/* Container is pickproof	*/
+#define CONT_CLOSED         2	/* Container is closed		*/
+#define CONT_LOCKED         3	/* Container is locked		*/
 
 
 /* Some different kind of liquids for use in values of drink containers */
@@ -398,6 +399,13 @@
 #define RENT_FORCED     4
 #define RENT_TIMEDOUT   5
 
+/* Array stuff */
+#define RF_ARRAY_MAX    4
+#define PM_ARRAY_MAX    4
+#define PR_ARRAY_MAX    4
+#define AF_ARRAY_MAX    4
+#define TW_ARRAY_MAX    4
+#define EF_ARRAY_MAX    4
 
 /* other #defined constants **********************************************/
 
@@ -491,13 +499,13 @@ struct extra_descr_data {
 struct obj_flag_data {
    int	value[4];	/* Values of the item (see list)    */
    byte type_flag;	/* Type of item			    */
-   int	wear_flags;	/* Where you can wear it	    */
-   int	extra_flags;	/* If it hums, glows, etc.	    */
-   int	weight;		/* Weigt what else                  */
+   int	wear_flags[TW_ARRAY_MAX];	/* Where you can wear it	    */
+   int	extra_flags[EF_ARRAY_MAX];	/* If it hums, glows, etc.	    */
+   int	weight;		/* Weight what else                  */
    int	cost;		/* Value when sold (gp.)            */
    int	cost_per_day;	/* Cost to keep pr. real day        */
    int	timer;		/* Timer for object                 */
-   long	bitvector;	/* To set chars bits                */
+   int	bitvector[AF_ARRAY_MAX];	/* To set chars bits                */
 };
 
 
@@ -540,10 +548,10 @@ struct obj_file_elem {
    obj_vnum item_number;
 
    int	value[4];
-   int	extra_flags;
+   int	extra_flags[EF_ARRAY_MAX];
    int	weight;
    int	timer;
-   long	bitvector;
+   int	bitvector[AF_ARRAY_MAX];
    struct obj_affected_type affected[MAX_OBJ_AFFECT];
 };
 
@@ -591,7 +599,7 @@ struct room_data {
    char	*description;           /* Shown when entered                 */
    struct extra_descr_data *ex_description; /* for examine/look       */
    struct room_direction_data *dir_option[NUM_OF_DIRS]; /* Directions */
-   int room_flags;		/* DEATH,DARK ... etc                 */
+   int room_flags[RF_ARRAY_MAX];	/* DEATH,DARK ... etc                 */
 
    byte light;                  /* Number of lightsources in room     */
    SPECIAL(*func);
@@ -690,9 +698,9 @@ struct char_point_data {
 struct char_special_data_saved {
    int	alignment;		/* +-1000 for alignments                */
    long	idnum;			/* player's idnum; -1 for mobiles	*/
-   long	act;			/* act flag for NPC's; player flag for PC's */
+   int	act[PM_ARRAY_MAX];	/* act flag for NPC's; player flag for PC's */
 
-   long	affected_by;		/* Bitvector for spells/skills affected by */
+   int	affected_by[AF_ARRAY_MAX];	/* Bitvector for spells/skills affected by */
    sh_int apply_saving_throw[5]; /* Saving throw (Bonuses)		*/
 };
 
@@ -728,7 +736,7 @@ struct player_special_data_saved {
    byte freeze_level;		/* Level of god who froze char, if any	*/
    sh_int invis_level;		/* level of invisibility		*/
    room_vnum load_room;		/* Which room to place char in		*/
-   long	pref;			/* preference flags for PC's.		*/
+   int	pref[PR_ARRAY_MAX];	/* preference flags for PC's.		*/
    ubyte bad_pws;		/* number of bad password attemps	*/
    sbyte conditions[3];         /* Drunk, full, thirsty			*/
 
diff -Bbup ../../circle30bpl12/src/sysdep.h ./sysdep.h
--- ../../circle30bpl12/src/sysdep.h	Wed Oct 29 17:04:08 1997
+++ ./sysdep.h	Thu Jan 29 00:26:00 1998
@@ -227,9 +227,9 @@ extern void abort (), exit ();
 #endif
 
 #ifdef HAVE_SIGNAL_H
-# define _POSIX_C_SOURCE 2
+// # define _POSIX_C_SOURCE 2
 # include <signal.h>
-# undef _POSIX_C_SOURCE
+// # undef _POSIX_C_SOURCE
 #endif
 
 #ifdef HAVE_SYS_UIO_H
Common subdirectories: ../../circle30bpl12/src/util and ./util
diff -Bbup ../../circle30bpl12/src/utils.c ./utils.c
--- ../../circle30bpl12/src/utils.c	Wed Oct 29 00:16:30 1997
+++ ./utils.c	Thu Jan 29 20:30:40 1998
@@ -187,6 +187,31 @@ void mudlog(char *str, char type, int le
 }
 
 
+void sprintbitarray(int bitvector[], char *names[], int maxar, char *result)
+{
+  int nr, teller, found = FALSE;
+
+  *result = '\0';
+
+  for(teller = 0; teller < maxar && !found; teller++)
+    for (nr = 0; nr < 32 && !found; nr++) {
+      if (IS_SET_AR(bitvector, (teller*32)+nr))
+        if (*names[(teller*32)+nr] != '\n') {
+          if (*names[(teller*32)+nr] != '\0') {
+	    strcat(result, names[(teller*32)+nr]);
+	    strcat(result, " ");
+          }
+        } else {
+	  strcat(result, "UNDEFINED ");
+        }
+      if (*names[(teller*32)+nr] == '\n')
+        found = TRUE;
+    }
+
+  if (!*result)
+    strcpy(result, "NOBITS ");
+}
+
 
 void sprintbit(long bitvector, char *names[], char *result)
 {
@@ -339,7 +364,8 @@ void stop_follower(struct char_data * ch
   }
 
   ch->master = NULL;
-  REMOVE_BIT(AFF_FLAGS(ch), AFF_CHARM | AFF_GROUP);
+  REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_CHARM);
+  REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_GROUP);
 }
 
 
diff -Bbup ../../circle30bpl12/src/utils.h ./utils.h
--- ../../circle30bpl12/src/utils.h	Wed Oct 29 17:04:08 1997
+++ ./utils.h	Thu Jan 29 20:35:36 1998
@@ -31,6 +31,7 @@ int	get_line(FILE *fl, char *buf);
 int	get_filename(char *orig_name, char *filename, int mode);
 struct time_info_data age(struct char_data *ch);
 int	num_pc_in_room(struct room_data *room);
+void	sprintbitarray(int bitvector[], char *names[], int maxar, char *result);
 
 /* random functions in random.c */
 void circle_srandom(unsigned long initial_seed);
@@ -156,7 +157,14 @@ void	update_pos(struct char_data *victim
 
 /* basic bitvector utils *************************************************/
 
+#define Q_FIELD(x)  ((int) (x) / 32)
+#define Q_BIT(x)    (1 << ((x) % 32))
 
+#define IS_SET_AR(var, bit)       ((var)[Q_FIELD(bit)] & Q_BIT(bit))
+#define SET_BIT_AR(var, bit)      ((var)[Q_FIELD(bit)] |= Q_BIT(bit))
+#define REMOVE_BIT_AR(var, bit)   ((var)[Q_FIELD(bit)] &= ~Q_BIT(bit))
+#define TOGGLE_BIT_AR(var, bit)   ((var)[Q_FIELD(bit)] = \
+                                   (var)[Q_FIELD(bit)] ^ Q_BIT(bit))
 #define IS_SET(flag,bit)  ((flag) & (bit))
 #define SET_BIT(var,bit)  ((var) |= (bit))
 #define REMOVE_BIT(var,bit)  ((var) &= ~(bit))
@@ -168,20 +176,20 @@ void	update_pos(struct char_data *victim
 #define AFF_FLAGS(ch) ((ch)->char_specials.saved.affected_by)
 #define ROOM_FLAGS(loc) (world[(loc)].room_flags)
 
-#define IS_NPC(ch)  (IS_SET(MOB_FLAGS(ch), MOB_ISNPC))
+#define IS_NPC(ch)  (IS_SET_AR(MOB_FLAGS(ch), MOB_ISNPC))
 #define IS_MOB(ch)  (IS_NPC(ch) && ((ch)->nr >-1))
 
-#define MOB_FLAGGED(ch, flag) (IS_NPC(ch) && IS_SET(MOB_FLAGS(ch), (flag)))
-#define PLR_FLAGGED(ch, flag) (!IS_NPC(ch) && IS_SET(PLR_FLAGS(ch), (flag)))
-#define AFF_FLAGGED(ch, flag) (IS_SET(AFF_FLAGS(ch), (flag)))
-#define PRF_FLAGGED(ch, flag) (IS_SET(PRF_FLAGS(ch), (flag)))
-#define ROOM_FLAGGED(loc, flag) (IS_SET(ROOM_FLAGS(loc), (flag)))
+#define MOB_FLAGGED(ch, flag) (IS_NPC(ch) && IS_SET_AR(MOB_FLAGS(ch), (flag)))
+#define PLR_FLAGGED(ch, flag) (!IS_NPC(ch) && IS_SET_AR(PLR_FLAGS(ch), (flag)))
+#define AFF_FLAGGED(ch, flag) (IS_SET_AR(AFF_FLAGS(ch), (flag)))
+#define PRF_FLAGGED(ch, flag) (IS_SET_AR(PRF_FLAGS(ch), (flag)))
+#define ROOM_FLAGGED(loc, flag) (IS_SET_AR(ROOM_FLAGS(loc), (flag)))
 
 /* IS_AFFECTED for backwards compatibility */
 #define IS_AFFECTED(ch, skill) (AFF_FLAGGED((ch), (skill)))
 
-#define PLR_TOG_CHK(ch,flag) ((TOGGLE_BIT(PLR_FLAGS(ch), (flag))) & (flag))
-#define PRF_TOG_CHK(ch,flag) ((TOGGLE_BIT(PRF_FLAGS(ch), (flag))) & (flag))
+#define PLR_TOG_CHK(ch,flag) ((TOGGLE_BIT_AR(PLR_FLAGS(ch), (flag))) & Q_BIT(flag))
+#define PRF_TOG_CHK(ch,flag) ((TOGGLE_BIT_AR(PRF_FLAGS(ch), (flag))) & Q_BIT(flag))
 
 
 /* room utils ************************************************************/
@@ -324,6 +332,7 @@ void	update_pos(struct char_data *victim
 #define GET_OBJ_COST(obj)	((obj)->obj_flags.cost)
 #define GET_OBJ_RENT(obj)	((obj)->obj_flags.cost_per_day)
 #define GET_OBJ_EXTRA(obj)	((obj)->obj_flags.extra_flags)
+#define GET_OBJ_EXTRA_AR(obj, i)   ((obj)->obj_flags.extra_flags[(i)])
 #define GET_OBJ_WEAR(obj)	((obj)->obj_flags.wear_flags)
 #define GET_OBJ_VAL(obj, val)	((obj)->obj_flags.value[(val)])
 #define GET_OBJ_WEIGHT(obj)	((obj)->obj_flags.weight)
@@ -331,12 +340,12 @@ void	update_pos(struct char_data *victim
 #define GET_OBJ_RNUM(obj)	((obj)->item_number)
 #define GET_OBJ_VNUM(obj)	(GET_OBJ_RNUM(obj) >= 0 ? \
 				 obj_index[GET_OBJ_RNUM(obj)].virtual : -1)
-#define IS_OBJ_STAT(obj,stat)	(IS_SET((obj)->obj_flags.extra_flags,stat))
-
+#define IS_OBJ_STAT(obj,stat)	(IS_SET_AR((obj)->obj_flags.extra_flags, \
+                                 (stat)))
 #define GET_OBJ_SPEC(obj) ((obj)->item_number >= 0 ? \
 	(obj_index[(obj)->item_number].func) : NULL)
 
-#define CAN_WEAR(obj, part) (IS_SET((obj)->obj_flags.wear_flags, (part)))
+#define CAN_WEAR(obj, part) (IS_SET_AR((obj)->obj_flags.wear_flags, (part)))
 
 
 /* compound utilities and other macros **********************************/