local exhaust = Condition(CONDITION_EXHAUST_HEAL)
exhaust:setParameter(CONDITION_PARAM_TICKS, (configManager.getNumber(configKeys.EX_ACTIONS_DELAY_INTERVAL) - 900))
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
if itemEx.itemid ~= 1 or itemEx.type ~= THING_TYPE_PLAYER then
return true
end
--[[
if player:getCondition(CONDITION_EXHAUST_HEAL) then
player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED))
return true
end
]]
local level, mlevel = player:getLevel(), player:getMagicLevel()
local min, max = (level * 5) + (mlevel * 3) - 50, (level * 6) + (mlevel * 4)
if not doTargetCombatMana(0, player, min, max, CONST_ME_MAGIC_BLUE) then
return false
end
--player:addCondition(exhaust)
player:say("Aaaah...", TALKTYPE_MONSTER_SAY)
Item(item.uid):remove(1)
return true
end