sestorme
Member
LUA:
function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS and combat == COMBAT_PHYSICALDAMAGE then
if isPlayer(cid) == TRUE then
local weapon = getPlayerSlotItem(cid, CONST_SLOT_ARMOR)
if(weapon.itemid == 2464) then
if math.random(1,10) == 1 then
doSendAnimatedText(getPlayerPosition(cid), "Dodge!", 18)
doTargetCombatHealth(attacker, cid, COMBAT_PHYSICALDAMAGE, value, value, CONST_ME_NONE)
end
end
end
end
return true
end
Script works absolutely fine, however, it's rather annoying that damage dealing number still comes up. It cannot kill, as when I created a demon dealing +1k damage it was constantly dealing only 1 damage to 1max hp player and couldn't kill it, but damage number is still visible. Is there any way to get rid of it?