i have 2 spells, that cooldown or exhaust arnt working at all.
also would be greatful if they where done so they heal/damage more depending on either level/m lvl.
second spell
also would be greatful if they where done so they heal/damage more depending on either level/m lvl.
Code:
function onCastSpell(cid, var)
local list = getSpectators(getCreaturePosition(cid), 5, 7, false)
local creatures, t = {}, {}
if(#list > 0) then
for i = 1, #list do
if(isCreature(list[i]) or isPlayer(list[i])) then
table.insert(creatures, list[i])
end
end
end
table.insert(t, cid)
for _, p in ipairs(creatures) do
if p ~= cid then
table.insert(t, p)
end
end
if(#t > 0) then
for i = 1, #t do
doSendDistanceShoot(getCreaturePosition(t[i == 1 and i or i - 1]), getCreaturePosition(t[i]), CONST_ANI_ENERGYBALL)
doTargetCombatHealth(cid, t[i], COMBAT_ENERGYDAMAGE, -100, -5000, CONST_ME_NONE)
end
end
end
second spell
Code:
function onCastSpell(cid, var)
local list = getSpectators(getCreaturePosition(cid), 5, 7, false)
local players, t = {}, {}
if(#list > 0) then
for i = 1, #list do
if(isPlayer(list[i])) then
table.insert(players, list[i])
end
end
end
table.insert(t, cid)
for _, p in ipairs(players) do
if p ~= cid then
table.insert(t, p)
end
end
if(#t > 0) then
for i = 1, #t do
doSendDistanceShoot(getCreaturePosition(t[i == 1 and i or i - 1]), getCreaturePosition(t[i]), CONST_ANI_SMALLICE)
doTargetCombatHealth(0, t[i], COMBAT_HEALING, 1000 + (i * -50), 2000 + (i * -100), CONST_ME_MAGIC_BLUE)
end
end
end