This snippet was taken from www.grayarea.com/sneak.htm and MAY NOT be
posted on your web site. It MUST be linked back to the above URL for   
download.   

- In merc.h add:
- (you probably already have this so check!)
#define deathmsg(format,ch,arg1,arg2,type)\
        act_sub((format),(ch),(arg1),(arg2),(type),POS_RESTING)

- Under struct pc_data add:
 char *              deathblow;

- In act_info.c add:

void set_deathblow( CHAR_DATA *ch, char *deathblow )
{
    char buf[MAX_STRING_LENGTH];

    if ( IS_NPC(ch) )
    {
        bug( "Set_deathblow: NPC.", 0 );
        return;
    }

        strcpy( buf, deathblow );


    free_string( ch->pcdata->deathblow );
    ch->pcdata->deathblow = str_dup( buf );
    return;
}

void do_deathblow( CHAR_DATA *ch, char *argument )
{   char deathmsg[MAX_STRING_LENGTH];

    if ( IS_NPC(ch) )
        return;

    if ( argument[0] == '\0' )
    {
        send_to_char( "Change your deathblow message to what?\n\r", ch );
        send_to_char( "Running deathblow with no argument sets deathblow to none.\n\r",ch);
        ch->pcdata->deathblow = NULL;
        return;
    }

    if ( strlen(argument) > 45 )
        argument[45] = '\0';

    smash_tilde( argument );
    set_deathblow( ch, argument );
    send_to_char( "Deathblow message has been set to:\n\r", ch );
    sprintf(deathmsg,"%s{x\n\r",ch->pcdata->deathblow);
    send_to_char(deathmsg,ch);
}

- In fight.c in the damage() function rip out your case POS_DEAD: (all of the code up
- to and including the first break; after POS_DEAD: and replace it with:

 case POS_DEAD:
if(!IS_NPC(ch)) {
if(!ch->pcdata->deathblow) {
 switch ( number_bits( 3 ) )
    {
    default: act("{x{WYou tear the {x{Mheart{x {W out of $N!{x",ch,NULL,victim,TO_CHAR); break;
    case  0:  act("{x{WYou smash your weapon through $N's skull!{x",ch,NULL,victim,TO_CHAR);  break;
    case  1:  act("{x{WYou pull $N's spine out through their mouth!{x",ch,NULL,victim,TO_CHAR);  break;
    case  2:  act("{x{WYou land your blow directly on $N's spine!{x",ch,NULL,victim,TO_CHAR);  break;
    case  4:  act("{x{WYou cleave $N in half with one mighty swing!{x",ch,NULL,victim,TO_CHAR);  break;
    case  5:  act("{x{WYou tear $N's windpipe right out of their throat!{x",ch,NULL,victim,TO_CHAR); break;
    case  6: act("{x{WYou disembowel $N with amazing skill!{x",ch,NULL,victim,TO_CHAR); break;
    } } else
{
  deathmsg(ch->pcdata->deathblow,ch,NULL,victim,TO_ROOM);
  deathmsg(ch->pcdata->deathblow,ch,NULL,victim,TO_CHAR);
  } }

        act( "{R$n is DEAD!!{x", victim, 0, 0, TO_ROOM );
        send_to_char( "{RYou have been KILLED!!{x\n\r\n\r", victim );
        break;

- In interp.c insert this in your commands table:
  { "deathblow",      do_deathblow,   POS_DEAD,         0,  LOG_NORMAL, 1},
- You must also declare it in interp.h DUH

- To make the messages save add this to save.c:
- Under fwrite_char add:
 if(ch->pcdata->deathblow > 0)
    fprintf( fp, "Dblow %s~\n", ch->pcdata->deathblow);
- Under case 'D': of fread_char() add:
   KEY( "Dblow",       ch->pcdata->deathblow,  fread_string( fp ) );


- In recycle.c add:
- In the free_pcdata() function:
  free_string(pcdata->deathblow);
- I put it right after free_string(pcdata->title);

