Welcome to the Builder Academy

Question Drink units in liq containers

More
22 Apr 2013 15:09 - 22 Apr 2013 19:17 #1984 by JTP
Dunno if its a bug, but i tryed setting an item to be liq container with 5 drink units, i was only able to drink 1 time,
Then i tryed setting into be 10 drink units and. Could drink most times 2 times but some 3 times then empty.
Then i tryed 25 drink units and i was able to drink 5-6 times then it was empty.

Is that normal or do you guys have same problem ?
Last edit: 22 Apr 2013 19:17 by JTP.

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

More
22 Apr 2013 22:18 #1988 by thomas
When you "drink" you drink betweeen 3 and 10 units of liquid. If you just want to drink 1 unit, use "sip":
Code:
if (subcmd == SCMD_DRINK) { char buf[MAX_STRING_LENGTH]; snprintf(buf, sizeof(buf), "$n drinks %s from $p.", drinks[GET_OBJ_VAL(temp, 2)]); act(buf, TRUE, ch, temp, 0, TO_ROOM); send_to_char(ch, "You drink the %s.\r\n", drinks[GET_OBJ_VAL(temp, 2)]); if (drink_aff[GET_OBJ_VAL(temp, 2)][DRUNK] > 0) amount = (25 - GET_COND(ch, THIRST)) / drink_aff[GET_OBJ_VAL(temp, 2)][DRUNK]; else amount = rand_number(3, 10); } else { act("$n sips from $p.", TRUE, ch, temp, 0, TO_ROOM); send_to_char(ch, "It tastes like %s.\r\n", drinks[GET_OBJ_VAL(temp, 2)]); amount = 1; }
The following user(s) said Thank You: JTP

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

More
22 Apr 2013 22:27 #1990 by JTP
Replied by JTP on topic Drink units in liq containers
Tnx alot Thomas for that info.

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

Time to create page: 0.183 seconds