pokemon moves.lua (data/lib):
elseif spell == "Ion Deluge" then
local config = {
spell_area = ionDelugeArea, --Área da spell (dano AOE + debuff).
effect = xxx, --Efeito.
debuff_time = xxx --Duração do debuff (em segundos).
}
local positions = getPosfromArea(cid, config.spell_area)
if #positions < 1 then return true end
local function doSendDebuffEffect(cid, times)
if not isCreature(cid) or times <= 0 then return true end
doSendMagicEffect(getThingPos(cid), config.effect)
addEvent(doSendDebuffEffect, 1000, cid, times - 1)
end
for i = 1, #positions do
local pid = getTopCreature(positions[i]).uid
if isCreature(pid) and canAttackOther(cid, pid) == "Can" then
setPlayerStorageValue(pid, 2919, os.time() + config.debuff_time)
doSendDebuffEffect(pid, config.debuff_time)
end
end
doDanoWithProtect(cid, ELECTRICDAMAGE, getThingPos(cid), config.spell_area, min, max, config.effect)
areas.lua:
ionDelugeArea = {
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 2, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0}
}
exp2.0.lua (data/creaturescripts/scripts):
Abaixo de:
local damageCombat = combat
Coloque:
if getPlayerStorageValue(attacker, 2919) > os.time() then
damageCombat = ELECTRICDAMAGE
end
No mesmo arquivo, abaixo de:
if isSummon(attacker) and getPlayerStorageValue(getCreatureMaster(attacker), 86228) >= 1 then
valor = valor*getClanPorcent(getCreatureMaster(attacker), combat, "atk")
elseif isSummon(cid) and getPlayerStorageValue(getCreatureMaster(cid), 86228) >= 1 then
valor = valor - (valor*getClanPorcent(getCreatureMaster(cid), combat, "def", pokes[getCreatureName(cid)].type, pokes[getCreatureName(cid)].type2))
end
Coloque:
local Volt_Absorb = {
passive_owners = {"Jolteon", "Shiny Jolteon", "Lanturn"}, --Pokémons com a passiva Volt Absorb.
heal = {
min_percent = xxx, --Porcentagem mínima do dano curada.
max_percent = xxx, --Porcentagem máxima do dano curada.
}
}
if isInArray(Volt_Absorb.passive_owners, getCreatureName(cid)) and damageCombat == ELECTRICDAMAGE then
local amount = math.floor(valor * math.random(Volt_Absorb.heal.min_percent, Volt_Absorb.heal.max_percent) / 100)
valor = 0
doSendAnimatedText(getThingPos(cid), "+"..amount, 65)
doCreatureAddHealth(cid, amount)
end
Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.