Re: Room Regen *Important*

From: Jeramy Singleton (XsCaPe4Me@AOL.COM)
Date: 09/22/98

sure thing... its quite simple...

This is the Snippet i used from Ceramic Mouse...

John Evans: Regen Rooms

          Wednesday, August 12th @ 11:35:32 PM, from George Greer in the Rooms
          dept. Updated Mar 7, 1997. Click the link below to read it or
download it.

  From: John Evans <>
  Subject: Regen Rooms

  >    I was thinking 3 times regen as much per tick. If anyone has
  > any ideas about this please let me know. Thank you for your time
  > and patience in reading this.

  Here is what I did:

  In structs.h ----
  Search for:
  #define ROOM_OLC                (1 << 14)

  Find the last ROOM_XXXX flag and add:


  (1 << 15)  /* Good Regen Room */

  NOTE: The "15" needs to be one number higher than the one above it. This
  means that if the last one listed is number 17, the one you add needs to
  be number 18.

  In olc.h ----
  Search For:
  #define NUM_ROOM_FLAGS


  Change it to:
  #define NUM_ROOM_FLAGS


  In constants.c ----
  Search for:
  /* ROOM_x */
  const char *room_bits[] = {

  Goto the bottom of that list, and before:

  add in:

  Those are the basic steps for adding new room flags. Now you have to write
  the code for doing something with those flags. In this case, the flags are
  only checked every tick, so....

  In limits.c ----
  Search for:;
  int mana_gain(struct char_data * ch)

  At the bottom of this function is:
  return (gain);

  BEFORE that line do something like:
    if (IS_SET(ROOM_FLAGS(ch->in_room), ROOM_GOOD_REGEN))
      gain += (gain * 2);

  You will need to do the same thing in hit_gain() and in move_gain() as
  well. All three of those functions are basically the same, so you should
  be able to handle it from there.

  Most of this was written in the mailer because I completly yanked the
  stock regen code and wrote my own from scratch. Not saying that the stock
  one was bad. It just wasn't what I wanted. I coded one that takes into
  account race, class, age, conditions, and affected bys as well as the room

  Good luck!

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

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