Bragging Npc's - A ButterMud Production ButterMud - Telnet://betterbox.net:4000 Players seem to really enjoy this one. When someone on the mud dies at the hands of an Npc, they end up having to suffer the humiliation of the npc's taunts on the gossip channel! It goes in quick and easy. Any questions/problems suggestions, feel free to drop me some email. -Jac jacobin@bellatlantic.net Add the following to comm.h __comm.h__ void brag(struct char_data *ch, struct char_data *victim); __ Add the following to fight.c __fight.c__ /* External procedures */ void brag(struct char_data * ch, struct char_data * victim); _Now call the brag fuction whenever an npc kills a player character. I added it within the following conditional, and works like a charm. if (!IS_NPC(victim)) { sprintf(buf2, "%s killed by %s at %s", GET_NAME(victim), GET_NAME(ch), world[victim->in_room].name); mudlog(buf2, BRF, LVL_IMMORT, TRUE); if (IS_NPC(ch)) brag(ch, victim); /* <- Insert brag call here */ if (MOB_FLAGGED(ch, MOB_MEMORY)) forget(ch, victim); } __ Now add the following function to the end of comm.c __comm.c__ void brag(struct char_data *ch, struct char_data *vict) { /* Npc taunts slayed player characters. Text goes out through gossip channel. Muerte - Telnet://betterbox.net:4000 */ struct descriptor_data *i; char brag[256]={" "}; switch (number(0, 11)) { case 0: sprintf(brag, "$n brags, '%s was just too easy a kill!'", GET_NAME(vict)); break; case 1: sprintf(brag, "$n brags, '%s was a tasty dinner, now who's for desert? Muhaha!'", GET_NAME(vict)); break; case 2: sprintf(brag, "$n brags, 'Bahaha! %s should stick to Odif's !'",GET_NAME(vict)); break; case 3: sprintf(brag, "$n brags, '%s is now in need of some exp...Muhaha!'", GET_NAME(vict)); break; case 4: sprintf(brag, "$n brags, '%s needs a hospital now. Muhaha!'",GET_NAME(vict)); break; case 5: sprintf(brag, "$n brags, '%s's mother is a slut! Muhaha!'", GET_NAME(vict)); break; case 6: sprintf(brag, "$n brags, '%s is a punk, hits like a swampfly. Bah.'", GET_NAME(vict)); break; case 7: sprintf(brag, "$n brags, '%s, your life force has just run out...Muahaha!'", GET_NAME(vict)); break; case 8: sprintf(brag, "$n brags, 'Bah, %s should stick to the newbie zone!'",GET_NAME(vict)); break; case 9: sprintf(brag, "$n brags, '%s, give me your daughter's number and I might return your corpse. Muhaha!'", GET_NAME(vict)); break; case 10: sprintf(brag, "$n brags, 'Hey %s! Come back, you dropped your corpse! Muahaha'", GET_NAME(vict)); break; case 11: sprintf(brag, "$n brags, 'I think %s wears pink chainmail. Fights like a girl! Muhaha!'", GET_NAME(vict)); break; } for (i = descriptor_list; i; i = i->next) if (!i->connected && i != ch->desc && i->character && !PRF_FLAGGED(i->character, PRF_NOGOSS) && !PLR_FLAGGED(i->character, PLR_WRITING) && !ROOM_FLAGGED(i->character->in_room, ROOM_SOUNDPROOF)) { if (COLOR_LEV(i->character) >= C_NRM) send_to_char(CCRED(i->character, C_NRM), i->character); act(brag, FALSE, ch, 0, i->character, TO_VICT | TO_SLEEP); if (COLOR_LEV(i->character) >= C_NRM) send_to_char(CCNRM(i->character, C_NRM), i->character); } } __