User Tools

Site Tools


lua:ch:skilled

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

lua:ch:skilled [2014/08/18 17:46]
vodur created
— (current)
Line 1: Line 1:
-Syntax: 
-<​code>​ 
-skilled( skillname ) 
-skilled( skillname, prac ) 
-</​code>​ 
- 
-Arguments: 
-<​code>​ 
-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. 
-</​code>​ 
- 
-Returns false if the the CH does not have the given skill, otherwise returns the skill percentage (effective by default). ​ 
- 
-Example: 
- 
-<code lua> 
-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 
- 
- 
-</​code>​ 
  
lua/ch/skilled.1408383974.txt.gz ยท Last modified: 2014/08/18 17:46 by vodur