• 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!

Action OnUse Exhaust?

sapu98

New Member
Joined
Dec 1, 2010
Messages
4
Reaction score
4
I wish to make different exhaust times for each rune on my server and i do not understand why i am not getting any exhaustion.

I am using Tibia version 10.98 and TFS version 1.3

Here is my code

Lua:
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
exhaust:setParameter(CONDITION_PARAM_TICKS, 1000)

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = 50000
    local max = 50000
    if player:getCondition(exhaust) then
        player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You are exhausted')
            return false
    end
    player:addCondition(exhaust)
    player:addMana(math.random(min, max))
    player:getPosition():sendMagicEffect(CONST_ME_REDSMOKE)
    return true
end
 
Back
Top