local config = {
item1 = {XXXX, 2000}, -- {ID DO ITEM, QUANTIDADE QUE VAI ALMENTAR DE HEALTH}
item2 = {XXXX, 2000}, -- {ID DO ITEM, QUANTIDADE QUE VAI ALMENTAR DE MANA}
}
function onUse(cid, item, frompos, item2, topos)
if item.itemid == config.item1[1] then
if getPlayerStorageValue(cid,12345) < 1 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + config.item1[2])
setPlayerStorageValue(cid,12345,1)
doCreatureSay(cid, "Você recebeu "..config.item1[2].." de health!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid)
else
return doPlayerSendCancel(cid, "You can't use this item again.")
end
elseif item.itemid == config.item2[1] then
if getPlayerStorageValue(cid,12346) < 1 then
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + config.item2[2])
setPlayerStorageValue(cid,12346,1)
doCreatureSay(cid, "Você recebeu "..config.item2[2].." de mana!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid)
else
return doPlayerSendCancel(cid, "You can't use this item again.")
end
end
return true
end
Banido por falta de ética e desonestidade.