Wearsobj

Main.Wearsobj History

Hide minor edits - Show changes to markup

December 31, 2008, at 06:46 PM EST by admin
Added lines 1-12:
     wearsobj - syntax: wearsobj(CH,"object type") 

Hasobj returns true if the character is carrying an item of the given type in inventory (containers are not searched). Wears obj returns true only if the item is worn.

   if hasobj(ch,"weapon") then
      say ("Looks like you came ready for a fight?")
      if not(wearsobj(ch,"weapon")) then
         say ("Here's a hint, your weapon will work better wielded!")
      end
   end