/* this code made by Sean Cohmer - Autodamage */

@@@ act_info.c
   send_to_char("autoassist     ",ch);
   if (IS_SET(ch->act,PLR_AUTOASSIST))
       send_to_char("ON\n\r",ch);
   else
      send_to_char("OFF\n\r",ch); 

+   send_to_char("autodamage     ",ch);
+    if (IS_SET(ch->act,PLR_AUTODAMAGE))
+        send_to_char("ON\n\r",ch);
+    else
+        send_to_char("OFF\n\r",ch);


void do_autoassist(CHAR_DATA *ch, char *argument)
 {
    if (IS_NPC(ch))
      return;
        if (IS_SET(ch->act,PLR_AUTOASSIST))    {
      send_to_char("Autoassist removed.\n\r",ch);      
      REMOVE_BIT(ch->act,PLR_AUTOASSIST);    
   }    
    else    {      
      send_to_char("You will now assist when needed.\n\r",ch);
      SET_BIT(ch->act,PLR_AUTOASSIST); 
  }
}



+ void do_autodamage(CHAR_DATA *ch, char *argument)
+   {
+     if (IS_NPC(ch))
+      return;
+        if (IS_SET(ch->act,PLR_AUTODAMAGE))    {
+      send_to_char("Autodamage is currently OFF.\n\r",ch);      
+      REMOVE_BIT(ch->act,PLR_AUTODAMAGE);    
+   }    
+        else    {            
+      send_to_char("Autodamage is currently ON.\n\r",ch);
+      SET_BIT(ch->act,PLR_AUTODAMAGE); 
+   }
+ }

@@@ fight.c

	 else
          {
	sprintf( buf1, "$n's %s %s $N%c",  attack, vp, dam, punct);
    	sprintf( buf2, "Your %s %s $N%c",  attack, vp, dam, punct);
    	sprintf( buf3, "$n's %s %s you%c", attack, vp, dam, punct);
          }


+   else if (PLR_AUTODAMAGE == true)
+      {
+        sprintf( buf1, "$n's %s %s $N%c",  attack, vp, punct );
+        sprintf( buf2, "Your %s %s $N%c (%s)",  attack, vp, punct, dam );
+        sprintf( buf3, "$n's %s %s you%c (%s)", attack, vp, punct, dam );
+      }

@@@ interp.c

{ "autoassist",	do_autoassist,	POS_DEAD,        0,  LOG_NORMAL, 1 },

+  { "autodamage", do_autodamage,     POS_DEAD,        0,  LOG_NORMAL, 1 },

@@@ interp.h

DECLARE_DO_FUN( do_autoassist	);

+  DECLARE_DO_FUN( do_autodamage    );

@@@ merc.h

#define PLR_AUTOASSIST		(C)

+   #define PLR_AUTODAMAGE            (D)

/*  note: change the rest of the alphabetical variables ie. D on autoexit
 *  would change to another variable (E) and so on for the rest of the RT
 *  auto flags..
 */

@@@ tables.c

{ "autoassist", 	C,	FALSE	},

+   { "autodamage",          D,    FALSE },

/*  note: you'll again have to change the alpha-variables so that the
 *  variables match the one's you just defined in merc.h...
 *
 *  thats also about all i need to put in, if you want to add in color
 *  to the autodamage code, add it yourself cause if you're doing this
 *  you should already know how to put color into this code... bye  8)
 */
From scohmer@ns1.in-touch.net Thu Apr  2 15:46:30 1998
Date: Wed, 28 Jan 1998 17:54:16 -0500
From: Sean Cohmer <scohmer@ns1.in-touch.net>
To: darkoth@rep.mudservices.com
Subject: autodamage.txt

if you've never heard of this code, before, its a great code, its just
not been actually released yet, as far as i know..  i think its cause
mud owners wanna keep it to themselves, but i figured out how they did
it and ended up with what i got, im not a really experienced programmer,
and i havent tested this code yet, but i am pretty sure that this code
works, codewise the whole thing looks fine to me, but for the time-being
i need an ansi compiler msvc++ and that might take a while, but for now,
ill give you what i came up with, believe me this is a great code, fate
of kingdoms at fate.mudservices.com uses this autodamage code, but i
doubt its exactly the same as mine, but ill most likely never know, i'd
just like to put this out on the web just to give back to game.org, and
mudservices, and all the people who've made ROM 2.4 possible, its
great..

/* this code made by Sean Cohmer - Autodamage */

@@@ act_info.c
   send_to_char("autoassist     ",ch);
   if (IS_SET(ch->act,PLR_AUTOASSIST))
       send_to_char("ON\n\r",ch);
   else
      send_to_char("OFF\n\r",ch); 

+   send_to_char("autodamage     ",ch);
+    if (IS_SET(ch->act,PLR_AUTODAMAGE))
+        send_to_char("ON\n\r",ch);
+    else
+        send_to_char("OFF\n\r",ch);


void do_autoassist(CHAR_DATA *ch, char *argument)
 {
    if (IS_NPC(ch))
      return;
        if (IS_SET(ch->act,PLR_AUTOASSIST))    {
      send_to_char("Autoassist removed.\n\r",ch);      
      REMOVE_BIT(ch->act,PLR_AUTOASSIST);    
   }    
    else    {      
      send_to_char("You will now assist when needed.\n\r",ch);
      SET_BIT(ch->act,PLR_AUTOASSIST); 
  }
}



+ void do_autodamage(CHAR_DATA *ch, char *argument)
+   {
+     if (IS_NPC(ch))
+      return;
+        if (IS_SET(ch->act,PLR_AUTODAMAGE))    {
+      send_to_char("Autodamage is currently OFF.\n\r",ch);      
+      REMOVE_BIT(ch->act,PLR_AUTODAMAGE);    
+   }    
+        else    {            
+      send_to_char("Autodamage is currently ON.\n\r",ch);
+      SET_BIT(ch->act,PLR_AUTODAMAGE); 
+   }
+ }

@@@ fight.c

	 else
          {
	sprintf( buf1, "$n's %s %s $N%c",  attack, vp, dam, punct);
    	sprintf( buf2, "Your %s %s $N%c",  attack, vp, dam, punct);
    	sprintf( buf3, "$n's %s %s you%c", attack, vp, dam, punct);
          }


+   else if (PLR_AUTODAMAGE == true)
+      {
+        sprintf( buf1, "$n's %s %s $N%c",  attack, vp, punct );
+        sprintf( buf2, "Your %s %s $N%c (%s)",  attack, vp, punct, dam );
+        sprintf( buf3, "$n's %s %s you%c (%s)", attack, vp, punct, dam );
+      }

@@@ interp.c

{ "autoassist",	do_autoassist,	POS_DEAD,        0,  LOG_NORMAL, 1 },

+  { "autodamage", do_autodamage,     POS_DEAD,        0,  LOG_NORMAL, 1 },

@@@ interp.h

DECLARE_DO_FUN( do_autoassist	);

+  DECLARE_DO_FUN( do_autodamage    );

@@@ merc.h

#define PLR_AUTOASSIST		(C)

+   #define PLR_AUTODAMAGE            (D)

/*  note: change the rest of the alphabetical variables ie. D on autoexit
 *  would change to another variable (E) and so on for the rest of the RT
 *  auto flags..
 */

@@@ tables.c

{ "autoassist", 	C,	FALSE	},

+   { "autodamage",          D,    FALSE },

/*  note: you'll again have to change the alpha-variables so that the
 *  variables match the one's you just defined in merc.h...
 *
 *  thats also about all i need to put in, if you want to add in color
 *  to the autodamage code, add it yourself cause if you're doing this
 *  you should already know how to put color into this code... bye  8)
 */

