whitevo
Feeling good, thats what I do.
Trying to make a monster who is using mass heal, but is not healing PLAYERS
Try1:
Made a custom defensive spell for monster:
What it does:
It checks if the target is player, if it is: Then he doesn't heal him
Problems:
This spell doesn't heal caster himself and any other monsters, even when they are at the same area
Try2:
Made a custom attack spell for monster:
What it does:
It doesn't heal the player because the area effect removed the healing are from the position he is in.
Problems:
This spell doesn't heal caster himself and any other monsters, even when they are at the same area
Try3&4:
Used healing attribute for attack & defence:
What it does:
It heals everybody who are in the range.
Problems:
It also heals the player (what i don't want to heal)
Try5:
added radius for custom spells.
Radius didn't change anything
<attack name="monsterHeal" interval="2000" min="5" max="5" radius="10"/>
Here are all my futile attempts, Anyone has any idea how to fix any of these solutions or another way around idea?
extra:
Found this in sourcecode:
Is there any way i could set custom combatArea for the radius? without changing sourcecode
Try1:
Made a custom defensive spell for monster:
What it does:
It checks if the target is player, if it is: Then he doesn't heal him
Problems:
This spell doesn't heal caster himself and any other monsters, even when they are at the same area
xml
spells.xml
script for the spell
Code:
<defenses armor="15" defense="15">
<defence name="monsterHeal" interval="2000" min="5" max="5"/>
</defenses>
Code:
<instant name="monsterHeal" words="###52" aggressive="1" blockwalls="0" needtarget="1" needlearn="1"
script="custom monsters/bandit druid - heal.lua"/>
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
local area = createCombatArea(area9x9)
setCombatArea(combat, area)
function onTargetCreature(creature, target)
if isPlayer(target) then
return true
end
local min, max = 10, 10
doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE)
return true
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Try2:
Made a custom attack spell for monster:
What it does:
It doesn't heal the player because the area effect removed the healing are from the position he is in.
Problems:
This spell doesn't heal caster himself and any other monsters, even when they are at the same area
xml
spells.xml
script for the spell
Code:
<attack name="monsterHeal" interval="2000" min="5" max="5"/>
Code:
<instant name="monsterHeal" words="###52" aggressive="1" blockwalls="0" needtarget="1" needlearn="1"
script="custom monsters/bandit druid - heal.lua"/>
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
local area = createCombatArea(area9x9) --this time this area excludes the impact point
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Try3&4:
Used healing attribute for attack & defence:
What it does:
It heals everybody who are in the range.
Problems:
It also heals the player (what i don't want to heal)
xml
Code:
<attack name="healing" interval="2000" min="100" max="100" min="5" max="5" range="8" radius="10" target="1"/>
Try5:
added radius for custom spells.
Radius didn't change anything
<attack name="monsterHeal" interval="2000" min="5" max="5" radius="10"/>
Here are all my futile attempts, Anyone has any idea how to fix any of these solutions or another way around idea?
extra:
Found this in sourcecode:
Code:
if ((attr = node.attribute("radius"))) {
int32_t radius = pugi::cast<int32_t>(attr.value());
//target spell
if ((attr = node.attribute("target"))) {
needTarget = attr.as_bool();
}
AreaCombat* area = new AreaCombat();
area->setupArea(radius);
combat->setArea(area);
}
Last edited: