FeLiPe-Eduardo
New Member
- Joined
- Jun 3, 2015
- Messages
- 38
- Solutions
- 1
- Reaction score
- 3
Hello at my server i have one rarity system based at this : [TFS 1.X] Rarity Rolls & Custom Attributes Library (https://otland.net/threads/tfs-1-x-rarity-rolls-custom-attributes-library.268888/)
Was made by @Leo32 but it was edited by a guy in the Discord who was helping me.
TFS1.3 OTServBR
And the script works perfectly, only mana/life leech is defective and only in pvp. against monsters works perfectly.
Code:
Both are in the same file, could this be a conflict?
If you need more files let me know.
FLP
Was made by @Leo32 but it was edited by a guy in the Discord who was helping me.
TFS1.3 OTServBR
And the script works perfectly, only mana/life leech is defective and only in pvp. against monsters works perfectly.
Code:
Lua:
-- Apply mana leech
if manaleech ~= 0 then
local manatoadd = math.floor((manaleech / 100) * (primaryDamage + secondaryDamage))
local attackerpos = attacker:getPosition()
addEvent(manaLeechConcat, 5, attacker.uid, manatoadd)
end
-- Apply life leech
if lifeleech ~= 0 then
local lifetoadd = math.floor((lifeleech / 100) * (primaryDamage + secondaryDamage))
local attackerpos = attacker:getPosition()
addEvent(lifeLeechConcat, 5, attacker.uid, lifetoadd)
end
Lua:
-- Apply mana leech
if manaleech ~= 0 and primaryType ~= COMBAT_HEALING and secondaryType ~= COMBAT_HEALING then
local manatoadd = math.floor((manaleech / 100) * (primaryDamage + secondaryDamage))
manaLeechConcat(attacker.uid, manatoadd)
end
-- Apply life leech
if lifeleech ~= 0 and primaryType ~= COMBAT_HEALING and secondaryType ~= COMBAT_HEALING then
local lifetoadd = math.floor((lifeleech / 100) * (primaryDamage + secondaryDamage))
lifeLeechConcat(attacker.uid, lifetoadd)
end
Both are in the same file, could this be a conflict?
If you need more files let me know.
FLP
Attachments
-
attributes(core).lua37.7 KB · Views: 9 · VirusTotal
-
attributes.lua28.7 KB · Views: 12 · VirusTotal
Last edited: