creaturescripts:
local monsters = {
["Demon"] = {itemid = 2160, count = 100, chance = 20},
["Dragon"] = {itemid = 2525, count = 1, chance = 20}
}
function onKill(cid, target, lastHit)
local tab = monsters[getCreatureName(target)]
if tab then
if math.random(100) < tab.chance then
doPlayerAddItem(cid, tab.itemid, tab.count)
doBroadcastMessage("O Player "..getCreatureName(cid).." conseguio "..tab.count.." "..getItemNameById(tab.itemid).." ao matar "..getCreatureName(target)..".")
end
end
return true
end
tag:
<event type="kill" name="MonsterKill" event="script" value="NOME DO ARQUIVO.lua"/>
login.lua:
registerCreatureEvent(cid, "MonsterKill")
qualquer erro por favor, dizer.




info
Grupo: Campones
Registrado: 03/06/08
Posts: 85
Reputação: +27
Char no Tibia: Drunk Outlaw
Olá galera, gostaria de um script onde aconteceria ao dropar um item apareceria uma mensagem no Broadcast a todos os players desse modo: 'Player' conseguiu 'Item' ao matar 'Monstro' !
Se der, o script deveria conter uma lista para colocar o ID dos itens e o Name dos monstros que fariam com que a mensagem fosse exibida.
Esperando
Aahh, e a versão é 8.60 !