tellon 0 Report post Posted June 27, 2017 Hi guys, i need a npc for get all skills on click, i try to add one i got error "MsgProc: function option unknown function" my files skills bug, i cant level up the skills, i need it NPC, thanks Quote Share this post Link to post Share on other sites
iZae 55 Report post Posted June 27, 2017 Can you show us the function you've tried to use? Or the npc function? you should add the sdk on NpcSdk.lua scroll untill you find something like elseif item.func == ....... then return ....(character) and below that add elseif item.func == YourFunctionName then return YourFunctionName(character) changing YourFunctionName to your function name lol. 1 Quote Share this post Link to post Share on other sites
tellon 0 Report post Posted June 27, 2017 @iZae npc: Text (1, "Obtain All Skills!", fullskills1, 1) add forge: function fullskills1 (role) ---Swordsman AddChaSkill ( role , SK_CHF , 10 , 0 , 0 ) AddChaSkill ( role , SK_JDZZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_GTYZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_JSSL , 10 , 0 , 0 ) AddChaSkill ( role , SK_HYZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_PJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_KB , 10 , 0 , 0 ) AddChaSkill ( role , SK_HX , 10 , 0 , 0 ) ---Crusader AddChaSkill ( role , SK_FSZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_PXKG , 10 , 0 , 0 ) AddChaSkill ( role , SK_LQHB , 10 , 0 , 0 ) AddChaSkill ( role , SK_YS , 10 , 0 , 0 ) AddChaSkill ( role , SK_GWZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_DB , 10 , 0 , 0 ) ---champion AddChaSkill ( role , SK_JJSL , 10 , 0 , 0 ) AddChaSkill ( role , SK_MNRX , 10 , 0 , 0 ) AddChaSkill ( role , SK_SWZQ , 10 , 0 , 0 ) AddChaSkill ( role , SK_QHTZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_ZJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_LH , 10 , 0 , 0 ) ---Explorer AddChaSkill ( role , SK_JR , 10 , 0 , 0 ) AddChaSkill ( role , SK_LJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_SL , 10 , 0 , 0 ) AddChaSkill ( role , SK_BKZJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_JF , 10 , 0 , 0 ) AddChaSkill ( role , SK_HZCR , 10 , 0 , 0 ) ---Voyager AddChaSkill ( role , SK_BKCJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_SF , 10 , 0 , 0 ) AddChaSkill ( role , SK_XW , 10 , 0 , 0 ) AddChaSkill ( role , SK_MW , 10 , 0 , 0 ) AddChaSkill ( role , SK_LM , 10 , 0 , 0 ) ---Hunter AddChaSkill ( role , SK_GJSL , 10 , 0 , 0 ) AddChaSkill ( role , SK_JFB , 10 , 0 , 0 ) AddChaSkill ( role , SK_LZJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_FNQ , 10 , 0 , 0 ) AddChaSkill ( role , SK_DJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_BDJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_LXJY , 10 , 0 , 0 ) ---Sharpshooter AddChaSkill ( role , SK_HQSL , 10 , 0 , 0 ) AddChaSkill ( role , SK_RSD , 10 , 0 , 0 ) AddChaSkill ( role , SK_TJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_SJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_BT , 10 , 0 , 0 ) ---Herbalist AddChaSkill ( role , SK_XZY , 10 , 0 , 0 ) AddChaSkill ( role , SK_JSJC , 10 , 0 , 0 ) AddChaSkill ( role , SK_XLCZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_SHPF , 10 , 0 , 0 ) AddChaSkill ( role , SK_XLZH , 10 , 0 , 0 ) AddChaSkill ( role , SK_FZLZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_HFS , 10 , 0 , 0 ) AddChaSkill ( role , SK_FH , 10 , 0 , 0 ) ---Cleric AddChaSkill ( role , SK_SY , 10 , 0 , 0 ) AddChaSkill ( role , SK_SYZY , 10 , 0 , 0 ) AddChaSkill ( role , SK_JSFB , 10 , 0 , 0 ) AddChaSkill ( role , SK_TSHD , 10 , 0 , 0 ) AddChaSkill ( role , SK_HFWQ , 10 , 0 , 0 ) AddChaSkill ( role , SK_XLPZ , 10 , 0 , 0 ) ---SealMaster AddChaSkill ( role , SK_SY , 10 , 0 , 0 ) AddChaSkill ( role , SK_SYZY , 10 , 0 , 0 ) AddChaSkill ( role , SK_ZZZH , 10 , 0 , 0 ) AddChaSkill ( role , SK_SYNZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_AYZZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_XZFY , 10 , 0 , 0 ) end i only added this functions Quote Share this post Link to post Share on other sites
tellon 0 Report post Posted June 27, 2017 i find this on NPCSdk. else return SystemNotice( character, "MsgProc: function option unknown function!" ) Quote Share this post Link to post Share on other sites
tellon 0 Report post Posted June 27, 2017 OOOOOOOOOOOOH THANKKKKKKKKS <33333333333333333333333 Quote Share this post Link to post Share on other sites
aleksandr 21 Report post Posted June 27, 2017 (edited) @tellon maybe it will help you, although i see you have already figured out An example in Russian language. Edited June 27, 2017 by aleksandr Quote Share this post Link to post Share on other sites
tellon 0 Report post Posted June 27, 2017 @aleksandr the problem is npcsdk, now it works, thx Quote Share this post Link to post Share on other sites
iZae 55 Report post Posted June 28, 2017 That function is kind of bad, if you don't set class conditions it'll give all skills to every player regardless of their classes. Try using this one instead, only give the skills of acording to player's class. function fullskills1 (role) local job = GetChaAttr(role, ATTR_JOB) ---Swordsman if job == 1 then AddChaSkill ( role , SK_CHF , 10 , 0 , 0 ) AddChaSkill ( role , SK_JDZZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_GTYZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_JSSL , 10 , 0 , 0 ) AddChaSkill ( role , SK_HYZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_PJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_KB , 10 , 0 , 0 ) AddChaSkill ( role , SK_HX , 10 , 0 , 0 ) elseif job == 9 then ---Crusader AddChaSkill ( role , SK_FSZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_PXKG , 10 , 0 , 0 ) AddChaSkill ( role , SK_LQHB , 10 , 0 , 0 ) AddChaSkill ( role , SK_YS , 10 , 0 , 0 ) AddChaSkill ( role , SK_GWZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_DB , 10 , 0 , 0 ) elseif job == 8 then---champion AddChaSkill ( role , SK_JJSL , 10 , 0 , 0 ) AddChaSkill ( role , SK_MNRX , 10 , 0 , 0 ) AddChaSkill ( role , SK_SWZQ , 10 , 0 , 0 ) AddChaSkill ( role , SK_QHTZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_ZJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_LH , 10 , 0 , 0 ) elseif job == 4 then ---Explorer AddChaSkill ( role , SK_JR , 10 , 0 , 0 ) AddChaSkill ( role , SK_LJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_SL , 10 , 0 , 0 ) AddChaSkill ( role , SK_BKZJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_JF , 10 , 0 , 0 ) AddChaSkill ( role , SK_HZCR , 10 , 0 , 0 ) elseif job == 16 then ---Voyager AddChaSkill ( role , SK_BKCJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_SF , 10 , 0 , 0 ) AddChaSkill ( role , SK_XW , 10 , 0 , 0 ) AddChaSkill ( role , SK_MW , 10 , 0 , 0 ) AddChaSkill ( role , SK_LM , 10 , 0 , 0 ) elseif job == 2 then ---Hunter AddChaSkill ( role , SK_GJSL , 10 , 0 , 0 ) AddChaSkill ( role , SK_JFB , 10 , 0 , 0 ) AddChaSkill ( role , SK_LZJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_FNQ , 10 , 0 , 0 ) AddChaSkill ( role , SK_DJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_BDJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_LXJY , 10 , 0 , 0 ) elseif job == 12 then ---Sharpshooter AddChaSkill ( role , SK_HQSL , 10 , 0 , 0 ) AddChaSkill ( role , SK_RSD , 10 , 0 , 0 ) AddChaSkill ( role , SK_TJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_SJ , 10 , 0 , 0 ) AddChaSkill ( role , SK_BT , 10 , 0 , 0 ) elseif job == 5 then ---Herbalist AddChaSkill ( role , SK_XZY , 10 , 0 , 0 ) AddChaSkill ( role , SK_JSJC , 10 , 0 , 0 ) AddChaSkill ( role , SK_XLCZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_SHPF , 10 , 0 , 0 ) AddChaSkill ( role , SK_XLZH , 10 , 0 , 0 ) AddChaSkill ( role , SK_FZLZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_HFS , 10 , 0 , 0 ) AddChaSkill ( role , SK_FH , 10 , 0 , 0 ) elseif job == 13 then ---Cleric AddChaSkill ( role , SK_SY , 10 , 0 , 0 ) AddChaSkill ( role , SK_SYZY , 10 , 0 , 0 ) AddChaSkill ( role , SK_JSFB , 10 , 0 , 0 ) AddChaSkill ( role , SK_TSHD , 10 , 0 , 0 ) AddChaSkill ( role , SK_HFWQ , 10 , 0 , 0 ) AddChaSkill ( role , SK_XLPZ , 10 , 0 , 0 ) elseif job == 14 then ---SealMaster AddChaSkill ( role , SK_SY , 10 , 0 , 0 ) AddChaSkill ( role , SK_SYZY , 10 , 0 , 0 ) AddChaSkill ( role , SK_ZZZH , 10 , 0 , 0 ) AddChaSkill ( role , SK_SYNZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_AYZZ , 10 , 0 , 0 ) AddChaSkill ( role , SK_XZFY , 10 , 0 , 0 ) end end Quote Share this post Link to post Share on other sites