I found this snippet on the circlemud ftp site:
------------------------------------------------------------------
From: "Josh B." <ruiner@mail.org>
Subject: Fast, easy, Autoassist code!
Hey all, just thought I'd post the code that I use for autoassisting,
use it if you want... I'm not responsible for anything that happens
when using it.
Structs.h:
#define PRF_AUTOASSIST ??; /* Whatever number is next */
Interpreter.h:
#define SCMD_AUTOASSIST ??; /* Whatever number is next */
Interpreter.c:
{"autoassist", POS_DEAD, do_gen_tog, 0, SCMD_AUTOASSIST},
Act.other.c:
{"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;
Act.offensive.c:
in the function ACMD(do_hit):
struct follow_type *k
ACMD(do_assist);
after the line hit(ch, vict, 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);
}
------------------------------------------------------------------
And what I need to know is what to do with the part:
Act.other.c:
{"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;
I know I don't just throw it there anywhere! :)
-Neostar
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/06/01 PST