Re: [CODE] Copy,Move,Delete mobs/objs/rooms

From: Sammy (Samedi@cris.com)
Date: 01/09/97


On Wed, 8 Jan 1997, Gary Barnett wrote:

- I am going to implement three commands that the builders on
- my mud have requested.
- 
- They wish the ability to move, copy and delete the various
- items in the game (objects, mobs and rooms)

Moving?  That one I don't understand, unless you mean changing the vnum.

Get this file:

ftp.clark.net/pub/samedi/act.build.c

Look at do_copy, copy_mobile, copy_room, and copy_object for copy code
which is pretty close to "plug-in" if you move those to act.wizard.c.  I
think the only thing you'll have to change is to modify do_copy so it
takes two vnums as arguments instead of one (obuild always copies the
argument to the mob, room, or object you're currently editing).

For mob and object deletion look at do_medit and do_oedit, where it checks
for a "delete" argument.  Note that it doesn't remove the mobs and objects
from the game, but calls save functions which write all the mobs or
objects in that zone except the one you're deleting, so you can undelete
any time before a reboot.

Sam

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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