local cfg = {
palm_id = 1234,
coconut_id = 2345,
count = 10, -- How many coconuts?
minutes = 120, -- How many minutes before you can use the palm again?
storage = 3456,
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == cfg.palm_id then
if getPlayerStorageValue(cid, cfg.storage) <= 0 then
doPlayerAddItem(cid, cfg.coconut_id, cfg.count)
setPlayerStorageValue(cid, cfg.storage, os.time() + (cfg.minutes * 60 * 1000))
end
end
return true
end