nunb2560 1 Report post Posted September 22, 2018 Hi, i need some help. I have the newbie skill in my server files (skillinfo, skillefect.lua) and also have client (icon texture). But i dont know how to activate it. I want the skill already activated when someone create a new char. Quote Share this post Link to post Share on other sites
DangThao 80 Report post Posted September 23, 2018 Maybe something like this? inside ur attrcalculate.lua function CreatCha( role ) --[[´´½¨½ÇÉ«]]-- --LuaPrint("Enter function CreatCha(role) --[[create character]]--".."\n") local attr_ap = Attr_ap( role ) + 4 --[[£«5µã×ÔÓÉ·ÖÅäµãÊý]]-- SetCharaAttr( attr_ap, role, ATTR_AP ) AttrRecheck(role) hp = GetChaAttr( role, ATTR_MXHP ) sp = GetChaAttr( role, ATTR_MXSP ) SetCharaAttr( hp, role, ATTR_HP ) SetCharaAttr( sp, role, ATTR_SP ) CreatChaSkill ( role ) --LuaPrint("Out function CreatCha(role) --[[create character]]--".."\n") AddChaSkill ( role , SKILL_NUM , 1 , 1 , 0 ) --Replace SKILL_NUM to your newbie skill id in skillinfo.txt --SystemNotice ( role , "Learned skill '[Newbie Slash]'" ) end 1 Quote Share this post Link to post Share on other sites
nunb2560 1 Report post Posted September 24, 2018 On 9/23/2018 at 12:42 AM, DangThao said: Maybe something like this? inside ur attrcalculate.lua function CreatCha( role ) --[[´´½¨½ÇÉ«]]-- --LuaPrint("Enter function CreatCha(role) --[[create character]]--".."\n") local attr_ap = Attr_ap( role ) + 4 --[[£«5µã×ÔÓÉ·ÖÅäµãÊý]]-- SetCharaAttr( attr_ap, role, ATTR_AP ) AttrRecheck(role) hp = GetChaAttr( role, ATTR_MXHP ) sp = GetChaAttr( role, ATTR_MXSP ) SetCharaAttr( hp, role, ATTR_HP ) SetCharaAttr( sp, role, ATTR_SP ) CreatChaSkill ( role ) --LuaPrint("Out function CreatCha(role) --[[create character]]--".."\n") AddChaSkill ( role , SKILL_NUM , 1 , 1 , 0 ) --Replace SKILL_NUM to your newbie skill id in skillinfo.txt --SystemNotice ( role , "Learned skill '[Newbie Slash]'" ) end Yes, thank you. But theres a mistake in your code. You need to change the order like this: AddChaSkill ( role , SKILL_NUM , 1 , 1 , 0 ) CreatChaSkill ( role ) end Quote Share this post Link to post Share on other sites
DangThao 80 Report post Posted September 24, 2018 5 hours ago, nunb2560 said: Yes, thank you. But theres a mistake in your code. You need to change the order like this: AddChaSkill ( role , SKILL_NUM , 1 , 1 , 0 ) CreatChaSkill ( role ) end I didn't test so idk if it works. Hopefully it works for you though. 1 Quote Share this post Link to post Share on other sites
nunb2560 1 Report post Posted September 24, 2018 3 hours ago, DangThao said: I didn't test so idk if it works. Hopefully it works for you though. Yes, it works. Thank you. Quote Share this post Link to post Share on other sites