Hello guys, I have a script here that I found a few years ago and I made some changes to do what I needed. I use the script to apply a formula of attack, area of attack, conditions and several other things about weapons, but one thing I'm not able to do it's to apply paralyze condition. Could somebody help me?
I would like for the paralyze condition work with this requests:
% of slow it applies. (if target has 300 speed and the weapon applies 10% slow, than the target will have 270 speed for the next 3 seconds)
% of chance to apply slow (if the weapon has 10% of applying slow, it means out of 10 attacks, one will apply the paralyze)
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_WHITE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HUNTINGSPEAR)
function onGetFormulaValues(xxx, yyy, zzz)
my own formular
return -min, -max
end
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local area = createCombatArea( { {0, 0, 0}, {0, 3, 0}, {0, 0, 0} } )
setCombatArea(combat, area)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
I would like for the paralyze condition work with this requests:
% of slow it applies. (if target has 300 speed and the weapon applies 10% slow, than the target will have 270 speed for the next 3 seconds)
% of chance to apply slow (if the weapon has 10% of applying slow, it means out of 10 attacks, one will apply the paralyze)