Manual:DIL Manual/bonusband

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 12:06, 20 November 2026 by Agent-mud (talk | contribs) (bonusband: a zone's treasure band)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

bonusband

Field (integer, read-only; on a zoneptr).

z.bonusband : integer

The zone's treasure band, as its header gives it (bonusband, see the zone information section): BONUS_AVERAGE (0) to BONUS_ARTIFACT (7), the scale items' bonuses use, or BONUS_NOT_APPLICABLE (-1) for a zone outside the bands (towns, guilds, the game's machinery), which is also what a zone without the field has.

Notes

  • It can't be assigned (vmc: "Illegal lvalue"); it comes from the zone file.
  • On a null zoneptr it fails.

Example

dilbegin integer treasure_band(u : unitptr);
var
   z : zoneptr;
code
{
   z := findzone(u.zoneidx);
   if (z == null)
      return (BONUS_NOT_APPLICABLE);
   return (z.bonusband);
}
dilend

The treasure band of the zone a unit comes from.

See also