• 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+ Mana potions not working

nugo

Australia OT Mapper
Joined
Apr 1, 2009
Messages
396
Solutions
4
Reaction score
194
Hello guys,

Having a weird issue where all mana potions (mana potion, strong & ultimate) arent working. You use a potion it says "AHHHH" but doesn't restore MP. However health potions are working. Im having this issue across multiple scripts. I have tried my script tfs 1.2, tfs 1.1, tfs 1.3. All 3 potions.lua scripts are having the same issue which makes me thing something is interfering with the mana resore?

i am running tfs 1.2

any ideas
 
I have narrowed it down, my custom loot system is conflicting with mana restore. Can anyone see in this script how it is blocking my mana potions?

Code:
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
    return stat_onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
end

-- function onManaChange(creature, attacker, manaChange, origin)
function onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
    -- return stat_onManaChange(creature, attacker, manaChange, origin)
    return stat_onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
end

function onPrepareDeath(creature, lastHitKiller, mostDamageKiller)
    return stat_onPrepareDeath(creature, lastHitKiller, mostDamageKiller)
end

function onKill(player, target, lastHit)
    return stat_onKill(player, target, lastHit)
end

function onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
    return stat_onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
end

function onLogin(player)
    return stat_onLogin(player)
end

When i green out this function potions work:

Code:
-- function onManaChange(creature, attacker, manaChange, origin)

function onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)

    -- return stat_onManaChange(creature, attacker, manaChange, origin)

    return stat_onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)

end
 
Last edited:
Back
Top