17 horas atrás, Testing111 disse:Pro pessoal que ta com problema no efetivo das spells, alterei o código com base na função getResistent que o servidor possui.
Vá em data/lib/106-main functions.lua e procure por:
function getEffectvineSpell(attacker, spellNameFromAttacker, value, cid)Altera toda função para essa:
function getEffectvineSpell(attacker, spellNameFromAttacker, value, cid) -- printar os elementos if(spellNameFromAttacker ~= -1) then -- checagem de efetividades local name = getCreatureName(attacker) -- reflect system if isMega(attacker) then name = getPlayerStorageValue(attacker, storages.isMega) end local spellRace, pokeElement1, pokeElement2 = getMoveType(name, spellNameFromAttacker), getPokemonType(cid).type1, getPokemonType(cid).type2 if not typeTable[spellRace] then local remover = removeSpellInXML(doCorrectString(name), spellNameFromAttacker) if remover then print("Magia: " .. spellNameFromAttacker .. " removida do XML: " .. doCorrectString(name) .. ".xml") end return 0 end local multiplier = 1 if isInArray(typeTable[spellRace].super, pokeElement1) then multiplier = multiplier + 0.5 end if pokeElement2 and isInArray(typeTable[spellRace].super, pokeElement2) then multiplier = multiplier + 0.5 end if isInArray(typeTable[spellRace].weak, pokeElement1) then multiplier = multiplier - 0.25 end if pokeElement2 and isInArray(typeTable[spellRace].weak, pokeElement2) then multiplier = multiplier - 0.25 end if isInArray(typeTable[spellRace].non, pokeElement1) then multiplier = multiplier * 0 end if pokeElement2 and isInArray(typeTable[spellRace].non, pokeElement2) then multiplier = multiplier * 0 end if multiplier == 1.5 and poketype2 == "no type" then multiplier = 2 elseif multiplier == 0.75 and poketype2 == "no type" then multiplier = 0.5 elseif multiplier == 1.25 then multiplier = 1 end value = value * multiplier if getCreatureName(cid) == "Venusaur" and value ~= 0 and isMega(cid) and isInArray({"ice", "fire"}, spellRace)then -- Passiva thick fat value = value / 2 end end return valueend
OBS: Fiz poucos testes.
funcionou sim !













info
Grupo: Visconde
Registrado: 08/12/15
Posts: 309
Reputação: +133
Gênero: Masculino
removido
Editado Outubro 5 por samlecter