Postado Junho 19, 2014 10 anos Entao achei um script de stages de skill, to tentando modificar ele, mas ta dando erro, ele funciona perfeitamente, o erro ta na minha modificação: if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then skillStages[sKILL__MAGLEVEL] = {{0,15},{10,8},{20,5},{60,3}} else if getPlayerVocation(cid) == 8 or getPlayerVocation(cid) == 4 then skillStages[sKILL__MAGLEVEL] = {{0,4},{4,3}} else if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then skillStages[sKILL__MAGLEVEL] = {{0,4},{4,3}} end end end else skillStages[sKILL__MAGLEVEL] = {{0,4}} end O que eu fiz de errado? Script skillConfig = {skill = getConfigValue('rateSkill'), magiclevel = getConfigValue('rateMagic')} skillStages = {} skillStages[sKILL_FIST] = {{0,20},{40,15},{60,10},{80,9}} skillStages[sKILL_CLUB] = {{0,20},{40,15},{60,10},{80,9}} skillStages[sKILL_SWORD] = {{0,20},{40,15},{60,10},{80,9}} skillStages[sKILL_AXE] = {{0,20},{40,15},{60,10},{80,9}} skillStages[sKILL_DISTANCE] = {{0,20},{40,15},{60,10},{80,9}} skillStages[sKILL_SHIELD] = {{0,20},{40,15},{60,10},{80,9}} --skillStages[sKILL_FISHING] = {{0,5},{60,4},{80,3},{100,2},{110,1}} -- uncomment it to make it work, you can remove other skill config if you dont need it --skillStages[sKILL__MAGLEVEL] = {{0,8},{4,6},{8,5},{60,3}} if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then skillStages[sKILL__MAGLEVEL] = {{0,15},{10,8},{20,5},{60,3}} else if getPlayerVocation(cid) == 8 or getPlayerVocation(cid) == 4 then skillStages[sKILL__MAGLEVEL] = {{0,4},{4,3}} else if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then skillStages[sKILL__MAGLEVEL] = {{0,4},{4,3}} end end end else skillStages[sKILL__MAGLEVEL] = {{0,4}} end showInfoOnAdvance = true -- send player message about skill rate change showInfoOnLogin = true -- send player message about skill rates when he login function getPlayerSkillRatesText(cid) local skillInfo = getPlayerRates(cid) return "YOUR SKILLS STAGES: [ Magic Level: " .. skillInfo[sKILL__MAGLEVEL] * skillConfig.magiclevel .. "x || Fist: " .. skillInfo[sKILL_FIST] * skillConfig.skill .. "x | Club: " .. skillInfo[sKILL_CLUB] * skillConfig.skill .. "x | Sword: " .. skillInfo[sKILL_SWORD] * skillConfig.skill .. "x | Axe: " .. skillInfo[sKILL_AXE] * skillConfig.skill .. "x | Distance: " .. skillInfo[sKILL_DISTANCE] * skillConfig.skill .. " | Shielding: " .. skillInfo[sKILL_SHIELD] * skillConfig.skill .. "x | Fishing: " .. skillInfo[sKILL_FISHING] * skillConfig.skill .. "x ]" end Erro:
Postado Setembro 14, 2018 6 anos Em 19/06/2014 em 15:52, gmstrikker disse: Citar if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then skillStages[sKILL__MAGLEVEL] = {{0,15},{10,8},{20,5},{60,3}} else if getPlayerVocation(cid) == 8 or getPlayerVocation(cid) == 4 then skillStages[sKILL__MAGLEVEL] = {{0,4},{4,3}} else if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then skillStages[sKILL__MAGLEVEL] = {{0,4},{4,3}} end end end else skillStages[sKILL__MAGLEVEL] = {{0,4}} end Acho que vc pode mudar as condições para: Spoiler -- function... local pVocation = getPlayerVocation(cid) if pVocation == 1 or pVocation == 5 or pVocation == 2 or pVocation == 6 then skillStages[sKILL__MAGLEVEL] = {{0, 15}, {10, 8}, {20, 5}, {60, 3}} else if pVocation == 8 or pVocation == 4 then skillStages[sKILL__MAGLEVEL] = {{0, 4}, {4, 3}} else if pVocation == 3 or pVocation == 7 then skillStages[sKILL__MAGLEVEL] = {{0, 4}, {4, 3}} else if pVocation > 8 then skillStages[sKILL__MAGLEVEL] = {{0, 4}} end end end end -- end da function... Em 19/06/2014 em 15:52, gmstrikker disse: O que eu fiz de errado? Script Veja se funciona: Spoiler -- function... skillConfig = {skill = getConfigValue("rateSkill"), magiclevel = getConfigValue("rateMagic")} skillStages = {} skillStages[sKILL_FIST] = {{0, 20}, {40, 15}, {60, 10}, {80, 9}} skillStages[sKILL_CLUB] = {{0, 20}, {40, 15}, {60, 10}, {80, 9}} skillStages[sKILL_SWORD] = {{0, 20}, {40, 15}, {60, 10}, {80, 9}} skillStages[sKILL_AXE] = {{0, 20}, {40, 15}, {60, 10}, {80, 9}} skillStages[sKILL_DISTANCE] = {{0, 20}, {40, 15}, {60, 10}, {80, 9}} skillStages[sKILL_SHIELD] = {{0, 20}, {40, 15}, {60, 10}, {80, 9}} --skillStages[sKILL_FISHING] = {{0,5},{60,4},{80,3},{100,2},{110,1}} -- uncomment it to make it work, you can remove other skill config if you dont need it --skillStages[sKILL__MAGLEVEL] = {{0,8},{4,6},{8,5},{60,3}} local pVocation = getPlayerVocation(cid) if pVocation == nil or pVocation == 0 then return false end if pVocation == 1 or pVocation == 5 or pVocation == 2 or pVocation == 6 then skillStages[sKILL__MAGLEVEL] = {{0, 15}, {10, 8}, {20, 5}, {60, 3}} else if pVocation == 8 or pVocation == 4 then skillStages[sKILL__MAGLEVEL] = {{0, 4}, {4, 3}} else if pVocation == 3 or pVocation == 7 then skillStages[sKILL__MAGLEVEL] = {{0, 4}, {4, 3}} else if pVocation > 8 then skillStages[sKILL__MAGLEVEL] = {{0, 4}} end end end end showInfoOnAdvance = true -- send player message about skill rate change showInfoOnLogin = true -- send player message about skill rates when he login function getPlayerSkillRatesText(cid) local skillInfo = getPlayerRates(cid) return "YOUR SKILLS STAGES: [ Magic Level: " .. skillInfo[sKILL__MAGLEVEL] * skillConfig.magiclevel .. "x || Fist: " .. skillInfo[sKILL_FIST] * skillConfig.skill .. "x | Club: " .. skillInfo[sKILL_CLUB] * skillConfig.skill .. "x | Sword: " .. skillInfo[sKILL_SWORD] * skillConfig.skill .. "x | Axe: " .. skillInfo[sKILL_AXE] * skillConfig.skill .. "x | Distance: " .. skillInfo[sKILL_DISTANCE] * skillConfig.skill .. " | Shielding: " .. skillInfo[sKILL_SHIELD] * skillConfig.skill .. "x | Fishing: " .. skillInfo[sKILL_FISHING] * skillConfig.skill .. "x ]" end -- end da function... Editado Setembro 14, 2018 6 anos por dirso (veja o histórico de edições)
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.