patch_1.01d_to_1.02.gz

patches · 43.1 KB · 2010-03-30

Download   « Back to the patches list

diff -cr tmp/dist/area/help.are dist/area/help.are
*** tmp/dist/area/help.are	Fri Jan 31 04:58:39 1997
--- dist/area/help.are	Thu Feb  6 09:34:42 1997
***************
*** 88,93 ****
--- 88,104 ----
   
  ~
  
+ 1 'ACETUM PRIMUS'~
+ 'Acetum Primus,' is the third and most powerful of the known acid
+ disciplines at the Mage's disposal.  This incantation pulls forth the
+ strongest caustic agents in the casting Mage's neighboring planes,
+ and propels them in a tight cyclone-like blast towards the Mage's
+ chosen victim.  The cross-dimensional disturbance, the physical
+ violence, and the bonescouring potency of the conjured compound all
+ work together to effect an estimable estrapade.
+  
+ ~
+ 
  1 'ACID BLAST' 'BURNING HANDS' 'COLOUR SPRAY' FIREBALL 'LIGHTNING BOLT'
  
  'MAGIC MISSILE' 'SHOCKING GRASP'~
  These are all attack spells and should not be used against another player
***************
*** 643,653 ****
  ~
  
  0 BASH~
! Syntax: bash <mob>
! 
! Bash is a skill which can only be used once a fight has started.  It will 
! temporarily stun your opponent.  It will also cause you to lag about one
! to three rounds.  This skill will inflict damage on the target.
  ~
  
  1 BERSERK~
--- 654,671 ----
  ~
  
  0 BASH~
! Syntax:  bash
!  
! Bash can only be used once a fight has started.  It will inflict damage and
! temporarily daze both yourself and your opponent for approximately two rounds
! during which you cannot heal, flee or perform other extraneous combat actions
! (i.e. you will be able to dodge/parry/attack but nothing else).  These same
! consequences are inflicted on your opponent if it is a player character,
! otherwise the skill only inflicts damage.
!  
! Note that bash has a drastically reduced chance of hitting if the basher is
! not one of the primary targets (i.e. is not tanking).
!  
  ~
  
  1 BERSERK~
***************
*** 694,699 ****
--- 712,740 ----
  See AASSIGN
  ~
  
+ 1 'BLACK FIST'~
+ The spell 'Black Fist' calls from the Ethereal Plane a disembodied clenched
+ fist to pummel the calling Mage's opponents in combat.  The fist may
+ be called once per combat round.
+  
+ ~
+ 
+ 1 'BLACK HAND'~
+ The spell 'Black Hand' calls from the Ethereal Plane a disembodied hand
+ to pummel the calling Mage's opponents in combat.  The hand may be called
+ once per combat round.
+  
+ ~
+ 
+ 1 'BLACK LIGHTNING'~
+ The spell 'Black Lightning' calls from the Ethereal Plane a higly
+ organized spike of the Ethereal analogue to electricity.  This spike
+ orients itself on the calling Mage's main opponent in combat, onto
+ whom it unleashes its awesome destructive power.  The Black Lightning
+ may be called once per combat round.
+  
+ ~
+ 
  0 BLAZEBANE~
  Syntax:  cast 'blazebane' <mob>
  Syntax:  cast 'blazebane' <player>
***************
*** 937,942 ****
--- 978,992 ----
  more damage.
  ~
  
+ 1 'CAUSTIC FOUNT'~
+ The second discipline of acid mastery, 'Caustic Fount' causes a
+ fountain of acid to levitate about the casting Mage's victim, bathing
+ him in a malodorous and painful concoction.  The combination of magical
+ and physical attack gives this spell appreciable effect in combat versus
+ a wide variety of physical types.
+  
+ ~
+ 
  61 CEDIT~
  Syntax:  cedit save
  Syntax:  cedit <command> create [code]
***************
*** 1830,1835 ****
--- 1880,1895 ----
  appear under the 'deadly characters' section of the who list!
  ~
  
+ 1 DISRUPTION~
+ With the spell 'Disruption,' the casting Mage causes his opponent to
+ be enveloped in a weird energy field that momentarily alters the plane
+ which the victim inhabits.  The spell was an early attempt by the Dark
+ Mage Thanatos to cause teleportation, but it was a failed attempt.  
+ Instead of teleporting it causes a horrendous nerve-wracking pain as
+ the victim exits and reenters his current plane of existence.
+  
+ ~
+ 
  57 DMESG~
  Syntax: dmesg
  
***************
*** 2171,2176 ****
--- 2231,2248 ----
  INVENTORY lists your inventory.
  ~
  
+ 1 'ETHEREAL FIST'~
+ 'Ethereal Fist' is an odylic enchantment in which the casting Mage
+ conjures from the ether about himself a solid manifestation of a
+ cubical volume of ether.  As if this weren't great fun in and of
+ itself, the final syllables of the spell cause the fist to 
+ repeatedly and mercilessly pound into a victim of the caster's choice.
+  
+ Fun to cast in a room by yourself, and always a hit at parties,
+ 'Ethereal Fist' is a low-level Mage's best friend.
+  
+ ~
+ 
  0 'ETHEREAL FUNNEL' ETHEREAL FUNNEL~
  This spell increases the damage done to the victim by energy attacks.
  ~
***************
*** 2303,2308 ****
--- 2375,2397 ----
  advantage over you in combat.
  ~
  
+ 1 'EXTRADIMENSIONAL PORTAL'~
+ The Great Wizard Thanatos, after creating his fabled WarMagicks,
+ found himself snubbed and abused in and about The Realms for his
+ researches.  Much time would pass before mages and other classes
+ alike would learn the true power of these spells.
+  
+ In the interim, disguised as an assassin, Thanatos became interested
+ in a more minor problem: that of carrying off the loot he gained
+ from all those he slew with Quantum Spike.  Realising that such a
+ forumla would be easily grasped by his class, he thought to extend
+ it freely.
+  
+ As a final touch to the spell, he thought he would spite those of
+ other classes by inbuing into these containers a quality which made
+ them unobtainable by the other classes.
+ ~
+ 
  1 F~
  .                COMMANDS FOR COMBAT
                  ---------------------
***************
*** 2660,2681 ****
  
  -1 GREETING~
  .
! Kiss your curly locks goodbye, you've entered... the
  
! |////////      /\      |       |///    |         /\      //    /  |///    ///
! |       //    /  \     |       |  //   |        /  \     / // //  |  //  /
! |////////    /    \    |       |   //  |       /    \    /   ///  |   // \
! |       //  /      \   |       |  //   |      /      \   /   //   |  //   \
! |////////  /        \  |_____  |//     |____ /        \  /   //   |//   ///
!                                                                     ____/
! SMAUG v1.01b, written by Thoric (Derek Snider - derek@idirect.com),
!               with help from:  Altrag, Blodkai, Narn, Haus, Scryn,
!                                Swordbearer, Rennard, Tricops and Gorog
!  
! Original MERC 2.1 code by Hatchet, Furey, and Kahn.  Original DikuMUD code by:
! Hans Staerfeldt, Katja Nyboe, Tom Madsen, Michael Seifert & Sebastian Hammer
!  
! The name of your chrome-domed freak?  ~
  
  1 GRIP~
  This skill is automatic, once practiced.  The skill causes you to grip
--- 2749,2772 ----
  
  -1 GREETING~
  .
!          /     _      _            _      _    _____
!         /      |\    /|     /\     |      |   /     \     ***************
!        /       | \  / |    /  \    |      |  |            *   \\._.//   *
!       /        |  \/  |   /    \   |      |  |            *   (0...0)   *
!      /_______  |      |  |______|  |      |  |            *    ).:.(    *
!             /  |      |  |      |  |      |  |            *    {o o}    *
!            /   |      |  |      |  |      |  |     __     *   / ' ' \   *
!           /    |      |  |      |  |      |  |       |    *-'^.VxvxV.^'-*
!          /     |      |  |      |   \____/    \_____/     ***************
!         /      ^^      ^^  ^^      ^^
  
! SMAUG 1.0 written by Thoric (Derek Snider - derek@idirect.com), with help from
!   Altrag, Blodkai, Narn, Haus, Scryn, Swordbearer, Rennard, Tricops and Gorog
! 
!  Original MERC 2.1 code by Hatchet, Furey, and Kahn.  Original DikuMUD code by:
!   Hans Staerfeldt, Katja Nyboe, Tom Madsen, Michael Seifert && Sebastian Hammer
! 
! Enter your character's name, or type new: ~
  
  1 GRIP~
  This skill is automatic, once practiced.  The skill causes you to grip
***************
*** 3662,3667 ****
--- 3753,3768 ----
   
  ~
  
+ 1 'MAGNETIC THRUST'~
+ 'Magnetic Thrust,' much like 'Sonic Resonance,' allows the casting
+ Mage to control the nature of space and time in the immediate locale
+ of his victim.  In this sorcery, the Mage forms a wedge of magnetic
+ energy within the body of the victim.  As the spell progresses, the
+ victims organs are violently rent and internal tissues are torn.  The
+ resulting pain and damage are formidible, indeed.
+  
+ ~
+ 
  0 MAIL~
  Syntax: mail list
  Syntax: mail read    <number>
***************
*** 3899,3904 ****
--- 4000,4013 ----
  OFIND finds all object types with a particular name.
  ~
  
+ 1 'MIDAS TOUCH'~
+ Syntax:  cast 'midas touch' obj
+  
+ [where obj is in your inventory]
+  
+ Turns an object in your inventory into gold.
+ ~
+ 
  53 MINVOKE OINVOKE~
  Syntax:  minvoke <vnum>
           minvoke <keyword of mob>
***************
*** 5282,5287 ****
--- 5391,5409 ----
  integer.
  ~
  
+ 1 'QUANTUM SPIKE'~
+ The 'Quantum Spike' is one of the Sorceror's most awesome attacks.  With
+ this spell, the casting Mage is able to form, within the body of his
+ victim, a sphere of Quantum probability optimized in such a way as to
+ cause the most bizarre contortion of bodily order imaginable.  Organs
+ and tissues are rendered into unrecognizable blobs interconnected in
+ fiendish, unknowable geometries.
+  
+ Obviously, such an attack has astonishing effects on any physical
+ creature, as well as any entity which has an extention into the
+ physical world.
+ ~
+ 
  0 QUEST~
  Syntax: QUEST <message>
  
***************
*** 6364,6369 ****
--- 6486,6500 ----
  not succeed in bad weather).
  ~
  
+ 1 'SONIC RESONANCE'~
+ The magick of 'Sonic Resonance' allows the casting Mage to realign
+ the component particles of his foe in such a way that they are
+ susceptible to a certain mystical tone.  By the completion of the
+ spell, this tone is conjured, causing the particles to vibrate 
+ violently causing intense pain and tissue damage.
+  
+ ~
+ 
  0 SPEAK~
  Syntax: speak
  Syntax: speak <language>
***************
*** 6547,6552 ****
--- 6678,6693 ----
  stun your opponent if successful.
  ~
  
+ 1 'SULFUROUS SPRAY'~
+ With the incantation 'Sulfurous Spray,' the casting mage culls from
+ the air the elements necessary to form a strong acid which rains
+ down upon his opponent or opponents.  This strength and velocity
+ of the spray is such that it can work its way into various forms
+ of armor and clothing, and it is also able to harm opponents one
+ might think resistant to such attacks, due to its magical nature.
+  
+ ~
+ 
  51 SUMMARY~
  |--------------------------------------|--------------------------------------|
  |                MOVEMENT              |                 GROUP                |
***************
*** 6731,6736 ****
--- 6872,6884 ----
  0 TRAIN~
  The TRAIN command is no longer functional; you must keep your assigned 
  attributes and can modify them with objects.
+ ~
+ 
+ 1 TRANCE~
+ Syntax:  trance
+  
+ A character in possession of this skill may use it to briefly focus its
+ energies toward restoring a small burst of mana.
  ~
  
  52 TRANSFER~
diff -cr tmp/dist/doc/contrib.txt dist/doc/contrib.txt
*** tmp/dist/doc/contrib.txt	Mon Jan 13 10:48:39 1997
--- dist/doc/contrib.txt	Thu Feb  6 09:40:27 1997
***************
*** 98,111 ****
  
  Altrag started coding early in 1996.
  
! Has done a lot of major code work including the vnums command, tongues,
! the mposet, mpmset mudprog commands (mpxset.c), rewrote mprog_do_ifcheck
! from a big mess of redundant code into something nice and clean :),
! the screen pager, the configurable prompt code, the reset code (reset.c),
! the command timing/lag detection code, a lot of "safeguard" coding, the
! fancier "echo" command, the new owhere command, corpse saving, hell/unhell
! commands, ban saving and loading, some work on the RIS stuff, some skills
! and spells, as well as the retrans and regoto commands.
  
  -----------------------------------------------------------------------------
  
--- 98,111 ----
  
  Altrag started coding early in 1996.
  
! Has done a lot of major code work including the vnums command, tongues, the
! mposet, mpmset mudprog commands (mpxset.c), rewrote mprog_do_ifcheck from a
! big mess of redundant code into something nice and clean :), the screen
! pager, the configurable prompt code, the inline color codes, the reset code
! (reset.c), the command timing/lag detection code, a lot of "safeguard"
! coding, the fancier "echo" command, the new owhere command, corpse saving,
! hell/unhell commands, ban saving and loading, some work on the RIS stuff,
! some skills and spells, as well as the retrans and regoto commands.
  
  -----------------------------------------------------------------------------
  
Only in tmp/dist/gods: Blodkai
diff -cr tmp/dist/src/Makefile dist/src/Makefile
*** tmp/dist/src/Makefile	Wed Dec 18 10:51:35 1996
--- dist/src/Makefile	Thu Feb  6 09:38:20 1997
***************
*** 6,22 ****
  C_FLAGS = -g3 -Wall $(PROF) $(NOCRYPT) $(DBUGFLG)
  L_FLAGS = $(PROF)
  
! O_FILES = comments.o player.o ibuild.o act_comm.o act_info.o \
! 	  act_move.o act_obj.o act_wiz.o boards.o clans.o comm.o const.o db.o \
! 	  fight.o handler.o interp.o magic.o makeobjs.o misc.o mud_comm.o \
! 	  mud_prog.o mpxset.o requests.o save.o shops.o skills.o special.o track.o \
! 	  update.o mapout.o build.o id.o hashstr.o tables.o reset.o deity.o
  
! C_FILES = comments.c player.c ibuild.c act_comm.c act_info.c \
! 	  act_move.c act_obj.c act_wiz.c boards.c clans.c comm.c const.c db.c \
! 	  fight.c handler.c interp.c magic.c makeobjs.c misc.c mud_comm.c \
! 	  mud_prog.c mpxset.c requests.c save.c shops.c skills.c special.c track.c \
! 	  update.c mapout.c build.c id.c hashstr.c tables.c reset.c deity.c
  
  H_FILES = mud.h bet.h
  
--- 6,24 ----
  C_FLAGS = -g3 -Wall $(PROF) $(NOCRYPT) $(DBUGFLG)
  L_FLAGS = $(PROF)
  
! O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o \
! 	  build.o clans.o comm.o comments.o const.o db.o deity.o fight.o \
! 	  handler.o hashstr.o ibuild.o id.o interp.o magic.o makeobjs.o \
! 	  mapout.o misc.o mpxset.o mud_comm.o mud_prog.o player.o requests.o \
! 	  reset.o save.o shops.o skills.o special.o tables.o track.o update.o \
! 	  grub.o
  
! C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c boards.c \
! 	  build.c clans.c comm.c comments.c const.c db.c deity.c fight.c \
! 	  handler.c hashstr.c ibuild.c id.c interp.c magic.c makeobjs.c \
! 	  mapout.c misc.c mpxset.c mud_comm.c mud_prog.c player.c requests.c \
! 	  reset.c save.c shops.c skills.c special.c tables.c track.c update.c \
! 	  grub.c
  
  H_FILES = mud.h bet.h
  
diff -cr tmp/dist/src/act_comm.c dist/src/act_comm.c
*** tmp/dist/src/act_comm.c	Mon Dec 16 12:43:35 1996
--- dist/src/act_comm.c	Thu Feb  6 09:22:47 1997
***************
*** 986,992 ****
  		char *sbuf = buf;
  		
  		if ( !knows_language( vch, ch->speaking, ch ) &&
! 			 (!IS_NPC(ch) || ch->speaking != 0) )
  			sbuf = scramble(buf, ch->speaking);
  		MOBtrigger = FALSE;
  		act( AT_ACTION, "$n $t", ch, sbuf, vch, (vch == ch ? TO_CHAR : TO_VICT) );
--- 986,992 ----
  		char *sbuf = buf;
  		
  		if ( !knows_language( vch, ch->speaking, ch ) &&
! 			 (!IS_NPC(ch) && ch->speaking != 0) )
  			sbuf = scramble(buf, ch->speaking);
  		MOBtrigger = FALSE;
  		act( AT_ACTION, "$n $t", ch, sbuf, vch, (vch == ch ? TO_CHAR : TO_VICT) );
***************
*** 1375,1380 ****
--- 1375,1397 ----
  	send_to_char( "You must be at least second level to save.\n\r", ch );
  	return;
      }
+ 
+     if ( !IS_SET( ch->affected_by, race_table[ch->race].affected ) )
+ 	SET_BIT( ch->affected_by, race_table[ch->race].affected );
+     if ( !IS_SET( ch->resistant, race_table[ch->race].resist ) )
+ 	SET_BIT( ch->resistant, race_table[ch->race].resist );
+     if ( !IS_SET( ch->susceptible, race_table[ch->race].suscept ) )
+ 	SET_BIT( ch->susceptible, race_table[ch->race].suscept );	   
+ 
+     if ( ch->pcdata->deity )
+     {
+ 	if ( !IS_SET( ch->affected_by, ch->pcdata->deity->affected ) )
+ 	   SET_BIT( ch->affected_by, ch->pcdata->deity->affected );
+ 	if ( !IS_SET( ch->resistant, ch->pcdata->deity->element ) )
+ 	   SET_BIT( ch->resistant, ch->pcdata->deity->element );
+ 	if ( !IS_SET( ch->susceptible, ch->pcdata->deity->suscept ) )
+ 	   SET_BIT( ch->susceptible, ch->pcdata->deity->suscept );
+     }
      save_char_obj( ch );
      saving_char = NULL;
      send_to_char( "Ok.\n\r", ch );
***************
*** 1669,1674 ****
--- 1686,1755 ----
  	    }
  	}
  	return;
+     }
+ 
+     if ( !strcmp( arg, "disband" ))
+     {
+ 	CHAR_DATA *gch;
+ 	int count = 0;
+ 
+ 	if ( ch->leader || ch->master )
+ 	{
+ 	    send_to_char( "You cannot disband a group if you're following someone.\n\r", ch );
+ 	    return;
+ 	}
+ 	
+ 	for ( gch = first_char; gch; gch = gch->next )
+ 	{
+ 	    if ( is_same_group( ch, gch )
+ 	    && ( ch != gch ) )
+ 	    {
+ 		gch->leader = NULL;
+ 		gch->master = NULL;
+ 		count++;
+ 		send_to_char( "Your group is disbanded.\n\r", gch );
+ 	    }
+ 	}
+ 
+ 	if ( count == 0 )
+ 	   send_to_char( "You have no group members to disband.\n\r", ch );
+ 	else
+ 	   send_to_char( "You disband your group.\n\r", ch );
+ 	
+     return;
+     }
+ 
+     if ( !strcmp( arg, "all" ) )
+     {
+ 	CHAR_DATA *rch;
+ 	int count = 0;
+ 
+         for ( rch = ch->in_room->first_person; rch; rch = rch->next_in_room )
+ 	{
+            if ( ch != rch
+            &&   !IS_NPC( rch )
+ 	   &&   can_see( ch, rch )
+ 	   &&   rch->master == ch
+ 	   &&   !ch->master
+ 	   &&   !ch->leader
+     	   &&   abs( ch->level - rch->level ) < 8
+     	   &&   !is_same_group( rch, ch )
+    	   &&   IS_PKILL( ch ) == IS_PKILL( rch )
+ 	      )
+ 	   {
+ 		rch->leader = ch;
+ 		count++;
+ 	   }
+ 	}
+ 	
+ 	if ( count == 0 )
+ 	  send_to_char( "You have no eligible group members.\n\r", ch );
+ 	else
+ 	{
+      	   act( AT_ACTION, "$n groups $s followers.", ch, NULL, victim, TO_ROOM );
+ 	   send_to_char( "You group your followers.\n\r", ch );
+ 	}
+     return;
      }
  
      if ( ( victim = get_char_room( ch, arg ) ) == NULL )
diff -cr tmp/dist/src/act_info.c dist/src/act_info.c
*** tmp/dist/src/act_info.c	Tue Dec 17 01:55:55 1996
--- dist/src/act_info.c	Thu Feb  6 09:22:47 1997
***************
*** 75,80 ****
--- 75,82 ----
      if ( IS_OBJ_STAT(obj, ITEM_HUM)       )   strcat( buf, "(Humming) "   );
      if ( IS_OBJ_STAT(obj, ITEM_HIDDEN)	  )   strcat( buf, "(Hidden) "	  );
      if ( IS_OBJ_STAT(obj, ITEM_BURRIED)	  )   strcat( buf, "(Burried) "	  );
+     if ( IS_IMMORTAL(ch)
+ 	 && IS_OBJ_STAT(obj, ITEM_PROTOTYPE) ) strcat( buf, "(PROTO) "	  );
      if ( IS_AFFECTED(ch, AFF_DETECTTRAPS)
  	 && is_trapped(obj)   )   strcat( buf, "(Trap) "  );
  
***************
*** 452,457 ****
--- 454,461 ----
  						strcat( buf, "(THIEF) "      );
      if ( !IS_NPC(victim) && IS_SET(victim->act, PLR_LITTERBUG  ) )
  						strcat( buf, "(LITTERBUG) "  );
+     if ( IS_NPC(victim) && IS_IMMORTAL(ch)
+ 	 && IS_SET(victim->act, ACT_PROTOTYPE) ) strcat( buf, "(PROTO) " );
      if ( victim->desc && victim->desc->connected == CON_EDITING )
  						strcat( buf, "(Writing) " );
  
***************
*** 691,697 ****
      return door;
  }
  
- 
  void do_look( CHAR_DATA *ch, char *argument )
  {
      char arg  [MAX_INPUT_LENGTH];
--- 695,700 ----
***************
*** 1292,1301 ****
--- 1295,1306 ----
  		send_to_char( "You notice that it is not depressed.\n\r", ch );
  	    break;
  
+ /* Not needed due to check in do_look already
  	case ITEM_PORTAL:
  	    sprintf( buf, "in %s noprog", arg );
  	    do_look( ch, buf );
  	    break;
+ */
  
          case ITEM_CORPSE_PC:
  	case ITEM_CORPSE_NPC:
***************
*** 1664,1670 ****
  	fprintf( fpout, "0 $~\n\n\n#$\n" );
  	fclose( fpout );
  	fpReserve = fopen( NULL_FILE, "r" );
! 	send_to_char( "Saved.\n", ch );
  	return;
      }
      if ( str_cmp( arg1, "remove" ) )
--- 1669,1675 ----
  	fprintf( fpout, "0 $~\n\n\n#$\n" );
  	fclose( fpout );
  	fpReserve = fopen( NULL_FILE, "r" );
! 	send_to_char( "Saved.\n\r", ch );
  	return;
      }
      if ( str_cmp( arg1, "remove" ) )
***************
*** 2508,2514 ****
  	    sprintf( buf, "%d", mob->pIndexData->vnum );
  	    if ( !is_name( buf, skill_table[sn]->teachers ) )
  	    {
! 		act( AT_TELL, "$n tells you 'I no not know how to teach that.'",
  		    mob, NULL, ch, TO_VICT );
  		return;
  	    }
--- 2513,2519 ----
  	    sprintf( buf, "%d", mob->pIndexData->vnum );
  	    if ( !is_name( buf, skill_table[sn]->teachers ) )
  	    {
! 		act( AT_TELL, "$n tells you, 'I know not know how to teach that.'",
  		    mob, NULL, ch, TO_VICT );
  		return;
  	    }
***************
*** 3622,3764 ****
    ch_printf( ch, "Page pausing set to %d lines.\n\r", ch->pcdata->pagerlen );
    return;
  }
- 
- /*
-  * Sorts the arrays "vnums" and "count" based on the order in "count"
-  */
- void zero_sort( int *vnums, int *count, int left, int right )
- {
- int i=left, j=right, swap, test;
- test = count[(left + right) / 2];
- do {
-    while (count[i] > test) i++;
-    while (test > count[j]) j--;
-    if (i <= j) {
-       swap=count[i]; count[i] = count[j]; count[j] = swap;
-       swap=vnums[i]; vnums[i] = vnums[j]; vnums[j] = swap;
-       i++; j--;
-       }
-    }
- while (i <= j);
- if (left < j)  zero_sort (vnums, count, left, j);
- if (i < right) zero_sort (vnums, count, i, right);
- }
- 
- /*
-  * Displays the help screen for the "diagnose" command
-  */
- void diagnose_help (CHAR_DATA *ch)
- {
- send_to_char( "Syntax:\n\r", ch);
- send_to_char( "diagnose of n  -  object frequency top n objects\n\r", ch );
- send_to_char( "diagnose zero  -  count objects with zero weight\n\r", ch );
- send_to_char( "diagnose zero n - list n objects with zero weight\n\r", ch );
- }
- 
- /*
-  * Takes an object vnum and the count of the number of times
-  * that object occurs and decides whether or not to include it in the
-  * frequency table which contains the "top n" frequently occurring objects.
-  */
- 
- void diag_ins (OBJ_INDEX_DATA *p, int siz, OBJ_INDEX_DATA **f, CHAR_DATA *ch)
- {
- int  cou =  0;                             /* temporary counter */
- int  ins = -1;                             /* insert pos in dynamic f array */
- 
- if (!f[siz-1] || p->count>f[siz-1]->count) /* don't bother looping thru f */
-    while ( cou<siz && ins<0 )              /* should this vnum be insertted? */
-       if ( !f[cou++] || p->count > f[cou-1]->count )
-          ins = cou-1;                      /* needs to go into pos "cou" */
- 
- if ( ins>=0 )                              /* if vnum occurs more frequently */
-    {
-    for (cou = siz-1; cou > ins; cou--)     /* open a slot in the table */
-        f[cou] = f[cou-1];
-    f[ins] = p;                             /* insert pointer in empty slot */
-    }
- }
- 
- /*
-  * The "diagnose" command is designed to be expandable and take different
-  * parameters to handle different diagnostic routines.
-  * The only parameter it takes at present is "of" (object frequencies).
-  */
- 
- void do_diagnose( CHAR_DATA *ch, char *argument )
- {
- #define   DIAG_MAX_SIZE  1000
- extern    OBJ_INDEX_DATA *obj_index_hash[MAX_KEY_HASH];
- OBJ_INDEX_DATA *pObj;
- OBJ_INDEX_DATA **freq;                        /* dynamic array of pointers */
- char arg1 [MAX_INPUT_LENGTH];
- char arg2 [MAX_INPUT_LENGTH];
- int   num = 20;                               /* display lines requested */
- int   cou;
- 
- argument = one_argument( argument, arg1 );
- argument = one_argument( argument, arg2 );
- if (!*arg1) {                                 /* empty arg gets help screen */
-    diagnose_help(ch);
-    return;
-    }
- if (!str_cmp(arg1, "of")) {
-    if (*arg2)                                    /* empty arg gets dft number */
-       num = atoi (arg2);
-    if (num > DIAG_MAX_SIZE  || num < 1) {        /* display num out of bounds */
-       diagnose_help(ch);
-       return;
-       }
-    CREATE(freq, OBJ_INDEX_DATA *, num);           /* dynamic freq array */
-    for (cou = 0; cou < num; cou++)                /* initialize freq array */
-        freq[cou] = NULL;                          /* to NULL pointers */
-    for (cou = 0; cou < MAX_KEY_HASH; cou++) {     /* loop thru obj_index_hash */
-        if ( obj_index_hash[cou] )                 /* safety check */
-           for (pObj=obj_index_hash[cou];          /* loop thru all pObjInd */
-                pObj; pObj=pObj->next)
-                diag_ins (pObj, num, freq, ch);    /* insert pointer into list */
-        }
-    ch_printf (ch, "\n\rObject Frequencies\n\r");  /* send results to char */
-    for (cou = 0; cou < num && freq[cou]; cou++)
-        ch_printf(ch, "%3d%8d%8d\n\r", cou+1,freq[cou]->vnum,freq[cou]->count);
-    DISPOSE(freq);
-    return;
-    }
- if (!str_cmp(arg1, "zero"))
-    {
-    #define ZERO_MAX   1500
-    int vnums[ZERO_MAX];
-    int count[ZERO_MAX];
-    int zero_obj_ind = 0;                        /* num of obj_ind's with 0 wt */
-    int zero_obj     = 0;                        /* num of objs with 0 wt */
-    int zero_num     = -1;                       /* num of lines requested */
- 
-    if (*arg2)
-       zero_num = atoi (arg2);
-    for (cou = 0; cou < MAX_KEY_HASH; cou++)     /* loop thru obj_index_hash */
-        if ( obj_index_hash[cou] )
-           for (pObj=obj_index_hash[cou]; pObj; pObj=pObj->next)
-               if (pObj->weight == 0) {
-                  zero_obj_ind++;
-                  zero_obj += pObj->count;
-                  if (zero_obj_ind <= ZERO_MAX) {
-                     vnums[zero_obj_ind - 1] = pObj->vnum;
-                     count[zero_obj_ind - 1] = pObj->count;
-                     }
-                  }
-    if (zero_num > 0) {
-       zero_sort (vnums, count, 0, zero_obj_ind - 1);
-       zero_num = UMIN (zero_num, ZERO_MAX);
-       zero_num = UMIN (zero_num, zero_obj_ind);
-       for (cou=0; cou<zero_num; cou++)
-           ch_printf (ch, "%6d %6d %6d\n\r",
-                      cou+1, vnums[cou], count[cou]);
-       }
-    ch_printf (ch, "%6d %6d\n\r", zero_obj_ind, zero_obj);
-    return;
-    }
- diagnose_help( ch );
- }
- 
- 
- 
--- 3627,3629 ----
diff -cr tmp/dist/src/act_obj.c dist/src/act_obj.c
*** tmp/dist/src/act_obj.c	Mon Dec 16 12:43:35 1996
--- dist/src/act_obj.c	Thu Feb  6 09:22:47 1997
***************
*** 269,275 ****
  		if ( fAll )
  		  send_to_char( "I see nothing here.\n\r", ch );
  		else
! 		  act( AT_PLAIN, "I see no $T here.", ch, NULL, &arg1[4], TO_CHAR );
  	    }
  	    else
  	    if ( IS_SET( sysdata.save_flags, SV_GET ) )
--- 269,275 ----
  		if ( fAll )
  		  send_to_char( "I see nothing here.\n\r", ch );
  		else
! 		  act( AT_PLAIN, "I see no $T here.", ch, NULL, chk, TO_CHAR );
  	    }
  	    else
  	    if ( IS_SET( sysdata.save_flags, SV_GET ) )
***************
*** 1857,1865 ****
  
      if ( arg[0] == '\0' || !str_cmp( arg, ch->name ) )
      {
! 	act( AT_ACTION, "$n offers $mself to Thoric, who graciously declines.",
  	    ch, NULL, NULL, TO_ROOM );
! 	send_to_char( "Thoric appreciates your offer and may accept it later.", ch );
  	return;
      }
  
--- 1857,1865 ----
  
      if ( arg[0] == '\0' || !str_cmp( arg, ch->name ) )
      {
! 	act( AT_ACTION, "$n offers $mself to $s deity, who graciously declines.",
  	    ch, NULL, NULL, TO_ROOM );
! 	send_to_char( "Your deity appreciates your offer and may accept it later.", ch );
  	return;
      }
  
***************
*** 1912,1921 ****
      extract_obj( obj );
      return;
  }
- 
- 
- 
- 
  
  void do_brandish( CHAR_DATA *ch, char *argument )
  {
--- 1912,1917 ----
diff -cr tmp/dist/src/act_wiz.c dist/src/act_wiz.c
*** tmp/dist/src/act_wiz.c	Wed Dec 18 15:19:08 1996
--- dist/src/act_wiz.c	Thu Feb  6 09:22:47 1997
***************
*** 19,26 ****
  #include <time.h>
  #include <unistd.h>
  #include <ctype.h>
- #include <sys/stat.h>
  #include <sys/types.h>
  #include <errno.h>
  #include "mud.h"
  
--- 19,26 ----
  #include <time.h>
  #include <unistd.h>
  #include <ctype.h>
  #include <sys/types.h>
+ #include <sys/stat.h>
  #include <errno.h>
  #include "mud.h"
  
***************
*** 1283,1293 ****
          victim->leader      ? victim->leader->name   : "(none)" );
      if ( !IS_NPC(victim) )
  	ch_printf( ch,
! 	    "Thirst: %d   Full: %d   Drunk: %d     Favor: %d\n\r",
  	    victim->pcdata->condition[COND_THIRST],
  	    victim->pcdata->condition[COND_FULL],
  	    victim->pcdata->condition[COND_DRUNK],
! 	    victim->pcdata->favor );
      else
  	ch_printf( ch, "Hit dice: %dd%d+%d.  Damage dice: %dd%d+%d.\n\r",
  		victim->pIndexData->hitnodice,
--- 1283,1295 ----
          victim->leader      ? victim->leader->name   : "(none)" );
      if ( !IS_NPC(victim) )
  	ch_printf( ch,
! 	    "Thirst: %d   Full: %d   Drunk: %d     Favor: %d    Glory: %d/%d\n\r",
  	    victim->pcdata->condition[COND_THIRST],
  	    victim->pcdata->condition[COND_FULL],
  	    victim->pcdata->condition[COND_DRUNK],
! 	    victim->pcdata->favor,
! 	    victim->pcdata->quest_curr,
! 	    victim->pcdata->quest_accum );
      else
  	ch_printf( ch, "Hit dice: %dd%d+%d.  Damage dice: %dd%d+%d.\n\r",
  		victim->pIndexData->hitnodice,
***************
*** 1997,2010 ****
  
      if ( get_trust(ch) < LEVEL_DEMI )
      {
  	if ( IS_NPC(ch) )
  	{
  	  send_to_char( "Huh?\n\r", ch );
  	  return;
  	}
! 	
! 	if ( vnum < ch->pcdata->m_range_lo
! 	||   vnum > ch->pcdata->m_range_hi )
  	{
  	  send_to_char( "That number is not in your allocated range.\n\r", ch );
  	  return;
--- 1999,2019 ----
  
      if ( get_trust(ch) < LEVEL_DEMI )
      {
+ 	AREA_DATA *pArea;
+ 
  	if ( IS_NPC(ch) )
  	{
  	  send_to_char( "Huh?\n\r", ch );
  	  return;
  	}
! 
! 	if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	{
! 	  send_to_char( "You must have an assigned area to invoke this mobile.\n\r", ch );
! 	  return;
! 	}
! 	if ( vnum < pArea->low_m_vnum
! 	&&   vnum > pArea->hi_m_vnum )
  	{
  	  send_to_char( "That number is not in your allocated range.\n\r", ch );
  	  return;
***************
*** 2100,2113 ****
  
      if ( get_trust(ch) < LEVEL_DEMI )
      {
  	if ( IS_NPC(ch) )
  	{
  	  send_to_char( "Huh?\n\r", ch );
  	  return;
  	}
  	
! 	if ( vnum < ch->pcdata->o_range_lo
! 	||   vnum > ch->pcdata->o_range_hi )
  	{
  	  send_to_char( "That number is not in your allocated range.\n\r", ch );
  	  return;
--- 2109,2129 ----
  
      if ( get_trust(ch) < LEVEL_DEMI )
      {
+ 	AREA_DATA *pArea;
+ 
  	if ( IS_NPC(ch) )
  	{
  	  send_to_char( "Huh?\n\r", ch );
  	  return;
  	}
  	
! 	if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	{
! 	  send_to_char( "You must have an assigned area to invoke this object.\n\r", ch );
! 	  return;
! 	}
! 	if ( vnum < pArea->low_o_vnum
! 	&&   vnum > pArea->hi_o_vnum )
  	{
  	  send_to_char( "That number is not in your allocated range.\n\r", ch );
  	  return;
***************
*** 2280,2286 ****
--- 2296,2304 ----
  {
      char arg[MAX_INPUT_LENGTH];
      char buf[MAX_STRING_LENGTH];
+     char buf2[MAX_STRING_LENGTH];
      CHAR_DATA *victim;
+     AREA_DATA *pArea;   
      int sn;
  
      argument = one_argument( argument, arg );
***************
*** 2328,2333 ****
--- 2346,2390 ----
  	victim->hit      = victim->max_hit;
  	victim->mana     = victim->max_mana;
  	victim->move     = victim->max_move;
+ 
+ 
+     sprintf( buf, "%s%s", GOD_DIR, capitalize(victim->name) );  
+  
+     if ( !remove( buf ) )
+       send_to_char( "Player's immortal data destroyed.\n\r", ch );
+     else if ( errno != ENOENT )
+     {
+       ch_printf( ch, "Unknown error #%d - %s (immortal data).  Report to 
+ Thoric\n\r",
+               errno, strerror( errno ) );
+       sprintf( buf2, "%s balzhuring %s", ch->name, buf );
+       perror( buf2 );
+     }
+     sprintf( buf2, "%s.are", capitalize(arg) );
+     for ( pArea = first_build; pArea; pArea = pArea->next )
+       if ( !strcmp( pArea->filename, buf2 ) )
+       {
+         sprintf( buf, "%s%s", BUILD_DIR, buf2 );
+         if ( IS_SET( pArea->status, AREA_LOADED ) )
+           fold_area( pArea, buf, FALSE );
+         close_area( pArea );
+         sprintf( buf2, "%s.bak", buf );
+         set_char_color( AT_RED, ch ); /* Log message changes colors */
+         if ( !rename( buf, buf2 ) )
+           send_to_char( "Player's area data destroyed.  Area saved as 
+ backup.\n\r", ch);
+         else if ( errno != ENOENT )
+         {
+           ch_printf( ch, "Unknown error #%d - %s (area data).  Report to 
+ Thoric.\n\r",
+                   errno, strerror( errno ) );
+           sprintf( buf2, "%s destroying %s", ch->name, buf );
+           perror( buf2 );   
+         }
+       }
+  
+  
+         make_wizlist();
  	advance_level( victim );
  	do_help(victim, "M_BALZHUR_" );
  	set_char_color( AT_WHITE, victim );
***************
*** 2991,2996 ****
--- 3048,3104 ----
  }
  
  
+ void do_notitle( CHAR_DATA *ch, char *argument )
+ {
+     char buf[MAX_STRING_LENGTH];
+     char arg[MAX_INPUT_LENGTH];
+     CHAR_DATA *victim;
+  
+     one_argument( argument, arg );
+ 
+     if ( arg[0] == '\0' )
+     {
+         send_to_char( "Notitle whom?\n\r", ch );
+         return;
+     }
+ 
+     if ( ( victim = get_char_world( ch, arg ) ) == NULL )
+     {
+         send_to_char( "They aren't here.\n\r", ch );
+         return;
+     }
+   
+     if ( IS_NPC(victim) )
+     {
+         send_to_char( "Not on NPC's.\n\r", ch );
+         return;
+     }
+     
+     if ( get_trust( victim ) >= get_trust( ch ) )
+     {
+         send_to_char( "You failed.\n\r", ch );
+         return;
+     }
+     
+     if ( IS_SET(victim->pcdata->flags, PCFLAG_NOTITLE) )
+     {
+         REMOVE_BIT(victim->pcdata->flags, PCFLAG_NOTITLE);
+         send_to_char( "You can set your own title again.\n\r", victim );
+         send_to_char( "NOTITLE removed.\n\r", ch );
+     }
+     else
+     {
+         SET_BIT(victim->pcdata->flags, PCFLAG_NOTITLE);
+         sprintf( buf, "the %s",
+                 title_table [victim->class] [victim->level]
+                 [victim->sex == SEX_FEMALE ? 1 : 0] );
+         set_title( victim, buf );   
+         send_to_char( "You can't set your own title!\n\r", victim );
+         send_to_char( "NOTITLE set.\n\r", ch );
+     }
+     
+     return;
+ }
  
  void do_silence( CHAR_DATA *ch, char *argument )
  {
***************
*** 3046,3052 ****
  
      if ( arg[0] == '\0' )
      {
! 	send_to_char( "Silence whom?", ch );
  	return;
      }
  
--- 3154,3160 ----
  
      if ( arg[0] == '\0' )
      {
! 	send_to_char( "Unsilence whom?\n\r", ch );
  	return;
      }
  
***************
*** 3890,3895 ****
--- 3998,4132 ----
      return;
  }
  
+ /*
+  * Extract area names from "input" string and place result in "output" string
+  * e.g. "aset joe.are sedit susan.are cset" --> "joe.are susan.are"
+  * - Gorog
+  */
+ void extract_area_names (char *inp, char *out)
+ {
+ char buf[MAX_INPUT_LENGTH], *pbuf=buf;
+ int  len;
+ 
+ *out='\0';
+ while (inp && *inp)
+    {
+    inp = one_argument(inp, buf);
+    if ( (len=strlen(buf)) >= 5 && !strcmp(".are", pbuf+len-4) )
+        {
+        if (*out) strcat (out, " ");
+        strcat (out, buf);
+        }
+    }
+ }
+ 
+ /*
+  * Remove area names from "input" string and place result in "output" string
+  * e.g. "aset joe.are sedit susan.are cset" --> "aset sedit cset"
+  * - Gorog
+  */
+ void remove_area_names (char *inp, char *out)
+ {
+ char buf[MAX_INPUT_LENGTH], *pbuf=buf;
+ int  len;
+ 
+ *out='\0';
+ while (inp && *inp)
+    {
+    inp = one_argument(inp, buf);
+    if ( (len=strlen(buf)) < 5 || strcmp(".are", pbuf+len-4) )
+        {
+        if (*out) strcat (out, " ");
+        strcat (out, buf);
+        }
+    }
+ }
+ 
+ /*
+  * Allows members of the Area Council to add Area names to the bestow field.
+  * Area names mus end with ".are" so that no commands can be bestowed.
+  */
+ void do_bestowarea( CHAR_DATA *ch, char *argument )
+ {
+     char arg[MAX_INPUT_LENGTH];
+     char buf[MAX_STRING_LENGTH];
+     CHAR_DATA *victim;
+     int  arg_len;
+ 
+     argument = one_argument( argument, arg );
+ 
+     if ( str_cmp( ch->pcdata->council_name, "Area Council" )
+     &&   get_trust (ch) < LEVEL_SUB_IMPLEM )
+        {
+        send_to_char( "Sorry. You are not on the Area Council.\n\r", ch );
+        return;
+        }
+ 
+     if ( !*arg )
+         {
+         send_to_char(
+         "Syntax:\n\r"
+         "bestowarea <victim> <filename>.are\n\r"
+         "bestowarea <victim> none             removes bestowed areas\n\r"
+         "bestowarea <victim> list             lists bestowed areas\n\r"
+         "bestowarea <victim>                  lists bestowed areas\n\r", ch);
+         return;
+         }
+ 
+     if ( !(victim = get_char_world( ch, arg )) )
+         {
+         send_to_char( "They aren't here.\n\r", ch );
+         return;
+         }
+ 
+     if ( IS_NPC( victim ) )
+         {
+         send_to_char( "You can't give special abilities to a mob!\n\r", ch );
+         return;
+         }
+ 
+     if ( get_trust(victim) < LEVEL_IMMORTAL )
+         {
+         send_to_char( "They aren't an immortal.\n\r", ch );
+         return;
+         }
+ 
+     if (!victim->pcdata->bestowments)
+        victim->pcdata->bestowments = str_dup("");
+ 
+     if ( !*argument || !str_cmp (argument, "list") )
+        {
+        extract_area_names (victim->pcdata->bestowments, buf);
+        ch_printf( ch, "Bestowed areas: %s\n\r", buf);
+        return;
+        }
+ 
+     if ( !str_cmp (argument, "none") )
+        {
+        remove_area_names (victim->pcdata->bestowments, buf);
+        DISPOSE( victim->pcdata->bestowments );
+        victim->pcdata->bestowments = str_dup( buf );
+        send_to_char( "Done.\n\r", ch);
+        return;
+        }
+ 
+     arg_len = strlen(argument);
+     if ( arg_len < 5 
+     || argument[arg_len-4] != '.' || argument[arg_len-3] != 'a'
+     || argument[arg_len-2] != 'r' || argument[arg_len-1] != 'e' )
+     {
+         send_to_char( "You can only bestow an area name\n\r", ch );
+         send_to_char( "E.G. bestow joe sam.are\n\r", ch );
+         return;
+     }
+ 
+     sprintf( buf, "%s %s", victim->pcdata->bestowments, argument );
+     DISPOSE( victim->pcdata->bestowments );
+     victim->pcdata->bestowments = str_dup( buf );
+     ch_printf( victim, "%s has bestowed on you the area: %s\n\r", 
+              ch->name, argument );
+     send_to_char( "Done.\n\r", ch );
+ }
  
  void do_bestow( CHAR_DATA *ch, char *argument )
  {
***************
*** 3917,3923 ****
  	return;
      }
  
!     if ( get_trust( victim ) >= get_trust( ch ) )
      {
  	send_to_char( "You aren't powerful enough...\n\r", ch );
  	return;
--- 4154,4160 ----
  	return;
      }
  
!     if ( get_trust( victim ) > get_trust( ch ) )
      {
  	send_to_char( "You aren't powerful enough...\n\r", ch );
  	return;
***************
*** 4040,4046 ****
        new_boot_time = update_time(now_time);
        new_boot_struct = *new_boot_time;
        new_boot_time = &new_boot_struct;
!       reboot_check("reset");
        get_reboot_string();
  
        ch_printf(ch, "Boot time set to %s\n\r", reboot_time);
--- 4277,4283 ----
        new_boot_time = update_time(now_time);
        new_boot_struct = *new_boot_time;
        new_boot_time = &new_boot_struct;
!       reboot_check(mktime(new_boot_time));
        get_reboot_string();
  
        ch_printf(ch, "Boot time set to %s\n\r", reboot_time);
***************
*** 5005,5016 ****
            ctime(&victim->pcdata->release_date));
    act(AT_MAGIC, "$n disappears in a cloud of hellish light.", victim, NULL, ch, TO_NOTVICT);
    char_from_room(victim);
!   char_to_room(victim, get_room_index(6));
    act(AT_MAGIC, "$n appears in a could of hellish light.", victim, NULL, ch, TO_NOTVICT);
    do_look(victim, "auto");
    ch_printf(victim, "The immortals are not pleased with your actions.\n\r"
            "You shall remain in hell for %d %s%s.\n\r", time,
!           (h_d ? "hour" : "day"), (time == 1 ? "s" : ""));
    save_char_obj(victim);	/* used to save ch, fixed by Thoric 09/17/96 */
    return;
  }
--- 5242,5253 ----
            ctime(&victim->pcdata->release_date));
    act(AT_MAGIC, "$n disappears in a cloud of hellish light.", victim, NULL, ch, TO_NOTVICT);
    char_from_room(victim);
!   char_to_room(victim, get_room_index(8));
    act(AT_MAGIC, "$n appears in a could of hellish light.", victim, NULL, ch, TO_NOTVICT);
    do_look(victim, "auto");
    ch_printf(victim, "The immortals are not pleased with your actions.\n\r"
            "You shall remain in hell for %d %s%s.\n\r", time,
!           (h_d ? "hour" : "day"), (time == 1 ? "" : "s"));
    save_char_obj(victim);	/* used to save ch, fixed by Thoric 09/17/96 */
    return;
  }
***************
*** 5028,5037 ****
      return;
    }
    location = ch->in_room;
!   ch->in_room = get_room_index(6);
    victim = get_char_room(ch, arg);
    ch->in_room = location;            /* The case of unhell self, etc. */
!   if ( !victim || IS_NPC(victim) || victim->in_room->vnum != 6 )
    {
      send_to_char( "No one like that is in hell.\n\r", ch );
      return;
--- 5265,5274 ----
      return;
    }
    location = ch->in_room;
!   ch->in_room = get_room_index(8);
    victim = get_char_room(ch, arg);
    ch->in_room = location;            /* The case of unhell self, etc. */
!   if ( !victim || IS_NPC(victim) || victim->in_room->vnum != 8 )
    {
      send_to_char( "No one like that is in hell.\n\r", ch );
      return;
***************
*** 5973,5976 ****
--- 6210,6297 ----
  	title_table[cl][x-1][1] = str_dup( argument );
      }
      do_setclass( ch, "" );
+ }
+ 
+ /*
+  * quest point set - TRI
+  * syntax is: qpset char give/take amount
+  */
+ 
+ void do_qpset( CHAR_DATA *ch, char *argument )
+ {
+   char arg[MAX_INPUT_LENGTH];
+   char arg2[MAX_INPUT_LENGTH];
+   char arg3[MAX_INPUT_LENGTH];
+   CHAR_DATA *victim;
+   int amount;
+   bool give = TRUE;
+ 
+   if ( IS_NPC(ch) )
+   {
+     send_to_char( "Cannot qpset as an NPC.\n\r", ch );
+     return;
+   }
+ 
+   if ( get_trust( ch ) < LEVEL_IMMORTAL ) 
+   {
+     send_to_char( "Huh?\n\r", ch );
+     return;
+   }
+  else if ( str_cmp( ch->pcdata->council_name, "Quest Council" ) 
+ 	&& ( get_trust( ch ) < LEVEL_DEMI ) )
+   {
+     send_to_char( "You must be a member of Quest Council to give or remove qp from players.\n\r", ch );
+     return;
+   }
+ 
+   set_char_color( AT_LOG, ch );  
+   argument = one_argument( argument, arg );
+   argument = one_argument( argument, arg2 );
+   argument = one_argument( argument, arg3 );
+   amount = atoi( arg3 );
+ 
+   if ( arg[0] == '\0' || arg2[0] == '\0' || amount <= 0 )
+   {
+     send_to_char( "Syntax: qpset <character> <give/take> <amount>\n\r", ch );
+     send_to_char( "Amount must be a positive number greater than 0.\n\r", ch );
+     return;
+   }
+ 
+   if ( ( victim = get_char_world( ch, arg ) ) == NULL )
+   {
+     send_to_char( "There is no such player currently playing.\n\r", ch );
+     return;
+   }
+ 
+   if ( IS_NPC( victim ) )
+   {
+     send_to_char( "Glory cannot be given to or taken from a "
+ 	"mob.\n\r", ch );
+     return;
+   }
+ 
+   if ( nifty_is_name_prefix( arg2, "give" ) )
+     give = TRUE;
+    else if ( nifty_is_name_prefix( arg2, "take" ) )
+     give = FALSE;
+    else
+     {
+       do_qpset( ch, "" );
+       return;
+     }
+ 
+   if ( give )
+   {
+     victim->pcdata->quest_curr += amount;
+     victim->pcdata->quest_accum += amount;
+     ch_printf( victim, "Your glory has been increased by %d.\n\r", amount );
+   }
+  else
+   {
+     victim->pcdata->quest_curr -= amount;
+     ch_printf( victim, "Your glory has been decreased by %d.\n\r", amount );
+   }
+ 
+   send_to_char( "Ok.\n\r", ch );
+   return;
  }
diff -cr tmp/dist/src/boards.c dist/src/boards.c
*** tmp/dist/src/boards.c	Mon Dec 16 12:43:35 1996
--- dist/src/boards.c	Thu Feb  6 09:22:47 1997
***************
*** 38,43 ****
--- 38,57 ----
  
  
  
+ bool can_remove( CHAR_DATA *ch, BOARD_DATA *board )
+ {
+   /* If your trust is high enough, you can remove it. */
+   if ( get_trust( ch ) >= board->min_remove_level )
+     return TRUE;
+   
+   if ( board->extra_removers[0] != '\0' )
+   {
+     if ( is_name( ch->name, board->extra_removers ) )
+       return TRUE;
+   }
+   return FALSE;
+ }
+  
  bool can_read( CHAR_DATA *ch, BOARD_DATA *board )
  {
    /* If your trust is high enough, you can read it. */
***************
*** 107,112 ****
--- 121,128 ----
  	fprintf( fpout, "Read_group        %s~\n", tboard->read_group       );
  	fprintf( fpout, "Post_group        %s~\n", tboard->post_group       );
  	fprintf( fpout, "Extra_readers     %s~\n", tboard->extra_readers    );
+         fprintf( fpout, "Extra_removers    %s~\n", tboard->extra_removers    );
+ 
  	fprintf( fpout, "End\n" );
      }
      fclose( fpout );
***************
*** 1026,1032 ****
  	    else if (!IS_MAIL)
                 vnum++;
  	    if ( ( is_note_to( ch, pnote )
! 	    ||	   board->min_remove_level <= get_trust( ch ) )
  	    &&   ( vnum == anum ) )
  	    {
  		if ( (is_name("all", pnote->to_list))
--- 1042,1048 ----
  	    else if (!IS_MAIL)
                 vnum++;
  	    if ( ( is_note_to( ch, pnote )
! 	    ||	    can_remove (ch, board)) 
  	    &&   ( vnum == anum ) )
  	    {
  		if ( (is_name("all", pnote->to_list))
***************
*** 1169,1174 ****
--- 1185,1191 ----
  	    break;
  	case 'E':
  	    KEY( "Extra_readers",	board->extra_readers,	fread_string_nohash( fp ) );
+             KEY( "Extra_removers",       board->extra_removers,   fread_string_nohash( fp ) );
              if ( !str_cmp( word, "End" ) )  
              {
   	      board->num_posts	= 0;
***************
*** 1182,1187 ****
--- 1199,1206 ----
                  board->post_group    = str_dup( "" );
                if ( !board->extra_readers )
                  board->extra_readers = str_dup( "" );
+               if ( !board->extra_removers )
+                 board->extra_removers = str_dup( "" );
                return board;
              }
  	case 'F':
***************
*** 1341,1346 ****
--- 1360,1366 ----
      board->read_group      = str_dup( "" );
      board->post_group      = str_dup( "" );
      board->extra_readers   = str_dup( "" );
+     board->extra_removers  = str_dup( "" );
  }
  
  void do_bset( CHAR_DATA *ch, char *argument )
***************
*** 1360,1366 ****
  	send_to_char( "Usage: bset <board filename> <field> value\n\r", ch );
  	send_to_char( "\n\rField being one of:\n\r", ch );
  	send_to_char( "  vnum read post remove maxpost filename type\n\r", ch );
! 	send_to_char( "  read_group post_group extra_readers\n\r", ch );
  	return;
      }
  
--- 1380,1386 ----
  	send_to_char( "Usage: bset <board filename> <field> value\n\r", ch );
  	send_to_char( "\n\rField being one of:\n\r", ch );
  	send_to_char( "  vnum read post remove maxpost filename type\n\r", ch );
! 	send_to_char( "  read_group post_group extra_readers extra_removers\n\r", ch );
  	return;
      }
  
***************
*** 1438,1443 ****
--- 1458,1481 ----
  	return;
      }
  
+    if ( !str_cmp( arg2, "extra_removers" ) )
+     {
+         if ( !argument || argument[0] == '\0' )
+         {   
+             send_to_char( "No names specified.\n\r", ch );
+             return;
+         }
+         if ( !str_cmp( argument, "none" ) )
+             buf[0] = '\0';
+         else
+             sprintf( buf, "%s %s", board->extra_removers, argument );
+         DISPOSE( board->extra_removers );
+         board->extra_removers = str_dup( buf ); 
+         write_boards_txt( );
+         send_to_char( "Done.\n\r", ch );
+         return;
+     }
+  
      if ( !str_cmp( arg2, "extra_readers" ) )
      {
  	if ( !argument || argument[0] == '\0' )
diff -cr tmp/dist/src/build.c dist/src/build.c
*** tmp/dist/src/build.c	Mon Dec 16 12:43:36 1996
--- dist/src/build.c	Thu Feb  6 09:22:47 1997
***************
*** 19,24 ****
--- 19,25 ----
  #include <stdio.h>
  #include <string.h>
  #include <time.h>
+ #include <unistd.h>
  #include "mud.h"
  
  
***************
*** 121,127 ****
  char *	const	pc_flags [] =
  {
  "r1", "deadly", "unauthed", "norecall", "nointro", "gag", "retired", "guest",
! "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13",
  "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24",
  "r25"
  };
--- 122,128 ----
  char *	const	pc_flags [] =
  {
  "r1", "deadly", "unauthed", "norecall", "nointro", "gag", "retired", "guest",
! "r2", "r3", "notitled", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13",
  "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24",
  "r25"
  };
***************
*** 237,245 ****
  
  bool can_rmodify( CHAR_DATA *ch, ROOM_INDEX_DATA *room )
  {
! 	sh_int vnum;
! 
! 	vnum = room->vnum;
  
  	if ( IS_NPC( ch ) )
  	  return FALSE;
--- 238,245 ----
  
  bool can_rmodify( CHAR_DATA *ch, ROOM_INDEX_DATA *room )
  {
! 	sh_int vnum = room->vnum;
! 	AREA_DATA *pArea;
  
  	if ( IS_NPC( ch ) )
  	  return FALSE;
***************
*** 250,257 ****
  	  send_to_char( "You cannot modify this room.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( vnum >= ch->pcdata->r_range_lo
! 	&&   vnum <= ch->pcdata->r_range_hi )
  	  return TRUE;
  
  	send_to_char( "That room is not in your allocated range.\n\r", ch );
--- 250,262 ----
  	  send_to_char( "You cannot modify this room.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	{
! 	  send_to_char( "You must have an assigned area to modify this room.\n\r", ch );
! 	  return FALSE;
! 	}
! 	if ( vnum >= pArea->low_r_vnum
! 	&&   vnum <= pArea->hi_r_vnum )
  	  return TRUE;
  
  	send_to_char( "That room is not in your allocated range.\n\r", ch );
***************
*** 260,269 ****
  
  bool can_omodify( CHAR_DATA *ch, OBJ_DATA *obj )
  {
! 	sh_int vnum;
  	
- 	vnum = obj->pIndexData->vnum;
- 	
  	if ( IS_NPC( ch ) )
  	  return FALSE;
  	if ( get_trust( ch ) >= sysdata.level_modify_proto )
--- 265,273 ----
  
  bool can_omodify( CHAR_DATA *ch, OBJ_DATA *obj )
  {
! 	sh_int vnum = obj->pIndexData->vnum;
! 	AREA_DATA *pArea;
  	
  	if ( IS_NPC( ch ) )
  	  return FALSE;
  	if ( get_trust( ch ) >= sysdata.level_modify_proto )
***************
*** 273,280 ****
  	  send_to_char( "You cannot modify this object.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( vnum >= ch->pcdata->o_range_lo
! 	&&   vnum <= ch->pcdata->o_range_hi )
  	  return TRUE;
  
  	send_to_char( "That object is not in your allocated range.\n\r", ch );
--- 277,289 ----
  	  send_to_char( "You cannot modify this object.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	{
! 	  send_to_char( "You must have an assigned area to modify this object.\n\r", ch );
! 	  return FALSE;
! 	}
! 	if ( vnum >= pArea->low_o_vnum
! 	&&   vnum <= pArea->hi_o_vnum )
  	  return TRUE;
  
  	send_to_char( "That object is not in your allocated range.\n\r", ch );
***************
*** 283,292 ****
  
  bool can_oedit( CHAR_DATA *ch, OBJ_INDEX_DATA *obj )
  {
! 	sh_int vnum;
! 	
! 	vnum = obj->vnum;
! 	
  	if ( IS_NPC( ch ) )
  	  return FALSE;
  	if ( get_trust( ch ) >= LEVEL_GOD )
--- 292,300 ----
  
  bool can_oedit( CHAR_DATA *ch, OBJ_INDEX_DATA *obj )
  {
! 	sh_int vnum = obj->vnum;
! 	AREA_DATA *pArea;
! 
  	if ( IS_NPC( ch ) )
  	  return FALSE;
  	if ( get_trust( ch ) >= LEVEL_GOD )
***************
*** 296,303 ****
  	  send_to_char( "You cannot modify this object.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( vnum >= ch->pcdata->o_range_lo
! 	&&   vnum <= ch->pcdata->o_range_hi )
  	  return TRUE;
  
  	send_to_char( "That object is not in your allocated range.\n\r", ch );
--- 304,316 ----
  	  send_to_char( "You cannot modify this object.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	{
! 	  send_to_char( "You must have an assigned area to modify this object.\n\r", ch );
! 	  return FALSE;
! 	}
! 	if ( vnum >= pArea->low_o_vnum
! 	&&   vnum <= pArea->hi_o_vnum )
  	  return TRUE;
  
  	send_to_char( "That object is not in your allocated range.\n\r", ch );
***************
*** 308,313 ****
--- 321,327 ----
  bool can_mmodify( CHAR_DATA *ch, CHAR_DATA *mob )
  {
  	sh_int vnum;
+ 	AREA_DATA *pArea;
  	
  	if ( mob == ch )
  	  return TRUE;
***************
*** 333,340 ****
  	  send_to_char( "You cannot modify this mobile.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( vnum >= ch->pcdata->m_range_lo
! 	&&   vnum <= ch->pcdata->m_range_hi )
  	  return TRUE;
  
  	send_to_char( "That mobile is not in your allocated range.\n\r", ch );
--- 347,359 ----
  	  send_to_char( "You cannot modify this mobile.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	{
! 	  send_to_char( "You must have an assigned area to modify this mobile.\n\r", ch );
! 	  return FALSE;
! 	}
! 	if ( vnum >= pArea->low_m_vnum
! 	&&   vnum <= pArea->hi_m_vnum )
  	  return TRUE;
  
  	send_to_char( "That mobile is not in your allocated range.\n\r", ch );
***************
*** 343,351 ****
  
  bool can_medit( CHAR_DATA *ch, MOB_INDEX_DATA *mob )
  {
! 	sh_int vnum;
! 	
! 	vnum = mob->vnum;
  
  	if ( IS_NPC( ch ) )
  	  return FALSE;
--- 362,369 ----
  
  bool can_medit( CHAR_DATA *ch, MOB_INDEX_DATA *mob )
  {
! 	sh_int vnum = mob->vnum;
! 	AREA_DATA *pArea;
  
  	if ( IS_NPC( ch ) )
  	  return FALSE;
***************
*** 356,363 ****
  	  send_to_char( "You cannot modify this mobile.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( vnum >= ch->pcdata->m_range_lo
! 	&&   vnum <= ch->pcdata->m_range_hi )
  	  return TRUE;
  
  	send_to_char( "That mobile is not in your allocated range.\n\r", ch );
--- 374,386 ----
  	  send_to_char( "You cannot modify this mobile.\n\r", ch );
  	  return FALSE;
  	}
! 	if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	{
! 	  send_to_char( "You must have an assigned area to modify this mobile.\n\r", ch );
! 	  return FALSE;
! 	}
! 	if ( vnum >= pArea->low_m_vnum
! 	&&   vnum <= pArea->hi_m_vnum )
  	  return TRUE;
  
  	send_to_char( "That mobile is not in your allocated range.\n\r", ch );
***************
*** 734,743 ****
  {
      char arg[MAX_INPUT_LENGTH];
      ROOM_INDEX_DATA *location;
- 
      CHAR_DATA *fch;
      CHAR_DATA *fch_next;
      ROOM_INDEX_DATA *in_room;
      sh_int vnum;
  
      one_argument( argument, arg );
--- 757,766 ----
  {
      char arg[MAX_INPUT_LENGTH];
      ROOM_INDEX_DATA *location;
      CHAR_DATA *fch;
      CHAR_DATA *fch_next;
      ROOM_INDEX_DATA *in_room;
+     AREA_DATA *pArea;
      sh_int vnum;
  
      one_argument( argument, arg );
***************
*** 761,771 ****
  	  send_to_char( "No such location.\n\r", ch );
  	  return;
  	}
! 	if ( get_trust( ch ) < sysdata.level_modify_proto
! 	&& ( vnum < ch->pcdata->r_range_lo || vnum > ch->pcdata->r_range_hi ) )
  	{
! 	  send_to_char( "That room is not in your assigned range.\n\r", ch );
! 	  return;
  	}
  	location = make_room( vnum );
  	if ( !location )
--- 784,802 ----
  	  send_to_char( "No such location.\n\r", ch );
  	  return;
  	}
! 	if ( get_trust( ch ) < sysdata.level_modify_proto )
  	{
! 	    if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	    {
! 		send_to_char( "You must have an assigned area to create rooms.\n\r", ch );
! 		return;
! 	    }
! 	    if ( vnum < pArea->low_r_vnum
! 	    ||   vnum > pArea->hi_r_vnum )
! 	    {
! 		send_to_char( "That room is not within your assigned range.\n\r", ch );
! 		return;
! 	    }
  	}
  	location = make_room( vnum );
  	if ( !location )
***************
*** 1898,1903 ****
--- 1929,1935 ----
             pcflag = FALSE;
  	   argument = one_argument( argument, arg3 );
  	   value = IS_NPC( victim) ? get_actflag( arg3 ) : get_plrflag( arg3 );
+ 
  	   if ( !IS_NPC( victim ) && ( value < 0 || value > 31 ) )
             {
               pcflag = TRUE;
***************
*** 1907,1922 ****
  	     ch_printf( ch, "Unknown flag: %s\n\r", arg3 );
  	   else
  	   {
! 	     if ( 1 << value == ACT_PROTOTYPE
  	     &&   get_trust( ch ) < LEVEL_GREATER 
!              &&   !is_name ("protoflag", ch->pcdata->bestowments)
!              &&   !pcflag )
  	       send_to_char( "You cannot change the prototype flag.\n\r", ch );
  	     else
! 	     if ( 1 << value == ACT_IS_NPC && !pcflag )
  	       send_to_char( "If that could be changed, it would cause many problems.\n\r", ch );
  	     else
! 	     if ( 1 << value == ACT_POLYMORPHED && !pcflag )
  	       send_to_char( "Changing that would be a _bad_ thing.\n\r", ch);
  	     else
  	     {
--- 1939,1954 ----
  	     ch_printf( ch, "Unknown flag: %s\n\r", arg3 );
  	   else
  	   {
! 	     if ( IS_NPC(victim)
! 	     &&   1 << value == ACT_PROTOTYPE
  	     &&   get_trust( ch ) < LEVEL_GREATER 
!              &&  !is_name ("protoflag", ch->pcdata->bestowments) )
  	       send_to_char( "You cannot change the prototype flag.\n\r", ch );
  	     else
! 	     if ( IS_NPC(victim) && 1 << value == ACT_IS_NPC )
  	       send_to_char( "If that could be changed, it would cause many problems.\n\r", ch );
  	     else
! 	     if ( IS_NPC(victim) && 1 << value == ACT_POLYMORPHED )
  	       send_to_char( "Changing that would be a _bad_ thing.\n\r", ch);
  	     else
  	     {
***************
*** 1925,1937 ****
  		else
  		{ 
  		  TOGGLE_BIT( victim->act, 1 << value );
! 		  if ( 1 << value == ACT_PROTOTYPE )
  		    victim->pIndexData->act = victim->act;
  		}
  	     }
  	   }
  	}
! 	if ( IS_NPC( victim ) && IS_SET( victim->act, ACT_PROTOTYPE ) )
  	  victim->pIndexData->act = victim->act; 
  	return;
      }
--- 1957,1970 ----
  		else
  		{ 
  		  TOGGLE_BIT( victim->act, 1 << value );
! 		  /* NPC check added by Gorog */
! 		  if ( IS_NPC(victim) && (1 << value == ACT_PROTOTYPE) )
  		    victim->pIndexData->act = victim->act;
  		}
  	     }
  	   }
  	}
! 	if ( IS_NPC(victim) && IS_SET( victim->act, ACT_PROTOTYPE ) )
  	  victim->pIndexData->act = victim->act; 
  	return;
      }
***************
*** 3752,3761 ****
      return buf;
  }
  
- #undef DONE
- #define DONE( ch )							\
-     while (
- 
  void do_redit( CHAR_DATA *ch, char *argument )
  {
      char arg [MAX_INPUT_LENGTH];
--- 3785,3790 ----
***************
*** 4629,4636 ****
        return;
      if ( get_trust( ch ) < LEVEL_LESSER )
      {
! 	if ( vnum < ch->pcdata->o_range_lo
! 	||   vnum > ch->pcdata->o_range_hi )
  	{
  	  send_to_char( "That number is not in your allocated range.\n\r", ch );
  	  return;
--- 4658,4672 ----
        return;
      if ( get_trust( ch ) < LEVEL_LESSER )
      {
! 	AREA_DATA *pArea;
! 
! 	if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	{
! 	  send_to_char( "You must have an assigned area to create objects.\n\r", ch );
! 	  return;
! 	}
! 	if ( vnum < pArea->low_o_vnum
! 	&&   vnum > pArea->hi_o_vnum )
  	{
  	  send_to_char( "That number is not in your allocated range.\n\r", ch );
  	  return;
***************
*** 4697,4704 ****
        return;
      if ( get_trust( ch ) < LEVEL_LESSER )
      {
! 	if ( vnum < ch->pcdata->m_range_lo
! 	||   vnum > ch->pcdata->m_range_hi )
  	{
  	  send_to_char( "That number is not in your allocated range.\n\r", ch );
  	  return;
--- 4733,4747 ----
        return;
      if ( get_trust( ch ) < LEVEL_LESSER )
      {
! 	AREA_DATA *pArea;
! 
! 	if ( !ch->pcdata || !(pArea=ch->pcdata->area) )
! 	{
! 	  send_to_char( "You must have an assigned area to create mobiles.\n\r", ch );
! 	  return;
! 	}
! 	if ( vnum < pArea->low_m_vnum
! 	&&   vnum > pArea->hi_m_vnum )
  	{
  	  send_to_char( "That number is not in your allocated range.\n\r", ch );
  	  return;
***************
*** 5084,5091 ****
  	if ( IS_NPC( ch ) )
  	  return;
  
  	if ( !str_cmp( "none", argument )
! 	||   !str_cmp( "null", argument ) )
  	{
  	    ch->pcdata->area = NULL;
  	    assign_area( ch );
--- 5127,5141 ----
  	if ( IS_NPC( ch ) )
  	  return;
  
+ 	if ( argument[0] == '\0' )
+ 	{
+ 	    send_to_char( "Syntax: aassign <filename.are>\n\r", ch );
+ 	    return;
+ 	}
+ 
  	if ( !str_cmp( "none", argument )
! 	||   !str_cmp( "null", argument )
! 	||   !str_cmp( "clear", argument ) )
  	{
  	    ch->pcdata->area = NULL;
  	    assign_area( ch );
***************
*** 5098,5113 ****
  
  	sprintf( buf, "%s", argument );
          tarea = NULL;
! 	for ( tmp = first_area; tmp; tmp = tmp->next )
! 	 if ( !str_cmp( buf, tmp->filename ) )
! 	 {  
! 	    tarea = tmp;
! 	    break;
! 	 }
  	 
  	if ( !tarea )
  	{
! 	    send_to_char( "No such area.  Use 'zones'.\n\r", ch );
  	    return;
  	}
  	ch->pcdata->area = tarea;
--- 5148,5190 ----
  
  	sprintf( buf, "%s", argument );
          tarea = NULL;
! 
! /*	if ( get_trust(ch) >= sysdata.level_modify_proto )   */
! 
! 	if ( get_trust(ch) >= LEVEL_SUB_IMPLEM
!         ||  (is_name( buf, ch->pcdata->bestowments )
!         &&   get_trust(ch) >= sysdata.level_modify_proto) )
! 	  for ( tmp = first_area; tmp; tmp = tmp->next )
! 	    if ( !str_cmp( buf, tmp->filename ) )
! 	    {  
! 		tarea = tmp;
! 		break;
! 	    }
! 
! 	if ( !tarea )
! 	  for ( tmp = first_build; tmp; tmp = tmp->next )
! 	    if ( !str_cmp( buf, tmp->filename ) )
! 	    {
! /*		if ( get_trust(ch) >= sysdata.level_modify_proto  */
! 		if ( get_trust(ch) >= LEVEL_GREATER
! 	        ||   is_name( tmp->filename, ch->pcdata->bestowments ) )
! 		{  
! 		    tarea = tmp;
! 		    break;
! 		}
! 		else
! 		{
! 		    send_to_char( "You do not have permission to use that area.\n\r", ch );
! 		    return;
! 		}
! 	    }
  	 
  	if ( !tarea )
  	{
! 	    if ( get_trust(ch) >= sysdata.level_modify_proto )
! 		send_to_char( "No such area.  Use 'zones'.\n\r", ch );
! 	    else
! 		send_to_char( "No such area.  Use 'newzones'.\n\r", ch );
  	    return;
  	}
  	ch->pcdata->area = tarea;
***************
*** 5841,5846 ****
--- 5918,5924 ----
  {
      AREA_DATA	*tarea;
      char	arg[MAX_INPUT_LENGTH];
+     char	buf[MAX_STRING_LENGTH];
      int		num;
      DESCRIPTOR_DATA *d;
  
***************
*** 5896,5901 ****
--- 5974,5983 ----
  	  tarea->nplayer = 0;
  	  reset_area( tarea );
  	  tarea->nplayer = num;
+ 	  send_to_char( "Renaming author's building file.\n\r", ch );
+ 	  sprintf( buf, "%s%s.installed", BUILD_DIR, tarea->filename );
+ 	  sprintf( arg, "%s%s", BUILD_DIR, tarea->filename );
+ 	  rename( arg, buf );
  	  send_to_char( "Done.\n\r", ch );
  	  return;
  	}
diff -cr tmp/dist/src/clans.c dist/src/clans.c
*** tmp/dist/src/clans.c	Mon Dec 16 12:51:27 1996
--- dist/src/clans.c	Thu Feb  6 09:22:47 1997
***************
*** 881,892 ****
  	return;
        }
      }
- 
-     if ( clan->clan_type != CLAN_GUILD && IS_SET(victim->act, PLR_OUTCAST))
-     {
- 	send_to_char( "That player is an outcast!\n\r", ch);
-   	return;
-     }
      clan->members++;
      if ( clan->clan_type != CLAN_ORDER && clan->clan_type != CLAN_GUILD )
        SET_BIT(victim->speaks, LANG_CLAN);
--- 881,886 ----
***************
*** 1991,2001 ****
--- 1985,2002 ----
  	send_to_char("You take yourself by the scruff of your neck, but go nowhere.\n\r", ch);
  	return; 
      }
+ 
      if ( IS_NPC(victim) 
           || !IS_SET( victim->pcdata->flags, PCFLAG_DEADLY ) )
      {
  	send_to_char("You can only drag deadly characters.\n\r", ch);
  	return;
+     }
+ 
+     if ( victim->fighting )
+     {
+         send_to_char( "You try, but can't get close enough.\n\r", ch);
+         return;
      }
            
      if ( arg2[0] == '\0' )
diff -cr tmp/dist/src/comm.c dist/src/comm.c
*** tmp/dist/src/comm.c	Thu Jan 16 10:54:22 1997
--- dist/src/comm.c	Thu Feb  6 09:22:48 1997
***************
*** 408,414 ****
      struct timeval	  last_time;
      char cmdline[MAX_INPUT_LENGTH];
      DESCRIPTOR_DATA *d;
!     time_t	last_check = 0;
  
      signal( SIGPIPE, SIG_IGN );
      signal( SIGALRM, caught_alarm );
--- 408,414 ----
      struct timeval	  last_time;
      char cmdline[MAX_INPUT_LENGTH];
      DESCRIPTOR_DATA *d;
! /*  time_t	last_check = 0;  */
  
      signal( SIGPIPE, SIG_IGN );
      signal( SIGALRM, caught_alarm );
***************
*** 631,637 ****
  
  	gettimeofday( &last_time, NULL );
  	current_time = (time_t) last_time.tv_sec;
! 	/* Check every 5 seconds..
  	if ( last_check+5 < current_time )
  	{
  	  CHECK_LINKS(first_descriptor, last_descriptor, next, prev,
--- 631,638 ----
  
  	gettimeofday( &last_time, NULL );
  	current_time = (time_t) last_time.tv_sec;
! 
!         /* Check every 5 seconds...  (don't need it right now)
  	if ( last_check+5 < current_time )
  	{
  	  CHECK_LINKS(first_descriptor, last_descriptor, next, prev,
***************
*** 1505,1511 ****
  	free_char( d->character );
  	fOld = load_char_obj( d, buf, FALSE );
  	ch = d->character;
! 	sprintf( log_buf, "%s@%s has connected.", ch->name, d->host );
  	if ( ch->level < LEVEL_DEMI )
  	{
  	  /*to_channel( log_buf, CHANNEL_MONITOR, "Monitor", ch->level );*/
--- 1506,1513 ----
  	free_char( d->character );
  	fOld = load_char_obj( d, buf, FALSE );
  	ch = d->character;
! 	sprintf( log_buf, "%s@%s(%s) has connected.", ch->name, d->host,
!                  d->user );
  	if ( ch->level < LEVEL_DEMI )
  	{
  	  /*to_channel( log_buf, CHANNEL_MONITOR, "Monitor", ch->level );*/
***************
*** 1843,1859 ****
  	else
  	  send_to_pager( "\014", ch );
  	set_pager_color( AT_LBLUE, ch );
! 	if ( IS_HERO(ch) )
! 	    do_help( ch, "imotd" );
! 	do_help( ch, "motd" );
  	send_to_pager( "\n\rPress [ENTER] ", ch );
! 	d->connected = CON_READ_MOTD;
! 	break;
  
      case CON_READ_MOTD:
! 	write_to_buffer( d,
!     "\n\rWelcome to Realms of Despair...\n\r",
! 	    0 );
  	add_char( ch );
  	d->connected	= CON_PLAYING;
  
--- 1845,1864 ----
  	else
  	  send_to_pager( "\014", ch );
  	set_pager_color( AT_LBLUE, ch );
! 	if ( IS_IMMORTAL(ch) )
! 	  do_help( ch, "imotd" );
! 	if ( ch->level == 50)
! 	  do_help( ch, "amotd" );
! 	if ( ch->level < 50 && ch->level > 0 )
! 	  do_help( ch, "motd" );
! 	if ( ch->level == 0 )
! 	  do_help( ch, "nmotd" );
  	send_to_pager( "\n\rPress [ENTER] ", ch );
!         d->connected = CON_READ_MOTD;
!         break;
  
      case CON_READ_MOTD:
! 	write_to_buffer( d, "\n\rWelcome to Realms of Despair...\n\r", 0 );
  	add_char( ch );
  	d->connected	= CON_PLAYING;
  
***************
*** 1966,1972 ****
  	else
  	if ( !IS_IMMORTAL(ch) && ch->pcdata->release_date > current_time )
  	{
! 	    char_to_room( ch, get_room_index(6) );
  	}
  	else
  	if ( ch->in_room && ( IS_IMMORTAL( ch ) 
--- 1971,1977 ----
  	else
  	if ( !IS_IMMORTAL(ch) && ch->pcdata->release_date > current_time )
  	{
! 	    char_to_room( ch, get_room_index(8) );
  	}
  	else
  	if ( ch->in_room && ( IS_IMMORTAL( ch ) 
***************
*** 2113,2119 ****
  		ch->timer	 = 0;
  		send_to_char( "Reconnecting.\n\r", ch );
  		act( AT_ACTION, "$n has reconnected.", ch, NULL, NULL, TO_ROOM );
! 		sprintf( log_buf, "%s@%s reconnected.", ch->name, d->host );
  		log_string_plus( log_buf, LOG_COMM, UMAX( sysdata.log_level, ch->level ) );
  /*
  		if ( ch->level < LEVEL_SAVIOR )
--- 2118,2124 ----
  		ch->timer	 = 0;
  		send_to_char( "Reconnecting.\n\r", ch );
  		act( AT_ACTION, "$n has reconnected.", ch, NULL, NULL, TO_ROOM );
! 		sprintf( log_buf, "%s@%s(%s) reconnected.", ch->name, d->host, d->user );
  		log_string_plus( log_buf, LOG_COMM, UMAX( sysdata.log_level, ch->level ) );
  /*
  		if ( ch->level < LEVEL_SAVIOR )
***************
*** 2339,2345 ****
    
    if ( !ch )
    {
!     bug( "Send_to_pager_colors: NULL *ch" );
      return;
    }
    if ( !txt || !ch->desc )
--- 2344,2350 ----
    
    if ( !ch )
    {
!     bug( "Send_to_pager_color: NULL *ch" );
      return;
    }
    if ( !txt || !ch->desc )
***************
*** 2355,2361 ****
  /*  make_color_sequence(NULL, NULL, NULL);*/
    while ( (colstr = strpbrk(prevstr, "&^")) != NULL )
    {
!     write_to_pager(d, prevstr, (colstr-prevstr));
      ln = make_color_sequence(colstr, colbuf, d);
      if ( ln < 0 )
      {
--- 2360,2367 ----
  /*  make_color_sequence(NULL, NULL, NULL);*/
    while ( (colstr = strpbrk(prevstr, "&^")) != NULL )
    {
!     if ( colstr > prevstr )
!       write_to_pager(d, prevstr, (colstr-prevstr));
      ln = make_color_sequence(colstr, colbuf, d);
      if ( ln < 0 )
      {
***************
*** 2841,2846 ****
--- 2847,2858 ----
  	  strcpy(pbuf, "evil");
  	else
  	  strcpy(pbuf, "neutral");
+ 	break;
+       case 'f':
+ 	if ( ch->pcdata->deity )
+ 	  stat = ch->pcdata->favor;
+ 	else
+ 	  strcpy(pbuf, "no favor");
  	break;
        case 'h':
  	stat = ch->hit;
diff -cr tmp/dist/src/db.c dist/src/db.c
*** tmp/dist/src/db.c	Mon Dec 16 12:43:37 1996
--- dist/src/db.c	Thu Feb  6 09:22:48 1997
***************
*** 1141,1146 ****
--- 1141,1147 ----
  	pObjIndex->value[4]		= x5;
  	pObjIndex->value[5]		= x6;
  	pObjIndex->weight		= fread_number( fp );
+ 	pObjIndex->weight = UMAX( 1, pObjIndex->weight );
  	pObjIndex->cost			= fread_number( fp );
  	pObjIndex->rent		  	= fread_number( fp ); /* unused */
  
***************
*** 2659,2665 ****
  
      if ( !isdigit(c) )
      {
! 	bug( "Fread_number: bad format." );
  	if ( fBootDb )
  	  exit( 1 );
  	return 0;
--- 2660,2666 ----
  
      if ( !isdigit(c) )
      {
! 	bug( "Fread_number: bad format. (%c)", c );
  	if ( fBootDb )
  	  exit( 1 );
  	return 0;
***************
*** 2695,2711 ****
   */
  char *str_dup( char const *str )
  {
!   static char *ret;
!   int len;
  
!   if ( !str )
!     return NULL;
      
!   len = strlen(str)+1;
  
!   CREATE( ret, char, len );
!   strcpy( ret, str );
!   return ret;
  }
  
  /*
--- 2696,2712 ----
   */
  char *str_dup( char const *str )
  {
!     static char *ret;
!     int len;
  
!     if ( !str )
! 	return NULL;
      
!     len = strlen(str)+1;
  
!     CREATE( ret, char, len );
!     strcpy( ret, str );
!     return ret;
  }
  
  /*
***************
*** 2728,2740 ****
       */
      do
      {
!         if ( feof(fp) )
!         {
!           bug("fread_string: EOF encountered on read.\n\r");
!           if ( fBootDb )
!             exit(1);
!           return STRALLOC("");
!         }
  	c = getc( fp );
      }
      while ( isspace(c) );
--- 2729,2741 ----
       */
      do
      {
! 	if ( feof(fp) )
! 	{
! 	    bug("fread_string: EOF encountered on read.\n\r");
! 	    if ( fBootDb )
! 		exit(1);
! 	    return STRALLOC("");
! 	}
  	c = getc( fp );
      }
      while ( isspace(c) );
***************
*** 2746,2754 ****
      {
  	if ( ln >= (MAX_STRING_LENGTH - 1) )
  	{
! 	   bug( "fread_string: string too long" );
! 	   *plast = '\0';
! 	   return STRALLOC( buf );
  	}
  	switch ( *plast = getc( fp ) )
  	{
--- 2747,2755 ----
      {
  	if ( ln >= (MAX_STRING_LENGTH - 1) )
  	{
! 	     bug( "fread_string: string too long" );
! 	     *plast = '\0';
! 	     return STRALLOC( buf );
  	}
  	switch ( *plast = getc( fp ) )
  	{
***************
*** 2780,2786 ****
  }
  
  /*
!  * Read a string from file fp using str_dup
   */
  char *fread_string_nohash( FILE *fp )
  {
--- 2781,2787 ----
  }
  
  /*
!  * Read a string from file fp using str_dup (ie: no string hashing)
   */
  char *fread_string_nohash( FILE *fp )
  {
***************
*** 2799,2811 ****
       */
      do
      {
!         if ( feof(fp) )
!         {
!           bug("fread_string_no_hash: EOF encountered on read.\n\r");
!           if ( fBootDb )
!             exit(1);
!           return str_dup("");
!         }
  	c = getc( fp );
      }
      while ( isspace(c) );
--- 2800,2812 ----
       */
      do
      {
! 	if ( feof(fp) )
! 	{
! 	    bug("fread_string_no_hash: EOF encountered on read.\n\r");
! 	    if ( fBootDb )
! 		exit(1);
! 	    return str_dup("");
! 	}
  	c = getc( fp );
      }
      while ( isspace(c) );
***************
*** 2861,2873 ****
  
      do
      {
!         if ( feof(fp) )
!         {
!           bug("fread_to_eol: EOF encountered on read.\n\r");
!           if ( fBootDb )
!             exit(1);
!           return;
!         }
  	c = getc( fp );
      }
      while ( c != '\n' && c != '\r' );
--- 2862,2874 ----
  
      do
      {
! 	if ( feof(fp) )
! 	{
! 	    bug("fread_to_eol: EOF encountered on read.\n\r");
! 	    if ( fBootDb )
! 		exit(1);
! 	    return;
! 	}
  	c = getc( fp );
      }
      while ( c != '\n' && c != '\r' );
***************
*** 2902,2915 ****
       */
      do
      {
!         if ( feof(fp) )
!         {
!           bug("fread_line: EOF encountered on read.\n\r");
!           if ( fBootDb )
!             exit(1);
!           strcpy(line, "");
!           return line;
!         }
  	c = getc( fp );
      }
      while ( isspace(c) );
--- 2903,2916 ----
       */
      do
      {
! 	if ( feof(fp) )
! 	{
! 	    bug("fread_line: EOF encountered on read.\n\r");
! 	    if ( fBootDb )
! 		exit(1);
! 	    strcpy(line, "");
! 	    return line;
! 	}
  	c = getc( fp );
      }
      while ( isspace(c) );
***************
*** 2917,2936 ****
      ungetc( c, fp );
      do
      {
!         if ( feof(fp) )
!         {
!           bug("fread_line: EOF encountered on read.\n\r");
!           if ( fBootDb )
!             exit(1);
!           *pline = '\0';
!           return line;
!         }
  	c = getc( fp );
  	*pline++ = c; ln++;
  	if ( ln >= (MAX_STRING_LENGTH - 1) )
  	{
! 	   bug( "fread_line: line too long" );
! 	   break;
  	}
      }
      while ( c != '\n' && c != '\r' );
--- 2918,2937 ----
      ungetc( c, fp );
      do
      {
! 	if ( feof(fp) )
! 	{
! 	    bug("fread_line: EOF encountered on read.\n\r");
! 	    if ( fBootDb )
! 		exit(1);
! 	    *pline = '\0';
! 	    return line;
! 	}
  	c = getc( fp );
  	*pline++ = c; ln++;
  	if ( ln >= (MAX_STRING_LENGTH - 1) )
  	{
! 	    bug( "fread_line: line too long" );
! 	    break;
  	}
      }
      while ( c != '\n' && c != '\r' );
***************
*** 2959,2972 ****
  
      do
      {
!         if ( feof(fp) )
!         {
!           bug("fread_word: EOF encountered on read.\n\r");
!           if ( fBootDb )
!             exit(1);
!           strcpy(word, "");
!           return word;
!         }
  	cEnd = getc( fp );
      }
      while ( isspace( cEnd ) );
--- 2960,2973 ----
  
      do
      {
! 	if ( feof(fp) )
! 	{
! 	    bug("fread_word: EOF encountered on read.\n\r");
! 	    if ( fBootDb )
! 		exit(1);
! 	    word[0] = '\0';
! 	    return word;
! 	}
  	cEnd = getc( fp );
      }
      while ( isspace( cEnd ) );
***************
*** 2984,2997 ****
  
      for ( ; pword < word + MAX_INPUT_LENGTH; pword++ )
      {
!         if ( feof(fp) )
!         {
!           bug("fread_word: EOF encountered on read.\n\r");
!           if ( fBootDb )
!             exit(1);
!           *pword = '\0';
!           return word;
!         }
  	*pword = getc( fp );
  	if ( cEnd == ' ' ? isspace(*pword) : *pword == cEnd )
  	{
--- 2985,2998 ----
  
      for ( ; pword < word + MAX_INPUT_LENGTH; pword++ )
      {
! 	if ( feof(fp) )
! 	{
! 	    bug("fread_word: EOF encountered on read.\n\r");
! 	    if ( fBootDb )
! 		exit(1);
! 	    *pword = '\0';
! 	    return word;
! 	}
  	*pword = getc( fp );
  	if ( cEnd == ' ' ? isspace(*pword) : *pword == cEnd )
  	{
***************
*** 3069,3076 ****
  {
      switch ( number_bits( 2 ) )
      {
!     case 0:  number -= 1; break;
!     case 3:  number += 1; break;
      }
  
      return UMAX( 1, number );
--- 3070,3077 ----
  {
      switch ( number_bits( 2 ) )
      {
! 	case 0:  number -= 1; break;
! 	case 3:  number += 1; break;
      }
  
      return UMAX( 1, number );
***************
*** 3232,3241 ****
  void smash_tilde( char *str )
  {
      for ( ; *str != '\0'; str++ )
-     {
  	if ( *str == '~' )
  	    *str = '-';
-     }
  
      return;
  }
--- 3233,3240 ----
***************
*** 3247,3256 ****
  void hide_tilde( char *str )
  {
      for ( ; *str != '\0'; str++ )
-     {
  	if ( *str == '~' )
  	    *str = HIDDEN_TILDE;
-     }
  
      return;
  }
--- 3246,3253 ----
***************
*** 3358,3367 ****
      sstr2 = strlen(bstr);
  
      for ( ichar = 0; ichar <= sstr2 - sstr1; ichar++ )
-     {
  	if ( c0 == LOWER(bstr[ichar]) && !str_prefix( astr, bstr + ichar ) )
  	    return FALSE;
-     }
  
      return TRUE;
  }
--- 3355,3362 ----
***************
*** 3636,3641 ****
--- 3631,3639 ----
      }
  }
  
+ /*
+  * Show the boot log file					-Thoric
+  */
  void do_dmesg( CHAR_DATA *ch, char *argument )
  {
      set_pager_color( AT_LOG, ch );
***************
*** 3747,3752 ****
--- 3745,3753 ----
    return;
  }
  
+ /*
+  * Wizlist builder						-Thoric
+  */
  void make_wizlist( )
  {
    DIR *dp;
***************
*** 4665,4671 ****
  	  pObjIndex->value[1]		= 0;
  	  pObjIndex->value[2]		= 0;
  	  pObjIndex->value[3]		= 0;
! 	  pObjIndex->weight		= 0;
  	  pObjIndex->cost		= 0;
  	}
  	else
--- 4666,4672 ----
  	  pObjIndex->value[1]		= 0;
  	  pObjIndex->value[2]		= 0;
  	  pObjIndex->value[3]		= 0;
! 	  pObjIndex->weight		= 1;
  	  pObjIndex->cost		= 0;
  	}
  	else
***************
*** 4944,4950 ****
  
  void load_area_file( AREA_DATA *tarea, char *filename )
  {
!     FILE *fpin;
  
      if ( fBootDb )
        tarea = last_area;
--- 4945,4956 ----
  
  void load_area_file( AREA_DATA *tarea, char *filename )
  {
! /*    FILE *fpin;
!     what intelligent person stopped using fpArea?????
!     if fpArea isn't being used, then no filename or linenumber
!     is printed when an error occurs during loading the area..
!     (bug uses fpArea)
!       --TRI  */
  
      if ( fBootDb )
        tarea = last_area;
***************
*** 4954,4960 ****
  	return;
      }
  
!     if ( ( fpin = fopen( filename, "r" ) ) == NULL )
      {
  	perror( filename );
  	bug( "load_area: error loading file (can't open)" );
--- 4960,4966 ----
  	return;
      }
  
!     if ( ( fpArea = fopen( filename, "r" ) ) == NULL )
      {
  	perror( filename );
  	bug( "load_area: error loading file (can't open)" );
***************
*** 4966,5010 ****
      {
  	char *word;
  
! 	if ( fread_letter( fpin ) != '#' )
  	{
  	    bug( tarea->filename );
  	    bug( "load_area: # not found." );
  	    exit( 1 );
  	}
  
! 	word = fread_word( fpin );
  
  	     if ( word[0] == '$'               )                 break;
  	else if ( !str_cmp( word, "AREA"     ) )
  	{
  		if ( fBootDb )
  		{
! 		  load_area    (fpin);
  		  tarea = last_area;
  		}
  		else
  		{
  		  DISPOSE( tarea->name );
! 		  tarea->name = fread_string_nohash( fpin );
  		}
  	}
! 	else if ( !str_cmp( word, "AUTHOR"   ) ) load_author  (tarea, fpin);
! 	else if ( !str_cmp( word, "FLAGS"    ) ) load_flags   (tarea, fpin);
! 	else if ( !str_cmp( word, "RANGES"   ) ) load_ranges  (tarea, fpin);
! 	else if ( !str_cmp( word, "ECONOMY"  ) ) load_economy (tarea, fpin);
! 	else if ( !str_cmp( word, "RESETMSG" ) ) load_resetmsg(tarea, fpin); 
  	/* Rennard */
! 	else if ( !str_cmp( word, "HELPS"    ) ) load_helps   (tarea, fpin);
! 	else if ( !str_cmp( word, "MOBILES"  ) ) load_mobiles (tarea, fpin);
! 	else if ( !str_cmp( word, "MUDPROGS" ) ) load_mudprogs(tarea, fpin);
! 	else if ( !str_cmp( word, "OBJECTS"  ) ) load_objects (tarea, fpin);
! 	else if ( !str_cmp( word, "OBJPROGS" ) ) load_objprogs(tarea, fpin);
! 	else if ( !str_cmp( word, "RESETS"   ) ) load_resets  (tarea, fpin);
! 	else if ( !str_cmp( word, "ROOMS"    ) ) load_rooms   (tarea, fpin);
! 	else if ( !str_cmp( word, "SHOPS"    ) ) load_shops   (tarea, fpin);
! 	else if ( !str_cmp( word, "REPAIRS"  ) ) load_repairs (tarea, fpin);
! 	else if ( !str_cmp( word, "SPECIALS" ) ) load_specials(tarea, fpin);
  	else
  	{
  	    bug( tarea->filename );
--- 4972,5016 ----
      {
  	char *word;
  
! 	if ( fread_letter( fpArea ) != '#' )
  	{
  	    bug( tarea->filename );
  	    bug( "load_area: # not found." );
  	    exit( 1 );
  	}
  
! 	word = fread_word( fpArea );
  
  	     if ( word[0] == '$'               )                 break;
  	else if ( !str_cmp( word, "AREA"     ) )
  	{
  		if ( fBootDb )
  		{
! 		  load_area    (fpArea);
  		  tarea = last_area;
  		}
  		else
  		{
  		  DISPOSE( tarea->name );
! 		  tarea->name = fread_string_nohash( fpArea );
  		}
  	}
! 	else if ( !str_cmp( word, "AUTHOR"   ) ) load_author  (tarea, fpArea);
! 	else if ( !str_cmp( word, "FLAGS"    ) ) load_flags   (tarea, fpArea);
! 	else if ( !str_cmp( word, "RANGES"   ) ) load_ranges  (tarea, fpArea);
! 	else if ( !str_cmp( word, "ECONOMY"  ) ) load_economy (tarea, fpArea);
! 	else if ( !str_cmp( word, "RESETMSG" ) ) load_resetmsg(tarea, fpArea); 
  	/* Rennard */
! 	else if ( !str_cmp( word, "HELPS"    ) ) load_helps   (tarea, fpArea);
! 	else if ( !str_cmp( word, "MOBILES"  ) ) load_mobiles (tarea, fpArea);
! 	else if ( !str_cmp( word, "MUDPROGS" ) ) load_mudprogs(tarea, fpArea);
! 	else if ( !str_cmp( word, "OBJECTS"  ) ) load_objects (tarea, fpArea);
! 	else if ( !str_cmp( word, "OBJPROGS" ) ) load_objprogs(tarea, fpArea);
! 	else if ( !str_cmp( word, "RESETS"   ) ) load_resets  (tarea, fpArea);
! 	else if ( !str_cmp( word, "ROOMS"    ) ) load_rooms   (tarea, fpArea);
! 	else if ( !str_cmp( word, "SHOPS"    ) ) load_shops   (tarea, fpArea);
! 	else if ( !str_cmp( word, "REPAIRS"  ) ) load_repairs (tarea, fpArea);
! 	else if ( !str_cmp( word, "SPECIALS" ) ) load_specials(tarea, fpArea);
  	else
  	{
  	    bug( tarea->filename );
***************
*** 5013,5024 ****
  	      exit( 1 );
  	    else
  	    {
! 	      fclose( fpin );
  	      return;
  	    }
  	}
      }
!     fclose( fpin );
      if ( tarea )
      {
  	if ( fBootDb )
--- 5019,5030 ----
  	      exit( 1 );
  	    else
  	    {
! 	      fclose( fpArea );
  	      return;
  	    }
  	}
      }
!     fclose( fpArea );
      if ( tarea )
      {
  	if ( fBootDb )
diff -cr tmp/dist/src/deity.c dist/src/deity.c
*** tmp/dist/src/deity.c	Mon Dec 16 12:43:48 1996
--- dist/src/deity.c	Thu Feb  6 09:22:48 1997
***************
*** 31,36 ****
--- 31,38 ----
  void	fread_deity	 args( ( DEITY_DATA *deity, FILE *fp ) );
  bool	load_deity_file	 args( ( char *deityfile ) );
  void	write_deity_list args( ( void ) );
+ int	get_risflag	 args( ( char *flag ) );
+ int	get_npc_race	 args( ( char *type ) );
  
  /* Get pointer to deity structure from deity name */
  
***************
*** 103,110 ****
--- 105,114 ----
  	fprintf( fp, "Worshippers	%d\n",	deity->worshippers );
  	fprintf( fp, "Flee		%d\n",	deity->flee );
  	fprintf( fp, "Flee_npcrace	%d\n",	deity->flee_npcrace );
+ 	fprintf( fp, "Flee_npcfoe	%d\n",	deity->flee_npcfoe );
  	fprintf( fp, "Kill		%d\n",	deity->kill );
  	fprintf( fp, "Kill_npcrace	%d\n",	deity->kill_npcrace );
+ 	fprintf( fp, "Kill_npcfoe	%d\n",	deity->kill_npcfoe );
  	fprintf( fp, "Kill_magic	%d\n",	deity->kill_magic );
  	fprintf( fp, "Sac		%d\n",	deity->sac );
  	fprintf( fp, "Bury_corpse	%d\n",	deity->bury_corpse );
***************
*** 114,119 ****
--- 118,124 ----
  	fprintf( fp, "Backstab		%d\n",	deity->backstab );
  	fprintf( fp, "Die		%d\n",	deity->die );
  	fprintf( fp, "Die_npcrace	%d\n",	deity->die_npcrace );
+ 	fprintf( fp, "Die_npcfoe	%d\n",	deity->die_npcfoe );
  	fprintf( fp, "Spell_aid		%d\n",	deity->spell_aid );
  	fprintf( fp, "Dig_corpse	%d\n",	deity->dig_corpse );
  	fprintf( fp, "Scorpse		%d\n",	deity->scorpse );
***************
*** 128,133 ****
--- 133,140 ----
  	fprintf( fp, "Deityobj		%d\n",	deity->deityobj	);
  	fprintf( fp, "Affected		%d\n",	deity->affected );
  	fprintf( fp, "Npcrace		%d\n",	deity->npcrace );
+ 	fprintf( fp, "Npcfoe		%d\n",	deity->npcfoe );
+ 	fprintf( fp, "Suscept		%d\n",	deity->suscept );
  	fprintf( fp, "End\n\n" );
  	fprintf( fp, "#END\n" );
  	fclose(fp);
***************
*** 190,195 ****
--- 197,203 ----
  	    KEY( "Description",	deity->description,	fread_string( fp ) );
  	    KEY( "Die",		deity->die,		fread_number( fp ) );
  	    KEY( "Die_npcrace",	deity->die_npcrace,	fread_number( fp ) );
+ 	    KEY( "Die_npcfoe",	deity->die_npcfoe,	fread_number( fp ) );
  	    KEY( "Dig_corpse",	deity->dig_corpse,	fread_number( fp ) );
  	    break;
  
***************
*** 209,224 ****
--- 217,235 ----
  	    KEY( "Filename",	deity->filename,	fread_string_nohash( fp ) );
  	    KEY( "Flee",	deity->flee,		fread_number( fp ) ); 
  	    KEY( "Flee_npcrace",deity->flee_npcrace,	fread_number( fp ) );
+ 	    KEY( "Flee_npcfoe",	deity->flee_npcfoe,	fread_number( fp ) );
  	    break;
  
  	case 'K':
  	    KEY( "Kill",	deity->kill,		fread_number( fp ) );
  	    KEY( "Kill_npcrace",deity->kill_npcrace,	fread_number( fp ) );
+ 	    KEY( "Kill_npcfoe",	deity->kill_npcfoe,	fread_number( fp ) );
  	    KEY( "Kill_magic",	deity->kill_magic,	fread_number( fp ) );
  	    break;
  
  	case 'N':
  	    KEY( "Name",	deity->name,		fread_string( fp ) );
+ 	    KEY( "Npcfoe",	deity->npcfoe,		fread_number( fp ) );
  	    KEY( "Npcrace",	deity->npcrace,		fread_number( fp ) );
  	    break;
  
***************
*** 235,240 ****
--- 246,252 ----
  	    KEY( "Sex",		deity->sex,		fread_number( fp ) );
  	    KEY( "Spell_aid",   deity->spell_aid,	fread_number( fp ) );
  	    KEY( "Steal",	deity->steal,		fread_number( fp ) );
+ 	    KEY( "Suscept",	deity->suscept,		fread_number( fp ) );
  	    break;
  
  	case 'W':
***************
*** 349,354 ****
--- 361,367 ----
      char arg2[MAX_INPUT_LENGTH];
      char arg3[MAX_INPUT_LENGTH];
      DEITY_DATA *deity;
+     int value;
  
      if ( IS_NPC( ch ) )
      {
***************
*** 382,393 ****
      {
  	send_to_char( "Usage: setdeity <deity> <field> <toggle>\n\r", ch );
  	send_to_char( "\n\rField being one of:\n\r", ch );
! 	send_to_char( "filename name description type alignment worshippers\n\r", ch );
! 	send_to_char( "deityobj race npcrace class element avatar sex affected\n\r", ch );
  	send_to_char( "\n\rFavor adjustments:\n\r", ch );
  	send_to_char( "flee flee_npcrace kill kill_npcrace kill_magic\n\r", ch );
  	send_to_char( "die die_npcrace dig_corpse bury_corpse spell_aid\n\r", ch);
! 	send_to_char( "steal backstab aid aid_spell sac\n\r", ch );
  	send_to_char( "\n\rFavor requirements for supplicate:\n\r", ch );
  	send_to_char( "scorpse savatar sdeityobj srecall\n\r", ch );
  	return;
--- 395,407 ----
      {
  	send_to_char( "Usage: setdeity <deity> <field> <toggle>\n\r", ch );
  	send_to_char( "\n\rField being one of:\n\r", ch );
! 	send_to_char( "filename name description type alignment worshippers npcfoe\n\r", ch );
! 	send_to_char( "deityobj race npcrace class element avatar sex affected suscept\n\r", ch );
  	send_to_char( "\n\rFavor adjustments:\n\r", ch );
  	send_to_char( "flee flee_npcrace kill kill_npcrace kill_magic\n\r", ch );
  	send_to_char( "die die_npcrace dig_corpse bury_corpse spell_aid\n\r", ch);
! 	send_to_char( "steal backstab aid aid_spell sac kill_npcfoe\n\r", ch );
! 	send_to_char( "die_npcfoe flee_npcfoe\n\r", ch );
  	send_to_char( "\n\rFavor requirements for supplicate:\n\r", ch );
  	send_to_char( "scorpse savatar sdeityobj srecall\n\r", ch );
  	return;
***************
*** 455,460 ****
--- 469,482 ----
          return;
      }
  
+     if ( !strcmp( arg2, "flee_npcfoe" ) )
+     {
+ 	deity->flee_npcfoe = atoi( argument );
+ 	send_to_char( "Done.\n\r", ch );
+ 	save_deity( deity );
+ 	return;
+     }
+ 
      if ( !strcmp( arg2, "kill" ) )
      {
          deity->kill = atoi( argument );
***************
*** 471,476 ****
--- 493,506 ----
          return;
      }
  
+     if ( !strcmp( arg2, "kill_npcfoe" ) )
+     {
+ 	deity->kill_npcfoe = atoi( argument );
+ 	send_to_char( "Done.\n\r", ch );
+ 	save_deity( deity );
+ 	return;
+     }
+ 
      if ( !strcmp( arg2, "kill_magic" ) )
      {
          deity->kill_magic = atoi( argument );
***************
*** 543,548 ****
--- 573,586 ----
          return;
      }
  
+     if ( !strcmp( arg2, "die_npcfoe" ) )
+     {
+ 	deity->die_npcfoe = atoi( argument );
+ 	send_to_char( "Done.\n\r", ch );
+ 	save_deity( deity );
+ 	return;
+     }
+ 
      if ( !strcmp( arg2, "spell_aid" ) )
      {
          deity->spell_aid = atoi( argument );
***************
*** 609,615 ****
  
      if ( !strcmp( arg2, "race" ) )
      {
! 	deity->race = atoi( argument );
  	send_to_char( "Done.\n\r", ch );
  	save_deity( deity );
  	return;
--- 647,661 ----
  
      if ( !strcmp( arg2, "race" ) )
      {
! 	value = get_npc_race( argument );
! 	if ( value < 0 ) value = atoi( argument );
! 	if ( ( value < 0 ) || ( value >= MAX_RACE ) )
! 	{
! 	  deity->race = -1;
! 	  send_to_char( "No race set.\n\r", ch );
! 	  return;
! 	}
! 	deity->race = value;
  	send_to_char( "Done.\n\r", ch );
  	save_deity( deity );
  	return;
***************
*** 617,642 ****
  
      if ( !strcmp( arg2, "npcrace" ) )
      {
! 	deity->npcrace = atoi( argument );
  	send_to_char( "Done.\n\r", ch );
  	save_deity( deity );
  	return;
      }
  
!     if ( !strcmp( arg2, "class" ) )
      {
! 	deity->class = atoi( argument );
  	send_to_char( "Done.\n\r", ch );
  	save_deity( deity );
  	return;
      }
  
      if ( !strcmp( arg2, "element" ) )
      {
! 	deity->element = atoi( argument );
! 	send_to_char( "Done.\n\r", ch );
! 	save_deity( deity );
! 	return;
      }
  
      if ( !strcmp( arg2, "avatar" ) )
--- 663,763 ----
  
      if ( !strcmp( arg2, "npcrace" ) )
      {
! 	value = get_npc_race( argument );
! 	if ( value < 0 ) value = atoi( argument );
! 	if ( ( value < 0 ) || ( value >= MAX_NPC_RACE ) )
! 	{
! 	  send_to_char( "Invalid npc race.\n\r", ch );
! 	  return;
! 	}	
! 	deity->npcrace = value;
  	send_to_char( "Done.\n\r", ch );
  	save_deity( deity );
  	return;
      }
  
!     if ( !strcmp( arg2, "npcfoe" ) )
      {
! 	value = get_npc_race( argument );
! 	if ( value < 0 ) value = atoi( argument );
! 	if ( ( value < 0 ) || ( value >= MAX_NPC_RACE ) )
! 	{
! 	  send_to_char( "Invalid npc race.\n\r", ch );
! 	  return;
! 	}
! 	deity->npcfoe = value;
  	send_to_char( "Done.\n\r", ch );
  	save_deity( deity );
  	return;
      }
  
+     if ( !strcmp( arg2, "class" ) )
+     {
+ 	deity->class = atoi( argument );
+ 	if ( ( deity->class < 0 ) || ( deity->class >= MAX_CLASS ) ) deity->class = -1;
+         send_to_char( "Done.\n\r", ch );
+         save_deity( deity );
+         return;
+     }
+ 
+     if ( !strcmp( arg2, "suscept" ) )
+     {
+       bool fMatch = FALSE;
+  
+       while ( argument[0] != '\0' )
+         {
+            argument = one_argument( argument, arg3 );
+            if ( !str_cmp ( arg3, "none" ) )
+             {
+             fMatch = TRUE;
+             deity->suscept = 0;
+             }
+            else
+             {
+              value = get_risflag( arg3 );
+              if ( value < 0 || value > 31 )
+               ch_printf( ch, "Unknown flag: %s\n\r", arg3 );
+              else
+              {
+               TOGGLE_BIT( deity->suscept, 1 << value );
+               fMatch = TRUE;
+              }
+             }
+         }
+  
+         if ( fMatch ) ch_printf( ch, "Done.\n\r" );
+         save_deity( deity );
+         return;
+     }
+ 
      if ( !strcmp( arg2, "element" ) )
      {
!       bool fMatch = FALSE;
!  
!       while ( argument[0] != '\0' )
!         {
!            argument = one_argument( argument, arg3 );
!            if ( !str_cmp ( arg3, "none" ) )
!             {
!             fMatch = TRUE;
!             deity->element = 0;
!             }
!            else
!             {
!              value = get_risflag( arg3 );
!              if ( value < 0 || value > 31 )
!               ch_printf( ch, "Unknown flag: %s\n\r", arg3 );
!              else
!              {
!               TOGGLE_BIT( deity->element, 1 << value );  
!               fMatch = TRUE;
!              }
!             }
!         }
!  
!         if ( fMatch ) ch_printf( ch, "Done.\n\r" );
!         save_deity( deity );
!         return;
      }
  
      if ( !strcmp( arg2, "avatar" ) )
***************
*** 657,663 ****
  
      if ( !strcmp( arg2, "affected" ) )
      {
-       int value;
        bool fMatch = FALSE;
  
        while ( argument[0] != '\0' )      
--- 778,783 ----
***************
*** 715,726 ****
      }
  
      ch_printf( ch, "Deity: %s\n\rFilename: %s\n\rDescription:\n\r%s\n\r", deity->name, deity->filename, deity->description );   
!     ch_printf( ch, "Alignment: %-6dWorshippers: %-5dNpcrace: %d\n\r", 
! 	deity->alignment, deity->worshippers, deity->npcrace );
!     ch_printf( ch, "Race: %-11dClass: %-11dElement: %-9dSex: %d\n\r", 
! 	deity->race, deity->class, deity->element, deity->sex );
!     ch_printf( ch, "Object: %-9dAvatar: %-10dAffected: %s\n\r", 
! 	deity->deityobj,deity->avatar, affect_bit_name( deity->affected ));
      ch_printf( ch, "\n\rFlee: %-11dFlee_npcrace: %-4dKill_npcrace: "
  	"%-4dKill: %d\n\r", deity->flee, deity->flee_npcrace,
  	deity->kill_npcrace, deity->kill );
--- 835,855 ----
      }
  
      ch_printf( ch, "Deity: %s\n\rFilename: %s\n\rDescription:\n\r%s\n\r", deity->name, deity->filename, deity->description );   
!     ch_printf( ch, "Alignment: %-6dNpcrace: %-9sNpcfoe: %s\n\r", 
! 	deity->alignment, 
! 	( deity->npcrace < 0 || deity->npcrace > MAX_NPC_RACE ) ? "none" : npc_race[deity->npcrace],
! 	( deity->npcfoe < 0 || deity->npcfoe > MAX_NPC_RACE ) ? "none" : npc_race[deity->npcfoe] );
!     ch_printf( ch, "Race: %-11sClass: %-11sSex: %s\n\r", 
! 	( deity->race < 0 || deity->race > MAX_RACE ) ? "none" : npc_race[deity->race],
! 	( deity->class < 0 || deity->class > MAX_CLASS ) ? "none" : npc_class[deity->class],
! 	deity->sex == -1	  ? "none"   :
!         deity->sex == SEX_MALE    ? "male"   :
!         deity->sex == SEX_FEMALE  ? "female" : "neutral" );
!     ch_printf( ch, "Object: %-9dAvatar: %-10dWorshippers: %d\n\r", 
! 	deity->deityobj, deity->avatar, deity->worshippers );
!     ch_printf( ch, "\n\rAffected: %s\n\r", affect_bit_name( deity->affected ));
!     ch_printf( ch, "Suscept: %s\n\r", flag_string( deity->suscept, ris_flags ));
!     ch_printf( ch, "Element: %s\n\r", flag_string( deity->element, ris_flags ));
      ch_printf( ch, "\n\rFlee: %-11dFlee_npcrace: %-4dKill_npcrace: "
  	"%-4dKill: %d\n\r", deity->flee, deity->flee_npcrace,
  	deity->kill_npcrace, deity->kill );
***************
*** 729,736 ****
  	deity->aid_spell );
      ch_printf( ch, "Aid: %-12dSteal: %-11dBackstab: %-8dDie: %d\n\r", 
  	deity->aid, deity->steal, deity->backstab, deity->die );
!     ch_printf( ch, "Die_npcrace: %-4dDig_corpse: %-6dSpell_aid %d\n\r",
! 	deity->die_npcrace, deity->dig_corpse, deity->spell_aid );
      ch_printf( ch, "\n\rScorpse: %-8dSavatar: %-9dSdeityobj: %-7d"
  	"Srecall: %d\n\r", deity->scorpse, deity->savatar,
  	deity->sdeityobj, deity->srecall );
--- 858,867 ----
  	deity->aid_spell );
      ch_printf( ch, "Aid: %-12dSteal: %-11dBackstab: %-8dDie: %d\n\r", 
  	deity->aid, deity->steal, deity->backstab, deity->die );
!     ch_printf( ch, "Die_npcrace: %-4dDig_corpse: %-6dSpell_aid: %-7dKill_npcfoe: %d\n\r",
! 	deity->die_npcrace, deity->dig_corpse, deity->spell_aid, deity->kill_npcfoe );
!     ch_printf( ch, "Die_npcfoe: %-5dFlee_npcfoe: %d\n\r", 
! 	deity->die_npcfoe, deity->flee_npcfoe );
      ch_printf( ch, "\n\rScorpse: %-8dSavatar: %-9dSdeityobj: %-7d"
  	"Srecall: %d\n\r", deity->scorpse, deity->savatar,
  	deity->sdeityobj, deity->srecall );
***************
*** 805,810 ****
--- 936,945 ----
          {
             REMOVE_BIT( ch->resistant, ch->pcdata->deity->element );
          }
+ 	if ( IS_SET( ch->susceptible, ch->pcdata->deity->suscept ) )
+ 	{
+ 	   REMOVE_BIT( ch->susceptible, ch->pcdata->deity->suscept );
+ 	}
          if ( is_affected( ch, gsn_blindness ) ) affect_strip( ch, gsn_blindness );
          af.type         = gsn_blindness;
          af.location     = APPLY_HITROLL;
***************
*** 855,860 ****
--- 990,996 ----
  	return;
      }
  
+ /*
      if ( ch->pcdata->deity )
      {
  	AFFECT_DATA af;
***************
*** 869,874 ****
--- 1005,1011 ----
  	{
  	   REMOVE_BIT( ch->resistant, ch->pcdata->deity->element );
  	}
+ 
  	if ( is_affected( ch, gsn_blindness ) ) affect_strip( ch, gsn_blindness );
  	af.type		= gsn_blindness;
  	af.location	= APPLY_HITROLL;
***************
*** 878,883 ****
--- 1015,1021 ----
  	affect_to_char( ch, &af );
  	save_deity(ch->pcdata->deity);
      }	
+ */
  
      STRFREE(ch->pcdata->deity_name);
      ch->pcdata->deity_name = QUICKLINK( deity->name );
***************
*** 890,895 ****
--- 1028,1037 ----
      {
  	SET_BIT( ch->resistant, ch->pcdata->deity->element );
      }
+     if ( !IS_SET( ch->susceptible, ch->pcdata->deity->suscept ) )
+     {
+ 	SET_BIT( ch->susceptible, ch->pcdata->deity->suscept );
+     }
      act( AT_MAGIC, "Body and soul, you devote yourself to $t!", ch, ch->pcdata->deity_name, NULL, TO_CHAR );
      ++ch->pcdata->deity->worshippers;
      save_deity(ch->pcdata->deity);
***************
*** 1057,1062 ****
--- 1199,1211 ----
   	   return;
  	}
  
+ 	if ( ( ch->in_room == get_room_index(6) )
+ 	||   ( ch->in_room == get_room_index(8) ) )
+ 	{
+ 	   send_to_char( "You have been forsaken!\n\r", ch );
+ 	   return;
+ 	}
+ 
  	location = NULL;
   
  	if ( !IS_NPC(ch) && ch->pcdata->clan )
***************
*** 1099,1106 ****
  0 = flee		5 = sac			10 = backstab	
  1 = flee_npcrace	6 = bury_corpse		11 = die
  2 = kill		7 = aid_spell		12 = die_npcrace
! 3 = kil_npcrace		8 = aid			13 = spell_aid
  4 = kill_magic		9 = steal		14 = dig_corpse
  */
  void  adjust_favor( CHAR_DATA *ch, int field, int mod )
  {
--- 1248,1256 ----
  0 = flee		5 = sac			10 = backstab	
  1 = flee_npcrace	6 = bury_corpse		11 = die
  2 = kill		7 = aid_spell		12 = die_npcrace
! 3 = kill_npcrace		8 = aid			13 = spell_aid
  4 = kill_magic		9 = steal		14 = dig_corpse
+ 15 = die_npcfoe	       16 = flee_npcfoe         17 = kill_npcfoe
  */
  void  adjust_favor( CHAR_DATA *ch, int field, int mod )
  {
***************
*** 1117,1139 ****
  	return;
       }
  
     switch ( field )
     {
! 	case 0:  ch->pcdata->favor += ch->pcdata->deity->flee / mod;	break;
! 	case 1:  ch->pcdata->favor += ch->pcdata->deity->flee_npcrace / mod;	break;
! 	case 2:  ch->pcdata->favor += ch->pcdata->deity->kill / mod;	break;
! 	case 3:  ch->pcdata->favor += ch->pcdata->deity->kill_npcrace / mod;	break;
! 	case 4:  ch->pcdata->favor += ch->pcdata->deity->kill_magic / mod;	break;
! 	case 5:  ch->pcdata->favor += ch->pcdata->deity->sac / mod;	break;
! 	case 6:  ch->pcdata->favor += ch->pcdata->deity->bury_corpse / mod;	break;
! 	case 7:  ch->pcdata->favor += ch->pcdata->deity->aid_spell / mod;	break;
! 	case 8:  ch->pcdata->favor += ch->pcdata->deity->aid / mod;	break;	
! 	case 9:  ch->pcdata->favor += ch->pcdata->deity->steal / mod;	break;
! 	case 10: ch->pcdata->favor += ch->pcdata->deity->backstab / mod; break;
! 	case 11: ch->pcdata->favor += ch->pcdata->deity->die / mod;	break;
! 	case 12: ch->pcdata->favor += ch->pcdata->deity->die_npcrace / mod;	break;
! 	case 13: ch->pcdata->favor += ch->pcdata->deity->spell_aid / mod;	break;
! 	case 14: ch->pcdata->favor += ch->pcdata->deity->dig_corpse / mod;	break;
     }
     ch->pcdata->favor = URANGE( -1000, ch->pcdata->favor, 1000 );
     return;
--- 1267,1293 ----
  	return;
       }
  
+    if ( mod < 1 ) mod = 1;
     switch ( field )
     {
! 	case 0:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->flee / mod);	break;
! 	case 1:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->flee_npcrace / mod);	 break;
! 	case 2:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->kill / mod);	break;
! 	case 3:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->kill_npcrace / mod);	 break;
! 	case 4:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->kill_magic / mod);	 break;
! 	case 5:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->sac / mod);	break;
! 	case 6:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->bury_corpse / mod);	 break;
! 	case 7:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->aid_spell / mod);	 break;
! 	case 8:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->aid / mod);	break;	
! 	case 9:  ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->steal / mod);	break;
! 	case 10: ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->backstab / mod); break;
! 	case 11: ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->die / mod);	break;
! 	case 12: ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->die_npcrace / mod);	 break;
! 	case 13: ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->spell_aid / mod);	 break;
! 	case 14: ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->dig_corpse / mod);	 break;
! 	case 15: ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->die_npcfoe / mod);	 break;
! 	case 16: ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->flee_npcfoe / mod);	 break;
! 	case 17: ch->pcdata->favor += number_fuzzy(ch->pcdata->deity->kill_npcfoe / mod);	 break;
     }
     ch->pcdata->favor = URANGE( -1000, ch->pcdata->favor, 1000 );
     return;
diff -cr tmp/dist/src/fight.c dist/src/fight.c
*** tmp/dist/src/fight.c	Mon Dec 16 12:43:37 1996
--- dist/src/fight.c	Thu Feb  6 09:22:48 1997
***************
*** 1242,1248 ****
  	if ( IS_ENERGY(dt) )
  	  dam = ris_damage(victim, dam, RIS_ENERGY);
  	else
! 	if ( dt == gsn_poison )
  	  dam = ris_damage(victim, dam, RIS_POISON);
  	else
  	if ( dt == (TYPE_HIT + 7) || dt == (TYPE_HIT + 8) )
--- 1242,1251 ----
  	if ( IS_ENERGY(dt) )
  	  dam = ris_damage(victim, dam, RIS_ENERGY);
  	else
! 	if ( IS_DRAIN(dt) )
! 	  dam = ris_damage(victim, dam, RIS_DRAIN);
! 	else
! 	if ( dt == gsn_poison || IS_POISON(dt) )
  	  dam = ris_damage(victim, dam, RIS_POISON);
  	else
  	if ( dt == (TYPE_HIT + 7) || dt == (TYPE_HIT + 8) )
***************
*** 1945,1950 ****
--- 1948,1956 ----
  	return TRUE;
      }
  
+     if ( ch->level > LEVEL_IMMORTAL )
+         return FALSE;
+ 
      if( !IS_NPC( ch ) && !IS_NPC( victim )
         && ch != victim 
         && IS_SET( victim->in_room->area->flags, AFLAG_NOPKILL ) ) 
***************
*** 2027,2041 ****
      {
  	if ( !IS_NPC( ch ) )
  	{
  	  if ( ch->pcdata->clan )
  	    ch->pcdata->clan->mkills++;
  	  ch->pcdata->mkills++;
  	  ch->in_room->area->mkills++;
! 	  if ( ( ch->pcdata->deity ) 
! 	  && ( victim->race == ch->pcdata->deity->npcrace ) )
! 	    adjust_favor( ch, 3, 1 );
! 	  else
! 	    adjust_favor( ch, 2, 1 );
  	}
  	return;
      }
--- 2033,2054 ----
      {
  	if ( !IS_NPC( ch ) )
  	{
+ 	  int level_ratio;
+ 	  level_ratio = URANGE( 1, ch->level / victim->level, 50);
  	  if ( ch->pcdata->clan )
  	    ch->pcdata->clan->mkills++;
  	  ch->pcdata->mkills++;
  	  ch->in_room->area->mkills++;
! 	  if ( ch->pcdata->deity ) 
! 	  {
! 	    if ( victim->race == ch->pcdata->deity->npcrace )
! 	      adjust_favor( ch, 3, level_ratio );
! 	    else
! 	      if ( victim->race == ch->pcdata->deity->npcfoe )
! 		adjust_favor( ch, 17, level_ratio );
! 	      else
!                 adjust_favor( ch, 2, level_ratio );
! 	  }
  	}
  	return;
      }
***************
*** 2133,2147 ****
      {
        if ( !IS_NPC(victim) )
        {
          if ( victim->pcdata->clan )
            victim->pcdata->clan->mdeaths++;
          victim->pcdata->mdeaths++;
  	victim->in_room->area->mdeaths++;
! 	if ( ( victim->pcdata->deity )
! 	&& ( ch->race == victim->pcdata->deity->npcrace ) )
! 	  adjust_favor( victim, 12, 1 );
! 	else
! 	  adjust_favor( victim, 11, 1 );
        }
        return;
      }
--- 2146,2167 ----
      {
        if ( !IS_NPC(victim) )
        {
+ 	int level_ratio;
          if ( victim->pcdata->clan )
            victim->pcdata->clan->mdeaths++;
          victim->pcdata->mdeaths++;
  	victim->in_room->area->mdeaths++;
! 	level_ratio = URANGE( 1, ch->level / victim->level, 50 );
! 	if ( victim->pcdata->deity )
! 	{
! 	  if ( ch->race == victim->pcdata->deity->npcrace )
! 	    adjust_favor( victim, 12, level_ratio );
! 	  else
! 	    if ( ch->race == victim->pcdata->deity->npcfoe )
! 		adjust_favor( victim, 15, level_ratio );
! 	    else
! 	        adjust_favor( victim, 11, level_ratio );
! 	}
        }
        return;
      }
***************
*** 2589,2596 ****
      }
      while ( victim->first_affect )
  	affect_remove( victim, victim->first_affect );
!     victim->affected_by	= race_table[victim->race].affected
! 			| (victim->pcdata->deity ? victim->pcdata->deity->affected : 0);
      victim->carry_weight= 0;
      victim->armor	= 100;
      victim->mod_str	= 0;
--- 2609,2618 ----
      }
      while ( victim->first_affect )
  	affect_remove( victim, victim->first_affect );
!     victim->affected_by	= race_table[victim->race].affected;
!     victim->resistant   = 0;
!     victim->susceptible = 0;
!     victim->immune      = 0;
      victim->carry_weight= 0;
      victim->armor	= 100;
      victim->mod_str	= 0;
***************
*** 3213,3231 ****
  	if ( !IS_NPC(ch) )
  	{
  	    CHAR_DATA *wf = who_fighting(ch);
! 
  	    los = (exp_level(ch, ch->level+1) - exp_level(ch, ch->level)) * 0.03;
  	    sprintf(buf, "You flee from combat!  You lose %d experience.", los );
  	    act( AT_FLEE, buf, ch, NULL, NULL, TO_CHAR );
  	    gain_exp( ch, 0 - los );
! 	    if ( ( ch->pcdata->deity )
! 	    && ( wf && wf->race == ch->pcdata->deity->npcrace ) )
! 		adjust_favor( ch, 1, 1 );
! 	    else
! 		adjust_favor( ch, 0, 1 );
  	}
- 	if ( ch->fighting )
-             WAIT_STATE( who_fighting( ch ), 0 );
  	stop_fighting( ch, TRUE );
  	return;
      }
--- 3235,3257 ----
  	if ( !IS_NPC(ch) )
  	{
  	    CHAR_DATA *wf = who_fighting(ch);
! 	    int level_ratio;	    
  	    los = (exp_level(ch, ch->level+1) - exp_level(ch, ch->level)) * 0.03;
  	    sprintf(buf, "You flee from combat!  You lose %d experience.", los );
  	    act( AT_FLEE, buf, ch, NULL, NULL, TO_CHAR );
  	    gain_exp( ch, 0 - los );
! 	    if ( wf ) level_ratio = URANGE( 1, wf->level / ch->level, 50 );
! 	    if ( ch->pcdata->deity )
! 	    {
! 	      if ( wf && wf->race == ch->pcdata->deity->npcrace )
! 		adjust_favor( ch, 1, level_ratio );
!    	      else
! 		if ( wf && wf->race == ch->pcdata->deity->npcfoe )
! 		  adjust_favor( ch, 16, level_ratio );
! 		else
! 		  adjust_favor( ch, 0, level_ratio );
! 	    }
  	}
  	stop_fighting( ch, TRUE );
  	return;
      }
***************
*** 3281,3296 ****
  
      if ( !str_cmp( arg2, "immolate" ) )
      {
!       act( AT_IMMORT, "Your fireball turns $N into a blazing inferno.",  ch, NULL, victim, TO_CHAR    );
!       act( AT_IMMORT, "$n releases a single fireball in your direction.", ch, NULL, victim, TO_VICT    );
!       act( AT_IMMORT, "$n points at $N, who bursts into flames.",  ch, NULL, victim, TO_NOTVICT );
      }
  
      else if ( !str_cmp( arg2, "shatter" ) )
      {
!       act( AT_IMMORT, "You freeze $N with a glance and shatter the frozen corpse into tiny shards.",  ch, NULL, victim, TO_CHAR    );
!       act( AT_IMMORT, "$n freezes you with a glance and shatters your frozen body into tiny shards.", ch, NULL, victim, TO_VICT    );
!       act( AT_IMMORT, "$n freezes $N with a glance and shatters the frozen body into tiny shards.",  ch, NULL, victim, TO_NOTVICT );
      }
  
      else if ( !str_cmp( arg2, "demon" ) )
--- 3307,3322 ----
  
      if ( !str_cmp( arg2, "immolate" ) )
      {
!       act( AT_FIRE, "Your fireball turns $N into a blazing inferno.",  ch, NULL, victim, TO_CHAR    );
!       act( AT_FIRE, "$n releases a searing fireball in your direction.", ch, NULL, victim, TO_VICT    );
!       act( AT_FIRE, "$n points at $N, who bursts into a flaming inferno.",  ch, NULL, victim, TO_NOTVICT );
      }
  
      else if ( !str_cmp( arg2, "shatter" ) )
      {
!       act( AT_LBLUE, "You freeze $N with a glance and shatter the frozen corpse into tiny shards.",  ch, NULL, victim, TO_CHAR    );
!       act( AT_LBLUE, "$n freezes you with a glance and shatters your frozen body into tiny shards.", ch, NULL, victim, TO_VICT    );
!       act( AT_LBLUE, "$n freezes $N with a glance and shatters the frozen body into tiny shards.",  ch, NULL, victim, TO_NOTVICT );
      }
  
      else if ( !str_cmp( arg2, "demon" ) )
***************
*** 3301,3306 ****
--- 3327,3346 ----
        act( AT_IMMORT, "you with a horrible grin.   You scream in panic before being eaten alive.",  ch, NULL, victim, TO_VICT );
        act( AT_IMMORT, "$n gestures, and a slavering demon appears.  With a horrible grin, the",  ch, NULL, victim, TO_NOTVICT );
        act( AT_IMMORT, "foul creature turns on $N, who screams in panic before being eaten alive.",  ch, NULL, victim, TO_NOTVICT );
+     }
+ 
+     else if ( !str_cmp( arg2, "pounce" ) && get_trust(ch) >= LEVEL_ASCENDANT )
+     {
+       act( AT_BLOOD, "Leaping upon $N with bared fangs, you tear open $S throat and toss the corpse to the ground...",  ch, NULL, victim, TO_CHAR );
+       act( AT_BLOOD, "In a heartbeat, $n rips $s fangs through your throat!  Your blood sprays and pours to the ground as your life ends...", ch, NULL, victim, TO_VICT );
+       act( AT_BLOOD, "Leaping suddenly, $n sinks $s fangs into $N's throat.  As blood sprays and gushes to the ground, $n tosses $N's dying body away.",  ch, NULL, victim, TO_NOTVICT );
+     }
+  
+     else if ( !str_cmp( arg2, "slit" ) && get_trust(ch) >= LEVEL_ASCENDANT )
+     {
+       act( AT_BLOOD, "You calmly slit $N's throat.", ch, NULL, victim, TO_CHAR );
+       act( AT_BLOOD, "$n reaches out with a clawed finger and calmly slits your throat.", ch, NULL, victim, TO_VICT );
+       act( AT_BLOOD, "$n calmly slits $N's throat.", ch, NULL, victim, TO_NOTVICT );
      }
  
      else
Only in dist/src: grub.c
diff -cr tmp/dist/src/handler.c dist/src/handler.c
*** tmp/dist/src/handler.c	Mon Dec 16 12:43:37 1996
--- dist/src/handler.c	Thu Feb  6 09:22:48 1997
***************
*** 135,142 ****
      if ( IS_NPC(ch) && ch->level >= LEVEL_AVATAR )
  	return LEVEL_AVATAR;
  
!     if ( ch->level >= LEVEL_SAVIOR && IS_RETIRED( ch ) )
!       return LEVEL_SAVIOR;
  
      return ch->level;
  }
--- 135,142 ----
      if ( IS_NPC(ch) && ch->level >= LEVEL_AVATAR )
  	return LEVEL_AVATAR;
  
!     if ( ch->level >= LEVEL_NEOPHYTE && IS_RETIRED( ch ) )
!       return LEVEL_NEOPHYTE;
  
      return ch->level;
  }
***************
*** 3242,3248 ****
   */
    
    if ( IS_DEVOTED( ch ) )
!     deity_factor = abs( ch->pcdata->favor ) / -100;
    else
      deity_factor = 0;
  
--- 3242,3248 ----
   */
    
    if ( IS_DEVOTED( ch ) )
!     deity_factor = ch->pcdata->favor / -200;
    else
      deity_factor = 0;
  
***************
*** 3267,3273 ****
    }
  
    if ( IS_DEVOTED( ch ) )
!     deity_factor = abs( ch->pcdata->favor ) / -100;
    else
      deity_factor = 0;
  
--- 3267,3273 ----
    }
  
    if ( IS_DEVOTED( ch ) )
!     deity_factor = ch->pcdata->favor / -200;
    else
      deity_factor = 0;
  
diff -cr tmp/dist/src/hashstr.c dist/src/hashstr.c
*** tmp/dist/src/hashstr.c	Mon Dec 16 12:43:37 1996
--- dist/src/hashstr.c	Thu Feb  6 09:22:48 1997
***************
*** 50,56 ****
     psize = sizeof(struct hashstr_data);
     hash = len % STR_HASH_SIZE;
     for (ptr = string_hash[hash]; ptr; ptr = ptr->next )
!      if ( !strcmp(str,(char *)ptr+psize) )
       {
  	if ( ptr->links < 65535 )
  	  ++ptr->links;
--- 50,56 ----
     psize = sizeof(struct hashstr_data);
     hash = len % STR_HASH_SIZE;
     for (ptr = string_hash[hash]; ptr; ptr = ptr->next )
!      if ( len == ptr->length && !strcmp(str,(char *)ptr+psize) )
       {
  	if ( ptr->links < 65535 )
  	  ++ptr->links;
***************
*** 179,185 ****
     psize = sizeof(struct hashstr_data);
     hash = len % STR_HASH_SIZE;
     for (fnd = NULL, ptr = string_hash[hash], c = 0; ptr; ptr = ptr->next, c++ )
!      if ( !strcmp(str,(char *)ptr+psize) )
       {
  	fnd = ptr;
  	p = c+1;
--- 179,185 ----
     psize = sizeof(struct hashstr_data);
     hash = len % STR_HASH_SIZE;
     for (fnd = NULL, ptr = string_hash[hash], c = 0; ptr; ptr = ptr->next, c++ )
!      if ( len == ptr->length && !strcmp(str,(char *)ptr+psize) )
       {
  	fnd = ptr;
  	p = c+1;
diff -cr tmp/dist/src/magic.c dist/src/magic.c
*** tmp/dist/src/magic.c	Mon Dec 16 12:43:38 1996
--- dist/src/magic.c	Thu Feb  6 09:22:49 1997
***************
*** 1163,1173 ****
  	  return;
  
  	if ( !IS_NPC( ch ) && victim && !IS_NPC( victim ) 
! 	&&    CAN_PKILL( victim ) && !CAN_PKILL( ch ) )
  	{
! 	    set_char_color( AT_MAGIC, ch );
! 	    send_to_char( "You cannot cast spells on that player.\n\r", ch );
! 	    return;
  	}
  
  	/*
--- 1163,1174 ----
  	  return;
  
  	if ( !IS_NPC( ch ) && victim && !IS_NPC( victim ) 
! 	&&    CAN_PKILL( victim ) && !CAN_PKILL( ch )
! 	&&   !in_arena( ch ) && !in_arena( victim ) )
  	{
!           set_char_color( AT_MAGIC, ch );
!           send_to_char( "The gods will not permit you to cast spells on that character.\n\r", ch );
!           return;
  	}
  
  	/*
***************
*** 3601,3606 ****
--- 3602,3609 ----
  	return rSPELL_FAILED;
      }
  
+     separate_obj(obj);  /* altrag shoots, haus alley-oops! */
+ 
      if ( IS_OBJ_STAT( obj, ITEM_NODROP ) )
      {
  	send_to_char( "You can't seem to let go of it.\n\r", ch );
***************
*** 4852,4861 ****
--- 4855,4870 ----
  		if ( chance == 1000 )
  		{
  		    retcode = rVICT_IMMUNE;
+ 		    if ( SPELL_FLAG(skill, SF_STOPONFAIL) )
+ 			return retcode;
  		    continue;
  		}
  		if ( saves_poison_death( chance, victim ) )
+ 		{
+ 		    if ( SPELL_FLAG(skill, SF_STOPONFAIL) )
+ 			return retcode;
  		    continue;
+ 		}
  		victim->mental_state = URANGE( 30, victim->mental_state + 2, 100 );
  		break;
  	    case AFF_BLIND:	af.type = gsn_blindness;	break;
***************
*** 4866,4871 ****
--- 4875,4882 ----
  		if ( chance == 1000 )
  		{
  		    retcode = rVICT_IMMUNE;
+ 		    if ( SPELL_FLAG(skill, SF_STOPONFAIL) )
+ 			return retcode;
  		    continue;
  		}
  		break;
***************
*** 4874,4879 ****
--- 4885,4892 ----
  		if ( chance == 1000 )
  		{
  		    retcode = rVICT_IMMUNE;
+ 		    if ( SPELL_FLAG(skill, SF_STOPONFAIL) )
+ 			return retcode;
  		    continue;
  		}
  		break;
***************
*** 5441,5445 ****
--- 5454,5869 ----
  	case TAR_OBJ_INV:
  	  return spell_obj_inv( sn, level, ch, vo );
      }
+     return rNONE;
+ }
+ 
+ 
+ 
+ /* Haus' new, new mage spells follow */
+ 
+ /*
+  *  4 Energy Spells
+  */
+ ch_ret spell_ethereal_fist( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level       = UMAX(0, level);
+     level       = UMIN(35, level);
+     dam         = level*number_range( 1, 6 )-31;
+     dam         = UMAX(0,dam);
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam = 0;
+ 
+     act( AT_MAGIC, "A fist of black, otherworldly ether rams into $N, leaving $M looking stunned!"
+                    , ch, NULL, 
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ 
+ ch_ret spell_spectral_furor( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level	= UMAX(0, level);
+     level	= UMIN(16, level);
+     dam		= level*number_range( 1, 7 )+7;
+     if ( saves_spell_staff( level, victim ) )
+ 	dam /= 2;
+     act( AT_MAGIC, "The fabric of the cosmos strains in fury about $N!"
+                    , ch, NULL, 
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_hand_of_chaos( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level       = UMAX(0, level);
+     level       = UMIN(18, level);
+     dam         = level*number_range( 1, 7 )+9;
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam = 0;
+     act( AT_MAGIC, "$N is grasped by an incomprehensible hand of chaos!"
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ 
+ ch_ret spell_disruption( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level	= UMAX(0, level);
+     level	= UMIN(14, level);
+     dam		= level*number_range( 1, 6 )+8;
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam = 0;
+     act( AT_MAGIC, "A weird energy encompasses $N, causing you to question $S continued existence."
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_sonic_resonance( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level       = UMAX(0, level);
+     level       = UMIN(23, level);
+     dam         = level*number_range( 1, 8 );
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam = dam*3/4;
+     act( AT_MAGIC, "A cylinder of kinetic energy enshrouds $N causing $S to resonate."
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ /*
+  * 3 Mentalstate spells
+  */
+ ch_ret spell_mind_wrack( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     /* decrement mentalstate by up to 50 */
+ 
+     level	= UMAX(0, level);
+     dam		= number_range( 0, 0 );
+     if ( saves_spell_staff( level, victim ) )
+ 	dam /= 2;
+     act( AT_MAGIC, "$n stares intently at $N, causing $N to seem very lethargic."
+                    , ch, NULL,
+ 	 	  victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_mind_wrench( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+     
+     /* increment mentalstate by up to 50 */
+ 
+     level	= UMAX(0, level);
+     dam		= number_range( 0, 0 );
+     if ( saves_spell_staff( level, victim ) )
+ 	dam /= 2;
+     act( AT_MAGIC, "$n stares intently at $N, causing $N to seem very hyperactive."
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ 
+ /* Non-offensive spell! */
+ ch_ret spell_revive( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     /* set mentalstate to mentalstate/2 */
+     level	= UMAX(0, level);
+     dam		= number_range( 0, 0 );
+     if ( saves_spell_staff( level, victim ) )
+ 	dam /= 2;
+     act( AT_MAGIC, "$n concentrates intently, and begins looking more centered."
+                    , ch, NULL,
+ 	 	  victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ /*
+  * n Acid Spells
+  */
+ ch_ret spell_sulfurous_spray( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level       = UMAX(0, level);
+     level       = UMIN(19, level);
+     dam         = 2*level*number_range( 1, 7 )+11;
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam /= 4;
+     act( AT_MAGIC, "A stinking spray of sulfurous liquid rains down on $N." 
+                    , ch, NULL,
+ 	 	  victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_caustic_fount( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level       = UMAX(0, level);
+     level       = UMIN(42, level);
+     dam         = 2*level*number_range( 1, 6 )-31;
+     dam         = UMAX(0,dam);
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam = dam*3/4;
+     act( AT_MAGIC, "A fountain of caustic liquid forms below $N.  The smell of $S degenerating tissues is revolting! "
+                    , ch, NULL,
+ 	 	  victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_acetum_primus( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level       = UMAX(0, level);
+     dam         = 2*level*number_range( 1, 4 )+7;
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam = 3*dam/4;
+     act( AT_MAGIC, "A cloak of primal acid enshrouds $N, sparks form as it consumes all it touches. "
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ /*
+  *  Electrical
+  */
+ 
+ ch_ret spell_galvanic_whip( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level	= UMAX(0, level);
+     level	= UMIN(10, level);
+     dam		= level*number_range( 1, 6 )+5;
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam /= 2;
+     act( AT_MAGIC, "$n conjures a whip of ionized particles, which lashes ferociously at $N."
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_magnetic_thrust( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level       = UMAX(0, level);
+     level       = UMIN(29, level);
+     dam         = (5*level*number_range( 1, 6 )) +16;
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam /= 2;
+     act( AT_MAGIC, "An unseen energy moves nearby, causing your hair to stand on end!"
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_quantum_spike( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam,l;
+ 
+     level       = UMAX(0, level);
+     l 		= UMAX(1,level-40);
+     dam         = l*number_range( 1,40)+145;
+ 
+     if ( saves_spell_staff( level, victim ) )
+ 	dam /= 2;
+     act( AT_MAGIC, "$N seems to dissolve into tiny unconnected particles, then is painfully reassembled."
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ /*
+  * Black-magicish guys
+  */
+ 
+ /* L2 Mage Spell */
+ ch_ret spell_black_hand( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level	= UMAX(0, level);
+     level	= UMIN(5, level);
+     dam		= level*number_range( 1, 6 )+3;
+ 
+     if ( saves_poison_death( level, victim ) )
+ 	dam /= 4;
+     act( AT_MAGIC, "$n conjures a mystical hand, which swoops menacingly at $N."
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_black_fist( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam;
+ 
+     level       = UMAX(0, level);
+     level       = UMIN(30, level);
+     dam         = level*number_range( 1, 9 )+4;
+ 
+     if ( saves_poison_death( level, victim ) )
+ 	dam /= 4;
+     act( AT_MAGIC, "$n conjures a mystical fist, which swoops menacingly at $N."
+                    , ch, NULL,
+ 	 	   victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_black_lightning( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim = (CHAR_DATA *) vo;
+     int dam,l;
+ 
+     level       = UMAX(0, level);
+     l 		= UMAX(1,level-40);
+     dam         = l*number_range(1,50)+135;
+ 
+     if ( saves_poison_death( level, victim ) )
+ 	dam /= 4;
+     act( AT_MAGIC, "$n conjures a mystical black thundercloud directly over $N's head."
+                    , ch, NULL,
+ 	 	  victim, TO_NOTVICT );
+     return damage( ch, victim, dam, sn );
+ }
+ 
+ ch_ret spell_midas_touch( int sn, int level, CHAR_DATA *ch, void *vo )
+ {
+     CHAR_DATA *victim;
+     int val;
+     OBJ_DATA *obj = (OBJ_DATA *) vo;
+ 
+     separate_obj(obj);  /* nice, alty :) */
+ 
+     if ( IS_OBJ_STAT( obj, ITEM_NODROP ) )
+     {
+ 	send_to_char( "You can't seem to let go of it.\n\r", ch );
+ 	return rSPELL_FAILED;  
+     }
+ 
+     if ( IS_OBJ_STAT( obj, ITEM_PROTOTYPE )
+     &&   get_trust( victim ) < LEVEL_IMMORTAL )
+     {
+ 	send_to_char( "That item is not for mortal hands to touch!\n\r", ch );
+ 	return rSPELL_FAILED;   /* Thoric */
+     }
+ 
+     if ( !CAN_WEAR(obj, ITEM_TAKE) 
+        || ( obj->item_type == ITEM_CORPSE_NPC)
+        || ( obj->item_type == ITEM_CORPSE_PC )
+        )
+     {
+        send_to_char( "Your cannot seem to turn this item to gold!", ch);
+        return rNONE;
+     }
+ 
+     val = obj->cost/2;
+     val = UMAX(0, val);
+ 
+     if(  obj->item_type==ITEM_WEAPON ){
+ 	switch( number_bits(2) )
+ 	{
+ 	   case 0: victim = get_char_world( ch, "shmalnoth");	break;
+ 	   case 1:
+ 	   case 2:
+ 	   case 3: victim = get_char_world( ch, "shmalnak" ); break;
+         }
+     } else if (  obj->item_type==ITEM_ARMOR ){
+ 	switch( number_bits(2) )
+ 	{
+ 	   case 0: victim = get_char_world( ch, "shmalnoth");	break;
+ 	   case 1:
+ 	   case 2:
+ 	   case 3: victim = get_char_world( ch, "crafter" ); break;
+         }
+     } else if (  obj->item_type==ITEM_SCROLL ){
+        victim = get_char_world( ch, "tatorious" );
+     } else if (  obj->item_type==ITEM_STAFF ){
+        victim = get_char_world( ch, "tatorious" );
+     } else if (  obj->item_type==ITEM_WAND ){
+        victim = get_char_world( ch, "tatorious" );
+     } else {
+        victim = NULL;
+     }
+ 
+     if (  victim == NULL )
+     {
+         ch->gold += val;
+ 
+         if ( obj_extracted(obj) )
+           return rNONE;
+         if ( cur_obj == obj->serial )
+           global_objcode = rOBJ_SACCED;
+         extract_obj( obj );
+            send_to_char( "O.K.", ch);
+            return rNONE;
+     }
+ 
+ 
+     if ( ( victim->carry_weight + get_obj_weight ( obj ) ) > can_carry_w(victim) 
+     ||	(IS_NPC(victim) && IS_SET(victim->act, ACT_PROTOTYPE)))
+     {
+         ch->gold += val;
+ 
+         if ( obj_extracted(obj) )
+           return rNONE;
+         if ( cur_obj == obj->serial )
+           global_objcode = rOBJ_SACCED;
+         extract_obj( obj );
+            send_to_char( "O.K.", ch);
+            return rNONE;
+     }
+ 
+ 
+     ch->gold += val;
+     obj_from_char( obj );
+     obj_to_char( obj, victim );
+ 
+     send_to_char( "You transmogrify the item to gold!\n\r", ch );
      return rNONE;
  }
diff -cr tmp/dist/src/mud.h dist/src/mud.h
*** tmp/dist/src/mud.h	Thu Jan 16 10:55:20 1997
--- dist/src/mud.h	Thu Feb  6 09:22:50 1997
***************
*** 1,10 ****
  /****************************************************************************
   * [S]imulated [M]edieval [A]dventure multi[U]ser [G]ame      |   \\._.//   *
   * -----------------------------------------------------------|   (0...0)   *
!  * SMAUG 1.0 (C) 1994, 1995, 1996 by Derek Snider             |    ).:.(    *
   * -----------------------------------------------------------|    {o o}    *
!  * SMAUG code team: Thoric, Altrag, Blodkai, Narn, Haus,      |   / ' ' \   *
!  * Scryn, Rennard, Swordbearer, Gorog, Grishnakh and Tricops  |~'~.VxvxV.~'~*
   * ------------------------------------------------------------------------ *
   * Merc 2.1 Diku Mud improvments copyright (C) 1992, 1993 by Michael        *
   * Chastain, Michael Quan, and Mitchell Tse.                                *
--- 1,10 ----
  /****************************************************************************
   * [S]imulated [M]edieval [A]dventure multi[U]ser [G]ame      |   \\._.//   *
   * -----------------------------------------------------------|   (0...0)   *
!  * SMAUG (C) 1994, 1995, 1996 by Derek Snider                 |    ).:.(    *
   * -----------------------------------------------------------|    {o o}    *
!  * SMAUG code team: Thoric, Narn, Scryn, Haus, Swordbearer,   |   / ' ' \   *
!  * Altrag, Grishnakh and Tricops                              |~'~.VxvxV.~'~*
   * ------------------------------------------------------------------------ *
   * Merc 2.1 Diku Mud improvments copyright (C) 1992, 1993 by Michael        *
   * Chastain, Michael Quan, and Mitchell Tse.                                *
***************
*** 16,21 ****
--- 16,22 ----
  
  #include <stdlib.h>
  #include <limits.h>
+ #include <sys/cdefs.h>
  #include <sys/time.h>
  
  /* #include <malloc_dbg.h> */
***************
*** 343,349 ****
    CON_GET_NEW_RACE,	CON_GET_EMULATION,	CON_EDITING,
    CON_GET_WANT_RIPANSI,	CON_TITLE,		CON_PRESS_ENTER,
    CON_WAIT_1,		CON_WAIT_2,		CON_WAIT_3,
!   CON_ACCEPTED,         CON_GET_PKILL
  } connection_types;
  
  /*
--- 344,350 ----
    CON_GET_NEW_RACE,	CON_GET_EMULATION,	CON_EDITING,
    CON_GET_WANT_RIPANSI,	CON_TITLE,		CON_PRESS_ENTER,
    CON_WAIT_1,		CON_WAIT_2,		CON_WAIT_3,
!   CON_ACCEPTED,         CON_GET_PKILL,		CON_READ_IMOTD
  } connection_types;
  
  /*
***************
*** 765,773 ****
--- 766,776 ----
      sh_int	srecall;
      sh_int	flee;
      sh_int	flee_npcrace;
+     sh_int	flee_npcfoe;
      sh_int	kill;
      sh_int	kill_magic;
      sh_int	kill_npcrace;
+     sh_int	kill_npcfoe;
      sh_int	sac;
      sh_int	bury_corpse;
      sh_int	aid_spell;
***************
*** 776,791 ****
      sh_int	steal;
      sh_int	die;
      sh_int	die_npcrace;
      sh_int	spell_aid;
      sh_int	dig_corpse;
      int		race;
-     int		npcrace;
      int		class;
      int		element;
      int		sex;
      int		avatar;
      int		deityobj;
      int		affected;
  };
  
  
--- 779,797 ----
      sh_int	steal;
      sh_int	die;
      sh_int	die_npcrace;
+     sh_int	die_npcfoe;
      sh_int	spell_aid;
      sh_int	dig_corpse;
      int		race;
      int		class;
      int		element;
      int		sex;
      int		avatar;
      int		deityobj;
      int		affected;
+     int		npcrace;
+     int		npcfoe;
+     int		suscept;
  };
  
  
***************
*** 824,829 ****
--- 830,836 ----
      char *	 read_group;		/* Can restrict a board to a       */
      char *	 post_group;		/* council, clan, guild etc        */
      char *	 extra_readers;		/* Can give read rights to players */
+     char *       extra_removers;        /* Can give remove rights to players */
      int		 board_obj;		/* Vnum of board object		   */
      sh_int	 num_posts;		/* Number of notes on this board   */
      sh_int	 min_read_level;	/* Minimum level to read a note	   */
***************
*** 1130,1135 ****
--- 1137,1143 ----
  #define SF_CHARACTER		  BV26  /* directed at a character	*/
  #define SF_SECRETSKILL		  BV27	/* hidden unless learned	*/
  #define SF_PKSENSITIVE		  BV28	/* much harder for plr vs. plr	*/
+ #define SF_STOPONFAIL		  BV29	/* stops spell on first failure */
  
  typedef enum { SS_NONE, SS_POISON_DEATH, SS_ROD_WANDS, SS_PARA_PETRI,
  	       SS_BREATH, SS_SPELL_STAFF } save_types;
***************
*** 1588,1593 ****
--- 1596,1602 ----
  #define PCFLAG_GUEST               BV07
  #define PCFLAG_NOSUMMON		   BV08
  #define PCFLAG_PAGERON		   BV09
+ #define PCFLAG_NOTITLE             BV10
  
  typedef enum
  {
***************
*** 2544,2550 ****
        (link)->next->prev	= (link)->prev;			\
  } while(0)
  
! /*
  #define CHECK_LINKS(first, last, next, prev, type)		\
  do {								\
    type *ptr, *pptr = NULL;					\
--- 2553,2559 ----
        (link)->next->prev	= (link)->prev;			\
  } while(0)
  
! 
  #define CHECK_LINKS(first, last, next, prev, type)		\
  do {								\
    type *ptr, *pptr = NULL;					\
***************
*** 2604,2610 ****
      }								\
    }								\
  } while(0)
! */
  
  #define ASSIGN_GSN(gsn, skill)					\
  do								\
--- 2613,2619 ----
      }								\
    }								\
  } while(0)
! 
  
  #define ASSIGN_GSN(gsn, skill)					\
  do								\
***************
*** 2736,2741 ****
--- 2745,2757 ----
  #define IS_ENERGY(dt)		( IS_VALID_SN(dt) &&			     \
  				SPELL_DAMAGE(skill_table[(dt)]) == SD_ENERGY )
  
+ #define IS_DRAIN(dt)		( IS_VALID_SN(dt) &&			     \
+ 				SPELL_DAMAGE(skill_table[(dt)]) == SD_DRAIN )
+ 
+ #define IS_POISON(dt)		( IS_VALID_SN(dt) &&			     \
+ 				SPELL_DAMAGE(skill_table[(dt)]) == SD_POISON )
+ 
+ 
  #define NOT_AUTHED(ch)		(!IS_NPC(ch) && ch->pcdata->auth_state <= 3  \
  			      && IS_SET(ch->pcdata->flags, PCFLAG_UNAUTHED) )
  
***************
*** 2968,2973 ****
--- 2984,2990 ----
  DECLARE_DO_FUN( do_bashdoor     );
  DECLARE_DO_FUN( do_berserk	);
  DECLARE_DO_FUN( do_bestow	);
+ DECLARE_DO_FUN( do_bestowarea	);
  DECLARE_DO_FUN(	do_bio		);
  DECLARE_DO_FUN(	do_bite		);
  DECLARE_DO_FUN( do_boards	);
***************
*** 3048,3053 ****
--- 3065,3071 ----
  DECLARE_DO_FUN(	do_goto		);
  DECLARE_DO_FUN( do_gouge	);
  DECLARE_DO_FUN(	do_group	);
+ DECLARE_DO_FUN(	do_grub 	);
  DECLARE_DO_FUN(	do_gtell	);
  DECLARE_DO_FUN( do_guilds       );
  DECLARE_DO_FUN( do_guildtalk    );
***************
*** 3120,3130 ****
--- 3138,3150 ----
  DECLARE_DO_FUN( do_northeast	);
  DECLARE_DO_FUN( do_northwest	);
  DECLARE_DO_FUN(	do_notell	);
+ DECLARE_DO_FUN( do_notitle      );
  DECLARE_DO_FUN(	do_noteroom	);
  DECLARE_DO_FUN( do_oassign	);
  DECLARE_DO_FUN( do_ocreate	);
  DECLARE_DO_FUN( do_odelete	);
  DECLARE_DO_FUN(	do_ofind	);
+ DECLARE_DO_FUN(	do_ogrub 	);
  DECLARE_DO_FUN(	do_oinvoke	);
  DECLARE_DO_FUN(	do_oldscore	);
  DECLARE_DO_FUN( do_olist	);
***************
*** 3152,3157 ****
--- 3172,3178 ----
  DECLARE_DO_FUN(	do_purge	);
  DECLARE_DO_FUN( do_push		);
  DECLARE_DO_FUN(	do_put		);
+ DECLARE_DO_FUN( do_qpset	);
  DECLARE_DO_FUN(	do_quaff	);
  DECLARE_DO_FUN(	do_quest	);
  DECLARE_DO_FUN(	do_qui		);
***************
*** 3318,3325 ****
  DECLARE_DO_FUN( do_mpapply	);
  DECLARE_DO_FUN( do_mpapplyb  	);
  DECLARE_DO_FUN( do_mppkset	);
  
- 
  /*
   * Spell functions.
   * Defined in magic.c.
--- 3339,3346 ----
  DECLARE_DO_FUN( do_mpapply	);
  DECLARE_DO_FUN( do_mpapplyb  	);
  DECLARE_DO_FUN( do_mppkset	);
+ DECLARE_DO_FUN( do_mpfavor	);
  
  /*
   * Spell functions.
   * Defined in magic.c.
***************
*** 3396,3401 ****
--- 3417,3441 ----
  DECLARE_SPELL_FUN(      spell_transport      		);
  DECLARE_SPELL_FUN(      spell_portal                    );
  
+ DECLARE_SPELL_FUN(      spell_ethereal_fist                 );
+ DECLARE_SPELL_FUN(      spell_spectral_furor                );
+ DECLARE_SPELL_FUN(      spell_hand_of_chaos                 );
+ DECLARE_SPELL_FUN(      spell_disruption                    );
+ DECLARE_SPELL_FUN(      spell_sonic_resonance               );
+ DECLARE_SPELL_FUN(      spell_mind_wrack                    );
+ DECLARE_SPELL_FUN(      spell_mind_wrench                   );
+ DECLARE_SPELL_FUN(      spell_revive                        );
+ DECLARE_SPELL_FUN(      spell_sulfurous_spray               );
+ DECLARE_SPELL_FUN(      spell_caustic_fount                 );
+ DECLARE_SPELL_FUN(      spell_acetum_primus                 );
+ DECLARE_SPELL_FUN(      spell_galvanic_whip                 );
+ DECLARE_SPELL_FUN(      spell_magnetic_thrust               );
+ DECLARE_SPELL_FUN(      spell_quantum_spike                 );
+ DECLARE_SPELL_FUN(      spell_black_hand                    );
+ DECLARE_SPELL_FUN(      spell_black_fist                    );
+ DECLARE_SPELL_FUN(      spell_black_lightning               );
+ DECLARE_SPELL_FUN(      spell_midas_touch                   );
+ 
  
  /*
   * OS-dependent declarations.
***************
*** 4044,4050 ****
--- 4084,4093 ----
  void	gain_exp	args( ( CHAR_DATA *ch, int gain ) );
  void	gain_condition	args( ( CHAR_DATA *ch, int iCond, int value ) );
  void	update_handler	args( ( void ) );
+ void	reboot_check	args( ( time_t reset ) );
+ #if 0
  void    reboot_check    args( ( char *arg ) );
+ #endif
  void    auction_update  args( ( void ) );
  void	remove_portal	args( ( OBJ_DATA *portal ) );
  
diff -cr tmp/dist/src/mud_comm.c dist/src/mud_comm.c
*** tmp/dist/src/mud_comm.c	Mon Dec 16 12:43:38 1996
--- dist/src/mud_comm.c	Thu Feb  6 09:22:49 1997
***************
*** 1425,1430 ****
--- 1425,1476 ----
                    victim->max_hit : hp;
  }
  
+ /*
+  * Syntax mpfavor target number
+  * Raise a player's favor in progs.
+  */
+ void  do_mpfavor( CHAR_DATA *ch, char *argument )
+ {
+     char arg1[ MAX_INPUT_LENGTH ];
+     char arg2[ MAX_INPUT_LENGTH ];
+     CHAR_DATA *victim;
+     int favor;
+  
+     if ( IS_AFFECTED( ch, AFF_CHARM ) )
+       return;
+  
+     if ( !IS_NPC( ch ) || ( ch->desc && get_trust( ch ) < LEVEL_IMMORTAL )  )
+     {
+         send_to_char( "Huh?\n\r", ch );
+         return;
+     }
+     argument = one_argument( argument, arg1 );
+     argument = one_argument( argument, arg2 );
+ 
+     if ( arg1[0] == '\0' )
+     {
+        send_to_char( "mpfavor whom?\n\r", ch );
+        progbug( "Mpfavor: invalid argument1", ch );
+        return;
+     }
+  
+     if ( arg2[0] == '\0' )
+     {
+        send_to_char( "mpfavor how much favor?\n\r", ch );
+        progbug( "Mpfavor: invalid argument2", ch );
+        return;
+     }
+  
+     if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
+     {
+         send_to_char( "Victim must be in room.\n\r", ch );
+         progbug( "Mpfavor: victim not in room", ch );
+         return;
+     }
+  
+     favor = atoi(arg2);
+     victim->pcdata->favor = URANGE( -1000, victim->pcdata->favor + favor, 1000 );
+ } 
  
  /*
   * Syntax mp_open_passage x y z
diff -cr tmp/dist/src/mud_prog.c dist/src/mud_prog.c
*** tmp/dist/src/mud_prog.c	Mon Dec 16 12:43:38 1996
--- dist/src/mud_prog.c	Thu Feb  6 09:22:49 1997
***************
*** 79,84 ****
--- 79,87 ----
  				       CHAR_DATA* actor, OBJ_DATA* obj,
  				       void* vo, bool single_step ) );
  
+ bool mprog_keyword_check	args( ( const char *argu, const char *argl ) );
+ 
+ 
  void oprog_wordlist_check( char *arg, CHAR_DATA *mob, CHAR_DATA *actor, OBJ_DATA *obj, void *vo, int type, OBJ_DATA *iobj );
  void set_supermob(OBJ_DATA *obj);
  bool oprog_percent_check( CHAR_DATA *mob, CHAR_DATA *actor, OBJ_DATA *obj, void *vo, int type);
***************
*** 641,646 ****
--- 644,653 ----
      {
        return IS_PKILL(chkchar) ? TRUE : FALSE;
      }
+     if ( !str_cmp(chck, "isdevoted") )
+     {
+       return IS_DEVOTED(chkchar) ? TRUE : FALSE;
+     }
      if ( !str_cmp(chck, "canpkill") )
      {
        return CAN_PKILL(chkchar) ? TRUE : FALSE;
***************
*** 701,706 ****
--- 708,717 ----
      {
        return mprog_veval(chkchar->was_in_room->vnum, opr, atoi(rval), mob);
      }
+     if ( !str_cmp(chck, "norecall") )
+     {
+     return IS_SET(chkchar->in_room->room_flags, ROOM_NO_RECALL) ? TRUE : FALSE;
+     }
      if ( !str_cmp(chck, "sex") )
      {
        return mprog_veval(chkchar->sex, opr, atoi(rval), mob);
***************
*** 767,772 ****
--- 778,787 ----
        return mprog_veval(chkchar->pcdata->clan->clan_type, opr, atoi(rval),
            mob);
      }
+     if ( !str_cmp(chck, "favor") )
+     {
+       return mprog_veval(chkchar->pcdata->favor, opr, atoi(rval), mob);
+     }
      if ( !str_cmp(chck, "str") )
      {
        return mprog_veval(get_curr_str(chkchar), opr, atoi(rval), mob);
***************
*** 1640,1645 ****
--- 1655,1710 ----
   * Global function code and brief comments.
   */
  
+ bool mprog_keyword_check( const char *argu, const char *argl )
+ {
+     char word[MAX_INPUT_LENGTH];
+     char arg1[MAX_INPUT_LENGTH];
+     char arg2[MAX_INPUT_LENGTH];
+     int i;
+     char *arg, *arglist;
+     char *start, *end;
+ 
+     strcpy( arg1, strlower( argu ) );
+     arg = arg1;
+     strcpy( arg2, strlower( argl ) );
+     arglist = arg2;
+ 
+     for ( i = 0; i < strlen( arglist ); i++ )
+ 	arglist[i] = LOWER( arglist[i] );
+     for ( i = 0; i < strlen( arg ); i++ )
+ 	arg[i] = LOWER( arg[i] );
+     if ( ( arglist[0] == 'p' ) && ( arglist[1] == ' ' ) )
+     {
+ 	arglist += 2;
+ 	while ( ( start = strstr( arg, arglist ) ) )
+ 	    if ( (start == arg || *(start-1) == ' ' )
+     	    && ( *(end = start + strlen( arglist ) ) == ' '
+     	    ||   *end == '\n'
+     	    ||   *end == '\r'
+     	    ||   *end == '\0' ) )
+ 		return TRUE;
+ 	    else
+ 		arg = start+1;
+     }
+     else
+     {
+ 	arglist = one_argument( arglist, word );
+ 	for ( ; word[0] != '\0'; arglist = one_argument( arglist, word ) )
+ 	    while ( ( start = strstr( arg, word ) ) )
+ 		if ( ( start == arg || *(start-1) == ' ' )
+ 	    	&& ( *(end = start + strlen( word ) ) == ' '
+ 	    	||   *end == '\n'
+ 	    	||   *end == '\r'
+ 	    	||   *end == '\0' ) )
+ 		    return TRUE;
+ 		else
+ 		    arg = start +1;
+     }
+ /*    bug( "don't match" ); */
+     return FALSE;
+ }
+ 
+ 
  /* The next two routines are the basic trigger types. Either trigger
   *  on a certain percent, or trigger on a keyword or word phrase.
   *  To see how this works, look at the various trigger routines..
***************
*** 1648,1662 ****
  			  OBJ_DATA *obj, void *vo, int type )
  {
  
!   char        temp1[ MAX_STRING_LENGTH ];
!   char        temp2[ MAX_INPUT_LENGTH ];
!   char        word[ MAX_INPUT_LENGTH ];
    MPROG_DATA *mprg;
    char       *list;
    char       *start;
    char       *dupl;
    char       *end;
!   int         i;
  
    for ( mprg = mob->pIndexData->mudprogs; mprg; mprg = mprg->next )
      if ( mprg->type & type )
--- 1713,1727 ----
  			  OBJ_DATA *obj, void *vo, int type )
  {
  
!   char	      temp1[ MAX_STRING_LENGTH ];
!   char	      temp2[ MAX_INPUT_LENGTH ];
!   char	      word[ MAX_INPUT_LENGTH ];
    MPROG_DATA *mprg;
    char       *list;
    char       *start;
    char       *dupl;
    char       *end;
!   int	      i;
  
    for ( mprg = mob->pIndexData->mudprogs; mprg; mprg = mprg->next )
      if ( mprg->type & type )
***************
*** 1780,1785 ****
--- 1845,1852 ----
  		       OBJ_DATA *obj, void *vo)
  {
      MPROG_ACT_LIST * tmp_act;
+     MPROG_DATA *mprg;
+     bool found = FALSE;
  
      if ( IS_NPC( mob )
      &&   IS_SET( mob->pIndexData->progtypes, ACT_PROG ) )
***************
*** 1788,1793 ****
--- 1855,1871 ----
  	  trigger another instance. */
  	if ( IS_NPC( ch ) && ch->pIndexData == mob->pIndexData )
  	  return;
+ 
+ 	/* make sure this is a matching trigger */
+ 	for ( mprg = mob->pIndexData->mudprogs; mprg; mprg = mprg->next )
+ 	    if ( mprg->type & ACT_PROG
+ 	    &&   mprog_keyword_check( buf, mprg->arglist ) )
+ 	    {
+ 		found = TRUE;
+ 		break;
+ 	    }
+ 	if ( !found )
+ 	    return;
  
  	CREATE( tmp_act, MPROG_ACT_LIST, 1 );
  	if ( mob->mpactnum > 0 )
diff -cr tmp/dist/src/player.c dist/src/player.c
*** tmp/dist/src/player.c	Mon Dec 16 12:43:39 1996
--- dist/src/player.c	Thu Feb  6 09:22:49 1997
***************
*** 28,34 ****
  
  void do_gold(CHAR_DATA * ch, char *argument)
  {
!    ch_printf( ch,  "You have %d gold pieces.", ch->gold );
     return;
  }
  
--- 28,35 ----
  
  void do_gold(CHAR_DATA * ch, char *argument)
  {
!    set_char_color( AT_GOLD, ch );
!    ch_printf( ch,  "You have %d gold pieces.\n\r", ch->gold );
     return;
  }
  
***************
*** 183,188 ****
--- 184,192 ----
      ch_printf(ch, "LCK  : %2.2d(%2.2d) \n\r",
  	get_curr_lck(ch), ch->perm_lck);
  
+     ch_printf(ch, "Glory: %4.4d(%4.4d) \n\r",
+ 	ch->pcdata->quest_curr, ch->pcdata->quest_accum );
+ 
      ch_printf(ch, "PRACT: %3.3d         Hitpoints: %-5d of %5d   Pager: (%c) %3d    AutoExit(%c)\n\r",
  	ch->practice, ch->hit, ch->max_hit,
  	IS_SET(ch->pcdata->flags, PCFLAG_PAGERON) ? 'X' : ' ',
***************
*** 305,318 ****
  	ch_printf(ch, "Bamfout: %s %s\n\r", ch->name, (ch->pcdata->bamfout[0] != '\0')
  		? ch->pcdata->bamfout : "leaves in a swirling mist.");
  
- 	ch_printf(ch, "Vnums:   Room (%-5.5d - %-5.5d)   Object (%-5.5d - %-5.5d)   Mob (%-5.5d - %-5.5d)\n\r",
- 		ch->pcdata->r_range_lo, ch->pcdata->r_range_hi,
- 		ch->pcdata->o_range_lo, ch->pcdata->o_range_hi,
- 		ch->pcdata->m_range_lo, ch->pcdata->m_range_hi);
  
  	/* Area Loaded info - Scryn 8/11*/
  	if (ch->pcdata->area)
  	    ch_printf(ch, "Area Loaded [%s]\n\r", (IS_SET (ch->pcdata->area->status, AREA_LOADED)) ? "yes" : "no");
      }
      if (ch->first_affect)
      {
--- 309,324 ----
  	ch_printf(ch, "Bamfout: %s %s\n\r", ch->name, (ch->pcdata->bamfout[0] != '\0')
  		? ch->pcdata->bamfout : "leaves in a swirling mist.");
  
  
  	/* Area Loaded info - Scryn 8/11*/
  	if (ch->pcdata->area)
+ 	{
+ 	    ch_printf(ch, "Vnums:   Room (%-5.5d - %-5.5d)   Object (%-5.5d - %-5.5d)   Mob (%-5.5d - %-5.5d)\n\r",
+ 		ch->pcdata->area->low_r_vnum, ch->pcdata->area->hi_r_vnum,
+ 		ch->pcdata->area->low_o_vnum, ch->pcdata->area->hi_o_vnum,
+ 		ch->pcdata->area->low_m_vnum, ch->pcdata->area->hi_m_vnum);
  	    ch_printf(ch, "Area Loaded [%s]\n\r", (IS_SET (ch->pcdata->area->status, AREA_LOADED)) ? "yes" : "no");
+ 	}
      }
      if (ch->first_affect)
      {
***************
*** 523,528 ****
--- 529,539 ----
  	"You have scored %d exp, and have %d gold coins.\n\r",
  	ch->exp,  ch->gold );
  
+     if ( !IS_NPC(ch) )
+     ch_printf( ch,
+ 	"You have achieved %d glory during your life, and currently have %d.\n\r",
+ 	ch->pcdata->quest_accum, ch->pcdata->quest_curr );
+ 
      ch_printf( ch,
  	"Autoexit: %s   Autoloot: %s   Autosac: %s   Autogold: %s\n\r",
  	(!IS_NPC(ch) && IS_SET(ch->act, PLR_AUTOEXIT)) ? "yes" : "no",
***************
*** 849,854 ****
--- 860,871 ----
  	send_to_char( "Sorry... you must be at least level 5 to do that.\n\r", ch );
  	return;
      }
+     if ( IS_SET( ch->pcdata->flags, PCFLAG_NOTITLE ))
+     {
+         send_to_char( "The Gods prohibit you from changing your title.\n\r", ch );
+         return;
+     }
+  
  
      if ( argument[0] == '\0' )
      {
diff -cr tmp/dist/src/requests.c dist/src/requests.c
*** tmp/dist/src/requests.c	Mon Dec 16 12:43:39 1996
--- dist/src/requests.c	Thu Feb  6 09:42:30 1997
***************
*** 36,45 ****
  
  void check_requests( )
  {
    char buf[MAX_STRING_LENGTH];
    char buf2[MAX_STRING_LENGTH];
    int  c;
- #ifdef REQUESTS
    if ( read( REQ, buf, sizeof( buf ) ) != -1 )
    {
       close( REQ );
--- 36,45 ----
  
  void check_requests( )
  {
+ #ifdef REQUESTS
    char buf[MAX_STRING_LENGTH];
    char buf2[MAX_STRING_LENGTH];
    int  c;
    if ( read( REQ, buf, sizeof( buf ) ) != -1 )
    {
       close( REQ );
diff -cr tmp/dist/src/save.c dist/src/save.c
*** tmp/dist/src/save.c	Fri Jan 31 10:26:52 1997
--- dist/src/save.c	Thu Feb  6 09:22:49 1997
***************
*** 279,284 ****
--- 279,286 ----
      		  ch->saving_spell_staff			);
      fprintf( fp, "Alignment    %d\n",	ch->alignment		);
      fprintf( fp, "Favor	       %d\n",	ch->pcdata->favor	);
+     fprintf( fp, "Glory        %d\n",   ch->pcdata->quest_curr  );
+     fprintf( fp, "MGlory       %d\n",   ch->pcdata->quest_accum );
      fprintf( fp, "Hitroll      %d\n",	ch->hitroll		);
      fprintf( fp, "Damroll      %d\n",	ch->damroll		);
      fprintf( fp, "Armor        %d\n",	ch->armor		);
***************
*** 503,513 ****
  	fprintf( fp, "Nest         %d\n",	iNest		     );
      if ( obj->count > 1 )
  	fprintf( fp, "Count        %d\n",	obj->count	     );
- 
-     /*
-      * Even if you get weird warnings, don't modify the QUICKMATCH lines
-      * below... or they won't work properly			-Thoric
-      */
      if ( QUICKMATCH( obj->name, obj->pIndexData->name ) == 0 )
  	fprintf( fp, "Name         %s~\n",	obj->name	     );
      if ( QUICKMATCH( obj->short_descr, obj->pIndexData->short_descr ) == 0 )
--- 505,510 ----
***************
*** 547,553 ****
      if ( obj->cost != obj->pIndexData->cost )
        fprintf( fp, "Cost         %d\n",	obj->cost		     );
      if ( obj->value[0] || obj->value[1] || obj->value[2]
!     ||   obj->value[3] || obj->value[4] || obj->value[5] );
        fprintf( fp, "Values       %d %d %d %d %d %d\n",
  	obj->value[0], obj->value[1], obj->value[2],
  	obj->value[3], obj->value[4], obj->value[5]     );
--- 544,550 ----
      if ( obj->cost != obj->pIndexData->cost )
        fprintf( fp, "Cost         %d\n",	obj->cost		     );
      if ( obj->value[0] || obj->value[1] || obj->value[2]
!     ||   obj->value[3] || obj->value[4] || obj->value[5] )
        fprintf( fp, "Values       %d %d %d %d %d %d\n",
  	obj->value[0], obj->value[1], obj->value[2],
  	obj->value[3], obj->value[4], obj->value[5]     );
***************
*** 1093,1098 ****
--- 1090,1096 ----
              break;
  
  	case 'G':
+ 	    KEY( "Glory",       ch->pcdata->quest_curr, fread_number( fp ) );
  	    KEY( "Gold",	ch->gold,		fread_number( fp ) );
  	    /* temporary measure */
  	    if ( !str_cmp( word, "Guild" ) )
***************
*** 1178,1183 ****
--- 1176,1182 ----
  	case 'M':
  	    KEY( "MDeaths",	ch->pcdata->mdeaths,	fread_number( fp ) );
  	    KEY( "Mentalstate", ch->mental_state,	fread_number( fp ) );
+ 	    KEY( "MGlory",      ch->pcdata->quest_accum,fread_number( fp ) );
  	    KEY( "Minsnoop",	ch->pcdata->min_snoop,	fread_number( fp ) );
  	    KEY( "MKills",	ch->pcdata->mkills,	fread_number( fp ) );
  	    KEY( "Mobinvis",	ch->mobinvis,		fread_number( fp ) );
***************
*** 1526,1531 ****
--- 1525,1531 ----
      CREATE( obj, OBJ_DATA, 1 );
      obj->count		= 1;
      obj->wear_loc	= -1;
+     obj->weight		= 1;
  
      fNest		= TRUE;		/* Requiring a Nest 0 is a waste */
      fVnum		= TRUE;
diff -cr tmp/dist/src/shops.c dist/src/shops.c
*** tmp/dist/src/shops.c	Mon Dec 16 12:43:39 1996
--- dist/src/shops.c	Thu Feb  6 09:22:49 1997
***************
*** 732,743 ****
      return;
  }
  
  void do_repair( CHAR_DATA *ch, char *argument )
  {
-     char buf[MAX_STRING_LENGTH];
      CHAR_DATA *keeper;
      OBJ_DATA *obj;
-     int cost;
      char *fixstr;
      char *fixstr2;
      int maxgold;
--- 732,812 ----
      return;
  }
  
+ /*
+  * Repair a single object. Used when handling "repair all" - Gorog
+  */
+ void repair_one_obj( CHAR_DATA *ch, CHAR_DATA *keeper, OBJ_DATA *obj,
+                  char *arg, int maxgold, char *fixstr, char*fixstr2 )
+ {
+    char buf[MAX_STRING_LENGTH];
+    int cost;
+ 
+    if ( !can_drop_obj( ch, obj ) )
+        ch_printf( ch, "You can't let go of %s.\n\r", obj->name );
+    else if ( ( cost = get_repaircost( keeper, obj ) ) < 0 )
+    {
+        if (cost != -2)
+        act( AT_TELL, "$n tells you, 'Sorry, I can't do anything with $p.'", 
+             keeper, obj, ch, TO_VICT );
+        else
+ 	  act( AT_TELL, "$n tells you, '$p looks fine to me!'", keeper, obj, ch, TO_VICT );
+    }
+                /* "repair all" gets a 10% surcharge - Gorog */
+ 
+    else if ( (cost = strcmp("all",arg) ? cost : 11*cost/10) > ch->gold )
+    {
+       sprintf( buf,
+        "$N tells you, 'It will cost %d piece%s of gold to %s %s...'", cost,
+         cost == 1 ? "" : "s", fixstr, obj->name );
+       act( AT_TELL, buf, ch, NULL, keeper, TO_CHAR );
+       act( AT_TELL, "$N tells you, 'Which I see you can't afford.'", ch,
+               NULL, keeper, TO_CHAR );
+    }
+    else
+    {
+       sprintf( buf, "$n gives $p to $N, who quickly %s it.", fixstr2 );
+       act( AT_ACTION, buf, ch, obj, keeper, TO_ROOM );
+       sprintf( buf, "$N charges you %d gold piece%s to %s $p.",
+           cost, cost == 1 ? "" : "s", fixstr );
+       act( AT_ACTION, buf, ch, obj, keeper, TO_CHAR );
+       ch->gold     -= cost;
+       keeper->gold += cost;
+       if ( keeper->gold < 0 )
+           keeper->gold = 0;
+       else
+       if ( keeper->gold > maxgold )
+       {
+           boost_economy( keeper->in_room->area, keeper->gold - maxgold/2 );
+           keeper->gold = maxgold/2;
+           act( AT_ACTION, "$n puts some gold into a large safe.", keeper, 
+ 		NULL, NULL, TO_ROOM );
+       }
+ 
+       switch ( obj->item_type )
+       {
+           default:
+             send_to_char( "For some reason, you think you got ripped off...\n\r", ch);
+             break;
+           case ITEM_ARMOR:
+             obj->value[0] = obj->value[1];
+             break;
+           case ITEM_WEAPON:
+             obj->value[0] = INIT_WEAPON_CONDITION;
+             break;
+           case ITEM_WAND:
+           case ITEM_STAFF:
+             obj->value[2] = obj->value[1];
+             break;
+       }
+ 
+       oprog_repair_trigger( ch, obj );
+    }
+ }
+ 
  void do_repair( CHAR_DATA *ch, char *argument )
  {
      CHAR_DATA *keeper;
      OBJ_DATA *obj;
      char *fixstr;
      char *fixstr2;
      int maxgold;
***************
*** 765,770 ****
--- 834,855 ----
  	  break;
      }
  
+     if ( !strcmp( argument, "all" ) )
+     {
+ 	for ( obj = ch->first_carrying; obj ; obj = obj->next_content )
+ 	{
+            if ( obj->wear_loc  == WEAR_NONE
+            &&   can_see_obj( ch, obj )
+ 	   && ( obj->item_type == ITEM_ARMOR
+ 	   ||   obj->item_type == ITEM_WEAPON
+ 	   ||   obj->item_type == ITEM_WAND
+ 	   ||   obj->item_type == ITEM_STAFF ) )
+                 repair_one_obj( ch, keeper, obj, argument, maxgold,
+                                 fixstr, fixstr2);
+ 	}
+     return;
+     }
+ 
      if ( ( obj = get_obj_carry( ch, argument ) ) == NULL )
      {
  	act( AT_TELL, "$n tells you 'You don't have that item.'",
***************
*** 773,840 ****
  	return;
      }
  
!     if ( !can_drop_obj( ch, obj ) )
!     {
! 	send_to_char( "You can't let go of it.\n\r", ch );
! 	return;
!     }
! 
!     if ( ( cost = get_repaircost( keeper, obj ) ) < 0 )
!     {
! 	if (cost != -2)
! 	  act( AT_TELL, "$n tells you, 'Sorry, I can't do anything with $p.'", keeper, obj, ch, TO_VICT );
! 	else
! 	  act( AT_TELL, "$n tells you, '$p looks fine to me!'", keeper, obj, ch, TO_VICT );
! 	return;
!     }
! 
!     if ( cost > ch->gold )
!     {
! 	sprintf( buf, "$N tells you, 'It will cost %d piece%s of gold to %s that...'", cost,
! 		cost == 1 ? "" : "s", fixstr );
! 	act( AT_TELL, buf, ch, NULL, keeper, TO_CHAR );
! 	act( AT_TELL, "$N tells you, 'Which I see you can't afford.'", ch,
! 		NULL, keeper, TO_CHAR );
! 	return;
!     }
  
!     sprintf( buf, "$n gives $p to $N, who quickly %s it.", fixstr2 );
!     act( AT_ACTION, buf, ch, obj, keeper, TO_ROOM );
!     sprintf( buf, "$N charges you %d gold piece%s to %s $p.",
! 	cost, cost == 1 ? "" : "s", fixstr );
!     act( AT_ACTION, buf, ch, obj, keeper, TO_CHAR );
!     ch->g

Showing the first 150 KB. Download the file for the full text.

Site Stats

Snippets: 1791
Codebases: 571