ismob
ismob <creature>
Whether a creature is an NPC (a mobile) rather than a player.
Arguments
<creature>— the creature to test. A null value or a non-creature yields false.
Returns
A bool — true if the creature is an NPC, false if it is a player (or the argument does not resolve to a live creature).
Examples
after command (say) {
do "say ismob self=[ismob $self]."
}
The owner $self is a mobile, so [ismob $self] is true.
before command (enter) {
require [ismob $actor]
do "say Only mobiles may pass."
}
This guard lets the handler run only when the actor is an NPC; for a player
actor the script advances to the next matching handler (see
require).