iswearing
iswearing <creature> <vnum>
Whether a creature has an object of a given vnum equipped or implanted.
iswearing searches every worn equipment slot and every implant slot. It
does not search carried inventory — use isholding for
that.
Arguments
<creature>— the creature to inspect. A null value or a non-creature yields false.<vnum>— an int, the object vnum to look for.
Returns
A bool — true if a matching object is worn or implanted, false otherwise.
Examples
after command (say) {
do "say iswearing=[iswearing $self 1]."
}
In the minimal test world the owner has nothing equipped, so
[iswearing $self 1] is false. (This example compiles and runs without
error; equip an object of that vnum to see it return true.)
before command (enter) {
require [iswearing $actor 1]
do "say The wards admit only those wearing the sigil."
}
This guard lets the actor pass only while wearing or implanting an object
of vnum 1; otherwise the script advances to the next matching handler (see
require).