Hello looking for monster heal monster spell what i tried
1. This one heals players too and has no effects so its not perfection
<attack name="healing" interval="2000" min="100" max="100" min="5" max="5" range="8" radius="10" target="1"/>
2. This one doesnt work
1. This one heals players too and has no effects so its not perfection
<attack name="healing" interval="2000" min="100" max="100" min="5" max="5" range="8" radius="10" target="1"/>
2. This one doesnt work
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_LIGHTING61)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
combat:setArea(createCombatArea(AREA_CIRCLE3X3))
local healMonsters = true
function onTargetCreature(creature, target)
local player = creature:getPlayer()
local min = (getLevel() / 5) + (getMagicLevel() * 4.6) + 100
local max = (getLevel() / 5) + (getMagicLevel() * 9.6) + 125
if not healMonsters then
local master = target:getMaster()
if target:isMonster() and not master or master and master:isMonster() then
return true
end
end
doTargetCombatHealth(creature:getId(), target, COMBAT_HEALING, min, max, CONST_ME_NONE)
return true
end
combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end