Here's a nice little skill for your rangers or druids called "befriend" which will allow the ranger to "charm" animal-type mobs. You'll need some way to flag a mob as an animal - I implemented mob "classes", but you could just as create a MOB_ANIMAL flag instead, in which case you'll need to change the GET_CLASS(vict) == CLASS_ANIMAL to MOB_FLAGGED(vict, MOB_ANIMAL) You might want to have the mob attack the ranger on a really bad die roll (say, 95+), but I'll leave that to your discretion :p ACMD(do_befriend) { struct char_data *vict = NULL; struct affected_type af; int percent, prob, mod = 0; one_argument(argument, arg); if (!*arg) { send_to_char("Befriend what?\r\n", ch); return; } if (!(vict = get_char_room_vis(ch, arg))) { send_to_char("They're not hear...\r\n", ch); return; } if (vict == ch) { send_to_char("How sad that you have no other friends...\r\n", ch); return; } if (!IS_NPC(vict)) { send_to_char("I don't think so...\r\n", ch); return; } if (!GET_SKILL(ch, SKILL_BEFRIEND)) { send_to_char("Nice doggie....\r\n", ch); return; } if (IS_NPC(vict) && GET_CLASS(vict) != CLASS_ANIMAL) { send_to_char("That is not an animal!\r\n", ch); return; } if (GET_LEVEL(vict) > GET_LEVEL(ch)) { send_to_char("That animal is too independent-minded to join the likes of you!\r\n", ch); return; } percent = dice(1, 100); prob = GET_SKILL(ch, SKILL_BEFRIEND) + GET_CHA(ch); if (percent > prob) { sprintf(buf, "%s snaps at your hand!\r\n", vict->player.short_descr); send_to_char(buf, ch); return; } mod = -(((GET_LEVEL(ch) - 1) / 3) + 1); if (mag_savingthrow(vict, SAVING_ROD, mod)) { sprintf(buf, "%s shies away from you...\r\n", vict->player.short_descr); send_to_char(buf, ch); return; } if (vict->master) stop_follower(vict); add_follower(vict, ch); af.type = SPELL_CHARM; if (GET_INT(vict)) af.duration = 24 * 18 / GET_INT(vict); else af.duration = 24 * 18; af.modifier = 0; af.location = 0; af.bitvector = AFF_CHARM; affect_to_char(vict, &af); act("Isn't $n just such a nice fellow?", FALSE, ch, 0, vict, TO_VICT); if (IS_NPC(vict)) { REMOVE_BIT(MOB_FLAGS(vict), MOB_AGGRESSIVE); REMOVE_BIT(MOB_FLAGS(vict), MOB_SPEC); } } Angelfire for your free web-based e-mail. http://www.angelfire.com +------------------------------------------------------------+ | 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