Skip to content

skill

Tries a mobile at a skill, which may rise with the try.

Source: src/Moongate.Server.Ultima/Modules/SkillModule.cs

skill.check(mobile, skill, min, max) -> boolean

Tries the mobile at a skill, named as in data/skills.toml (hiding, animal_lore): min is the points (50.5) at which the task can just be begun, max those at which it never fails. Below min it fails, at max or above it succeeds, and neither teaches; in between the chance grows in a line, and the try, passed or failed, may raise the skill of a player by a tenth of a point, more often with room under the caps and for a hard task. False also for an unknown skill or a mobile not in the world.

Picking a lock that needs 30 points to try and never fails at 80; the try may raise the skill:

if skill.check(user, "lockpicking", 30, 80) then
mobile.message(user, "The lock quickly yields to your skill.")
else
mobile.message(user, "You are unable to pick the lock.")
end
ParameterTypeDefault
mobileinteger
skillstring
minnumber
maxnumber

Returns boolean.

Made with ❤️ by Tom

Buy me a coffee