Togu
Advanced OT User
I have this functions in data/lib/core/skillpoints.lua
And they are all working with modal window system. But I want to use the player:resetAllSkills() on a NPC. I've tried but it didn't recognize the function. I know I could copy the code of the function to the npc file, but I want to understand how to make it work as an imported function from the lib.
Extra: this function is reseting using a query and forcing logout of the player, if someone has another suggestion to remove skills without loging out it will help me a lot.
function Player:addSkillLevels(skill)
function Player:sendSkillPointsWindow()
function Player:skillWindowChoice(windowId, buttonId, choiceId)
function Player:addSkillPoints(count)
function Player:addSkillPointsOnLevelAdvance(oldLevel, newLevel)
function Player:assignSkillPoints(skill)
function Player:resetAllSkills()
function Player:resetSkill(skill)
function Player:removeSkill(skill)
function Player:messageOnAdvance(skill)
function Player:sendSkillPointsWindow()
function Player:skillWindowChoice(windowId, buttonId, choiceId)
function Player:addSkillPoints(count)
function Player:addSkillPointsOnLevelAdvance(oldLevel, newLevel)
function Player:assignSkillPoints(skill)
function Player:resetAllSkills()
function Player:resetSkill(skill)
function Player:removeSkill(skill)
function Player:messageOnAdvance(skill)
And they are all working with modal window system. But I want to use the player:resetAllSkills() on a NPC. I've tried but it didn't recognize the function. I know I could copy the code of the function to the npc file, but I want to understand how to make it work as an imported function from the lib.
Extra: this function is reseting using a query and forcing logout of the player, if someone has another suggestion to remove skills without loging out it will help me a lot.