Manual:DIL Manual/zoneidx

From DikuMUD Wiki
Jump to navigation Jump to search

zoneidx

Field (string, read-only; units: all).

u.zoneidx : string

The name of the zone the unit's definition comes from: "midgaard" for cityguard@midgaard. Together with nameidx it names the unit's definition; symname gives both as "nameidx@zoneidx".

Notes

  • For a player it is "_players"; for a room made with gmroom, "_gm"; for a unit with no definition, "NO-ZONE".
  • It can't be assigned (vmc: "Illegal lvalue").
  • On null it fails.
  • String == ignores case.

Example

dilbegin integer is_corpse(u : unitptr);
code
{
   return ((u.nameidx == "corpse") and (u.zoneidx == "death"));
}
dilend

Tells whether a unit is a corpse, as the corpse checks in baseget.zon and values.h do.

See also