adrianootavares
New Member
Lua:
local rewards = {
{ item = 9019, count = 1 },
{ item = 5809, count = 1 },
{ item = 8982, count = 1 }
}
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
local random = math.random(1, #rewards)
player:addItem(rewards[random].item, rewards[random].count)
player:sendTextMessage(36, 'You have found '.. ItemType(rewards[random].item):getName() ..'')
player:sendTextMessage(36, 'You have found '.. rewards[random].item ..'')
return true
end
I want to put this chest with
StorageValue
for play to do the quest only once