Re: [CODE] Limited Items Loading 18, 99 10:29:19 pm

From: Thomas Henke (ghost@warstein.owl.de)
Date: 01/18/99


Hello,

 ***SNIP***
     obj = read_object(r_num, REAL);
//     if (GET_OBJ_EXTRA(obj) = ITEM_LIMITED && GET_LEVEL(ch) < LVL_GOD) {
        if (OBJ_FLAGGED(obj, ITEM_LIMITED) && (GET_LEVEL(ch) < LVL_GOD)) {
       send_to_char("That item has restricted loading due to its &RLIMITED&n flag\r\n, ch);
       send_to_char("Please see a GOD+ to load that item manually.\r\n", ch);
       return;
     }
     obj_to_room(obj, ch->in_room);
     act("$n makes a strange magical gesture.", TRUE, ch, 0, 0, TO_ROOM);
     act("$n has created $p!", FALSE, ch, obj, 0, TO_ROOM);
     act("You create $p.", FALSE, ch, obj, 0, TO_CHAR);
   } else
     send_to_char("That'll have to be either 'obj' or 'mob'.\r\n", ch);
 ***END SNIP***

That should it be, because you need to check if it is in the 'FlagNumber',
it will be counted together (all Flags this item has). I didn't test it, but
it should work this way.  Example: If the object has the flags: ITEM_GLOW,
ITEM_HUM, ITEM_NORENT and ITEM_NODONATE. So all amounts will be counted into
the GET_OBJ_EXTRA(obj) variable. And OBJ_FlAGGED(obj, flag) will check if a
single is in the variable.

I hope i could help :)

--
MfG... Thomas Henke      - >> Systembetreuung der ACCESS und der W.I.N. << -
- http://www.warstein.owl.de - ghost@warstein.owl.de - cgi@warstein.owl.de -
- http://rom.mud.de - http://NewOrder.S-Link.de  - Yeto@NewOrder.S-link.De -


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



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