Dexftw
Total Boss
- Joined
- Jan 30, 2011
- Messages
- 317
- Reaction score
- 8
I was trying to mix some aoe spells with the life drain formula but its not working, the only life steal ability i could come up with is a single target, any idea if theres one for an aoe?
single-target heal ^ tried mixing it with the mass healing area 3x3 script but its not working, hope someone can help me with this epic spell
Code:
local formulaDrainHealth, percent = {
min = 50 * 2 + 100 * 1,
max = 40 * 2.5 + 200 * 1.5
}, 70
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
if not isCreature(target) then
return not doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
end
local drain = math.min(getCreatureHealth(target), math.random(formulaDrainHealth.min, formulaDrainHealth.max))
doTargetCombatHealth(cid, target, COMBAT_LIFEDRAIN, -drain, -drain, CONST_ME_NONE)
doCreatureAddHealth(cid, drain * (percent / 100))
doSendDistanceShoot(getThingPos(target), getThingPos(cid), 30)
return true
end
single-target heal ^ tried mixing it with the mass healing area 3x3 script but its not working, hope someone can help me with this epic spell