mirror of
https://github.com/opentibiabr/canary
synced 2026-08-16 06:26:09 -04:00
19 lines
639 B
Lua
19 lines
639 B
Lua
local blessedSteak = Action()
|
|
|
|
function blessedSteak.onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
|
if player:hasExhaustion("special-foods-cooldown") then
|
|
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait before using it again.")
|
|
return true
|
|
end
|
|
|
|
player:addMana(player:getMaxMana())
|
|
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your mana has been refilled.")
|
|
player:say("Chomp.", TALKTYPE_MONSTER_SAY)
|
|
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
|
|
player:setExhaustion("special-foods-cooldown", 10 * 60)
|
|
item:remove(1)
|
|
return true
|
|
end
|
|
|
|
blessedSteak:id(9086)
|
|
blessedSteak:register()
|