Re: [CODE] Using wimpy to quaff potion held in equipment

From: Xual (xual@danathara.dhs.org)
Date: 08/11/99


On Wed, 11 Aug 1999, Dave Brong wrote:

> I need some help automatically quaffing a potion in a character's
> equipment.
>
<snip>

  if ((GET_EQ(victim, WEAR_BELT)) && \
       (GET_EQ(victim, WEAR_BELT) == ITEM_POTION))
    do_use(victim, GET_EQ(victim, WEAR_BELT)->name, 0, SCMD_QUAFF);

  else if ((GET_EQ(victim, WEAR_BELT)) && \
           (GET_EQ(victim, WEAR_BELT) == ITEM_SCROLL))
    do_use(victim, GET_EQ(victim, WEAR_BELT)->name, 0, SCMD_RECITE);

Remember that ACMD's are functions too, and can be called whenever you need
them (spec_procs, whatever).  Standard MailerCode(tm) disclaimer applies.

--

"Misery is boundless"
        -Xual the Torturer, on the Eve of the Sundering.

Danathara Online RPG
telnet://danathara.dhs.org:4000


     +------------------------------------------------------------+
     | 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