Re: [Code][Newbie] Random Acts of Gold

From: Richard Glover (
Date: 02/18/99

Here is what I would do.  First, make a function like:

void random_gold(struct char_data *mob)

And in it generate some random amount of coins then give add it to the
GET_GOLD(mob) of the mob.

Put this function call after read_mobile calls throughout the code that you
want it to happen.  This wouldn't be done in a function like vstat, but it
would in load_zone() and do_load().


-----Original Message-----
From: Jeff Colledge <>
To: <>
Date: Thursday, February 18, 1999 12:58 PM
Subject:  [Code][Newbie] Random Acts of Gold

>Hey all,
>I'm working on setting up a new mud (Circle 30 bpl 14).  I'm still
>learning the code and am just now making some basic changes.  One of the
>things that I've been trying to do as a way to help me understand the
>way the program is organized is to randomize treasure...or at least gold
>found on mobs.  However, I've not been very successful...eventually
>having to reload the stock db.c file. =(  Such is programing in the
>beginning.  Anyway, I was wondering if there was a patch somewhere or if
>someone could send me a snippet of their code changes so I can have a
>template to work off of.  All of my different attempts at this have been
>solely in the db.c file, is there another file out there that I should
>be looking at?

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

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