Manual:DIL Manual/rent

From DikuMUD Wiki
Jump to navigation Jump to search

rent

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

obj.rent : integer

What the object costs its owner to keep, per real day, in the money's base unit (as cost). It is the rent line of the object in the zone file, 0 for most objects.

Nothing charges it today. The server has code to bill a returning player for the time away (reception.cpp), but it is switched off (DILWAY in pc_data.cpp), and rent in server.cfg is 0 anyway. Scripts can still use the number, as the engraver in midgaard.zon does.

Notes

  • Objects only. On a character, a room or null it fails.
  • Stored unsigned: don't assign a negative number.

Example

dilbegin integer engrave_fee(item : unitptr);
code
{
   if (item.type != UNIT_ST_OBJ)
      return (0);
   return ((5 * GOLD_MULT) + (item.rent * 3));
}
dilend

The engraver's fee in midgaard.zon: five gold pieces plus three times the item's rent.

See also