Manual:DIL Manual/skill points

From DikuMUD Wiki
Jump to navigation Jump to search

skill points

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

pc.skill_points : integer

The player's unspent skill points. Training a skill, a spell or a weapon at a teacher costs them. A player gets more at each level gained (vmelimits.cpp); pcinitabils@basis gives a new (or reborn) player 10.

Notes

  • Players only. On an NPC, an object, a room or null the field fails.
  • Assignable from any zone. Nothing stops a program from setting it below 0.
  • Stored as a 32-bit signed number.
  • Abilities are trained with ability_points instead.

Example

dilbegin string points_left(pc : unitptr);
code
{
   if ((pc.skill_points == 0) and (pc.ability_points == 0))
      return ("You have no points left to train with.<br/>");
   return ("You have " + itoa(pc.skill_points) + " skill points and " +
           itoa(pc.ability_points) + " ability points left.<br/>");
}
dilend

Tells a player how many points are left to train with, as score does in commands.zon.

See also