Não foi testado:
function onUse(cid, item)
if getPlayerStorageValue(cid, 15278) == -1 then
local config = {
item1 == ?????,
item2 == ?????,
item3 == ?????,
item4 == ?????,
item5 == ?????,
item6 == ?????,
item7 == ?????,
item8 == ?????,
item9 == ?????,
item10 == ?????
}
local random = math.random(1, 10)
if random == 1 then
doTransformItem(item.uid, config.item1)
setPlayerStorageValue(cid, 15278, 1)
elseif random == 2 then
doTransformItem(item.uid, config.item2)
setPlayerStorageValue(cid, 15278, 1)
elseif random == 3 then
doTransformItem(item.uid, config.item3)
setPlayerStorageValue(cid, 15278, 1)
elseif random == 4 then
doTransformItem(item.uid, config.item4)
setPlayerStorageValue(cid, 15278, 1)
elseif random == 5 them
doTransformItem(item.uid, config.item5)
setPlayerStorageValue(cid, 15278, 1)
elseif random == 6 them
doTransformItem(item.uid, config.item6)
setPlayerStorageValue(cid, 15278, 1)
elseif random == 7 them
doTransformItem(item.uid, config.item7)
setPlayerStorageValue(cid, 15278, 1)
elseif random == 8 them
doTransformItem(item.uid, config.item8)
setPlayerStorageValue(cid, 15278, 1)
elseif random == 9 them
doTransformItem(item.uid, config.item9)
setPlayerStorageValue(cid, 15278, 1)
elseif random == 10 them
doTransformItem(item.uid, config.item10)
setPlayerStorageValue(cid, 15278, 1)
end
end
return doPlayerSendCancel(cid, "Você só pode usar uma vez este item")
end
No lugar dos ????? vc põe o id dos itens.