xFlamek
New Member
- Joined
- May 1, 2020
- Messages
- 23
- Reaction score
- 0
hello, im trying to fix paralyze scripts for monsters atm using scrip like this one, but my problem is that it also affect monster, even if monster have paralyze immunity set in config.
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) -- effect of spell
local condition = Condition(CONDITION_PARALYZE)
condition:setParameter(CONDITION_PARAM_TICKS, 20000) -- 20 seconds
condition:setFormula(-0.25, 0, -0.45, 0) -- player speed -25% to -45%
combat:addCondition(condition)
local area = createCombatArea(AREA_SQUARE1X1)-- need to setup right area of effect
combat:setArea(area)
Combat:addCondition(condition)
function onCastSpell(creature, variant, isHotkey)
if not combat:execute(creature, variant) then
return false
end
end