nefinoo
Carnage.flv
spell that heals the monster and damages players, as if it were life steal from the monster, i am using tfs 1.3
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
combat:setArea(createCombatArea(AREA_CIRCLE3X3))
function onCastSpell(creature, variant)
local player = creature:getPlayer()
local min = 1000
local max = 2000
for _, target in ipairs(combat:getTargets(creature, variant)) do
if target:isPlayer() then
doTargetCombat(0, target, COMBAT_HEALING, -min, -max)
end
if target:isMonster() then
doTargetCombat(0, target, COMBAT_HEALING, min, max)
end
end
return true
end
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
combat:setArea(createCombatArea(AREA_CIRCLE3X3))
function onCastSpell(creature, variant)
local player = creature:getPlayer()
local min = 1000
local max = 2000
for _, target in ipairs(combat:getTargets(creature, variant)) do
if target:isPlayer() then
doTargetCombat(0, target, COMBAT_HEALING, -min, -max)
end
if target:isMonster() then
doTargetCombat(0, target, COMBAT_HEALING, min, max)
end
end
return true
end
Did you solve it? Because you marked my reply as solution just as soon as you posted this error so I don't know if its solved or not.[Warning - Event::checkScript] Event onCastSpell not found. scripts/monster/nightmare.lua
data/spells/scripts/monster
and you'll have to add it in spells.xml
like this line<instant name="scriptname" words="###1" aggressive="0" blockwalls="1" needtarget="0" needlearn="0" script="monster/scriptname.lua"/>
Did you solve it? Because you marked my reply as solution just as soon as you posted this error so I don't know if its solved or not.
I think you added it in wrong folder, It should be indata/spells/scripts/monster
and you'll have to add it inspells.xml
like this line
XML:<instant name="scriptname" words="###1" aggressive="0" blockwalls="1" needtarget="0" needlearn="0" script="monster/scriptname.lua"/>
<instant name="Nightmare Beast" words="#####474" direction="1" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/nightmare.lua" />
Now if you launch the spell and everything, but it does not heal and the console does not throw an errorEdited it, Retry again.
I dont understand at all what you wantspell that heals the monster and damages players, as if it were life steal from the monster, i am using tfs 1.3
Yes, a spell that damages player X and that damage turns into healing for the monsterI dont understand at all what you want
you want the monster to heal????
No heal or damage? Both not working?Now if you launch the spell and everything, but it does not heal and the console does not throw an error
Yeah is gona be a spell with X interval and X chance to castalso if demon attacks player for like 500 damage
the demon will heal 500 aswell?
Yeah nothing, my monster dont heal and dont make anydamageNo heal or damage? Both not working?
Edited again, Retry.Yeah nothing, my monster dont heal and dont make anydamage