> and steals a random item or gold..like below..might be useful to eight
> mobprog or dg people (with a little tweaking)..
heh..i meant 'either', not 'eight'..
ObCircle:
let's see..something simple..ok..here's a command that will set all mobs
of a certain level hunting a character..a funny way to put the fuck-up on
a mort that rubs you the wrong way..beware it may cause killer lag..you
need to have mob hunting implemented..
ACMD(do_masshunt)
{
struct char_data *vict, *i, *next_char;
int value;
argument = one_argument(argument, arg);
if (!(vict = get_char_vis(ch, arg))) {
send_to_char("You must supply a victim.\r\n", ch);
return;
}
if (vict == ch) {
send_to_char("Aren't we funny today...\r\n", ch);
return;
}
if ((GET_LEVEL(vict) >= GET_LEVEL(ch)) || IS_NPC(vict) || IS_NPC(ch)) {
send_to_char("Quit fucking around!\r\n", ch);
return;
}
one_argument(argument, buf);
if (!*buf) {
send_to_char("You must specify the level for mobs.\n\r", ch);
return;
}
if (!is_number(buf)) {
send_to_char("The level must be a number between 1 and 100.\r\n", ch);
return;
}
value = atoi(buf);
if (value < 0) {
send_to_char("Minimum value for levels is 1.\n\r", ch);
return;
}
if (value > 100) {
send_to_char("Max value for levels is 100.\n\r", ch);
return;
}
log("%s all mobs level %d hunting %s.", GET_NAME(ch), value, GET_NAME(vict));
send_to_char(OK, ch);
/* now go through mob list */
for (i = character_list; i; i = next_char) {
next_char = i->next;
if (!IS_NPC(i))
continue;
if (MOB_FLAGGED(i, MOB_SENTINEL) || (GET_LEVEL(i) != value))
continue;
HUNTING(i) = vict;
}
}
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST