tente usar assim o script
local table = {
[1] = 5978, --[vocation] = id do corpse
[2] = 1112,
[3] = 1113,
[4] = 1114
}
local function transform(pos, id, voc)
local item = getTileItemById(pos, id)
if item and item.uid > 1 then
doTransformItem(item.uid, table[voc])
doDecayItem(item.uid or 0)
end
end
function onDeath(cid, corpse)
if not isPlayer(cid) or not table[getPlayerVocation(cid)] then return true end
addEvent(transform, 15, getThingPos(cid), corpse.itemid, getPlayerVocation(cid))
end
return true
end