Welcome to the Builder Academy

Question show how much a char can carry

More
29 Mar 2016 17:44 #5699 by JTP
for (i = 0, j = k->carrying; j; j = j->next_content, i++);
856 send_to_char(ch, "Carried: weight: %d, items: %d; Items in: inventory: %d, ", IS_CARRYING_W(k), IS_CARRYING_N(k), i);


Shows how much the char is carrying..but is there a way to show how much the char can carry in weight ?

And is there a way to limit one class to X amount total items carryed ?

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

More
29 Mar 2016 18:42 #5701 by krell
Have you looked in structs.h as a starting point?
Code:
/** Describes the bonuses applied for a specific value of a character's * strength attribute. */ struct str_app_type { sh_int tohit; /**< To Hit (THAC0) Bonus/Penalty */ sh_int todam; /**< Damage Bonus/Penalty */ sh_int carry_w; /**< Maximum weight that can be carrried */ sh_int wield_w; /**< Maximum weight that can be wielded */ };

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

More
29 Mar 2016 22:34 #5709 by WhiskyTest
CAN_CARRY_W(ch) shows the maximum weight.
To make changes check out the definition in utils.h. You can either alter the definition, or the str_appp[] that it refers to

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

Time to create page: 0.225 seconds