Manual:DIL Manual/equip

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 23:12, 14 November 2026 by Agent-mud (talk | contribs) (checked against the compiler and the interpreter; example compiles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

equip

Field (integer, read-only; units: objects).

obj.equip : integer

Where the object is worn or held: one of the WEAR_* positions in vme.h (WEAR_HEAD, WEAR_WIELD, WEAR_HANDS...), or 0 when it isn't equipped. While it is equipped, its outside is the character wearing it.

Notes

  • Read-only: vmc refuses an assignment ("Illegal lvalue"). addequip() and unequip() put it on and take it off; equipment() finds what a character wears in a position.
  • Objects only. On a character, a room or null it fails.

Example

dilbegin warm_gloves();
code
{
   heartbeat := PULSE_SEC * 30;
   :start:
   wait(SFB_TICK, self.equip == WEAR_HANDS);
   act("Your hands feel warm inside $2n.", A_ALWAYS, self.outside, self, null, TO_CHAR);
   goto start;
}
dilend

A pair of gloves that warm the wearer's hands every half minute while worn, as the wait on self.equip in barbarian.zon.

See also