oserc
Advanced OT User
Hi, everyone!
Not sure if this is a bug or just how the game works, but if I use the function "player:addSkill" to increase any skill, it won't raise if the corresponding skill level is 0. For example, if I use the function to raise sword fighting, and my sword fighting is 0, it won't work. The skill level remains 0. On the other hand, if the skill level is already 1 or more, the function works perfectly, and the skill level is increased.
Why is that? Is there a way to make the function work even if the skill level is 0?
I also tried to find "player:addSkill" function in luascript.cpp to see how it works but couldnt find anything regarding that.
I'm using TFS 1.4.1, by the way. Thanks in advance!
During tests, I realized that you can't add tries to a skill when its level is 0. But, for context, I'm using custom skills in my server, such as "mining" and "lumberjacking". Players will have to pay a NPC in order to "learn" these skill, thus setting the skill to level 1, "enabling" it for use.
That's why I want to know if there's a way to make "player:addSkill" function work even if the skill level is 0.
Not sure if this is a bug or just how the game works, but if I use the function "player:addSkill" to increase any skill, it won't raise if the corresponding skill level is 0. For example, if I use the function to raise sword fighting, and my sword fighting is 0, it won't work. The skill level remains 0. On the other hand, if the skill level is already 1 or more, the function works perfectly, and the skill level is increased.
Why is that? Is there a way to make the function work even if the skill level is 0?
I also tried to find "player:addSkill" function in luascript.cpp to see how it works but couldnt find anything regarding that.
I'm using TFS 1.4.1, by the way. Thanks in advance!
Post automatically merged:
During tests, I realized that you can't add tries to a skill when its level is 0. But, for context, I'm using custom skills in my server, such as "mining" and "lumberjacking". Players will have to pay a NPC in order to "learn" these skill, thus setting the skill to level 1, "enabling" it for use.
That's why I want to know if there's a way to make "player:addSkill" function work even if the skill level is 0.
Last edited: