Welcome to the Builder Academy

Question do_wear

More
14 May 2016 21:35 #5884 by JTP
do_wear was created by JTP
If i dont want a certain class to be able to Wear items with OBJ_FLAGGED(obj, ITEM_MAGIC) on

Then what do i need to type in do_wear ?

Please Log in or Create an account to join the conversation.

More
15 May 2016 17:29 #5885 by thomas
Replied by thomas on topic do_wear
What have you tried?





(generally, it's a good idea to try yourself before asking for help)






(that said, I'd add another check where the level is checked, and the refactor those three calls out to another simple function)

Please Log in or Create an account to join the conversation.

More
15 May 2016 18:11 - 15 May 2016 18:14 #5887 by JTP
Replied by JTP on topic do_wear
Yea dunno what happened to the message, some was ct off:

else if ((GET_CLASS(ch) == CLASS_*****) && (OBJ_FLAGGED(obj, ITEM_MAGIC))
send_to_char(ch, "It seems that you cant use magic items.\r\n");

?
Last edit: 15 May 2016 18:14 by JTP.

Please Log in or Create an account to join the conversation.

More
16 May 2016 11:08 #5889 by thomas
Replied by thomas on topic do_wear
Yes, more or less (there's a right-parenthesis missing at the end of the if-check).

That's exactly how I would have done it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.218 seconds