Auto Loot System.

DenerAlc98
em Scripts

DenerAlc98

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 28/04/12Posts: 17

Bom,peguei um script aqui no fórum mais preciso da ajuda de vocês para me ajudar.

Esse auto loot é muito bom e tals mais ele não tá juntando os gold's , eu jogo um ot que junta os gold's tudo certinho e tals , olha a imagem .

 

post-346652-0-19888700-1336415432.jpg

 

Bom,queria que ele juntasse o gold e virasse platinum direto e 100 platinum virasse o Crystal.

POR FAVOR ME AJUDEM !

Obrigado Desde já! =]

jhon992

Dono JhonBot
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 30/06/11Posts: 631Char no Tibia: Warrior of Mort

deeners2

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/07/11Posts: 23Char no Tibia: Senhor Feudal

Bom cara , eu perdi meu cadastro a cima , mais sou o mesmo então vou te paasar meu script por favor me ajude .

 

local configs = {

ids = {2148, 2152, 2160}, -- adicionado somente os dos dinheiros, mais pode adicionar qual id quiser.

premium = true -- só premium usar o auto loot ? [true ou false]

}

 

function getItemsInContainerById(container, itemid)

local items = {}

if getContainerSize(container) > 0 then

for slot=0, (getContainerSize(container)-1) do

local item = getContainerItem(container, slot)

if isContainer(item.uid) then

local itemsbag = getItemsInContainerById(item.uid, itemid)

for i=0, #itemsbag do

table.insert(items, itemsbag)

end

else

if itemid == item.itemid then

table.insert(items, item.uid)

end

end

end

end

return items

end

 

function autoGold(cid, pos, stack)

if stack > 255 then return true end

local position = {x = pos.x, y = pos.y, z = pos.z, stackpos = stack}

local tile = getThingFromPos(position)

if isCorpse(tile.uid) then

corpse = tile

else

autoGold(cid, pos, stack + 1)

end

if corpse ~= nil then

for _, idmoney in pairs(configs.ids) do

tab = getItemsInContainerById(corpse.uid, idmoney)

if #tab ~= 0 then

for _, uid in pairs(tab) do

item = getThing(uid)

doPlayerAddItem(cid, idmoney, item.type)

doRemoveItem(item.uid, item.type)

end

end

end

end

end

 

function onKill(cid, target)

if not isPremium(cid) and configs.premium then return true end

return addEvent(autoGold, 10, cid, getCreaturePosition(target), 0)

end

jhon992

Dono JhonBot
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 30/06/11Posts: 631Char no Tibia: Warrior of Mort
local configs = {
   ids = {2148, 2152, 2160}, -- adicionado somente os dos dinheiros, mais pode adicionar qual id quiser.
   premium = true -- só premium usar o auto loot ? [true ou false]
}

function getItemsInContainerById(container, itemid)
local items = {}
   if getContainerSize(container) > 0 then
       for slot=0, (getContainerSize(container)-1) do
           local item = getContainerItem(container, slot)
           if isContainer(item.uid) then
               local itemsbag = getItemsInContainerById(item.uid, itemid)
               for i=0, #itemsbag do
                   table.insert(items, itemsbag[i])
               end
           else
               if itemid == item.itemid then
                   table.insert(items, item.uid)
               end
           end
       end
   end
return items
end

function autoGold(cid, pos, stack)
if stack > 255 then
   return true
end

local position = {x = pos.x, y = pos.y, z = pos.z, stackpos = stack}
local tile = getThingFromPos(position)
if isCorpse(tile.uid) then
   corpse = tile
else
   autoGold(cid, pos, stack + 1)
end

if corpse ~= nil then
   for _, idmoney in pairs(configs.ids) do
       tab = getItemsInContainerById(corpse.uid, idmoney)
       if #tab ~= 0 then
           for _, uid in pairs(tab) do
               money = getPlayerMoney(cid)
               item = getThing(uid)
               doPlayerRemoveMoney(cid, money)
               doPlayerAddMoney(cid, money+item.type)
               doRemoveItem(item.uid, item.type)
           end
       end
   end
end
end

function onKill(cid, target)
if not isPremium(cid) and configs.premium then
   return true
end
return addEvent(autoGold, 10, cid, getCreaturePosition(target), 0)
end

deeners2

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/07/11Posts: 23Char no Tibia: Senhor Feudal

O Valeu ai mano , deu certinho! =]

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

Quando sua dúvida for sanada, use o botão denunciar para que um moderador venha mover o tópico.

Movido.

Atenciosamente, Vilden.