User Tools

Site Tools


lua:ch:skilled

Syntax:

skilled( skillname )
skilled( skillname, prac )

Arguments:

skillname - Full skill name to check (see skill_table table).
prac      - Optional boolean value, defaults to false. If true, return value is the practiced skill percentage. If false, return value is the effective skill percentage.

Returns false if the the CH does not have the given skill, otherwise returns the skill percentage (effective by default).

Example:

if mob:skilled("blessed darkness") then
  mob:say("I have blessed darkness")
end
 
local sk=ch:skilled("magic missile")
if sk then
  ch:say("My magic missile is %d effective", sk)
  ch:say("My magic missile is %d practiced", ch:skilled("magic missile", true) )
end
lua/ch/skilled.txt · Last modified: 2014/08/18 17:46 by vodur