Re: [NEWBIE] Making npc's gos when they kill other npc's

From: Kras Kresh (
Date: 04/05/02

>From: Alysia <>
>Subject: [CIRCLE] [NEWBIE] Making npc's gos when they kill other npc's
>Date: Fri, 5 Apr 2002 10:52:20 -0500
>I used the npc brag snip, to make npc's brag when they kill eachother.
>it keeps core dumping my autorun script. im not sure what i need to
>do to make it stop core dumping.

What do you mean by "core dumping my autorun script".
Try running your debugger "gdb bin/circle lib/core" in your mud dir.
Also, I have no idea where the brag snippet is. Maybe you should have
included the code where the npc gossips.

>Now it logs when npc's kill eachother just like normal players.
>I checked out removing the logging, and it wouldnt work at all.
>They gossip when they kill eachother. But it can only happen a few times
>before it dumps.

I am guessing that they are gossiping with each others names and that
that was done after the extraction of the mob.

>Another issue I found, how do i make it so mobs dont get xp, i had a newbie
>npc level to 35, by killing things and that crashed the mud as well ?
>Also this could lead to spam, how would i add a % to the gossip when they
>kill eachother ?

in limits.c: gain_exp():
add "if (IS_NPC(ch)) return 0;

you probably dont want the message of gaining exp to be sent to the mobs
either, so in fight.c, in functions group_gain(), perform_group_gain(), and
solo_gain(), add "if (IS_NPC(ch)) return;"

>/* what i put to make it work*/
>if (IS_NPC(ch)) {
>       sprintf(buf2, "%s killed by %s at %s", GET_NAME(ch), GET_NAME(ch),
>               world[ch->in_room].name);
>        mudlog(buf2, BRF, LVL_IMMORT, TRUE);
>       if (MOB_FLAGGED(ch, MOB_MEMORY))
>         forget(ch,victim);

You probably want "if (!IS_NPC(victim))" instead of the first line there,
which makes it log whenever the KILLER is a mob.

Send and receive Hotmail on your mobile device:

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT