Eat and Drink Action Descriptions Version 1.0 ================================================ Author and Version Information ------------------------------ This simple patch has been created for the stock CircleMud code, version 3.1, and was relased on September 1, 2003. It was written by Ken Ray , and is available for anyone to use, under the same terms and conditions as the CircleMud licence. Since it is so trivial, I don't care if you give me credit or not. But, of course, if you use the code and it destroys your mud, causes you dog to die, friends to leave you and horrible sores to break out on your face, that's your problem. What it Does ------------ Whe someone types in drink oe eat , right after the standard message telling you what you have drunk or eaten, a check is made to see if the object has an "action description". If so, this is shown to the character using the act() function. For example: > buy waybread The baker tells you, 'That'll be 55 coins.' You now have a waybread. > eat waybread You eat a waybread. You can feel an inner warmth return to your tired body. or: > buy firebreather Filthy tells you, 'That'll be - say 40 coins.' You now have a bottle. > drink bottle You drink the firebreather. Gaaakkk!! What's in this stuff? You can feel the liquid burn its way down to your stomach! The Patch --------- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- diff -BbuprN -x '*.o' -x conf.h circle-3.1-stock/src/act.item.c circle-3.1-ken/src/act.item.c --- circle-3.1-stock/src/act.item.c 2002-09-25 18:44:45.000000000 -0500 +++ circle-3.1-ken/src/act.item.c 2003-09-01 09:45:21.000000000 -0500 @@ -867,6 +867,8 @@ ACMD(do_drink) 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 (temp->action_description) + act(temp->action_description, TRUE, ch, temp, 0, TO_CHAR); if (drink_aff[GET_OBJ_VAL(temp, 2)][DRUNK] > 0) amount = (25 - GET_COND(ch, THIRST)) / drink_aff[GET_OBJ_VAL(temp, 2)][DRUNK]; @@ -957,6 +959,8 @@ ACMD(do_eat) } if (subcmd == SCMD_EAT) { act("You eat $p.", FALSE, ch, food, 0, TO_CHAR); + if (food->action_description) + act(food->action_description, FALSE, ch, food, 0, TO_CHAR); act("$n eats $p.", TRUE, ch, food, 0, TO_ROOM); } else { act("You nibble a little bit of $p.", FALSE, ch, food, 0, TO_CHAR); --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- As you can see, no rocket science in here. Use and enjoy.