Jabantiz wrote:The problem we have is the spell we are casting from is a hostile spell, a life tap type spell, we do damage to the target, however we also need to heal the caster. With out the changes made SpellHeal() would heal your target as that was the target of the spell.
Even if in the LUA script, we use Caster as the parameter for the heal component, it still heals the Target? That doesn't make sense.
Ie, my Faith Strike I did when I did level 1's for all classes:
Code: Select all
--[[
Script Name : Spells/Fighter/Crusader/Paladin/FaithStrike.lua
Script Author : John Adams
Script Date : 2013.11.17 06:11:09
Script Purpose : DD + Heal
:
--]]
function cast(Caster, Target, DDType, MinDmg, MaxDmg, HealAmt)
-- DD Component
if MaxDmg ~= nil and MinDmg < MaxDmg then
dmgAmount = math.random(MinDmg, MaxDmg)
SpellDamage(Target, DDType, dmgAmount)
else
SpellDamage(Target, DDType, MinDmg)
end
-- Heal Component
if HealAmt ~= nil then
ModifyHP(Caster, HealAmt)
end
end
You saying that ModifyHP(Caster, HealAmt) does not put the HealAmt on the one who cast the spell?