• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Critical System

LoOoZa

Member
Joined
Sep 18, 2017
Messages
68
Reaction score
6
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


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:
Back
Top