Manual:DIL Manual/minv
Jump to navigation
Jump to search
Contents
minv
Field (integer, read/write; units: all).
u.minv : integer
The unit's wizard invisibility level: only characters of at least this level can see it. 0 means visible to everyone (as far as light and the invisible flag allow). A god's wizinv sets it on the god; in a zone file it is minv.
Notes
- Stored as an 8-bit unsigned number: values outside 0 to 255 wrap around.
- It hides the unit from every character below that level, NPCs included, and from DIL functions that only find what the searcher can see, such as findunit() and visible().
- Zones use it to keep an object out of sight for a while: death.zon gives a new item
minv 200while it sets it up and 0 when it is ready. - Objects with a
minvabove 0 cost no rent, and neither does anything inside them. - On null it fails.
Example
dilbegin set_wizinv(lvl : integer);
var
wl : integer;
code
{
wl := lvl;
if (wl > self.level)
wl := self.level;
if (wl < 0)
wl := 0;
self.minv := wl;
sendtext("Wizinv level set to " + itoa(wl) + ".<br/>", self);
quit;
}
dilend
Sets a god's invisibility level, never above the god's own level, as the wiz menu in basis.zon does.