Re: Buffer system

From: Desmond Daignault (tekdd@DTOL.DATATIMES.COM)
Date: 08/19/97


=>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;
=>
=>

Another method would be to add another %d to the fscanf in parse_zones and
add a variable to the zone command structure.  When you parse the zones
you can have it check to see if that extra %d was missing from the zone
file and just set it to 0 in the command struct.  Then inside the reset
zone function just have it check to see if that value is !0, instead of
ITEM_RARE.  This would also work for equiping mobs and giving objects to
mobs.

*shrug* just a random thought as to how I would do it without wasting an
ITEM_xxxx value. heh.


--

Dez.

void signature () {
  printf ("Praise not the day until evening has come; a woman\n"
          "until she is burnt; a sword until it is tried; a maiden until\n"
          "she is married; ice until it has been  crossed; beer until it\n"
          "has been drunk.   -- Viking Proverb\n");
}


     +------------------------------------------------------------+
     | 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