Untitled
unknown
lua
a year ago
798 B
5
Indexable
local storage = 4500 local multiplier = 1.20 local config = { [1] = 150, [2] = 80, [3] = 50 } function onStatsChange(cid, attacker, type, combat, value) if origin == ORIGIN_CRITICAL or not isPlayer(attacker) or attacker == cid or (type ~= STATSCHANGE_HEALTHLOSS and type ~= STATSCHANGE_MANALOSS) then return true end local nobility = tonumber(getPlayerStorageValue(attacker, storage)) or 0 if config[nobility] then if (config[nobility] * 2) >= math.random (800) then local damage = math.min(2000000000, math.floor(value * multiplier)) * 2 doTargetCombatHealth(attacker, cid, combat, -value, -value, 255, true, ORIGIN_CRITICAL) return false end end return true end
Editor is loading...
Leave a Comment