• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ player:addSkill not working if skill level is 0

oserc

Advanced OT User
Joined
Mar 5, 2022
Messages
148
Solutions
1
Reaction score
194
Location
Brazil
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!
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:
Back
Top