Thing not found!
Script:
Script:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, condition)
function onAttack(cid, weapon, target)
if getPlayerStorageValue(cid, eSkill.dexterity) >= 1 then
local chance = math.random(1, 1000)
if chance > 0 and chance <= getPlayerStorageValue(cid, eSkill.dexterity) and getDistanceBetween(getCreaturePos(cid), getCreaturePos(target)) <= 1 then
doAddCondition(cid, condition)
end
end
return true
end
Last edited: