diff -uN backup/128bit.README src/128bit.README
--- backup/128bit.README	Thu Jan  1 00:00:00 1970
+++ src/128bit.README	Fri Jun  7 17:20:18 2002
@@ -0,0 +1,56 @@
+Ok, this is just the 128bits patch for bpl 21. I have 128bits myself, 
+and I noticed how much the old 128bit patch differs from bpl21. 
+So.. I decided to make it myself. This patch should work fine, there are
+no warnings I know of whatsoever. If you find any bpl21-specific bugs, 
+send them to my email adress mentioned below. Otherwise, send them to
+the original author (Niese-Petersen). I do not want any credit 
+whatsoever, if you want to give credit, give it to Niese-petersen, not 
+to me. This patch is for circlemud bpl21, WITHOUT olc, and without 
+dg_scripts. I might make one, one day, if enough requests come in.
+
+Have fun with this piece of code,
+
+Templar Viper (Templarviper@hotmail.com)
+ 
+ 
+
+Original Readme document:
+
++----------------------------------------------------------------------+
+|                128 Bitvectors for CircleMUD 3.0 bpl 12               |
++----------------------------------------------------------------------+
+             Original Code by Niese-Petersen 
+               Patch by Tony Robbins 
++----------------------------------------------------------------------+
+128 Bitvectors are a way of making it so that you can exceed the normal
+limitation of 32 AFF, PRF, PLR, etc, flags in CircleMUD.  It is sugges-
+ted that you take a look at: 
+http://cspo.queensu.ca/~fletcher/Circle/Snippet/128bits.txt
+[Editor's Note: That is 'democracy.queensu.ca' now.]
+This document is the original 128 Bitvector code.
+:STANDARD DISCLAIMER:
+The code might very well destroy your MUD, turn you into a frog, and 
+blow up your server.  The frog part is doubtful.  Anything that happens 
+to your computer and code while you're using this code is your own 
+problem, and I will not take responsibility for it.
++----------------------------------------------------------------------+
+PROBLEMS:
++----------------------------------------------------------------------+
+128 Bitvectors are saved into the MOB, OBJ, and WLD files.  This means
+that your rooms, mobiles, and objects won't work with the new code.  The
+ fix?  http://cspo.queensu.ca/~fletcher/Circle/Snippet/128conv2.txt
+This gives you perl scripts to convert your files...  The only problem 
+is that the mob converter didn't work properly.
++----------------------------------------------------------------------+
+QUICK INFO:
++----------------------------------------------------------------------+
+if a standard line in your mfiles is:
+   
+then your new set up should be
+         
+ ^first 32 ^2nd 32 ^3rd....
+
+The document by Niese Petersen should contain more information.
++----------------------------------------------------------------------+
+(BTW, a li'l line in your credits for Niese Petersen and me for the 
+stuff would sure be nice...  :))
diff -uN backup/Makefile src/Makefile
--- backup/Makefile	Mon Apr 15 18:33:50 2002
+++ src/Makefile	Thu Jan  1 00:00:00 1970
@@ -1,3 +0,0 @@
-all:
-	# You must run "configure" in Circle's top-level directory.  See the
-	# README file in that directory for more information.
diff -uN backup/act.informative.c src/act.informative.c
--- backup/act.informative.c	Tue Apr  9 05:52:44 2002
+++ src/act.informative.c	Fri Jun  7 15:34:26 2002
@@ -417,8 +417,7 @@
   send_to_char(ch, "%s", CCCYN(ch, C_NRM));
   if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_ROOMFLAGS)) {
     char buf[MAX_STRING_LENGTH];
-
-    sprintbit(ROOM_FLAGS(IN_ROOM(ch)), room_bits, buf, sizeof(buf));
+    sprintbitarray(ROOM_FLAGS(IN_ROOM(ch)), room_bits, RF_ARRAY_MAX, buf);
     send_to_char(ch, "[%5d] %s [ %s]", GET_ROOM_VNUM(IN_ROOM(ch)), world[IN_ROOM(ch)].name, buf);
   } else
     send_to_char(ch, world[IN_ROOM(ch)].name);
@@ -1531,8 +1530,8 @@
     send_to_char(ch, "Usage: color { Off | Sparse | Normal | Complete }\r\n");
     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 | PRF_COLOR_2);
+  SET_BIT_AR(PRF_FLAGS(ch), (PRF_COLOR_1 * (tp & 1)) | (PRF_COLOR_2 * (tp & 2) >> 1));
 
   send_to_char(ch, "Your %scolor%s is now %s.\r\n", CCRED(ch, C_SPR), CCNRM(ch, C_OFF), ctypes[tp]);
 }
diff -uN backup/act.item.c src/act.item.c
--- backup/act.item.c	Tue Apr  9 05:12:16 2002
+++ src/act.item.c	Thu Jun  6 14:18:48 2002
@@ -74,7 +74,7 @@
 
     /* Yes, I realize this is strange until we have auto-equip on rent. -gg */
     if (OBJ_FLAGGED(obj, ITEM_NODROP) && !OBJ_FLAGGED(cont, ITEM_NODROP)) {
-      SET_BIT(GET_OBJ_EXTRA(cont), ITEM_NODROP);
+      SET_BIT_AR(GET_OBJ_EXTRA(cont), ITEM_NODROP);
       act("You get a strange feeling as you put $p in $P.", FALSE,
                 ch, obj, cont, TO_CHAR);
     } else
diff -uN backup/act.movement.c src/act.movement.c
--- backup/act.movement.c	Fri Feb 15 12:31:32 2002
+++ src/act.movement.c	Thu Jun  6 14:24:48 2002
@@ -727,7 +727,7 @@
       }
       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 -uN backup/act.other.c src/act.other.c
--- backup/act.other.c	Thu Jan 31 16:04:18 2002
+++ src/act.other.c	Thu Jun  6 14:28:40 2002
@@ -182,14 +182,14 @@
   send_to_char(ch, "You attempt to hide yourself.\r\n");
 
   if (AFF_FLAGGED(ch, AFF_HIDE))
-    REMOVE_BIT(AFF_FLAGS(ch), AFF_HIDE);
+    REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_HIDE);
 
   percent = rand_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);
 }
 
 
@@ -369,7 +369,7 @@
   if (AFF_FLAGGED(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);
@@ -453,7 +453,7 @@
 	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);
     }
   }
 }
@@ -477,14 +477,14 @@
     for (f = ch->followers; f; f = next_fol) {
       next_fol = f->next;
       if (AFF_FLAGGED(f->follower, AFF_GROUP)) {
-	REMOVE_BIT(AFF_FLAGS(f->follower), AFF_GROUP);
+	REMOVE_BIT_AR(AFF_FLAGS(f->follower), AFF_GROUP);
         act("$N has disbanded the group.", TRUE, f->follower, NULL, ch, TO_CHAR);
         if (!AFF_FLAGGED(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(ch, "You disband the group.\r\n");
     return;
   }
@@ -502,7 +502,7 @@
     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);
@@ -743,22 +743,22 @@
     return;
   }
   if (!str_cmp(argument, "on") || !str_cmp(argument, "all"))
-    SET_BIT(PRF_FLAGS(ch), PRF_DISPHP | PRF_DISPMANA | PRF_DISPMOVE);
+    SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP | PRF_DISPMANA | PRF_DISPMOVE);
   else if (!str_cmp(argument, "off") || !str_cmp(argument, "none"))
-    REMOVE_BIT(PRF_FLAGS(ch), PRF_DISPHP | PRF_DISPMANA | PRF_DISPMOVE);
+    REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP | PRF_DISPMANA | PRF_DISPMOVE);
   else {
-    REMOVE_BIT(PRF_FLAGS(ch), PRF_DISPHP | PRF_DISPMANA | PRF_DISPMOVE);
+    REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP | PRF_DISPMANA | 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(ch, "Usage: prompt { { H | M | V } | all | none }\r\n");
@@ -834,8 +834,6 @@
 
 #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 -uN backup/act.wizard.c src/act.wizard.c
--- backup/act.wizard.c	Tue Apr  9 05:12:16 2002
+++ src/act.wizard.c	Thu Jun  6 14:39:28 2002
@@ -380,7 +380,7 @@
 	  zone_table[rm->zone].number, CCGRN(ch, C_NRM), rm->number,
 	  CCNRM(ch, C_NRM), IN_ROOM(ch), buf2);
 
-  sprintbit(rm->room_flags, room_bits, buf2, sizeof(buf2));
+  sprintbitarray(rm->room_flags, room_bits, RF_ARRAY_MAX, buf2);
   send_to_char(ch, "SpecProc: %s, Flags: %s\r\n", rm->func == NULL ? "None" : "Exists", buf2);
 
   send_to_char(ch, "Description:\r\n%s", rm->description ? rm->description : "  None.\r\n");
@@ -473,13 +473,13 @@
     send_to_char(ch, "%s\r\n", CCNRM(ch, C_NRM));
   }
 
-  sprintbit(GET_OBJ_WEAR(j), wear_bits, buf, sizeof(buf));
+  sprintbitarray(GET_OBJ_WEAR(j), wear_bits, TW_ARRAY_MAX, buf);
   send_to_char(ch, "Can be worn on: %s\r\n", buf);
 
-  sprintbit(GET_OBJ_AFFECT(j), affected_bits, buf, sizeof(buf));
+  sprintbitarray(GET_OBJ_AFFECT(j), affected_bits, AF_ARRAY_MAX, buf);
   send_to_char(ch, "Set char bits : %s\r\n", buf);
 
-  sprintbit(GET_OBJ_EXTRA(j), extra_bits, buf, sizeof(buf));
+  sprintbitarray(GET_OBJ_EXTRA(j), extra_bits, EF_ARRAY_MAX, buf);
   send_to_char(ch, "Extra flags   : %s\r\n", buf);
 
   send_to_char(ch, "Weight: %d, Value: %d, Cost/day: %d, Timer: %d\r\n",
@@ -669,15 +669,14 @@
   if (IS_NPC(k)) {
     sprinttype(k->mob_specials.default_pos, position_types, buf, sizeof(buf));
     send_to_char(ch, ", Default position: %s\r\n", buf);
-    sprintbit(MOB_FLAGS(k), action_bits, buf, sizeof(buf));
+    sprintbitarray(MOB_FLAGS(k), action_bits, PM_ARRAY_MAX, buf);
     send_to_char(ch, "NPC flags: %s%s%s\r\n", CCCYN(ch, C_NRM), buf, CCNRM(ch, C_NRM));
   } else {
     send_to_char(ch, ", Idle Timer (in tics) [%d]\r\n", k->char_specials.timer);
-
-    sprintbit(PLR_FLAGS(k), player_bits, buf, sizeof(buf));
+	sprintbitarray(PLR_FLAGS(k), player_bits, PM_ARRAY_MAX, buf);
     send_to_char(ch, "PLR: %s%s%s\r\n", CCCYN(ch, C_NRM), buf, CCNRM(ch, C_NRM));
 
-    sprintbit(PRF_FLAGS(k), preference_bits, buf, sizeof(buf));
+    sprintbitarray(PRF_FLAGS(k), preference_bits, PR_ARRAY_MAX, buf);
     send_to_char(ch, "PRF: %s%s%s\r\n", CCGRN(ch, C_NRM), buf, CCNRM(ch, C_NRM));
   }
 
@@ -714,7 +713,7 @@
   }
 
   /* Showing the bitvector */
-  sprintbit(AFF_FLAGS(k), affected_bits, buf, sizeof(buf));
+  sprintbitarray(AFF_FLAGS(k), affected_bits, AF_ARRAY_MAX, buf);
   send_to_char(ch, "AFF: %s%s%s\r\n", CCYEL(ch, C_NRM), buf, CCNRM(ch, C_NRM));
 
   /* Routine to show what spells a char is affected by */
@@ -729,7 +728,7 @@
 	if (aff->modifier)
 	  send_to_char(ch, ", ");
 
-	sprintbit(aff->bitvector, affected_bits, buf, sizeof(buf));
+	strcpy(buf, affected_bits[aff->bitvector]);
         send_to_char(ch, "sets %s", buf);
       }
       send_to_char(ch, "\r\n");
@@ -1186,8 +1185,10 @@
     send_to_char(ch, "Usage: syslog { Off | Brief | Normal | Complete }\r\n");
     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);
 
   send_to_char(ch, "Your syslog is now %s.\r\n", logtypes[tp]);
 }
@@ -1269,8 +1270,10 @@
     /* If they are no longer an immortal, let's remove some of the
      * nice immortal only flags, shall we?
      */
-    REMOVE_BIT(PRF_FLAGS(victim), PRF_LOG1 | PRF_LOG2);
-    REMOVE_BIT(PRF_FLAGS(victim), PRF_NOHASSLE | PRF_HOLYLIGHT);
+    REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_LOG1);
+    REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_LOG2);
+    REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_NOHASSLE);
+    REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_HOLYLIGHT);
     run_autowiz();
   }
 
@@ -1784,8 +1787,9 @@
 	send_to_char(ch, "Your victim is not flagged.\r\n");
 	return;
       }
-      REMOVE_BIT(PLR_FLAGS(vict), PLR_THIEF | PLR_KILLER);
-      send_to_char(ch, "Pardoned.\r\n");
+      REMOVE_BIT_AR(PLR_FLAGS(vict), PLR_THIEF);
+      REMOVE_BIT_AR(PLR_FLAGS(vict), PLR_KILLER);
+	  send_to_char(ch, "Pardoned.\r\n");
       send_to_char(vict, "You have been pardoned by the Gods!\r\n");
       mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s pardoned by %s", GET_NAME(vict), GET_NAME(ch));
       break;
@@ -1810,7 +1814,7 @@
 	send_to_char(ch, "Your victim is already pretty cold.\r\n");
 	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(vict, "A bitter wind suddenly rises and drains every erg of heat from your body!\r\nYou feel frozen!\r\n");
       send_to_char(ch, "Frozen.\r\n");
@@ -1828,7 +1832,7 @@
 	return;
       }
       mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s un-frozen by %s.", GET_NAME(vict), GET_NAME(ch));
-      REMOVE_BIT(PLR_FLAGS(vict), PLR_FROZEN);
+      REMOVE_BIT_AR(PLR_FLAGS(vict), PLR_FROZEN);
       send_to_char(vict, "A fireball suddenly explodes in front of you, melting the ice!\r\nYou feel thawed.\r\n");
       send_to_char(ch, "Thawed.\r\n");
       act("A sudden fireball conjured from nowhere thaws $n!", FALSE, vict, 0, 0, TO_ROOM);
@@ -2103,8 +2107,8 @@
 #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))))
 
@@ -2423,11 +2427,11 @@
     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)) {
       rvnum = atoi(val_arg);
       if (real_room(rvnum) != NOWHERE) {
-        SET_BIT(PLR_FLAGS(vict), PLR_LOADROOM);
+        SET_BIT_AR(PLR_FLAGS(vict), PLR_LOADROOM);
 	GET_LOADROOM(vict) = rvnum;
 	send_to_char(ch, "%s will enter at room #%d.", GET_NAME(vict), GET_LOADROOM(vict));
       } else {
diff -uN backup/class.c src/class.c
--- backup/class.c	Tue Apr  9 05:52:44 2002
+++ src/class.c	Thu Jun  6 14:18:48 2002
@@ -1507,7 +1507,7 @@
   GET_COND(ch, DRUNK) = 0;
 
   if (siteok_everyone)
-    SET_BIT(PLR_FLAGS(ch), PLR_SITEOK);
+    SET_BIT_AR(PLR_FLAGS(ch), PLR_SITEOK);
 }
 
 
@@ -1565,7 +1565,7 @@
   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);
   }
 
   snoop_check(ch);
diff -uN backup/db.c src/db.c
--- backup/db.c	Tue Apr  9 05:12:16 2002
+++ src/db.c	Fri Jun  7 16:18:10 2002
@@ -901,8 +901,9 @@
 void parse_room(FILE *fl, int virtual_nr)
 {
   static int room_nr = 0, zone = 0;
-  int t[10], i;
-  char line[READ_SIZE], flags[128], buf2[MAX_STRING_LENGTH], buf[128];
+  int t[10], i, taeller;
+  char line[READ_SIZE], flags[READ_SIZE], flags2[READ_SIZE], flags3[READ_SIZE]; 
+  char flags4[READ_SIZE], buf2[MAX_STRING_LENGTH], buf[128];
   struct extra_descr_data *new_descr;
 
   /* This really had better fit or there are other problems. */
@@ -928,16 +929,22 @@
     exit(1);
   }
 
-  if (sscanf(line, " %d %s %d ", t, flags, t + 2) != 3) {
+  if (sscanf(line, " %d %s %s %s %s %d ", t, flags, flags2, flags3, flags4, t + 2) != 6) {
     log("SYSERR: Format error in roomflags/sector type of room #%d",
 	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);
   sprintf(flags, "object #%d", virtual_nr);	/* sprintf: OK (until 399-bit integers) */
-  check_bitvector_names(world[room_nr].room_flags, room_bits_count, flags, "room");
+  
+  for(taeller=0; taeller < AF_ARRAY_MAX; taeller++) 
+    check_bitvector_names(world[room_nr].room_flags[taeller], room_bits_count, flags, "room");
 
   world[room_nr].sector_type = t[2];
 
@@ -1316,9 +1323,9 @@
 void parse_mobile(FILE *mob_f, int nr)
 {
   static int i = 0;
-  int j, t[10];
-  char line[READ_SIZE], *tmpptr, letter;
-  char f1[128], f2[128], buf2[128];
+  int j, t[10], taeller;
+  char line[READ_SIZE], buf2[MAX_STRING_LENGTH], *tmpptr, letter;
+  char f1[128], f2[128], f3[128], f4[128], f5[128], f6[128], f7[128], f8[128];
 
   mob_index[i].vnum = nr;
   mob_index[i].number = 0;
@@ -1353,26 +1360,36 @@
   }
 
 #ifdef CIRCLE_ACORN	/* Ugh. */
-  if (sscanf(line, "%s %s %d %s", f1, f2, t + 2, &letter) != 4) {
+  if (sscanf(line, "%s %s %s %s %s %s %s %s %d %s", f1, f2, f3, f4, f5, f6, f7, f8, 
+	  t + 2, &letter) != 10) {
 #else
-  if (sscanf(line, "%s %s %d %c", f1, f2, t + 2, &letter) != 4) {
+  if (sscanf(line, "%s %s %s %s %s %s %s %s %d %c", f1, f2, f3, f4, f5, f6, f7, f8, 
+	  t + 2, &letter) != 10) {
 #endif
     log("SYSERR: Format error after string section of mob #%d\n"
 	"...expecting line of form '# # # {S | E}'", nr);
     exit(1);
   }
 
-  MOB_FLAGS(mob_proto + i) = asciiflag_conv(f1);
-  SET_BIT(MOB_FLAGS(mob_proto + i), MOB_ISNPC);
+  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);
   if (MOB_FLAGGED(mob_proto + i, MOB_NOTDEADYET)) {
     /* Rather bad to load mobiles with this bit already set. */
     log("SYSERR: Mob #%d has reserved bit MOB_NOTDEADYET set.", nr);
-    REMOVE_BIT(MOB_FLAGS(mob_proto + i), MOB_NOTDEADYET);
+    REMOVE_BIT_AR(MOB_FLAGS(mob_proto + i), MOB_NOTDEADYET);
   }
-  check_bitvector_names(MOB_FLAGS(mob_proto + i), action_bits_count, buf2, "mobile");
-
-  AFF_FLAGS(mob_proto + i) = asciiflag_conv(f2);
-  check_bitvector_names(AFF_FLAGS(mob_proto + i), affected_bits_count, buf2, "mobile affect");
+  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);
+  
+  for(taeller=0; taeller < AF_ARRAY_MAX; taeller++) {
+    check_bitvector_names(AFF_FLAGS(mob_proto + i)[taeller], affected_bits_count, buf2, "mobile affect");
+    check_bitvector_names(MOB_FLAGS(mob_proto + i)[taeller], action_bits_count, buf2, "mobile");
+  }
 
   GET_ALIGNMENT(mob_proto + i) = t[2];
 
@@ -1413,8 +1430,9 @@
   static int i = 0;
   static char line[READ_SIZE];
   int t[10], j, retval;
-  char *tmpptr;
-  char f1[READ_SIZE], f2[READ_SIZE], buf2[128];
+  char *tmpptr, buf2[128];
+  char f1[READ_SIZE], f2[READ_SIZE], f3[READ_SIZE], f4[READ_SIZE];
+  char f5[READ_SIZE], f6[READ_SIZE], f7[READ_SIZE], f8[READ_SIZE];
   struct extra_descr_data *new_descr;
 
   obj_index[i].vnum = nr;
@@ -1447,15 +1465,21 @@
     log("SYSERR: Expecting first numeric line of %s, but file ended!", buf2);
     exit(1);
   }
-  if ((retval = sscanf(line, " %d %s %s", t, f1, f2)) != 3) {
-    log("SYSERR: Format error in first numeric line (expecting 3 args, got %d), %s", retval, buf2);
+  if ((retval = sscanf(line, " %d %s %s %s %s %s %s %s %s", t, f1, f2, f3, f4, f5, f6, f7, f8)) != 9) {
+    log("SYSERR: Format error in first numeric line (expecting 9 args, got %d), %s", retval, buf2);
     exit(1);
   }
 
   /* Object flags checked in check_object(). */
   GET_OBJ_TYPE(obj_proto + i) = t[0];
-  GET_OBJ_EXTRA(obj_proto + i) = asciiflag_conv(f1);
-  GET_OBJ_WEAR(obj_proto + i) = asciiflag_conv(f2);
+  GET_OBJ_EXTRA(obj_proto + i)[0] = asciiflag_conv(f1);
+  GET_OBJ_EXTRA(obj_proto + i)[1] = asciiflag_conv(f2);
+  GET_OBJ_EXTRA(obj_proto + i)[2] = asciiflag_conv(f3);
+  GET_OBJ_EXTRA(obj_proto + i)[3] = asciiflag_conv(f4);
+  GET_OBJ_WEAR(obj_proto + i)[0] = asciiflag_conv(f5);
+  GET_OBJ_WEAR(obj_proto + i)[1] = asciiflag_conv(f6);
+  GET_OBJ_WEAR(obj_proto + i)[2] = asciiflag_conv(f7);
+  GET_OBJ_WEAR(obj_proto + i)[3] = asciiflag_conv(f8);
 
   if (!get_line(obj_f, line)) {
     log("SYSERR: Expecting second numeric line of %s, but file ended!", buf2);
@@ -2207,8 +2231,8 @@
 /* copy data from the file structure to a char struct */
 void store_to_char(struct char_file_u *st, struct char_data *ch)
 {
-  int i;
-
+  int i;
+
   /* to save memory, only PC's -- not MOB's -- have player_specials */
   if (ch->player_specials == NULL)
     CREATE(ch->player_specials, struct player_special_data, 1);
@@ -2706,7 +2730,7 @@
  */
 void init_char(struct char_data *ch)
 {
-  int i;
+  int i, taeller;
 
   /* create a player_special structure */
   if (ch->player_specials == NULL)
@@ -2769,7 +2793,8 @@
       SET_SKILL(ch, i, 100);
   }
 
-  AFF_FLAGS(ch) = 0;
+  for(taeller=0; taeller < AF_ARRAY_MAX; taeller++)
+    AFF_FLAGS(ch)[taeller] = 0;
 
   for (i = 0; i < 5; i++)
     GET_SAVE(ch, i) = 0;
@@ -2895,7 +2920,7 @@
 int check_object(struct obj_data *obj)
 {
   char objname[MAX_INPUT_LENGTH + 32];
-  int error = FALSE;
+  int error = FALSE, y;
 
   if (GET_OBJ_WEIGHT(obj) < 0 && (error = TRUE))
     log("SYSERR: Object #%d (%s) has negative weight (%d).",
@@ -2906,9 +2931,12 @@
 	GET_OBJ_VNUM(obj), obj->short_description, GET_OBJ_RENT(obj));
 
   snprintf(objname, sizeof(objname), "Object #%d (%s)", GET_OBJ_VNUM(obj), obj->short_description);
-  error |= check_bitvector_names(GET_OBJ_WEAR(obj), wear_bits_count, objname, "object wear");
-  error |= check_bitvector_names(GET_OBJ_EXTRA(obj), extra_bits_count, objname, "object extra");
-  error |= check_bitvector_names(GET_OBJ_AFFECT(obj), affected_bits_count, objname, "object affect");
+  
+  for(y = 0; y < TW_ARRAY_MAX; y++) {
+    error |= check_bitvector_names(GET_OBJ_WEAR(obj)[y], wear_bits_count, objname, "object wear");
+    error |= check_bitvector_names(GET_OBJ_EXTRA(obj)[y], extra_bits_count, objname, "object extra");
+    error |= check_bitvector_names(GET_OBJ_AFFECT(obj)[y], affected_bits_count, objname, "object affect");
+  }
 
   switch (GET_OBJ_TYPE(obj)) {
   case ITEM_DRINKCON:
diff -uN backup/deleteo.bat src/deleteo.bat
--- backup/deleteo.bat	Thu Jan  1 00:00:00 1970
+++ src/deleteo.bat	Tue Oct 30 14:16:44 2001
@@ -0,0 +1 @@
+del *.o
\ No newline at end of file
Common subdirectories: backup/doc and src/doc
diff -uN backup/fight.c src/fight.c
--- backup/fight.c	Sat Mar  2 19:25:26 2002
+++ src/fight.c	Fri Jun  7 16:21:04 2002
@@ -89,7 +89,8 @@
   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);
@@ -219,7 +220,7 @@
   if (PLR_FLAGGED(ch, PLR_KILLER) || IS_NPC(ch) || IS_NPC(vict) || ch == vict)
     return;
 
-  SET_BIT(PLR_FLAGS(ch), PLR_KILLER);
+  SET_BIT_AR(PLR_FLAGS(ch), PLR_KILLER);
   send_to_char(ch, "If you want to be a PLAYER KILLER, so be it...\r\n");
   mudlog(BRF, LVL_IMMORT, TRUE, "PC Killer bit set on %s for initiating attack on %s at %s.",
 	    GET_NAME(ch), GET_NAME(vict), world[IN_ROOM(vict)].name);
@@ -274,7 +275,7 @@
   char buf2[MAX_NAME_LENGTH + 64];
   struct obj_data *corpse, *o;
   struct obj_data *money;
-  int i;
+  int i, x, y;
 
   corpse = create_obj();
 
@@ -289,8 +290,14 @@
   corpse->short_description = strdup(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);
@@ -378,8 +385,10 @@
 void die(struct char_data *ch)
 {
   gain_exp(ch, -(GET_EXP(ch) / 2));
-  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_KILLER);
+  }
   raw_kill(ch);
 }
 
diff -uN backup/graph.c src/graph.c
--- backup/graph.c	Thu Jan 31 16:04:18 2002
+++ src/graph.c	Thu Jun  6 14:04:48 2002
@@ -46,9 +46,9 @@
 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)	(ROOM_FLAGGED(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)	(EXIT_FLAGGED(world[(x)].dir_option[(y)], EX_CLOSED))
 
diff -uN backup/handler.c src/handler.c
--- backup/handler.c	Tue Apr  9 03:34:36 2002
+++ src/handler.c	Fri Jun  7 16:25:28 2002
@@ -81,128 +81,146 @@
   }
 }
 
+void aff_apply_modify(struct char_data *ch, byte loc, sbyte mod, char *msg)
+{
+  int maxabil;
+
+  maxabil = (IS_NPC(ch) ? 25 : 18); /* Not used, but why remove it ? */
+
+  switch (loc) {
+  case APPLY_NONE:
+    break;
+
+  case APPLY_STR:
+    GET_STR(ch) += mod;
+    break;
+  case APPLY_DEX:
+    GET_DEX(ch) += mod;
+    break;
+  case APPLY_INT:
+    GET_INT(ch) += mod;
+    break;
+  case APPLY_WIS:
+    GET_WIS(ch) += mod;
+    break;
+  case APPLY_CON:
+    GET_CON(ch) += mod;
+    break;
+  case APPLY_CHA:
+    GET_CHA(ch) += mod;
+    break;
+
+  case APPLY_CLASS:
+    /* ??? GET_CLASS(ch) += mod; */
+    break;
+
+  case APPLY_LEVEL:
+    /* ??? GET_LEVEL(ch) += mod; */
+    break;
+
+  case APPLY_AGE:
+    ch->player.time.birth -= (mod * SECS_PER_MUD_YEAR);
+    break;
+
+  case APPLY_CHAR_WEIGHT:
+    GET_WEIGHT(ch) += mod;
+    break;
+
+  case APPLY_CHAR_HEIGHT:
+    GET_HEIGHT(ch) += mod;
+    break;
+
+  case APPLY_MANA:
+    GET_MAX_MANA(ch) += mod;
+    break;
+
+  case APPLY_HIT:
+    GET_MAX_HIT(ch) += mod;
+    break;
+
+  case APPLY_MOVE:
+    GET_MAX_MOVE(ch) += mod;
+    break;
+
+  case APPLY_GOLD:
+    break;
+
+  case APPLY_EXP:
+    break;
+
+  case APPLY_AC:
+    GET_AC(ch) += mod;
+    break;
+
+  case APPLY_HITROLL:
+    GET_HITROLL(ch) += mod;
+    break;
+
+  case APPLY_DAMROLL:
+    GET_DAMROLL(ch) += mod;
+    break;
+
+  case APPLY_SAVING_PARA:
+    GET_SAVE(ch, SAVING_PARA) += mod;
+    break;
+
+  case APPLY_SAVING_ROD:
+    GET_SAVE(ch, SAVING_ROD) += mod;
+    break;
+
+  case APPLY_SAVING_PETRI:
+    GET_SAVE(ch, SAVING_PETRI) += mod;
+    break;
+
+  case APPLY_SAVING_BREATH:
+    GET_SAVE(ch, SAVING_BREATH) += mod;
+    break;
+
+  case APPLY_SAVING_SPELL:
+    GET_SAVE(ch, SAVING_SPELL) += mod;
+    break;
+
+  default:
+    log("SYSERR: Unknown apply adjust attempt (handler.c, %s).", msg);
+    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");
+}
 
-
-void affect_modify(struct char_data *ch, byte loc, sbyte mod, 
-                   bitvector_t bitv, bool add)
-{
-  if (add)
-    SET_BIT(AFF_FLAGS(ch), bitv);
-  else {
-    REMOVE_BIT(AFF_FLAGS(ch), bitv);
-    mod = -mod;
-  }
-
-  switch (loc) {
-  case APPLY_NONE:
-    break;
-
-  case APPLY_STR:
-    GET_STR(ch) += mod;
-    break;
-  case APPLY_DEX:
-    GET_DEX(ch) += mod;
-    break;
-  case APPLY_INT:
-    GET_INT(ch) += mod;
-    break;
-  case APPLY_WIS:
-    GET_WIS(ch) += mod;
-    break;
-  case APPLY_CON:
-    GET_CON(ch) += mod;
-    break;
-  case APPLY_CHA:
-    GET_CHA(ch) += mod;
-    break;
-
-  case APPLY_CLASS:
-    /* ??? GET_CLASS(ch) += mod; */
-    break;
-
-  /*
-   * My personal thoughts on these two would be to set the person to the
-   * value of the apply.  That way you won't have to worry about people
-   * making +1 level things to be imp (you restrict anything that gives
-   * immortal level of course).  It also makes more sense to set someone
-   * to a class rather than adding to the class number. -gg
-   */
-
-  case APPLY_LEVEL:
-    /* ??? GET_LEVEL(ch) += mod; */
-    break;
-
-  case APPLY_AGE:
-    ch->player.time.birth -= (mod * SECS_PER_MUD_YEAR);
-    break;
-
-  case APPLY_CHAR_WEIGHT:
-    GET_WEIGHT(ch) += mod;
-    break;
-
-  case APPLY_CHAR_HEIGHT:
-    GET_HEIGHT(ch) += mod;
-    break;
-
-  case APPLY_MANA:
-    GET_MAX_MANA(ch) += mod;
-    break;
-
-  case APPLY_HIT:
-    GET_MAX_HIT(ch) += mod;
-    break;
-
-  case APPLY_MOVE:
-    GET_MAX_MOVE(ch) += mod;
-    break;
-
-  case APPLY_GOLD:
-    break;
-
-  case APPLY_EXP:
-    break;
-
-  case APPLY_AC:
-    GET_AC(ch) += mod;
-    break;
-
-  case APPLY_HITROLL:
-    GET_HITROLL(ch) += mod;
-    break;
-
-  case APPLY_DAMROLL:
-    GET_DAMROLL(ch) += mod;
-    break;
-
-  case APPLY_SAVING_PARA:
-    GET_SAVE(ch, SAVING_PARA) += mod;
-    break;
-
-  case APPLY_SAVING_ROD:
-    GET_SAVE(ch, SAVING_ROD) += mod;
-    break;
-
-  case APPLY_SAVING_PETRI:
-    GET_SAVE(ch, SAVING_PETRI) += mod;
-    break;
-
-  case APPLY_SAVING_BREATH:
-    GET_SAVE(ch, SAVING_BREATH) += mod;
-    break;
-
-  case APPLY_SAVING_SPELL:
-    GET_SAVE(ch, SAVING_SPELL) += mod;
-    break;
-
-  default:
-    log("SYSERR: Unknown apply adjust %d attempt (%s, affect_modify).", loc, __FILE__);
-    break;
-
-  } /* switch */
-}
-
-
-
+
 /* This updates a character by subtracting everything he is affected by */
 /* restoring original abilities, and then affecting all again           */
 void affect_total(struct char_data *ch)
@@ -213,7 +231,7 @@
   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_OBJ_AFFECT(GET_EQ(ch, i)), FALSE);
   }
@@ -227,7 +245,7 @@
   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_OBJ_AFFECT(GET_EQ(ch, i)), TRUE);
   }
@@ -423,7 +441,7 @@
 
     /* set flag for crash-save system, but not on mobs! */
     if (!IS_NPC(ch))
-      SET_BIT(PLR_FLAGS(ch), PLR_CRASH);
+      SET_BIT_AR(PLR_FLAGS(ch), PLR_CRASH);
   } else
     log("SYSERR: NULL obj (%p) or char (%p) passed to obj_to_char.", object, ch);
 }
@@ -442,7 +460,7 @@
 
   /* set flag for crash-save system, but not on mobs! */
   if (!IS_NPC(object->carried_by))
-    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)--;
@@ -540,7 +558,7 @@
     log("SYSERR: IN_ROOM(ch) = NOWHERE when equipping char %s.", GET_NAME(ch));
 
   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,
 		  GET_OBJ_AFFECT(obj), TRUE);
 
@@ -576,7 +594,7 @@
   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,
 		  GET_OBJ_AFFECT(obj), FALSE);
 
@@ -688,7 +706,7 @@
     IN_ROOM(object) = 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);
   }
 }
 
@@ -707,7 +725,7 @@
   REMOVE_FROM_LIST(object, world[IN_ROOM(object)].contents, next_content);
 
   if (ROOM_FLAGGED(IN_ROOM(object), ROOM_HOUSE))
-    SET_BIT(ROOM_FLAGS(IN_ROOM(object)), ROOM_HOUSE_CRASH);
+    SET_BIT_AR(ROOM_FLAGS(IN_ROOM(object)), ROOM_HOUSE_CRASH);
   IN_ROOM(object) = NOWHERE;
   object->next_content = NULL;
 }
@@ -961,9 +979,9 @@
 void extract_char(struct char_data *ch)
 {
   if (IS_NPC(ch))
-    SET_BIT(MOB_FLAGS(ch), MOB_NOTDEADYET);
+    SET_BIT_AR(MOB_FLAGS(ch), MOB_NOTDEADYET);
   else
-    SET_BIT(PLR_FLAGS(ch), PLR_NOTDEADYET);
+    SET_BIT_AR(PLR_FLAGS(ch), PLR_NOTDEADYET);
 
   extractions_pending++;
 }
@@ -990,9 +1008,9 @@
     next_vict = vict->next;
 
     if (MOB_FLAGGED(vict, MOB_NOTDEADYET))
-      REMOVE_BIT(MOB_FLAGS(vict), MOB_NOTDEADYET);
+      REMOVE_BIT_AR(MOB_FLAGS(vict), MOB_NOTDEADYET);
     else if (PLR_FLAGGED(vict, PLR_NOTDEADYET))
-      REMOVE_BIT(PLR_FLAGS(vict), PLR_NOTDEADYET);
+      REMOVE_BIT_AR(PLR_FLAGS(vict), PLR_NOTDEADYET);
     else {
       /* Last non-free'd character to continue chain from. */
       prev_vict = vict;
@@ -1259,6 +1277,7 @@
 {
   struct obj_data *obj;
   struct extra_descr_data *new_descr;
+  int y;
   char buf[200];
 
   if (amount <= 0) {
@@ -1299,7 +1318,9 @@
   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 -uN backup/handler.h src/handler.h
--- backup/handler.h	Wed Oct 17 17:18:06 2001
+++ src/handler.h	Fri Jun  7 16:24:58 2002
@@ -10,7 +10,7 @@
 
 /* handling the affected-structures */
 void	affect_total(struct char_data *ch);
-void	affect_modify(struct char_data *ch, byte loc, sbyte mod, bitvector_t bitv, bool add);
+void	affect_modify(struct char_data * ch, byte loc, sbyte mod, long bitv, bool add);
 void	affect_to_char(struct char_data *ch, struct affected_type *af);
 void	affect_remove(struct char_data *ch, struct affected_type *af);
 void	affect_from_char(struct char_data *ch, int type);
diff -uN backup/house.c src/house.c
--- backup/house.c	Thu Jan 31 16:19:40 2002
+++ src/house.c	Fri Jun  7 16:29:00 2002
@@ -143,7 +143,7 @@
   }
   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);
 }
 
 
@@ -276,8 +276,9 @@
 
     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);
   }
 
@@ -415,8 +416,9 @@
 
   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(ch, "House built.  Mazel tov!\r\n");
@@ -441,13 +443,16 @@
   if ((real_atrium = real_room(house_control[i].atrium)) == NOWHERE)
     log("SYSERR: House %d had invalid atrium %d!", atoi(arg), house_control[i].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)) == NOWHERE)
     log("SYSERR: House %d had invalid vnum %d!", atoi(arg), house_control[i].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);
 
   for (j = i; j < num_of_houses - 1; j++)
@@ -465,7 +470,7 @@
    */
   for (i = 0; i < num_of_houses; i++)
     if ((real_atrium = real_room(house_control[i].atrium)) != NOWHERE)
-      SET_BIT(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
+      SET_BIT_AR(ROOM_FLAGS(real_atrium), ROOM_ATRIUM);
 }
 
 
diff -uN backup/interpreter.c src/interpreter.c
--- backup/interpreter.c	Tue Apr  9 05:12:16 2002
+++ src/interpreter.c	Fri Jun  7 16:30:48 2002
@@ -577,7 +577,7 @@
   char *line;
   char arg[MAX_INPUT_LENGTH];
 
-  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);
@@ -1242,8 +1242,9 @@
   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(AFF_FLAGS(d->character), AFF_GROUP);
+  REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_MAILING);
+  REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_WRITING);
+  REMOVE_BIT_AR(AFF_FLAGS(d->character), AFF_GROUP);
   STATE(d) = CON_PLAYING;
 
   switch (mode) {
@@ -1322,9 +1323,10 @@
 	  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(AFF_FLAGS(d->character), AFF_GROUP);
+	  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); 
+	  REMOVE_BIT_AR(AFF_FLAGS(d->character), AFF_GROUP);
 	  write_to_output(d, "Password: ");
 	  echo_off(d);
 	  d->idle_tics = 0;
@@ -1663,7 +1665,7 @@
 	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);
       Crash_delete_file(GET_NAME(d->character));
       write_to_output(d, "Character '%s' deleted!\r\n"
diff -uN backup/magic.c src/magic.c
--- backup/magic.c	Thu Jan 31 16:04:18 2002
+++ src/magic.c	Fri Jun  7 16:31:38 2002
@@ -772,7 +772,7 @@
     char_to_room(mob, IN_ROOM(ch));
     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);
     if (spellnum == SPELL_CLONE) {
       /* Don't mess up the prototype; use new string copies. */
       mob->player.name = strdup(GET_NAME(ch));
@@ -877,13 +877,13 @@
     case SPELL_BLESS:
       if (!OBJ_FLAGGED(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 (!OBJ_FLAGGED(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.";
@@ -891,7 +891,7 @@
       break;
     case SPELL_INVISIBLE:
       if (!OBJ_FLAGGED(obj, ITEM_NOINVIS | ITEM_INVISIBLE)) {
-        SET_BIT(GET_OBJ_EXTRA(obj), ITEM_INVISIBLE);
+        SET_BIT_AR(GET_OBJ_EXTRA(obj), ITEM_INVISIBLE);
         to_char = "$p vanishes.";
       }
       break;
@@ -905,7 +905,7 @@
       break;
     case SPELL_REMOVE_CURSE:
       if (OBJ_FLAGGED(obj, ITEM_NODROP)) {
-        REMOVE_BIT(GET_OBJ_EXTRA(obj), ITEM_NODROP);
+        REMOVE_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 blue.";
diff -uN backup/mail.c src/mail.c
--- backup/mail.c	Tue Apr  9 05:12:16 2002
+++ src/mail.c	Fri Jun  7 16:32:56 2002
@@ -561,7 +561,7 @@
 
   act(buf, FALSE, mailman, 0, ch, TO_VICT);
   GET_GOLD(ch) -= STAMP_PRICE;
-  SET_BIT(PLR_FLAGS(ch), PLR_MAILING);	/* string_write() sets writing. */
+  SET_BIT_AR(PLR_FLAGS(ch), PLR_MAILING);	/* string_write() sets writing. */
 
   /* Start writing! */
   CREATE(mailwrite, char *, 1);
@@ -584,6 +584,7 @@
 {
   char buf[256];
   struct obj_data *obj;
+  int y;
 
   if (!has_mail(GET_IDNUM(ch))) {
     snprintf(buf, sizeof(buf), "$n tells you, 'Sorry, you don't have any mail waiting.'");
@@ -598,7 +599,10 @@
     obj->description = strdup("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 -uN backup/mobact.c src/mobact.c
--- backup/mobact.c	Tue Apr  9 05:12:16 2002
+++ src/mobact.c	Fri Jun  7 16:33:20 2002
@@ -54,7 +54,7 @@
       if (mob_index[GET_MOB_RNUM(ch)].func == NULL) {
 	log("SYSERR: %s (#%d): Attempting to call non-existing mob function.",
 		GET_NAME(ch), GET_MOB_VNUM(ch));
-	REMOVE_BIT(MOB_FLAGS(ch), MOB_SPEC);
+	REMOVE_BIT_AR(MOB_FLAGS(ch), MOB_SPEC);
       } else {
         char actbuf[MAX_INPUT_LENGTH] = "";
 	if ((mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, actbuf))
diff -uN backup/modify.c src/modify.c
--- backup/modify.c	Tue Apr  9 05:12:16 2002
+++ src/modify.c	Fri Jun  7 16:34:42 2002
@@ -93,7 +93,7 @@
 void string_write(struct descriptor_data *d, char **writeto, size_t len, long mailto, void *data)
 {
   if (d->character && !IS_NPC(d->character))
-    SET_BIT(PLR_FLAGS(d->character), PLR_WRITING);
+    SET_BIT_AR(PLR_FLAGS(d->character), PLR_WRITING);
 
   if (data)
     mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: string_write: I don't understand special data.");
@@ -147,7 +147,8 @@
       free(d->str);
       write_to_output(d, "Message sent!\r\n");
       if (!IS_NPC(d->character))
-	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); 
     }
     d->str = NULL;
 
@@ -160,7 +161,7 @@
       STATE(d) = CON_MENU;
     }
     if (STATE(d) == CON_PLAYING && 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");	/* strcat: OK (size checked) */
 }
diff -uN backup/objsave.c src/objsave.c
--- backup/objsave.c	Wed Mar 20 12:30:28 2002
+++ src/objsave.c	Fri Jun  7 16:38:12 2002
@@ -69,7 +69,7 @@
 {
   struct obj_data *obj;
   obj_rnum itemnum;
-  int j;
+  int j, taeller;
 
   *location = 0;
   if ((itemnum = real_object(object.item_number)) == NOTHING)
@@ -83,10 +83,12 @@
   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;
-  GET_OBJ_AFFECT(obj) = 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];
@@ -98,7 +100,7 @@
 
 int Obj_to_store(struct obj_data *obj, FILE *fl, int location)
 {
-  int j;
+  int j, taeller;
   struct obj_file_elem object;
 
   object.item_number = GET_OBJ_VNUM(obj);
@@ -109,10 +111,12 @@
   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 = GET_OBJ_AFFECT(obj);
+  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];
 
@@ -767,7 +771,7 @@
   Crash_restore_weight(ch->carrying);
 
   fclose(fp);
-  REMOVE_BIT(PLR_FLAGS(ch), PLR_CRASH);
+  REMOVE_BIT_AR(PLR_FLAGS(ch), PLR_CRASH);
 }
 
 
@@ -942,7 +946,7 @@
   fclose(fp);
 
   Crash_extract_objs(ch->carrying);
-  SET_BIT(PLR_FLAGS(ch), PLR_CRYO);
+  SET_BIT_AR(PLR_FLAGS(ch), PLR_CRYO);
 }
 
 
@@ -1119,7 +1123,7 @@
 	  FALSE, recep, 0, ch, TO_VICT);
       Crash_cryosave(ch, cost);
       mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s has cryo-rented.", GET_NAME(ch));
-      SET_BIT(PLR_FLAGS(ch), PLR_CRYO);
+      SET_BIT_AR(PLR_FLAGS(ch), PLR_CRYO);
     }
 
     act("$n helps $N into $S private chamber.", FALSE, recep, 0, ch, TO_NOTVICT);
@@ -1154,7 +1158,7 @@
       if (PLR_FLAGGED(d->character, PLR_CRASH)) {
 	Crash_crashsave(d->character);
 	save_char(d->character);
-	REMOVE_BIT(PLR_FLAGS(d->character), PLR_CRASH);
+	REMOVE_BIT_AR(PLR_FLAGS(d->character), PLR_CRASH);
       }
     }
   }
diff -uN backup/spec_procs.c src/spec_procs.c
--- backup/spec_procs.c	Tue Apr  9 05:33:12 2002
+++ src/spec_procs.c	Thu Jun  6 14:18:50 2002
@@ -675,7 +675,7 @@
 
     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) {
       snprintf(buf, sizeof(buf), "%s %s", pet->player.name, pet_name);
diff -uN backup/spells.c src/spells.c
--- backup/spells.c	Thu Jan 31 16:04:18 2002
+++ src/spells.c	Fri Jun  7 16:44:26 2002
@@ -238,7 +238,7 @@
 
     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_SPEC);
+      REMOVE_BIT_AR(MOB_FLAGS(victim), MOB_SPEC);
   }
 }
 
@@ -256,11 +256,10 @@
     send_to_char(ch, "You feel informed:\r\nObject '%s', Item type: %s\r\n", obj->short_description, bitbuf);
 
     if (GET_OBJ_AFFECT(obj)) {
-      sprintbit(GET_OBJ_AFFECT(obj), affected_bits, bitbuf, sizeof(bitbuf));
+      sprintbitarray(GET_OBJ_AFFECT(obj), affected_bits, AF_ARRAY_MAX, bitbuf);
       send_to_char(ch, "Item will give you following abilities:  %s\r\n", bitbuf);
     }
-
-    sprintbit(GET_OBJ_EXTRA(obj), extra_bits, bitbuf, sizeof(bitbuf));
+    sprintbitarray(GET_OBJ_EXTRA(obj), affected_bits, AF_ARRAY_MAX, bitbuf);
     send_to_char(ch, "Item is: %s\r\n", bitbuf);
 
     send_to_char(ch, "Weight: %d, Value: %d, Rent: %d\r\n", GET_OBJ_WEIGHT(obj), GET_OBJ_COST(obj), GET_OBJ_RENT(obj));
@@ -353,7 +352,7 @@
     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);
@@ -362,10 +361,10 @@
   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 -uN backup/structs.h src/structs.h
--- backup/structs.h	Sun Apr 14 09:24:24 2002
+++ src/structs.h	Fri Jun  7 15:26:56 2002
@@ -72,22 +72,22 @@
 
 /* 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 */
@@ -150,96 +150,96 @@
 
 
 /* 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_NOTDEADYET	(1 << 16)  /* (R) Player being extracted.	*/
+#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)	*/
+#define PLR_NOTDEADYET 16  /* (R) Player being extracted.	*/
 
 
 /* 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 auto-attacks everybody nearby	*/
-#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 any evil PC's		*/
-#define MOB_AGGR_GOOD	 (1 << 9)  /* Auto-attack any good PC's		*/
-#define MOB_AGGR_NEUTRAL (1 << 10) /* Auto-attack any 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_NOTDEADYET   (1 << 18) /* (R) Mob being extracted.		*/
+#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 auto-attacks everybody nearby	*/
+#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 any evil PC's		*/
+#define MOB_AGGR_GOOD	 9  /* Auto-attack any good PC's		*/
+#define MOB_AGGR_NEUTRAL 10 /* Auto-attack any 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		*/
+#define MOB_NOTDEADYET   18 /* (R) Mob being extracted.		*/
 
 
 /* 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_BLIND             0	   /* (R) Char is blind		*/
+#define AFF_INVISIBLE         1	   /* Char is invisible		*/
+#define AFF_DETECT_ALIGN      2	   /* Char is sensitive to align*/
+#define AFF_DETECT_INVIS      3	   /* Char can see invis chars  */
+#define AFF_DETECT_MAGIC      4	   /* Char is sensitive to magic*/
+#define AFF_SENSE_LIFE        5	   /* Char can sense hidden life*/
+#define AFF_WATERWALK	      6	   /* Char can walk on water	*/
+#define AFF_SANCTUARY         7	   /* Char protected by sanct.	*/
+#define AFF_GROUP             8	   /* (R) Char is grouped	*/
+#define AFF_CURSE             9	   /* Char is cursed		*/
+#define AFF_INFRAVISION       10	   /* Char can see in dark	*/
+#define AFF_POISON            11	   /* (R) Char is poisoned	*/
+#define AFF_PROTECT_EVIL      12	   /* Char protected from evil  */
+#define AFF_PROTECT_GOOD      13	   /* Char protected from good  */
+#define AFF_SLEEP             14	   /* (R) Char magically asleep	*/
+#define AFF_NOTRACK	          15	   /* Char can't be tracked	*/
+#define AFF_UNUSED16	      16	   /* Room for future expansion	*/
+#define AFF_UNUSED17	      17	   /* Room for future expansion	*/
+#define AFF_SNEAK             18	   /* Char can move quietly	*/
+#define AFF_HIDE              19	   /* Char is hidden		*/
+#define AFF_UNUSED20	      20	   /* Room for future expansion	*/
+#define AFF_CHARM             21   /* Char is charmed		*/
 
 
 /* Modes of connectedness: used by descriptor_data.state */
@@ -317,41 +317,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) */
@@ -438,6 +438,15 @@
 #define RENT_CRYO       3
 #define RENT_FORCED     4
 #define RENT_TIMEDOUT   5
+
+
+/* for the 128bits */
+#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 **********************************************/
@@ -579,13 +588,13 @@
 struct obj_flag_data {
    int	value[4];	/* Values of the item (see list)    */
    byte type_flag;	/* Type of item			    */
-   int /*bitvector_t*/	wear_flags;	/* Where you can wear it	    */
-   int /*bitvector_t*/	extra_flags;	/* If it hums, glows, etc.	    */
+   int  wear_flags[TW_ARRAY_MAX]; /* Where you can wear it	    */
+   int  extra_flags[EF_ARRAY_MAX]; /* If it hums, glows, etc.	    */
    int	weight;		/* Weigt 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_t*/	bitvector;	/* To set chars bits                */
+   int  bitvector[AF_ARRAY_MAX]; /* To set chars bits                */
 };
 
 
@@ -631,10 +640,10 @@
    sh_int location;
 #endif
    int	value[4];
-   int /*bitvector_t*/	extra_flags;
+   int extra_flags[EF_ARRAY_MAX];
    int	weight;
    int	timer;
-   long /*bitvector_t*/	bitvector;
+   int  bitvector[AF_ARRAY_MAX];
    struct obj_affected_type affected[MAX_OBJ_AFFECT];
 };
 
@@ -682,7 +691,7 @@
    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 /*bitvector_t*/ room_flags;		/* DEATH,DARK ... etc */
+   int room_flags[RF_ARRAY_MAX];   /* DEATH,DARK ... etc */
 
    byte light;                  /* Number of lightsources in room     */
    SPECIAL(*func);
@@ -781,10 +790,9 @@
 struct char_special_data_saved {
    int	alignment;		/* +-1000 for alignments                */
    long	idnum;			/* player's idnum; -1 for mobiles	*/
-   long /*bitvector_t*/ 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 /*bitvector_t*/	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)		*/
 };
 
@@ -820,7 +828,7 @@
    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 /*bitvector_t*/	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			*/
 
Common subdirectories: backup/util and src/util
diff -uN backup/utils.c src/utils.c
--- backup/utils.c	Tue Apr  9 06:03:06 2002
+++ src/utils.c	Fri Jun  7 16:41:24 2002
@@ -30,7 +30,6 @@
 struct time_info_data *mud_time_passed(time_t t2, time_t t1);
 void prune_crlf(char *txt);
 
-
 /* creates a random number in interval [from;to] */
 int rand_number(int from, int to)
 {
@@ -456,7 +455,8 @@
   }
 
   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);
 }
 
 
@@ -681,3 +681,34 @@
 
   return (FALSE);
 }
+
+
+void sprintbitarray(int bitvector[], const 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 ");
+}
+
diff -uN backup/utils.h src/utils.h
--- backup/utils.h	Tue Apr  9 04:09:56 2002
+++ src/utils.h	Fri Jun  7 15:35:52 2002
@@ -35,6 +35,7 @@
 int	num_pc_in_room(struct room_data *room);
 void	core_dump_real(const char *, int);
 int	room_is_dark(room_rnum room);
+void sprintbitarray(int bitvector[], const char *names[], int maxar, char *result);
 
 #define core_dump()		core_dump_real(__FILE__, __LINE__)
 
@@ -180,7 +181,14 @@
 
 /* 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))
@@ -212,28 +220,27 @@
  * See http://www.circlemud.org/~greerga/todo/todo.009 to eliminate MOB_ISNPC.
  * IS_MOB() acts as a VALID_MOB_RNUM()-like function.
  */
-#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) && GET_MOB_RNUM(ch) <= top_of_mobt && \
 				GET_MOB_RNUM(ch) != NOBODY)
-
-#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)))
 #define EXIT_FLAGGED(exit, flag) (IS_SET((exit)->exit_info, (flag)))
 #define OBJAFF_FLAGGED(obj, flag) (IS_SET(GET_OBJ_AFFECT(obj), (flag)))
 #define OBJVAL_FLAGGED(obj, flag) (IS_SET(GET_OBJ_VAL((obj), 1), (flag)))
-#define OBJWEAR_FLAGGED(obj, flag) (IS_SET(GET_OBJ_WEAR(obj), (flag)))
-#define OBJ_FLAGGED(obj, flag) (IS_SET(GET_OBJ_EXTRA(obj), (flag)))
+#define OBJWEAR_FLAGGED(obj, flag) (IS_SET_AR(GET_OBJ_WEAR(obj), (flag)))
+#define OBJ_FLAGGED(obj, flag) (IS_SET_AR(GET_OBJ_EXTRA(obj), (flag)))
 #define HAS_SPELL_ROUTINE(spl, flag) (IS_SET(SPELL_ROUTINES(spl), (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 ************************************************************/
 
@@ -386,6 +393,7 @@
 #define GET_OBJ_RENT(obj)	((obj)->obj_flags.cost_per_day)
 #define GET_OBJ_AFFECT(obj)	((obj)->obj_flags.bitvector)
 #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)
@@ -399,7 +407,7 @@
 #define IS_CORPSE(obj)		(GET_OBJ_TYPE(obj) == ITEM_CONTAINER && \
 					GET_OBJ_VAL((obj), 3) == 1)
 
-#define CAN_WEAR(obj, part)	OBJWEAR_FLAGGED((obj), (part))
+#define CAN_WEAR(obj, part) (IS_SET_AR((obj)->obj_flags.wear_flags, (part)))
 
 
 /* compound utilities and other macros **********************************/
