On Mon, 13 Aug 2001, NeoStar wrote: >I want have the mud, when the timer for a pc corpse has been met, and the >corpse gone, to instead of purging the corpse, move it to a >pre-designated room. This would be useful for an Immortal to retrieve a >decayed corpse for a player if he/she lost it due to unnatural reasons. >Or maybe just to be nice to newbies. *shrug* Could someone just give me a >psuedo-code outlining what needs to be done and where? Something like: --- limits.c Mon Aug 13 23:56:53 2001 +++ limits_corpse.c Tue Aug 14 00:00:01 2001 @@ -451,31 +451,11 @@ if (GET_OBJ_TIMER(j) > 0) GET_OBJ_TIMER(j)--; - if (!GET_OBJ_TIMER(j)) { - - if (j->carried_by) - act("$p decays in your hands.", FALSE, j->carried_by, j, 0, TO_CHAR); - else if ((j->in_room != NOWHERE) && (world[j->in_room].people)) { - act("A quivering horde of maggots consumes $p.", - TRUE, world[j->in_room].people, j, 0, TO_ROOM); - act("A quivering horde of maggots consumes $p.", - TRUE, world[j->in_room].people, j, 0, TO_CHAR); - } - for (jj = j->contains; jj; jj = next_thing2) { - next_thing2 = jj->next_content; /* Next in inventory */ - obj_from_obj(jj); - - if (j->in_obj) - obj_to_obj(jj, j->in_obj); - else if (j->carried_by) - obj_to_room(jj, j->carried_by->in_room); - else if (j->in_room != NOWHERE) - obj_to_room(jj, j->in_room); - else - core_dump(); - } - extract_obj(j); - } + if (!GET_OBJ_TIMER(j)) + if (world[j->in_room].number != junk_room) { + obj_from_room(j); + obj_to_room(j, real_room(junk_room)); + } } } } You'll need to define 'junk_room' as something and make sure it exists. The above makes two assumptions: 1) A corpse is always in a room. 2) The 'junk_room' is a virtual room that must exist. People won't be able to grab their stuff after this though. NOTE: Uncompiled, untested. -- George Greer greerga@circlemud.org -- +---------------------------------------------------------------+ | 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