Appearance
sdk.skills
Live skill levels from TPlayerSkillStats. use() speaks the words through Packet.talk (mode 1).
lua
local M = require("sdk.skills")get
function · get(_player, name)
Returns table|nil: skill { level, percent }
Parameters
| Name | Type | Summary |
|---|---|---|
_player | Player|nil | unused; skills come from the session, not the snapshot |
name | string | fist/club/sword/axe/distance/shielding/fishing/magic (aliases: dist, shield, mlvl) |
Returns
| Type | Summary |
|---|---|
table|nil | skill { level, percent } |
string|nil | err one of: unknown skill, no session, no skill, layout miss |
learnedSpells
function · learnedSpells()
Spell ids the character has unlocked this session.
reset_learned_spells
function · reset_learned_spells()
Clear the learned-spell cache.
note_delay
function · note_delay(spell_id, delay_ms)
Record a spell cooldown from SpellDelay.
note_group_delay
function · note_group_delay(group, delay_ms)
Record a group cooldown from SpellGroupDelay.
note_multiuse
function · note_multiuse(delay_ms)
Record the multi-use delay.
note_cast
function · note_cast(words)
Note that words were just cast (optimistic cooldown).
reset_cooldowns
function · reset_cooldowns()
Clear cooldown caches.
remaining
function · remaining(words)
Milliseconds remaining before words can be cast.
canUse
function · canUse()
True when no global multi-use lock is active.
canCast
function · canCast(words, player)
Server remaining time when SpellDelay has arrived; otherwise the optimistic stamp from our last Skills.use / note_cast.
use
function · use(words)
Cast spell words via talk/packet.