potinho
Advanced OT User
Im using this Dodge System
But im taking hit from monsters when "Dodge" message apppears, i put to print result on console and the result is the hit im taking:
Can u guys help me to fix and dodge do not take any damage?
Dodge system TFS 0.3.6
Hello, I would like to add a dodge system on my server. So if someone have one I would apreciate it! Exemple: 0/100 dodge skill = 0% chance of dodge 100/100 dodge skill = 30% of dodge Thank you!
otland.net
But im taking hit from monsters when "Dodge" message apppears, i put to print result on console and the result is the hit im taking:
Lua:
local lvldodge = 48902
local percent = 1
function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS and isCreature(attacker) then
if (getPlayerStorageValue(cid, lvldodge)*3) >= math.random (0,1000) then
value = math.ceil(value*(percent))
print("value: "..value)
doTargetCombatHealth(attacker, cid, combat, -value, -value, 255)
doSendAnimatedText(getCreaturePos(cid), "DODGE", 6)
return false
end
end
return true
end
Can u guys help me to fix and dodge do not take any damage?