ghunalma
New Member
Hi guys, is my first post on this forum in many years. I need a help with my necro skill life steal. i'm making one, it's causing dmg(dot) but dont return the healing. Anyone can help me?
In this case, it's causing dot dmg without calculate damage and a fix heal rate. I want to do this, causing damage with magic level and level base, and return healing with a percent of the damage.
Its my spell. i'm using TFS 1.3
client version 12.72
In this case, it's causing dot dmg without calculate damage and a fix heal rate. I want to do this, causing damage with magic level and level base, and return healing with a percent of the damage.
Its my spell. i'm using TFS 1.3
client version 12.72
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, 18)
local condition = Condition(CONDITION_CURSED)
condition:addDamage(25, 1, -45)
combat:addCondition(condition)
local condition2 = Condition(CONDITION_REGENERATION)
condition2:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition2:setParameter(CONDITION_PARAM_HEALTHGAIN, 20)
condition2:setParameter(CONDITION_PARAM_HEALTHTICKS, 3 * 1000)
condition2:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(condition2)
local spell = Spell("instant")
function spell.onCastSpell(creature, var)
return combat:execute(creature, var)
end
spell:group("attack")
spell:name("demon kiss")
spell:words("life leech")
spell:level(1)
spell:mana(0)
spell:isAggressive(true)
spell:range(3)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(500)
spell:groupCooldown(2 * 1000)
spell:needLearn(false)
spell:vocation("necromancer;true")
spell:register()