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