Re: Ok I have really beat my poor head to much

From: Owen Brodal-Robertson (
Date: 04/12/02

Ok, I'll bite...
(This is all mailer code so I take no responsibility for it).

In fight.c, take a look at the damage function, and look
for the lines

if (ch != victim && MOB_FLAGGED(victim, MOB_WIMPY))
   do_flee(victim, NULL, 0, 0);

This is where we check to see if the Mob is wimpy and call
our flee function passing the mob struct as the first

This then calls do_flee from act.offensive.c

in do_flee, look for the following lines:

if (CAN_GO(ch, attempt) &&
        !ROOM_FLAGGED(EXIT(ch, attempt)->to_room,ROOM_DEATH))

Try changing to:

if (CAN_GO(ch, attempt) && (GET_POS(ch) != POS_SITTING) &&
        !ROOM_FLAGGED(EXIT(ch, attempt)->to_room,ROOM_DEATH))

This will stop mobs fleeing when they're in POS_SITTING (i.e.

Personally I do another check like the following:

/* If person tries to flee while they're not on their feet
   make them stand */
if (GET_POS(ch) == POS_SITTING) {
   act("$n madly scrambles to their feet!", TRUE, ch, 0, 0,
   send_to_char("You scamble madly to your feet!\r\n", ch);
   return 0;

Hopefully this helps you out a bit... someone slap me if I've
posted buggy code :)

Owen B-R.

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

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