hi guys i have a problem with script critical system , if player do health get text critical, i want only attacker get this text
TFS 1.3
TFS 1.3
Lua:
-- SRH Momentum (Sevu)
local configuracion = {
critical_storage = 25251, -- default storage 25250 ( recomendado cualquiera no repetido )
critical_effect = CONST_ME_POFF
}
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
if not attacker:isPlayer() then
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
if (math.random(200) < attacker:getStorageValue(configuracion.critical_storage)) then
creature:getPosition():sendMagicEffect(configuracion.critical_effect)
Game.sendAnimatedText("Super Hit", attacker:getPosition(), math.random(1, 200))
return primaryDamage * 3, primaryType, secondaryDamage, secondaryType
end
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
Last edited: