só mudar
for i = 1, #l3k0t.itemganhar do
pra
for i = 100, #l3k0t.itemganhar do
então ficando
local l3k0t = {
colors = {16, 161, 149, 251, 211, 200},
itemganhar = {
{2160, 30, 50},
{2160, 20, 30},
{2160, 10, 20}
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
doRemoveItem(item.uid, 1)
local rand = math.random(100)
for i = 100, #l3k0t.itemganhar do
if rand > l3k0t.itemganhar[i][3] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ah que pena, não foi desta vez! ;(")
doSendAnimatedText(getCreaturePosition(cid), "Bad!", l3k0t.colors[math.random(1, #l3k0t.colors)])
doSendMagicEffect(fromPosition, 2)
return true
end
end
local recompensal3k0t = l3k0t.itemganhar
rand = math.random(#recompensal3k0t)
doPlayerAddItem(cid, recompensal3k0t[rand][1], recompensal3k0t[rand][2], true)
doSendAnimatedText(getCreaturePosition(cid), "Win!", l3k0t.colors[math.random(1, #l3k0t.colors)])
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "PARABÉNS: Você ganhou: " .. recompensal3k0t[rand][2] .. " crystal coins!")
doSendMagicEffect(fromPosition, 27)
return true
end
ai se quiser que falhe é só reveter assim não perdendo parte do script