I've looked at other autoassit codes submitted to the circle site, and I
noticed that all are lacking. They are lacking in the fact that they only
assist at the start of combat. If you flee and come back, or walk in and
join the group during combat, then you still have to manually assist.

This snippet corrects this deficiency.

!!!! This is being uploaded because I made some minor fixes to prev one !!!!

Dylan Myers a.k.a. Ulath of Caer Dubrin
telnet://cd.dubrin.net:9900
ralgith@yahoo.com

in structs.h:
#define PRF_AUTOASSIST (1 << ??) /* Whatever number is next */

-------------------------------------------------------------------------

in interpreter.h:
#define SCMD_AUTOASSIST ?? /* Whatever number is next */

-------------------------------------------------------------------------

in interpreter.c:
{"autoassist", POS_DEAD, do_gen_tog, 0, SCMD_AUTOASSIST},

-------------------------------------------------------------------------

in act.other.c with all the other do_gen_toggle messages:
{"You will no longer Auto-Assist.\r\n",
 "You will now Auto-Assist.\r\n"},

Further down...
case SCMD_AUTOASSIST:
  result = PRF_TOG_CHK(ch, PRF_AUTOASSIST);
  break;

Make sure that the message and actual toggle are in same position (You
should all know that by now!!)

-------------------------------------------------------------------------

in fight.c:
struct follow_type *k;
ACMD(do_assist);


and at the end of it, right before hit(ch, FIGHTING(ch), TYPE_UNDEFINED); add:

for (k = ch->followers; k; k=k->next) {
      if (PRF_FLAGGED(k->follower, PRF_AUTOASSIST) &&
        (k->follower->in_room == ch->in_room))
       do_assist(k->follower, GET_NAME(ch), 0, 0);
    }