Hello, After receiving lots of info an this topic I have added some code which does the trick. It means that only the players whose corpse it is can loot the corpse. It also means that fido's dont eat player corpses. The only change is that now when a player want to get stuff from his/her corpse he/she has to type [get all pcorpse] rather than [get all corpse]. In fight.c find make_corpse, than add and change the following between the ----------'s: corpse->in_room = NOWHERE; ---------------------------- if (IS_NPC(ch)) corpse->name = str_dup("corpse"); else corpse->name = str_dup("pcorpse"); ---------------------------- sprintf(buf2, "The corpse of %s is lying here.", GET_NAME(ch)); corpse->description = str_dup(buf2); ----------------------------- corpse->short_description = str_dup(GET_NAME(ch)); ----------------------------- GET_OBJ_TYPE(corpse) = ITEM_CONTAINER; GET_OBJ_WEAR(corpse) = ITEM_WEAR_TAKE; GET_OBJ_EXTRA(corpse) = ITEM_NODONATE; GET_OBJ_VAL(corpse, 0) = 0; /* You can't store stuff in a corpse */ ----------------------------- if (IS_NPC(ch)) GET_OBJ_VAL(corpse, 3) = 1; /* corpse identifier */ else GET_OBJ_VAL(corpse, 3) = 0; /* corpse identifier */ GET_OBJ_WEIGHT(corpse) = 100000; ----------------------------- GET_OBJ_RENT(corpse) = 100000; Then in act.item.c add and change the following in do_get, again between the -----------'s } else { cont_dotmode = find_all_dots(arg2); if (cont_dotmode == FIND_INDIV) { mode = generic_find(arg2, FIND_OBJ_INV | FIND_OBJ_ROOM, ch, &tmp_char, &cont); if (!cont) { sprintf(buf, "You don't have %s %s.\r\n", AN(arg2), arg2); send_to_char(buf, ch); } else if (GET_OBJ_TYPE(cont) != ITEM_CONTAINER) act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR); ---------------------------------------- else if ((isname(cont->name, "pcorpse")) && (!isname(cont->short_description, GET_NAME(ch)))) { send_to_char("You can only loot your own corpse!\r\n", ch); return; } else ---------------------------------------- get_from_container(ch, cont, arg1, mode); } else { if (cont_dotmode == FIND_ALLDOT && !*arg2) { send_to_char("Get from all of what?\r\n", ch); return; }
This archive was generated by hypermail 2b30 : 12/18/00 PST