From the NannyMUD documentation

LAST CHANGE

2000-12-15

FUNCTION


NAME

        monster_died - called when a monster dies

LOCATION

	Can be placed anywhere as long as monster is configured to
	call that place for it.

SYNTAX

	int monster_died(object monster);

DESCRIPTION

	If either dead_ob or real_dead_ob (or both) are set, then this
	function is called.  For real_dead_ob (a Padrone hack that is 
	specific to Nanny), it is called when a monster is 'about' to die:
	that is, when it has received enough damage to put it below 0 
	hit points but has not performed the calculations yet and has
	not died.  As stated above, a true value prevents it from dying.

	The other case, when dead_ob is set, the monster has technically
	died.  Experience has been rewarded, everything calculated and
	finished except for the destruction of the monster.  As per above,
	a true value prevents the latter.

	They are called in the following context:
	if( dead_ob ) dead_ob->monster_died(this_object());
	if( real_dead_ob ) real_dead_ob->monster_died(this_object());

RETURN VALUES

	A true value may mean two things:
	  If real_dead_ob is set and monster_died is called in it, it means
	  the object does not actually die.  No experience is rewarded.

	  If dead_ob is set and monster_died is called in it, then the
	  attacker gains experience from defeating the monster, but the
	  monster is not destructed (though a corpse is created).
	A zero value does nothing.

NOTE

	To prevent a monster from dying, use Padrone's 'real_second_life'
	hack.  The original version is left in mainly for compatibility.

	this_player() should return the killer of the monster if nothing
	funny occurs.

EXAMPLE

	In a priest monster:
	reset(arg) { 
	        ...
	   set_real_dead_ob(this_object());
	        ...
	}
	monster_died(poor_monster) {
	  if( command("drink potion of healing", poor_monster) )
	     return 1;
	}
	In this example, the monster will not die until it runs out of
	potions of healing.

SEE ALSO

        hit_player in lfun/living/hit_player