Re: About damage in objects... "Aug 2, 97 07:29:06 pm"

From: AxL (axl@MINDWARP.PLYMOUTH.EDU)
Date: 08/04/97


> I have seen the code to apply damage in objects. I found this great, but
> the task of give this attributes to ALL the obj files seems hard to
> do... anyone have the stock areas fixed? Or a program to easily convert
> the old object files into new ones? Even if the program ask me for every
> object in the file, any help would be appreciated. <SP?>

        Look in db.c, where the obj files are read (parse_object function).
If there is no value, then this puts a zero in the object file...if the
value is already present, parse it as normal.  Change the 0 to 50 or 100
or whatever you'd want the default value for your objects hit points to be.


  if  (retval < 6) {
    obj_proto[i].obj_flags.hit = 0;
    obj_proto[i].obj_flags.max_hit = 0;
  } else {
       obj_proto[i].obj_flags.hit = t[4];
       obj_proto[i].obj_flags.max_hit = t[5];
    }


--
-axl @)-->---   "Beneath the stain of time, the feeling disappears.
 axl@mindwarp    You are someone else.  I am still right here." - NIN


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