Hello,
I'm trying to put increased shield percent on a healing spell I have, but I can't seem to make it work.
I would like to know what I'm doing at this script. The healing works fine, also the effect and everything else, I just can't increase shield %.
I'm trying to put increased shield percent on a healing spell I have, but I can't seem to make it work.
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, 237)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
local skill = Condition(CONDITION_ATTRIBUTES)
skill:setParameter(CONDITION_PARAM_TICKS, 13000)
skill:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, 220)
skill:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
combat:addCondition(skill)
function onCastSpell(creature, variant)
local maxHealth = creature:getMaxHealth()
local currentHealth = creature:getHealth()
local healthGain = math.floor((maxHealth / 100) * 10)
if currentHealth <= healthGain then
return false
end
creature:addHealth(healthGain)
local summons = creature:getSummons()
if #summons > 0 then
for i = 1, #summons do
summons[i]:addHealth(healthGain)
end
end
return combat:execute(creature, variant)
end
I would like to know what I'm doing at this script. The healing works fine, also the effect and everything else, I just can't increase shield %.