Re: [NEWBIE CODE] Auction bug

From: Rasmus 'Con' Ronlev (
Date: 12/09/96

On Mon, 9 Dec 1996, Eduardo Gutierrez de Oliveira wrote:

> I installed the auction code from the snippets page (or the FTP site, not
> sure) and it has been running for a while now, but today I realized that
> my morts are using a bug in it to crash the mud.
> It is not exactly a bug, but rather the lack of a check...
> If a user auctions something and he drops it the auction code will not
> check for it and the mud will crash, it they change what they are auction
> the same will happen.

Well, I am not using the code, but I doanloaded it at some point and
looked at it, and thought it was so far from what I needed I didn't want
to use it (Didn't imp what I wanted yet... so.. well.. I'm lazy.. :)

As far as the problems go, make a list (you can even make the mud save a
list as a file if you wish), with the object (or just a vnum), the person
auctioning it (id) and the person last bidding on it, and his bid in gold.
Keep this in memory, and if you want it secure for crashes etc. write a
table on disk.. When when a person auctions some piece of eq just take it
away, and put it into the mentioned list with his id.. (oh, and a min
auction price perhaps??)... Then when people bid you can take and give
gold to them using the id of the bidder and the amount of gold bidden....
you can allso make checks here to see if (s)he has the gold, and if (s)he
quits write the obj to the pfile of the person, or write the gold back if
another person makes a higher bid...

Enough ways of solving a lot of problems *grin* Just a little code to add
to the auctioning code before it'll work..

Hope you could use some of the ideas in this post if not all :)


     Rasmus Rønlev DOEK'94      WWW:
     Student instructor         MUD: 5000
       Student, B.Sc in Computer Science and Business Administration.

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

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