<action itemid = "2160" event = "script" value = "HealHEALTH.lua" />
HealHEALTH.lua
local config = {
min = 500, -- Mínimo que pode healar
max = 750, -- Máximo que pode healar
remove = true,
}
function onUse(cid, item, frompos, item2, topos)
local life = math.random(config.min, config.max)
doCreatureAddHealth(cid, life)
doSendAnimatedText(topos, life, 30)
return config.remove and doRemoveItem(item.uid, 1)
end
<action itemid = "2162" event = "script" value = "HealMANA.lua" />
HealMANA.lua
local config = {
min = 500, -- Mínimo que pode healar
max = 750, -- Máximo que pode healar
remove = true,
}
function onUse(cid, item, frompos, item2, topos)
local life = math.random(config.min, config.max)
doCreatureAddMana(cid, life)
doSendAnimatedText(topos, life, 5)
return config.remove and doRemoveItem(item.uid, 1)
end