Resolvido por MP ~~
Script:
local msg = [[ 20 Devoted Token (Tier 1-2) ]]
local itens = {
{2160, 15},
{2158, 10},
{2157, 2},
}
local a = {
ITEM = {2145, 10}, -- ITEM, QUANTIDADE
}
function onUse(cid, item, topos, item2, frompos)
doPlayerPopupFYI(cid, msg)
if getPlayerItemCount(cid, a.ITEM[1]) >= a.ITEM[2] then
local item = itens[math.random(1,#itens)]
doPlayerAddItem(cid, item[1], item[2])
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você recebeu um item raro!")
doSendMagicEffect(getCreaturePosition(cid), 28)
doPlayerRemoveItem(cid, a.ITEM[1], a.ITEM[2])
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "você não tem todos itens necessaríos que eu pedi, volte aqui quando tive-los todos!")
end
return TRUE
end