Seria interessente se você enviasse o quê se encontra na linha 4621 de pokemon moves.lua. Sobre as storages, não sei. Talvez sim.
Vou revisar o código do Protection aqui. Qualquer coisa, reescrevo-o.
#EDIT: Código reescrito. Aqui, pelo menos, está funcionando perfeitamente.
elseif spell == "Protection" then
local area = heal --Área do Protection.
local pos = getPosfromArea(cid, area)
local n = 0
local duel_sto_1 = xxx --Storage de duel.
local duel_sto_2 = xxx --Storage de duel.
local pvp_sto_1 = xxx --Storage de PvP.
local pvp_sto_2 = xxx --Storage de PvP.
local duration = 8 --Duração do buff.
local eff = 117
local ret = {}
local function isMonster(cid)
if isCreature(cid) then
if not isPlayer(cid) and not isSummon(cid) and not ehNPC(cid) then
return true
else
return false
end
end
return nil
end
if isSummon(cid) then
ret.id = cid
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
local owner = getCreatureMaster(cid)
ret.id = owner
doCondition2(ret)
elseif isMonster(cid) then
ret.id = cid
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
end
while n < #pos do
n = n + 1
local posis = {x = pos[n].x, y = pos[n].y, z = pos[n].z, stackpos = 253}
local thing = getThingFromPosWithProtect(posis)
if isCreature(thing) then
if isSummon(cid) then
local owner = getCreatureMaster(cid)
if isSummon(thing) then
if getPlayerStorageValue(owner, duel_sto_1) >= 1 then
if getPlayerStorageValue(getCreatureMaster(thing), duel_sto_2) < 1 then
ret.id = thing
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
end
elseif getPlayerStorageValue(owner, duel_sto_2) >= 1 then
if getPlayerStorageValue(getCreatureMaster(thing), duel_sto_1) < 1 then
ret.id = thing
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
end
elseif getPlayerStorageValue(owner, pvp_sto_2) >= 1 then
if getPlayerStorageValue(getCreatureMaster(thing), pvp_sto_1) < 1 then
ret.id = thing
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
end
elseif getPlayerStorageValue(owner, pvp_sto_1) >= 1 then
if getPlayerStorageValue(getCreatureMaster(thing), pvp_sto_2) < 1 then
ret.id = thing
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
end
end
elseif isPlayer(thing) then
if getPlayerStorageValue(owner, duel_sto_1) >= 1 then
if getPlayerStorageValue(thing, duel_sto_2) < 1 then
ret.id = thing
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
end
elseif getPlayerStorageValue(owner, duel_sto_2) >= 1 then
if getPlayerStorageValue(thing, duel_sto_1) < 1 then
ret.id = thing
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
end
elseif getPlayerStorageValue(owner, pvp_sto_2) >= 1 then
if getPlayerStorageValue(thing, pvp_sto_1) < 1 then
ret.id = thing
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
end
elseif getPlayerStorageValue(owner, pvp_sto_1) >= 1 then
if getPlayerStorageValue(thing, pvp_sto_2) < 1 then
ret.id = thing
ret.cd = duration
ret.eff = eff
ret.check = 0
ret.buff = spell
ret.first = true
doCondition2(ret)
end
end
end
end
end
end




info
Grupo: Campones
Registrado: 23/08/12
Posts: 67
Reputação: +1
Gênero: Masculino
protection aki n esta funcionando corretamente. quando não estou em battle, ele funciona, porém se há algum pokemon me atacando ele não funciona e da esse erro no console:
Editado Fevereiro 18 por lgan