Ir para conteúdo

Featured Replies

Postado

Estou com um bug relacionado ao systema de auto loot que foi adicionado.

BUG

Spoiler

[19/04/2016 22:03:39] [Error - Action Interface] 
[19/04/2016 22:03:39] data/actions/scripts/autoloot.lua:onUse
[19/04/2016 22:03:39] Description: 
[19/04/2016 22:03:39] (luaDoPlayerAddItem) Item not found

 

[19/04/2016 22:03:39] [Error - Action Interface] 
[19/04/2016 22:03:39] data/actions/scripts/autoloot.lua:onUse
[19/04/2016 22:03:39] Description: 
[19/04/2016 22:03:39] data/lib/050-function.lua:227: attempt to index a boolean value
[19/04/2016 22:03:39] stack traceback:
[19/04/2016 22:03:39]     data/lib/050-function.lua:227: in function 'getItemNameById'
[19/04/2016 22:03:39]     data/actions/scripts/autoloot.lua:18: in function <data/actions/scripts/autoloot.lua:2>

SCRIPT

Spoiler

--local toloot = {11441, 11441, 11443, 11444, 11445, 11446, 11447, 11448, 11449,11450, 11451, 11452, 11453, 11454, 12618, 12232, 12244, 12161, 12162, 12163, 12164, 12165, 12166, 12167, 12168, 12169, 12170, 12171, 12172, 12173, 12174, 12175, 12176, 12177, 12178, 12179, 12180, 12181, 12182, 12183, 12184, 12185, 12186, 12187, 12188, 12189, 12190, 12191, 12192, 12194, 12195, 12196, 12197, 12198, 12199, 12200, 12201, 12202, 12203, 12204, 12205, 12207, 12208, 12209, 12210, 12211, 12213, 12214, 12223, 12229, 12230, 12231, 12241, 12238, 12239, 12268, 12269, 12270, 12271, 12272, 12273, 12273, 12275, 12276, 12277, 12278, 12279, 12280, 12281, 12282, 12283, 12284, 12285, 12286, 12287, 12288, 12289, 12334, 12335, 12336, 12337, 12338, 12339, 12341, 12342, 12158, 12157, 12156, 12155, 12154, 12153, 12152, 12151, 12150, 12149, 12148, 12142, 12159, 12160, 12161, 12162, 12163, 12151, 12151, 12151, 12151} -- 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
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

Estou com um bug relacionado ao systema de auto loot que foi adicionado.

 

BUG

  Ocultar conteúdo

[19/04/2016 22:03:39] [Error - Action Interface] 
[19/04/2016 22:03:39] data/actions/scripts/autoloot.lua:onUse
[19/04/2016 22:03:39] Description: 
[19/04/2016 22:03:39] (luaDoPlayerAddItem) Item not found

 

[19/04/2016 22:03:39] [Error - Action Interface] 
[19/04/2016 22:03:39] data/actions/scripts/autoloot.lua:onUse
[19/04/2016 22:03:39] Description: 
[19/04/2016 22:03:39] data/lib/050-function.lua:227: attempt to index a boolean value
[19/04/2016 22:03:39] stack traceback:
[19/04/2016 22:03:39]     data/lib/050-function.lua:227: in function 'getItemNameById'
[19/04/2016 22:03:39]     data/actions/scripts/autoloot.lua:18: in function <data/actions/scripts/autoloot.lua:2>

SCRIPT

  Ocultar conteúdo

--local toloot = {11441, 11441, 11443, 11444, 11445, 11446, 11447, 11448, 11449,11450, 11451, 11452, 11453, 11454, 12618, 12232, 12244, 12161, 12162, 12163, 12164, 12165, 12166, 12167, 12168, 12169, 12170, 12171, 12172, 12173, 12174, 12175, 12176, 12177, 12178, 12179, 12180, 12181, 12182, 12183, 12184, 12185, 12186, 12187, 12188, 12189, 12190, 12191, 12192, 12194, 12195, 12196, 12197, 12198, 12199, 12200, 12201, 12202, 12203, 12204, 12205, 12207, 12208, 12209, 12210, 12211, 12213, 12214, 12223, 12229, 12230, 12231, 12241, 12238, 12239, 12268, 12269, 12270, 12271, 12272, 12273, 12273, 12275, 12276, 12277, 12278, 12279, 12280, 12281, 12282, 12283, 12284, 12285, 12286, 12287, 12288, 12289, 12334, 12335, 12336, 12337, 12338, 12339, 12341, 12342, 12158, 12157, 12156, 12155, 12154, 12153, 12152, 12151, 12150, 12149, 12148, 12142, 12159, 12160, 12161, 12162, 12163, 12151, 12151, 12151, 12151} -- 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
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

 

E proveitando queria fazer um pedido pra quem manja de OTClient queria pedir uma ajuda pra me ajudar a por a opçao de ativar e desativar auto loot pela configuraçao do OTClient!!!

 

Rep++++

brunobh.png

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo