Re: [NEWBIE] No regen

From: Xual (xual@SATANSPAWN.ML.ORG)
Date: 09/27/98

> There are several places in my code that do the GET_HIT(ch) = 1, do
> you/anyone else know what to replace it with? I found 2 GET_HIT(ch) -=
> dam; in my objcmd and wldcmd(from dg scripts), and replaced those with
> alter_hit(ch, dam) and then put a check_regen_rates(ch) right after it.
> Thanks in advance,

Quoted from the README file included in the dg_regen package:

 "Stock CircleMUD allows a character's points to be altered by directly
  manipulating the points variable, such as by setting GET_HIT(ch) or
  ch->points.hit.  When you use this patch, any changes must be done using
  the functions:

      void alter_hit(struct char_data *ch, int amount);
      void alter_mana(struct char_data *ch, int amount);
      void alter_move(struct char_data *ch, int amount);

  The first argument is the character to alter.  The second argument is
  the number of points to subtract from the points.  To add points, use
  a negative amount.  If the points variable must be manipulated directly,
  call the appropriate alter function with amount of 0 to make sure there
  are the proper regeneration events.  Remember to do this when increasing
  the maximum value also."

That's all I've done in my code, and have had no problems so far.


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

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