local config = {
itemid = 8266, -- your item
removeAll = true, -- should it remove all of the item or just 1
questStorage = {93939, -1} -- the storage you get for the quest and what it should be set to
}
function onDeath(cid, deathList, _)
local count = getPlayerItemCount(cid, config.itemid)
if count > 0 then
doPlayerRemoveItem(cid, config.itemid, (config.removeAll and count or 1))
doCreatureSetStorage(cid, config.questStorage[1], config.questStorage[2])
end
return true
end