Queria um script que ao player dropar x item de um aviso no default ex: O jogador Test dropou um golden helmet de x monstro.
tenho esse script como base, queria que desse para adicionar mais itens e que identificasse qual item e monstro dropou ex:
itemid =2471 golden helmet , x player matou orshabaal Mensagem > O jogador Teste, dropou um golden helmet de orshabaal
itemid =7730 blue legs, x player matou warlock Mensagem > O jogador Test Mage, dropou uma blue legs de warlock
local config = {
itemid = 2471, --ID do item.
drop_effect = false --Efeito que aparecerá em cima da corpse, OPCIONAL! Se não quiser, coloque false.
}
function examine(cid, position, corpse_id)
if not isPlayer(cid) then return true end
local corpse = getTileItemById(position, corpse_id).uid
if corpse <= 1 or not isContainer(corpse) then return true end
for slot = 0, getContainerSize(corpse) - 1 do
local item = getContainerItem(corpse, slot)
if item.uid <= 1 then return true end
if item.itemid == config.itemid then
doBroadcastMessage("DROP MENSAGEM: O Jogador (" .. getCreatureName(cid) .. ") Dropou Golden Helmet.", 19)
if config.drop_effect then
doSendMagicEffect(position, config.drop_effect, cid)
end
end
end
end
function onKill(cid, target)
if not isMonster(target) then return true end
local corpse_id = getMonsterInfo(getCreatureName(target)).lookCorpse
addEvent(examine, 2, cid, getThingPos(target), corpse_id)
return true
end