Re: Buffer system

From: Patrick J. Dughi (dughi@IMAXX.NET)
Date: 08/19/97


>         Huzzah for your hard work. I know people don't say that sort of
> thing enough. I'll implement your buffer system just as soon as I've time.
>
>                                                         PjD

Sorry, did not mean for this to go to the list - here's an obcircle..

ObCircle:

        Stock circle does not come with reboot-only items, though if
you're tricky, you can make use silly things like a no-reset zone, etc.
How about we make it a little different then, and add a RARE flag.  Here's
the guts of it, you'll have to add a bit to constants.c and olc.h to make
it work for olc,  and display correctly, but heres how I did it (cheap 'n'
easy.)

in reset_zone(), make sure you intitlize the following:
  time_t mytime;
  extern time_t boot_time;

  mytime=time(0)-boot_time;

... then under the "case 'O':" line (read an object..)

          if(IS_OBJ_STAT(obj,ITEM_RARE) && (((mytime / 60) % 60) <= 1))
            obj->in_room=NOWHERE;


        ie, it won't load up unless the mud has been running for under a
minute - or a minute exactly.

        Now, i'd like to have extracted the object here, but since it was
already created in memory a few steps above, and this was a messy quick
hack, i hadn't time to check and see if it does get referenced later on -
so I was safe and tried to avoid a null reference. SO, you can free it or
what have you, and try it to see if it works. :)

                                                        PjD


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



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