• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

doPlayerAddMeleeSkill ;p

Serginov

Onkonkoronkonk
Joined
Jun 28, 2008
Messages
1,321
Reaction score
18
Location
Sweden - Dalarna
just 2 simple funcions ;p
Thanks cyko for the fix;
Code:
local rate = getConfigInfo('rateSkill')
function doPlayerAddMeleeSkill(cid, amount)
    for i = 0, 3 do
        doPlayerAddSkillTry(cid, i, math.ceil((getPlayerRequiredSkillTries(cid, i, getPlayerSkillLevel(cid, i) + 1) - getPlayerSkillTries(cid, i)) / rate))
    end
end

function getPlayerMeleeSkill(cid)
    return {[0] = getPlayerSkillLevel(cid, SKILL_FIST), [1] = getPlayerSkillLevel(cid, SKILL_CLUB), [2] = getPlayerSkillLevel(cid, SKILL_SWORD), [3] = getPlayerSkillLevel(cid, SKILL_AXE)}
end
 
Last edited:
fixed:
Code:
local rate = getConfigInfo('rateSkill')
function doPlayerAddMeleeSkill(cid, amount)
	for i = 0, 3 do
		doPlayerAddSkillTry(cid, i, math.ceil((getPlayerRequiredSkillTries(cid, i, getPlayerSkillLevel(cid, i) + 1) - getPlayerSkillTries(cid, i)) / rate))
	end
end

function getPlayerMeleeSkill(cid)
	return {[0] = getPlayerSkillLevel(cid, SKILL_FIST), [1] = getPlayerSkillLevel(cid, SKILL_CLUB), [2] = getPlayerSkillLevel(cid, SKILL_SWORD), [3] = getPlayerSkillLevel(cid, SKILL_AXE)}
end
 
Back
Top