Poderia postar o link deste sistema que você citou (do Gabrielbsales)?
info
Grupo: Conde
Registrado: 14/04/15
Posts: 956
Reputação: +333
Gênero: Masculino

Talkaction:
function onSay(cid, words, param)
if param == "" then
return doPlayerSendCancel(cid, "/autoloot on/off")
end
local value = param:lower() == "on" and 1 or param:lower() == "off" and -1 or false
if not value then
return doPlayerSendCancel(cid, "/autoloot on/off")
elseif getPlayerStorageValue(cid, 4919) == value then
return doPlayerSendCancel(cid, "Your autoloot is already "..param..".")
end
setPlayerStorageValue(cid, 4919, value)
doPlayerSendTextMessage(cid, 27, "Your autoloot is now "..param..".")
return true
end
<action actionid="9282" event="script" value="Autoloot.lua"/>
--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
function onUse(cid, item, frompos, item2, topos)
if getItemAttribute(item.uid, "corpseowner") ~= cid then
doPlayerSendCancel(cid, "You're not the owner.")
return true
end
if getPlayerStorageValue(cid, 4919) < 1 then
return false
else
local items = {}
for x=0, (getContainerSize(item.uid)) do
local itens = getContainerItem(item.uid, x)
--if isInArray(toloot, itens.itemid) then
table.insert(items, {i=itens.itemid, q=itens.type})
doRemoveItem(itens.uid)
--break
--end
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
if #items > 0 then
return true
else
return false
end
end
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(--).
--]]function onDeath(cid, corpse, deathList)
doItemSetAttribute(corpse.uid, "aid", 9282)
Editado Junho 17 por zipter98
info
Grupo: Conde
Registrado: 14/04/15
Posts: 956
Reputação: +333
Gênero: Masculino

Eu uso a source do Poke Dash V9, que não é PDA, mas um cara editou a base e tentou chegar bem perto do PDA, mas ele n conseguio, estou usando de base a Poke Dash Advanced 2015 Open Source Pelo Nextbr
está dando este erro:
Editado Junho 18 por Zet0N0Murmurouu
Se você não colocar a função doPlayerAddItemStacking na lib, como indicado no tópico do sistema, é claro que não vai funcionar.
Também troque esta linha:
local itens = getContainerItem(item.uid, x)
por:
local itens = getContainerItem(item.uid, 0)
Editado Junho 18 por zipter98
info
Grupo: Conde
Registrado: 14/04/15
Posts: 956
Reputação: +333
Gênero: Masculino

Se você não colocar a função doPlayerAddItemStacking na lib, como indicado no tópico do sistema, é claro que não vai funcionar.
Também troque esta linha:
local itens = getContainerItem(item.uid, x)por:
local itens = getContainerItem(item.uid, 0)
eu n sei colocar esta função na lib, n tenho o código dela ¬¬
info
Grupo: Herói
Registrado: 01/05/08
Posts: 2.6k
Reputação: +536
Gênero: Masculino

Amigo, ele quis fizer no script.eu n sei colocar esta função na lib, n tenho o código dela ¬¬
Ficando assim:
--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
function onUse(cid, item, frompos, item2, topos)
if getItemAttribute(item.uid, "corpseowner") ~= cid then
doPlayerSendCancel(cid, "You're not the owner.")
return true
end
if getPlayerStorageValue(cid, 4919) < 1 then
return false
else
local items = {}
for x=0, (getContainerSize(item.uid)) do
local itens = getContainerItem(item.uid, 0)
--if isInArray(toloot, itens.itemid) then
table.insert(items, {i=itens.itemid, q=itens.type})
doRemoveItem(itens.uid)
--break
--end
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
if #items > 0 then
return true
else
return false
end
end
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(--).
--]]
info
Grupo: Conde
Registrado: 14/04/15
Posts: 956
Reputação: +333
Gênero: Masculino

agora está apenas sumindo o item e dando este erro:
info
Grupo: Herói
Registrado: 01/05/08
Posts: 2.6k
Reputação: +536
Gênero: Masculino

agora está apenas sumindo o item e dando este erro:
[18/06/2015 16:42:32] [Error - Action Interface]
[18/06/2015 16:42:32] data/actions/scripts/Autoloot.lua:onUse
[18/06/2015 16:42:32] Description:
[18/06/2015 16:42:32] (luaDoRemoveItem) Item not found
[18/06/2015 16:42:32] [Error - Action Interface]
[18/06/2015 16:42:33] data/actions/scripts/Autoloot.lua:onUse
[18/06/2015 16:42:33] Description:
[18/06/2015 16:42:33] data/actions/scripts/Autoloot.lua:20: attempt to call global 'doPlayerAddItemStacking' (a nil value)
[18/06/2015 16:42:33] stack traceback:
[18/06/2015 16:42:33] data/actions/scripts/Autoloot.lua:20: in function <data/actions/scripts/Autoloot.lua:2>
Tenta assim:
--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
function onUse(cid, item, frompos, item2, topos)
if getItemAttribute(item.uid, "corpseowner") ~= cid then
doPlayerSendCancel(cid, "You're not the owner.")
return true
end
if getPlayerStorageValue(cid, 4919) < 1 then
return false
else
local items = {}
for x=0, (getContainerSize(item.uid)) do
local itens = getContainerItem(item.uid, 0)
--if isInArray(toloot, itens.itemid) then
table.insert(items, {i=itens.itemid, q=itens.type})
doRemoveItem(itens.uid)
--break
--end
end
if #items > 0 then
for _, y in pairs(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
else
return false
end
end
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(--).
--]]
info
Grupo: Campones
Registrado: 06/11/11
Posts: 93
Reputação: 0
Char no Tibia: Deprex

Tem como fazer pra tibia 8.6 tfs 0.1.0?
info
Grupo: Conde
Registrado: 14/04/15
Posts: 956
Reputação: +333
Gênero: Masculino

Tenta assim:
--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 function onUse(cid, item, frompos, item2, topos) if getItemAttribute(item.uid, "corpseowner") ~= cid then doPlayerSendCancel(cid, "You're not the owner.") return true end if getPlayerStorageValue(cid, 4919) < 1 then return false else local items = {} for x=0, (getContainerSize(item.uid)) do local itens = getContainerItem(item.uid, 0) --if isInArray(toloot, itens.itemid) then table.insert(items, {i=itens.itemid, q=itens.type}) doRemoveItem(itens.uid) --break --end end if #items > 0 then for _, y in pairs(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 else return false end end 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(--). --]]
[18/06/2015 18:25:05] [Error - Action Interface]
Zet0N0Murmurouu, suponho que você não tenha lido o conteúdo do tópico que você mesmo enviou (do autoloot escrito pelo Gabrielbsales). Nele, o autor posta o código da função doPlayerAddItemStacking.
function doPlayerAddItemStacking(cid, itemid, quant)
local item = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid)
local piles = 0
if #item > 0 then
for i,x in pairs(item) do
if getThing(x).type < 100 then
local it = getThing(x)
doTransformItem(it.uid, itemid, it.type+quant)
if it.type+quant > 100 then
doPlayerAddItem(cid, itemid, it.type+quant-100)
end
else
piles = piles+1
end
break
end
else
return doPlayerAddItem(cid, itemid, quant)
end
if piles == #item then
doPlayerAddItem(cid, itemid, quant)
end
end
Coloque este código em algum arquivo da lib e depois utilize os scripts que enviei anteriormente.
Editado Junho 18 por zipter98
info
Grupo: Conde
Registrado: 14/04/15
Posts: 956
Reputação: +333
Gênero: Masculino

Não tinha visto ._. malz aew, vo ter aq ´q pq eu sabia que ele tinha postado, ai peguei o primeiro link o sistema dele que achei e mande ^^ vo testar aq
está funcionando! mas ao clicar no corpose do pokémon da este erro:




info
Grupo: Conde
Registrado: 14/04/15
Posts: 956
Reputação: +333
Gênero: Masculino
Eae pessoa, estou precisando de um sistema de auto-loot, que ao usar o comando "/autoloot on", todo corpose que ele clicar, vai pegar todos os itens dentro, e se ele usar "/autoloot off" esta função para! o Gabrielbsales, postou este sistema, mas ele precisa colocar corpose por corpose, ai queria que fosse automático help plx