Olá gostaria de pedir á alguém que possa arrumar esse script
local VocPoints = {
[1] = 3,
[2] = 3,
[3] = 3,
[4] = 5,
[5] = 5,
[6] = 5,
[7] = 5,
[8] = 8,
}
function onAdvance(cid, skill, oldlevel, newlevel)
if not (VocPoints[getPlayerVocation(cid)]) then
return true
end
if (skill == 8) then
if (getPlayerStorageValue(cid, 14573) < newlevel) then
if (getPlayerStorageValue(cid, 14574) < 0) then
setPlayerStorageValue(cid, 14574, 0)
setPlayerStorageValue(cid, 14573, 0)
end
setPlayerStorageValue(cid, 14573, newlevel)
setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]))
doSendAnimatedText(getThingPos(cid), "+" .. (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]), 18)
end
end
return true
end
pois uso sistema de reset no meu otserv e gostaria que os pontos fossem acumulativos, o servidor é high exp então não terá problema em ser acumulativos
Detalhes:
Distro: TFS 0.3.6
Versão: 8.60
mesmo quando eu retiro essa linha if (getPlayerStorageValue(cid, 14573) < newlevel) then que é linha em que faz com que não dê pontos ao mesmo level, depois começa da alguns erros no distro.
info
Grupo: Campones
Registrado: 09/02/09
Posts: 26
Reputação: +3
Olá gostaria de pedir á alguém que possa arrumar esse script
local VocPoints = { [1] = 3, [2] = 3, [3] = 3, [4] = 5, [5] = 5, [6] = 5, [7] = 5, [8] = 8, } function onAdvance(cid, skill, oldlevel, newlevel) if not (VocPoints[getPlayerVocation(cid)]) then return true end if (skill == 8) then if (getPlayerStorageValue(cid, 14573) < newlevel) then if (getPlayerStorageValue(cid, 14574) < 0) then setPlayerStorageValue(cid, 14574, 0) setPlayerStorageValue(cid, 14573, 0) end setPlayerStorageValue(cid, 14573, newlevel) setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)])) doSendAnimatedText(getThingPos(cid), "+" .. (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]), 18) end end return true endpois uso sistema de reset no meu otserv e gostaria que os pontos fossem acumulativos, o servidor é high exp então não terá problema em ser acumulativos
Detalhes:
Distro: TFS 0.3.6
Versão: 8.60
mesmo quando eu retiro essa linha if (getPlayerStorageValue(cid, 14573) < newlevel) then que é linha em que faz com que não dê pontos ao mesmo level, depois começa da alguns erros no distro.
Obrigado à todos.
Editado Janeiro 8 por joadson