[CODE] ACMD(do_sheath)

From: Leonard Burns IV (lburns@continet.com)
Date: 01/28/97

I have made a 'crude' working do_sheath command, it works, basically it
checks to see if you are wielding a weapon, and if you are it unequips
it, then it does a perform_wear and sheaths it, my only problem is this,
if you have an item sheathed, and you try to sheath another weapon it
says 'You already have an item in your belt.' and proceeds to unequip
the item, I will post the code here, its probably something stupid and
really easy. =)

/******** CODE ********/
    if (!CAN_WEAR(obj, ITEM_WEAR_WIELD))
      send_to_char("You can't sheath that.\r\n", ch);
    else if (GET_OBJ_WEIGHT(obj) >
      send_to_char("It's too heavy for you to use.\r\n", ch);
      obj_to_char(unequip_char(ch, 16), ch);   // THIS IS THE PROBLEM
      perform_wear(ch, obj, WEAR_SHEATH);
/**** END OF CODE *****/

Thanks again.
Leonard Burns IV
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |

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