function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local rewards = {
[20001] = {item = {2160, 100}},
[20002] = {item = {2160, 25}},
[20003] = {item = {2160, 10}}
}
local storage = {46182,1}
if(not rewards[item.uid]) then
print('Fatal error in quest script, error code: [A01].')
return true
end
if(player:getStorageValue(storage[1]) == storage[2]) then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "You have done this quest.")
return true
end
player:setStorageValue(storage[1], storage[2])
player:addItem(rewards[item.uid].item[1], rewards[item.uid].item[2])
player:sendTextMessage(MESSAGE_STATUS_SMALL, "Congratulations, you get item.")
return true
end