Postado Abril 18, 2018 7 anos Autor desculpe responder depois de tanto tempo, coloquei porém não fez diferença, não deu erro tbm, mas é como nao foi ativado e o Rateskill que esta valendo é o do Config.lua
Postado Abril 18, 2018 7 anos @JofreCorreia em events/scripts/player.lua adicione: Spoiler local config = { -- base vocationId [1] = { -- skillId [SKILL_FIST] = { -- [{skillLevel}] = skillRate [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_CLUB] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_SWORD] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_AXE] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_DISTANCE] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_SHIELD] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_FISHING] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_MAGLEVEL] = { [{10, 19}] = 10, [{20, 29}] = 5 } } } --[[ function Vocation.getBase(self) local demotion = self:getDemotion() while demotion do local tmp = demotion:getDemotion() if not tmp then return demotion end demotion = tmp end return self end ]] local function getSkillRate(player, skillId) local targetVocation = config[player:getVocation():getBase():getId()] if targetVocation then local targetSkillStage = targetVocation[skillId] if targetSkillStage then local skillLevel = player:getSkillLevel(skillId) for level, rate in pairs(targetSkillStage) do if skillLevel >= level[1] and skillLevel <= level[2] then return rate end end end end return skillId == SKILL_MAGLEVEL and configManager.getNumber(configKeys.RATE_MAGIC) or configManager.getNumber(configKeys.RATE_SKILL) end ainda em events/scripts/player.lua procure por: function Player:onGainSkillTries(skill, tries) if APPLY_SKILL_MULTIPLIER == false then return tries end if skill == SKILL_MAGLEVEL then return tries * configManager.getNumber(configKeys.RATE_MAGIC) end return tries * configManager.getNumber(configKeys.RATE_SKILL) end troque por: function Player:onGainSkillTries(skill, tries) if not APPLY_SKILL_MULTIPLIER then return tries end return tries * getSkillRate(self, skill) end
Postado Abril 19, 2018 7 anos Solução Em 01/04/2018 em 22:44, Jobs disse: local config = { -- base vocationId [1] = { -- skillId [SKILL_FIST] = { -- [{skillLevel}] = skillRate [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_CLUB] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_SWORD] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_AXE] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_DISTANCE] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_SHIELD] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_FISHING] = { [{10, 19}] = 10, [{20, 29}] = 5 }, [SKILL_MAGLEVEL] = { [{10, 19}] = 10, [{20, 29}] = 5 } } } --[[ function Vocation.getBase(self) local demotion = self:getDemotion() while demotion do local tmp = demotion:getDemotion() if not tmp then return demotion end demotion = tmp end return self end ]] local function getSkillRate(player, skillId) local targetVocation = config[player:getVocation():getBase():getId()] if targetVocation then local targetSkillStage = targetVocation[skillId] if targetSkillStage then local skillLevel = player:getSkillLevel(skillId) for level, rate in pairs(targetSkillStage) do if skillLevel >= level[1] and skillLevel <= level[2] then return rate end end end end return skillId == SKILL_MAGLEVEL and configManager.getNumber(configKeys.RATE_MAGIC) or configManager.getNumber(configKeys.RATE_SKILL) end function Player:onGainSkillTries(skill, tries) if not APPLY_SKILL_MULTIPLIER then return tries end return tries * getSkillRate(self, skill) end Créditos ao Ninja do otland, né?
Postado Abril 19, 2018 7 anos 1 hora atrás, FlavioHulk disse: Créditos ao Ninja do otland, né? sim, não sei lua, já disse mil vezes aqui, todos tópicos que eu ajudo, é porque pesquiso ou já fiz no meu servidor e ajudo.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.