[CODE] Corpse Saving

From: Michael Cunningham (malice@exit109.com)
Date: 04/01/99


Folks,

I just uploaded a corpse saving patch to ftp.circlemud.org
I am sure it will get in the appropriate directory soon.

Its designed to save players corpses over crashes/reboots/copyovers
and restore them when the mud comes back up. (No need to do
reimbursments!) Its designed for and will patch cleanly against a virgin
install of circle30bpl15.

If you find any bugs in it please email me..
A copy of the patch's readme file is below.

Thanks.. Mike Cunningham
--
Speed of Lightning, Roar of Thunder!
Fighting All Who Rob and Plunder...
UnderDog.. Ahhahah UnderDog!
-------------------------------------------------------------------------


/***********************************************************************
*  File: README                                                        *
*  Usage: To explain Corpse Saving over reboots/crashes/copyovers      *
*                                                                      *
*  By: Michael Cunningham (Romulus) IMP of Legends of The Phoenix MUD  *
*  Permission is granted to use and modify this software as long as    *
*  credits are given in the credits command in the game.               *
*  Built for circle30bpl15                                             *
*  Bunch of code reused from the XAP object patch by Patrick Dughi     *
*                                                  <dughi@IMAXX.NET>   *
*  Thankyou Patrick!                                                   *
*  All Rights Reserved, Copyright (C) 1999                             *
***********************************************************************/

I guess you are interested in saving your players corpses over
crashes/reboot/shutdowns/copyovers. Well you have come to
the right place!

A couple things that this patch does do..

1. Saves the players corpses after every corpse modifying event by calling
   save_corpse(); including corpse decomposition, purge, get, put..etc

2. Adds in some new flags to your mud:

   ITEM_PC_CORPSE = The obj is a players corpse.
   ITEM_NPC_CORPSE = The obj is a mobs corpse.
   ITEM_UNIQUE_SAVE = Adds in the ability to have custom objs like corpses:)

3. It saves the corpses in ascii file format with support for
   XAP Unique objects. It will work if you have ascii rent files
   or the old binary ones (although you should upgrade to ascii
   as well:).

4. It loads the corpses upon bootup by calling load_corpses();

5. It prevents players from getting ahold of the actual players
   corpse itself. It might be a dangerous thing to allow a
   player to have a players corpse in their inventory.
   In fact I know it is and it will allow obj duping if you
   remove this restriction. Any player can still get anything
   from the corpse though.. just not the corpse itself.
   They can still get mob corpses though.

Couple things it does not do:

1. Basically when the player looks at their freshly loaded corpse
   they will find that all their containers have been dumped
   into the corpse. Basically without a character to deal with
   when loading a corpse (all I have are objects) I have a tough
   time figuring out how to put objs back in containers so I just
   dumped it all into the corpse. I dont imagine the players will
   mind since they are getting their corpse back only by your good
   will of installing this. If anyone can figure out how to add the
   containers in containers.etc bit then please let me know.

2. I added the appropriate entries to the msvc Makefile but I dont
   run windows so I can't test this patch on it. If it all blows
   up then you are on your own. I have no clue about MS compilers.

Install:

1. READ THIS FILE TOTALLY!
2. copy the corpse.patch file into your src directory
   and type "patch < corpse.patch"
3. Fix any rejects.
4. Reconfigure your source by running ./configure in the top mud dir.
5. Make sure the frozen_start_room is defined in your mud
   code (config.c)
6. Go into the lib/misc/ directory and touch the filename
   "corpse.save"
7, Start up your mud.
8. Go into the mud and kill a player that has some objects:>
8. "shutdown reboot" the mud and check out the cool corpse
   load:)

Enjoy!

Email all bug reports to..

Michael Cunningham (malice@exit109.com)


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST