Manual:DIL Manual/acc total

From DikuMUD Wiki
Jump to navigation Jump to search

acc_total

Field (integer, read-only; units: PC).

pc.acc_total : integer

The total credit paid in to the player's account to date, in coin units (cents), when the game runs with accounting (accounting = 1 in server.cfg). A deposit adds to it and a withdrawal takes it back down, not below 0.

Notes

  • With accounting off (the default) it is always 0.
  • Players only. On an NPC, an object, a room or null the field fails.
  • It can't be assigned (vmc: "Illegal lvalue"); acc_modify() changes the account.

Example

dilbegin integer has_paid(pc : unitptr);
code
{
   if (pc.type != UNIT_ST_PC)
      return (FALSE);
   return (pc.acc_total > 0);
}
dilend

Tells whether a player has ever paid in credit.

See also