Postado Agosto 21, 2020 4 anos Pessoal estou com um problema no autoloot que eu adicionei no meu server. Se alguém puder por favor me ajude, estarei disponibilizando algumas prints a baixo. Como vc podem ver, quando eu uso o comando !autoloot ele aparece todas as informações normal, não da nenhum bug quando eu uso os comandos "!autoloot, !autoloot add, !autoloot gold, !autoloot power" Mas quando eu mato um mob da um erro e o dinheiro do comando "!autoloot gold" não vai para o banco, também da erro quando eu uso o comando !autoloot goldinfo. Enfim, basicamente o sistema não está coletando nada PS: Não sei se esse post esta no local correto. Se não estiver por favor movam! att O sistema que eu usei foi um que o Jnetworks postou. As prints: Quando eu uso os comandos n da erro. Quando eu mato um mob com os comandos ativo da esse erro Editado Agosto 21, 2020 4 anos por nizin (veja o histórico de edições)
Postado Agosto 22, 2020 4 anos O 3° erro talvez seja resolvido com essa libs Ja os dois primeiro a função, getContainerItemsInfo(getThingFromPos(position).uid) ta retornando nil, provavelmente ele não ta encontrando a uid por algum motivo, pesquisei rapidamente e alguns que vi falaram sobre loot dentro de bag. De qualquer forma autoloot por lua é bem chato...
Postado Setembro 3, 2020 4 anos O meu também estava dando estes problemas...achei estas functions do Killua, inclusive já estão as funcóes com storage de tabelas... Vá na pasta data/lib e no arquivo 050-function.lua cole o seguinte código -- Functions library created by Vitor Bertolucci (Killua) -- Functions used to store tables in storages killua_functions = { filtrateString = function(str) -- By Killua local tb, x, old, last = {}, 0, 0, 0 local first, second, final = 0, 0, 0 if type(str) ~= "string" then return tb end for i = 2, #str-1 do if string.byte(str:sub(i,i)) == string.byte(':') then x, second, last = x+1, i-1, i+2 for t = last,#str-1 do if string.byte(str:sub(t,t)) == string.byte(',') then first = x == 1 and 2 or old old, final = t+2, t-1 local index, var = str:sub(first,second), str:sub(last,final) tb[tonumber(index) or tostring(index)] = tonumber(var) or tostring(var) break end end end end return tb end, translateIntoString = function(tb) -- By Killua local str = "" if type(tb) ~= "table" then return str end for i, t in pairs(tb) do str = str..i..": "..t..", " end str = "a"..str.."a" return tostring(str) end } function getContainerItemsInfo(containerUid) -- By Killua local table = {} if containerUid and containerUid > 0 then local a = 0 for i = 0, getContainerSize(containerUid) do local item = getContainerItem(containerUid,i) a = a + 1 table[a] = {uid = item.uid, itemid = item.itemid, quant = item.type} end return table end return false end function countTable(table) -- By Killua local y = 0 if type(table) == "table" then for _ in pairs(table) do y = y + 1 end return y end return false end function setPlayerTableStorage(cid, key, value) return doPlayerSetStorageValue(cid, key, killua_functions.translateIntoString(value)) end function getPlayerTableStorage(cid, key) return killua_functions.filtrateString(getPlayerStorageValue(cid, key)) end function setGlobalTableStorage(key, value) return setGlobalStorageValue(key, killua_functions.translateIntoString(value)) end function getGlobalTableStorage(key) return killua_functions.filtrateString(getGlobalStorageValue(key)) end function getPlayerStorageZero(cid, storage) local sto = getPlayerStorageValue(cid, storage) return sto > 0 and sto or 0 end Os créditos do Killua estão no inicio do código.
Postado Setembro 3, 2020 4 anos Autor 2 horas atrás, Augusto disse: O meu também estava dando estes problemas...achei estas functions do Killua, inclusive já estão as funcóes com storage de tabelas... Vá na pasta data/lib e no arquivo 050-function.lua cole o seguinte código -- Functions library created by Vitor Bertolucci (Killua) -- Functions used to store tables in storages killua_functions = { filtrateString = function(str) -- By Killua local tb, x, old, last = {}, 0, 0, 0 local first, second, final = 0, 0, 0 if type(str) ~= "string" then return tb end for i = 2, #str-1 do if string.byte(str:sub(i,i)) == string.byte(':') then x, second, last = x+1, i-1, i+2 for t = last,#str-1 do if string.byte(str:sub(t,t)) == string.byte(',') then first = x == 1 and 2 or old old, final = t+2, t-1 local index, var = str:sub(first,second), str:sub(last,final) tb[tonumber(index) or tostring(index)] = tonumber(var) or tostring(var) break end end end end return tb end, translateIntoString = function(tb) -- By Killua local str = "" if type(tb) ~= "table" then return str end for i, t in pairs(tb) do str = str..i..": "..t..", " end str = "a"..str.."a" return tostring(str) end } function getContainerItemsInfo(containerUid) -- By Killua local table = {} if containerUid and containerUid > 0 then local a = 0 for i = 0, getContainerSize(containerUid) do local item = getContainerItem(containerUid,i) a = a + 1 table[a] = {uid = item.uid, itemid = item.itemid, quant = item.type} end return table end return false end function countTable(table) -- By Killua local y = 0 if type(table) == "table" then for _ in pairs(table) do y = y + 1 end return y end return false end function setPlayerTableStorage(cid, key, value) return doPlayerSetStorageValue(cid, key, killua_functions.translateIntoString(value)) end function getPlayerTableStorage(cid, key) return killua_functions.filtrateString(getPlayerStorageValue(cid, key)) end function setGlobalTableStorage(key, value) return setGlobalStorageValue(key, killua_functions.translateIntoString(value)) end function getGlobalTableStorage(key) return killua_functions.filtrateString(getGlobalStorageValue(key)) end function getPlayerStorageZero(cid, storage) local sto = getPlayerStorageValue(cid, storage) return sto > 0 and sto or 0 end Os créditos do Killua estão no inicio do código. Funcionou PERFEITAMENTE! Obrigado meu querido. rep+
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.