Re: [NEWBIE] Level Equipment

From: Mike Stilson (mike@c746148-a.ehlls1.pa.home.com)
Date: 07/11/01


On Wed, Jul 11, 2001 at 06:45:18PM -0300, Luca came up with this idea:
> Hey,
>    I know that you all will say to me search in the arquives but i serched
> all last month and i didn't find anything.
> I want to make my equipments have minimum level to equip like this :
> Roman combat boots : lvl 10 /* the minimum level to wear the boots will be
> 10 */
> but i don't know how to do that?
> anyone have an idea?

Doesn't that come stock in oasis  oedit.c?

Simple enough.  Add a field to the struct obj_data:
 int level;  /* Min level to use */

In perform_wear() add something to check the field:
if(GET_LEVEL(ch) < GET_OBJ_LEVEL(obj)) {
  send_to_char("You're too much of a luser to use that yet.\r\n", ch);
  return;
}

oh, #define GET_OBJ_LEVEL(obj) ((obj)->obj_flags.level)

-mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST