|
Autoassist Code [by Josh B.] |
|
|
|
Posted Wednesday, August 12th @ 11:24:02 PM, by George Greer in the Commands dept.
Added May 6, 1997. Click the link below to read it or download it.
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);
}
---------------------------------------------------------------
This is about it, of course it isn't to the exact detail, but if you
need help, just e-mail me, or e-mail the list.
<< Assassin mobs [by Doppleganger Software] | Reply | View as text | Flattened | Autodiagnosis Code [by Will Shaw] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|