flaviiojr
Active Member
- Joined
- Jan 20, 2017
- Messages
- 230
- Solutions
- 13
- Reaction score
- 39
When using "creature" just heal my summon, if you use "0", heal all the creatures around... How do I heal all the creatures around, showing that it was that sacred tree that healed them?
TFS 1.3
A sacred tree healed strong demon for 6 hitpoints. "This happens when used "creature""
An orc warlord was healed for 9 hitpoints. "This happens when used "0""
TFS 1.3
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0);
combat:setArea(createCombatArea(AREA_SQUARE1X1))
function onCastSpell(creature, var)
local spectators, spectator = Game.getSpectators(creature:getPosition(), false, false, 1, 1, 1, 1)
for i = 1, #spectators do
spectator = spectators[i]
if spectator:isMonster() and spectator:getName():lower() ~= 'sacred tree' then
doTargetCombatHealth(creature, spectator, COMBAT_HEALING, 5, 10, CONST_ME_NONE)
end
end
return combat:execute(creature, var)
end