[CODE] Using wimpy to quaff potion held in equipment

From: Dave Brong (subscriptions@thefinaldimension.com)
Date: 08/11/99

I need some help automatically quaffing a potion in a character's

I've added a new WEAR type and TYPE type as BELT.  The character
can hold an item in their belt that is a potion or scroll to heal them
combat.  Once their wimpy level + 20 is reached they will automatically use
the potion/scroll to heal.  I'm stuck on coding it in fight.c damage(...)

My question, how would I go about getting the item that is in the BELT
position and automatically quaff/recite it?

What i have so far is
if (GET_WIMP_LEV(victim) && (victim != ch)
      && GET_HIT(victim) < GET_WIMP_LEV(victim) + 20)
     && GET_HIT(victim) > 0)
  ... insert code to quaff potion here .. and determine the obj data for
the potion to pass to mag_objectmagic
else if (GET_EQ(victim, WEAR_BELT) == ITEM_SCROLL)
  ... insert code to recite scroll here.. and determine the obj data for
the scroll to pass to mag_objectmagic
else (continue with wimpy fleeing...)

Thanks in advance

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |

This archive was generated by hypermail 2b30 : 12/15/00 PST