darkmu
Well-Known Member
What is happening is that it is not removing the conditions that I had in the player.
It also happened that, some players started to take paralyze while in a protected zone or also when taking paralyze for a hydra bug .. your speed got to bugar and get 40 speed, can someone help me?
TFS 1.3
It also happened that, some players started to take paralyze while in a protected zone or also when taking paralyze for a hydra bug .. your speed got to bugar and get 40 speed, can someone help me?
TFS 1.3
Lua:
local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_SUBID, 20)
condition:setParameter(CONDITION_PARAM_TICKS, -1)
condition:setParameter(CONDITION_PARAM_SKILL_CRITICAL_HIT_CHANCE, 15)
condition:setParameter(CONDITION_PARAM_SKILL_CRITICAL_HIT_DAMAGE, 15)
condition:setParameter(CONDITION_PARAM_SKILL_LIFE_LEECH_CHANCE, 100)
condition:setParameter(CONDITION_PARAM_SKILL_LIFE_LEECH_AMOUNT, 25)
condition:setParameter(CONDITION_PARAM_SKILL_MANA_LEECH_CHANCE, 100)
condition:setParameter(CONDITION_PARAM_SKILL_MANA_LEECH_AMOUNT, 25)
function onThink(creature, interval)
local player = Player(creature)
if not player then
return false
end
delay = player:getStorageValue(15869)
if delay >= 8000 and player:getStorageValue(15866) >= os.time() then
player:getPosition():sendMagicEffect(CONST_ME_CRITICAL_DAMAGE)
player:say("BUFF Veteranos", TALKTYPE_MONSTER_SAY)
player:setStorageValue(15869, interval)
else
player:setStorageValue(15869, delay + interval)
end
if player:getStorageValue(15866) >= os.time() then
player:addCondition(condition)
end
if player:getStorageValue(15866) <= os.time() and player:getStorageValue(15867) > 0 then
player:removeCondition(CONDITION_ATTRIBUTES, 20)
end
return true
end