Manual:DIL Manual/height

From DikuMUD Wiki
Jump to navigation Jump to search

height

Field (integer, read/write; units: all).

u.height : integer

The size of a unit, set with height in the zone file. For a character it is the height in centimetres; a player gets it from the race and sex in vme/etc/races.def (a human 152 + 2d25). For armour and clothes it is the size of the wearer they were made for: the wear command in commands.zon refuses body armour, helmets, leggings and the like that are too small or too large, and fits() gives the same answer. Rooms and other objects have the field too.

Notes

  • On null it fails.
  • Stored as an unsigned 16-bit number: values outside 0 to 65535 wrap around. No access level is needed to assign it.
  • Guild masters who hand out equipment set its height to the player's, so that it fits.

Example

dilbegin give_fitted(pc : unitptr, sym : string);
var
   item : unitptr;
code
{
   item := load(sym);
   if (item == null)
      return;
   item.height := pc.height;
   link(item, pc);
   return;
}
dilend

Loads an item made to fit a player and gives it to them, as the guild masters in assassin.zon and knight.zon do.

See also