Re: Saving PC Corpses

From: Dust (dustlos@hotmail.com)
Date: 08/13/01


Oh, another thing, since you end up with like a dozen corpses in one
room, a sneaky thief pc might get all their stuff! Here is a decent
solution:

In structs.h in struct obj_data add in a new field:
char *whos_corpse;    /* If corpse, whos is it?       */

and in fight.c in make_corpse add in:
corpse->whos_corpse = str_dup(GET_NAME(ch));

Now, in act.item.c you want to put in various ways to check who is
meddling with what item and so forth:
In int can_take_obj somewhere add in these conditions:

  else if (str_cmp(GET_NAME(ch), obj->whos_corpse) && obj->whos_corpse
!= NULL && obj->was_npc == FALSE) {
    act("$p: you can't take what isn't yours!", FALSE, ch, obj, 0,
TO_CHAR);
    return 0;
  } else if (obj->in_obj) {
    if (str_cmp(obj->in_obj->whos_corpse, GET_NAME(ch)) &&
obj->in_obj->whos_corpse != NULL && obj->in_obj->was_npc == FALSE) {
      act("$p: you can't take what isn't yours!", FALSE, ch, obj, 0,
TO_CHAR);
      return 0;
    }

You can also put in thingies in other places like these for junk or
whatever, what I did is put death in the morgue and with dg scripts
made it so if a person
typed junk he would teleport them out after slapping their hands :)

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST