OTcreator
Active Member
- Joined
- Feb 14, 2022
- Messages
- 439
- Solutions
- 1
- Reaction score
- 48
Hello!
I need paralyze rune like RL (or with exhaustion).
I found this but for TFS 1.X. I need for TFS 0.3.7.
I need paralyze rune like RL (or with exhaustion).
I found this but for TFS 1.X. I need for TFS 0.3.7.
Lua:
function onCastSpell(creature, var)
local target = creature:getTarget()
if not target then
creature:sendCancelMessage("You need to target creature first.")
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000)
condition:setFormula(0, -(target:getSpeed()) + 80, 0, -(target:getSpeed()) + 80)
combat:addCondition(condition)
if not combat:execute(creature, var) then
return false
end
creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
return true
end