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

[Support] Decreasing a players skills

Aarthec

w0000t
Joined
Apr 25, 2009
Messages
129
Reaction score
0
Location
Sweden
I'm trying to decrease a players skills by using this function:
doPlayerAddSkill(cid, amount)

I can't think of any way to make a specific skill decrease by X.
 
data/lib/function.lua
Lua:
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
 
Back
Top Bottom