I added races to my mud, and now want to add anti race flags to my OLC,
which is obuild. What i did was...
in structs.h
#define ITEM_ANTI_WHATEVER (number << number)
in class.c
int invalid_race(struct char_data *ch, struct obj_data *obj) {
if ((IS_OBJ_STAT(obj, ITEM_ANTI_ELF) && (IS_ELF(ch) ||IS_HALFELF(ch)))
|| (IS_OBJ_STAT(obj,
ITEM_ANTI_HUMAN) && (IS_HUMAN(ch) || IS_HALFELF(ch))) ||
(IS_OBJ_STAT(obj, ITEM_ANTI_DWARF) && (IS_DWARF(ch))) ||
(IS_OBJ_STAT(obj, ITEM_ANTI_HALFGIANT) && (IS_HALFGIANT(ch))) ||
(IS_OBJ_STAT(obj, ITEM_ANTI_DROW) && (IS_DROW(ch))) ||
(IS_OBJ_STAT(obj, ITEM_ANTI_DRAGON) && (IS_DRAGON(ch))))
return 1;
else
return 0;
}
in the act.build.c, I added the "nohuman" and such
to the fields array, then added in the line
TOGGLE_BIT(OBJ_NEW(ch)->obj_flags.extra_flags, ITEM_ANTI_WHATEVER);
to the correspoding case(with a break; at the end). When i load the
mud, these flags appear in the extras menu, but if i type:
oset nohuman
instead of adding a nohuman flag, it adds UNDEFINED in
the object....have i forgotten something(I must have, duh *slap*)?
What must i change?
thank you,
JL
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/07/00 PST