Re: item duping

From: Chris Herringshaw (xxviper@med.umich.edu)
Date: 06/22/95


Yes, but the overhead of saving the entire player list is incredible,
especially if you have 100+ players online with equipment.  Of the
big name MUDs I have helped code for in the last 5 years, Epic
had the biggest problem with equipment duping, and here's the steps 
we took to solve it:

1) Remove the save command from the game.  Simple enough.  If the
server quietly saves the players every 1 - 2 minutes, that
should be good enough.  Sure, if a player gets an artifact and
the game crashes before having saved it, s/he loses out.  But in the
greater scheme of things, that's better than having 15 copies of an 
artifact floating around.

2) Unique item numbers.  Every item which was created (mobile or object)
got a unique unsigned long ID number, starting with whatever number you
want, and incrementing once for each object.  This is stored with
the object, and at each reboot, a database integrity check is done,
and among other things, duplicate ID numbers were searched for.  If
matching ID numbers were found, somebody duped that object and
both of them were removed from the game.  Once every couple of weeks
we would run a program to re-pack the object ID numbers, so we
would not run out of ID's  (kind of like defragging your hard drive).
It was not a change which was announced, which worked best because
the day after a reboot we'd usually get a person or two saying they
lost 4 platinum rings during rent or something.

This system worked quite well, and as it was unannounced, pretty much
solved the problem since no-one knew what the system was - and hence
could not figure out a way to get around it.

This doesn't have much to do with Circle, but programming MUD in
general.  Just something to consider.

====================================================================
Christopher Herringshaw     Networking and Special Projects Division
Medical Center Information Technology (MCIT)   xxviper@med.umich.edu
University of Michigan Medical Center, B1911 CFOB
1414 Catherine Street, Ann Arbor, MI 48109-0704       (313) 747-2778
====================================================================

On Thu, 22 Jun 1995, Belgian Underground Mud wrote:

> Hello, 
> 
> It's been bothering me for a while that players could dupe items if
> only they find a way to crash the mud : they give equipment around and 
> save their characters while they have the equipment, and then crash the 
> mud. The most simple sollution : if a player types 'save' ALL the players 
> get saved. It's just two lousy lines of code to add. For those interested :
>  
> 	Wodan 
> 
> ACMD(do_save)
> {
>   struct descriptor_data *i;
> 
>   if (IS_NPC(ch) || !ch->desc)
>     return;
> 
>   if (cmd) {
>     sprintf(buf, "Saving %s.\r\n", GET_NAME(ch));
>     send_to_char(buf, ch);
>   }
>   for (i=descriptor_list;i;i = i->next) {
>     ch = i->character;
>     save_char(ch, NOWHERE);
>     Crash_crashsave(ch);
>     if (ROOM_FLAGGED(ch->in_room, ROOM_HOUSE_CRASH))
>       House_crashsave(world[ch->in_room].number);
>   }
> }
> 
> 
> .-----------------------------------------------------------------------.
> |    I t ' s   n o t   a   b u g ,   i t ' s   a   f e a t u r e ! ! !  |
> | BUG Mud - Belgian UnderGround                  eduserv.rug.ac.be 3555 |
> |  Imps : Charlotte, Gekke,            If you can't connect, email to : |
> |         Hymy, Mentat and Wodan         tvergote@eduserv.rug.ac.be     |
> |  Thanx to SunGoku...                  Subject : frontdoor             |
> `-----------------------------------------------------------------------'
> 
> 
> 
> 



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