Estou usando o script HIT MEMSAGEM DO Skyforever e Vodkart pórem não funciona
function onStatsChange(cid, attacker, type, combat, value)
local tabble = {
[1] = {max = 15,msg = "Lower"},
[16] = {max= 50,msg = "Good"},
[51] = {max= 100,msg = "Mega"},
[101] = {max= 250,msg = "Epic"},
[251] = {max= 300,msg = "Perfect"},
[301] = {max= 600,msg = "Supreme"},
[601] = {max= 2000,msg = "Divine"},
[2001] = {max= 100000,msg = "Hs"}
}
if type == STATSCHANGE_HEALTHLOSS and isPlayer(attacker) then
if value == 0 then
doSendAnimatedText(getCreaturePosition(attacker), "MISS", math.random(1,255))
else
for min, hit in pairs(tabble) do
if value >= min and value <= hit.max then
local color = math.random(1,255)
doSendAnimatedText(getCreaturePosition(attacker), hit.msg, color)
local pos2 = {x=getCreaturePosition(attacker).x+1,y=getCreaturePosition(attacker).y,z=getCreaturePosition(attacker).z}
doSendAnimatedText(pos2, "HIT", color)
end
end
end
elseif type == STATSCHANGE_HEALTHGAIN then
return false
end
return true
end
function onCombat(cid, target)
registerCreatureEvent(target, "HitMessage")
return true
end