mob
mob <vnum>
Look up a mobile prototype by its vnum.
A prototype is the template a mobile is built from, not a live creature in
the world. Use mob to read facts about a kind of NPC — its name, its
level — without needing one spawned. To act on the actual creatures
present, use the live-entity producers creatures or
people instead.
Arguments
<vnum>— an int, the mobile's vnum.
Returns
A mob_proto (Types), or null if no mobile prototype
has that vnum. Test the result with isnull or
exists before using it.
Examples
after command (say) {
do "say Mob 1 is named [name [mob 1]]."
}
Mobile vnum 1 is Puff's prototype, so [mob 1] is non-null and
name reads its display name: the mob says
"Mob 1 is named Puff."
Guard against a missing vnum:
after command (say) {
if [isnull [mob 99999]] {
do "say There is no such mobile."
}
}
No prototype has vnum 99999, so [mob 99999] is null and the isnull
branch runs.