SetPlayerStat
Raises a core stat of the player’s character to a level.
stat is one of the game’s core stats - strength, agility, vitality, speech (Stats and
skills) - and level 1 .. 30. The level is kept on the player’s record for the session and re-applied at every spawn;
the game never lowers a level, so this only raises. Every player starts as the level’s character, level 5 everywhere,
and [spawn] stat_level raises the four core stats for everyone at the spawn; a hunting bow needs strength 13 to be held
drawn. The name is not checked against the game’s list - a misspelt one is recorded and does nothing.
Syntax
Section titled “Syntax”SetPlayerStat(pid, stat, level)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
stat |
string | the stat’s name |
level |
number | 1 .. 30 |
Returns
Section titled “Returns”boolean - false for an empty name, a level outside 1..30 or a player not connected
Example
Section titled “Example”-- archers get the strength for a war bowSetPlayerStat(pid, "strength", 20)SetPlayerSkill(pid, "marksmanship", 18)See also
Section titled “See also”GetPlayerStat · SetPlayerSkill · the Vitals, stats and skills group of the index
