@Poke X Ice
function onUse (cid,item,frompos,item2,topos)
local config = {
level = 5,
storage = 5951,
uniqueid = 9000,
effect = 29,
items = {
["Ultra Ball"] = {item = 2392, quantidade = 50},
["Nota Verde"] = {item = 2152, quantidade = 40},
["Shiny Box"] = {item = 14838, quantidade = 1},
["Hyper Potions"] = {item = 12345, quantidade = 100}
}
}
if item.uid == config.uniqueid then
if getPlayerLevel(cid) >= config.level then
local queststatus = getPlayerStorageValue(cid, config.storage)
if queststatus == -1 then
for k, v in pairs(config.items) do
local itemAdd = doPlayerAddItem(cid, v.item, v.quantidade)
doItemSetAttribute(itemAdd, "unique", 1)
end
doPlayerSendTextMessage(cid, 22, "Parabens, você acaba de pegar seu Kit Inicial.")
setPlayerStorageValue(cid, config.storage, 1)
doSendMagicEffect(getThingPos(cid), config.effect)
else
doPlayerSendCancel(cid, "Você ja pegou seu Kit Inicial.")
end
else
doPlayerSendCancel(cid, "Somente Level ".. config.level .."+ conseguem abrir este bau.")
end
end
return 1
end
Caso de algum erro de simbolos:
https://hastebin.com/woqakacede.rb