• 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!

[Lua Script] Add 1 skill

StormRusher

New Member
Joined
Dec 23, 2009
Messages
138
Reaction score
0
Well i tried to use the doPlayerAddSkillTry and doPlayerAddSkill to add one skill, for example axe, without succes

Someone knows how to add just one skill with one of these functions? Add like 100% of a skill...

Thanks
 
In TFS lib. you already have doPlayerAddSkill function o_O
Code:
function doPlayerAddSkill(cid, skill, amount, round)
	if(skill == SKILL__LEVEL) then
		return doPlayerAddLevel(cid, amount, round)
	elseif(skill == SKILL__MAGLEVEL) then
		return doPlayerAddMagLevel(cid, amount)
	end

	return doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)) / getConfigInfo('rateSkill'))
end
 
If you only want to add skills, round won't make any difference.

And obviously, amount is how many skill levels you want the player to receive.
 
Something is wrong, cause dont work "doPlayerAddSkill(cid, SKILL_AXE, 5)" it dont add 5 axe skills to the player.

For example how can i add 10 Shield skills to a player?
 
Iv also been trying to figure this out. Been searching everywhere. I can figure out skilltries. But like the thread starter, id like a 100% skill. Thank you
 
Back
Top