local t = {
-- Minotaurs
[2830] = {10, 5878},
[2866] = {10, 5878},
[2871] = {10, 5878},
[2876] = {10, 5878},
-- Dragon
[2844] = {10, 5877},
-- Dragon Lord
[2881] = {10, 5948},
-- Behemoth
[2931] = {10, 5893},
-- Lizards
[4256] = {10, 5876},
[4259] = {10, 5876},
[4262] = {10, 5876},
-- Bonebeast
[3031] = {10, 5925}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if toPosition.x == 0 or toPosition.x == 65535 or itemEx.itemid == 0 then
return FALSE
end
local v = t[itemEx.itemid]
if not(v) then
return FALSE
end
if math.random(100) <= v[1] then
doPlayerAddItem(cid, v[2], 1)
doSendMagicEffect(toPosition, CONST_ME_MAGIC_GREEN)
else
doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
end
doTransformItem(itemEx.uid, itemEx.itemid + 1)
doDecayItem(itemEx.uid)
return TRUE
end