Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onAdvance(cid, skill, oldLevel, newLevel)
- local stagesVocation = getPlayerVocation(cid)
- if stagesVocation > 4 then
- stagesVocation = stagesVocation - 4
- end
- local targetVocation = skillStagesConfig[stagesVocation]
- if targetVocation then
- local targetSkillStage = targetVocation[skill]
- if targetSkillStage then
- local skillRate = 1
- for level, rate in pairs(targetSkillStage) do
- if newLevel >= level[1] and newLevel <= level[2] then
- skillRate = rate
- end
- end
- doPlayerSetRate(cid, skill, skillRate)
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement