Galera preciso da ajuda de vocês.. esse script não esta funcionando 100%... coloquei a opção true que é pro script poder pegar apenas os itens no toloot porem ele pega tudo..
local toloot = {11441, 11441, 11443, 11444, 11445, 11446, 11447, 11448, 11449,11450, 11451, 11452, 11453, 11454, 12618, 12232, 12244} -- PREFERENCIAL - SE QUISER APENAS COM ALGUNS ITENS
local useSpecific = true --True para lotear somente os itens que estiverem na tabela toloot, false para todos os itens do corpse function onUse(cid, item, frompos, item2, topos) if getItemAttribute(item.uid, "corpseowner") ~= cid then doPlayerSendCancel(cid, "Você não é o proprietário.") return true end local items = {} for x = (getContainerSize(item.uid) - 1), 0, -1 do local k = getContainerItem(item.uid, x) table.insert(items, {i=k.itemid, q=k.type}) doRemoveItem(k.uid) end if #items == nil then return false end for y=1, #items do doPlayerAddItemStacking(cid, items[y].i, items[y].q) doPlayerSendTextMessage(cid, 20, "Looted "..items[y].q.."x "..getItemNameById(items[y].i)..".") end return true end --[[ AUTO LOOT BY GABRIEL SALES SE QUISER ATIVAR O AUTOLOOT APENAS PARA ALGUNS ITENS, ADICIONE OS IDS NA TABELA toloot E TIRE OS COMENTÁRIOS(--). --]]
EDIT: Galera eu já consegui aqui... Obrigado. quem quiser ta ai.
local effect = 173 --by brun123 --alterado v2.9 \/
local timeffect = 7
local function func(cid, position, corpseid, effect)
if not isCreature(cid) then return true end
local corpse = getTileItemById(position, corpseid).uid
if corpse <= 1 then return end
if 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 end
if isStone(item.itemid) then
for i = 1, timeffect do
addEvent(doSendMagicEffect, 1000 * i, position, effect)
end
doPlayerSendTextMessage(getCreatureMaster(cid), 27, "You found a "..getItemNameById(item.itemid).."!")
end
end
end
function onKill(cid, target, lastHit)
if not ehMonstro(target) then return true end
local corpse = getMonsterInfo(getCreatureName(target)).lookCorpse
info
Grupo: Campones
Registrado: 27/05/10
Posts: 69
Reputação: +5
Char no Tibia: Pedro
Galera preciso da ajuda de vocês.. esse script não esta funcionando 100%... coloquei a opção true que é pro script poder pegar apenas os itens no toloot porem ele pega tudo..
local toloot = {11441, 11441, 11443, 11444, 11445, 11446, 11447, 11448, 11449,11450, 11451, 11452, 11453, 11454, 12618, 12232, 12244} -- PREFERENCIAL - SE QUISER APENAS COM ALGUNS ITENS
local useSpecific = true --True para lotear somente os itens que estiverem na tabela toloot, false para todos os itens do corpse
function onUse(cid, item, frompos, item2, topos)
if getItemAttribute(item.uid, "corpseowner") ~= cid then
doPlayerSendCancel(cid, "Você não é o proprietário.")
return true
end
local items = {}
for x = (getContainerSize(item.uid) - 1), 0, -1 do
local k = getContainerItem(item.uid, x)
table.insert(items, {i=k.itemid, q=k.type})
doRemoveItem(k.uid)
end
if #items == nil then
return false
end
for y=1, #items do
doPlayerAddItemStacking(cid, items[y].i, items[y].q)
doPlayerSendTextMessage(cid, 20, "Looted "..items[y].q.."x "..getItemNameById(items[y].i)..".")
end
return true
end
--[[
AUTO LOOT BY GABRIEL SALES
SE QUISER ATIVAR O AUTOLOOT APENAS PARA ALGUNS ITENS, ADICIONE OS IDS NA TABELA toloot E TIRE OS COMENTÁRIOS(--).
--]]
EDIT: Galera eu já consegui aqui... Obrigado. quem quiser ta ai.
local effect = 173 --by brun123 --alterado v2.9 \/
end
Podem fexar o o topico
Editado Outubro 20 por Pedro19