Postado Abril 3, 2020 5 anos Boa tarde, Tenho um datapack que usa a TFS 0.4 e tem um sistema de loot que gostaria de pegar e colocar no meu que usa OTX 2.52. Quando coloco no meu, a coleta de gold funciona normalmente, mas quando tento adicionar algum item da o seguinte erro: Citar [3/4/2020 12:40:4] [Error - TalkAction Interface] [3/4/2020 12:40:4] local cid = 268455561 [3/4/2020 12:40:4] local words = "!autoloot" [3/4/2020 12:40:4] local param = "demon shield" [3/4/2020 12:40:4] local channel = 65534 [3/4/2020 12:40:4] domodlib('Loot_func') [3/4/2020 12:40:4] local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free [3/4/2020 12:40:4] if not param or param == "" then [3/4/2020 12:40:4] ShowItemsTabble(cid) return true [3/4/2020 12:40:4] elseif tonumber(param) then [3/4/2020 12:40:4] doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true [3/4/2020 12:40:4] elseif isInArray({"clean","limpar", "clear"}, param) then [3/4/2020 12:40:4] setPlayerStorageValue(cid, info.Storages[1], -1) [3/4/2020 12:40:4] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true [3/4/2020 12:40:4] elseif isInArray({"start","stop","on","off"}, param) then [3/4/2020 12:40:4] setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0) [3/4/2020 12:40:4] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "Stopped" or "Started")..".") return true [3/4/2020 12:40:4] elseif isInArray({"money","gold","gps","dinheiro"}, param) then [3/4/2020 12:40:4] setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0) [3/4/2020 12:40:4] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Gold Colleting "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true [3/4/2020 12:40:4] elseif isInArray({"selling","autosell","sell","vender"}, param) then [3/4/2020 12:40:4] setPlayerStorageValue(cid, info.Storages[4], getPlayerStorageValue(cid, info.Storages[4]) <= 0 and 1 or 0) [3/4/2020 12:40:4] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Automatic Itens Selling "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "disabled")..".") return true [3/4/2020 12:40:4] end [3/4/2020 12:40:4] local item = getItemIdByName(param, false) [3/4/2020 12:40:4] if not item then [3/4/2020 12:40:4] doPlayerSendCancel(cid, "This item does not exist.") return true [3/4/2020 12:40:4] end [3/4/2020 12:40:4] local var = isInTable(cid, item) [3/4/2020 12:40:4] if isInArray({2148,2152,2160},item) then [3/4/2020 12:40:4] doPlayerSendCancel(cid, "Enter !autoloot money to add money in your list!") return true [3/4/2020 12:40:4] elseif isInArray(info.BlockItemsList, item) then [3/4/2020 12:40:4] doPlayerSendCancel(cid, "You can not add this item in the list!") return true [3/4/2020 12:40:4] elseif not var and #getPlayerStorageTable(cid, info.Storages[1]) >= slots then [3/4/2020 12:40:4] doPlayerSendCancel(cid, "max "..slots.." from auto loot") return true [3/4/2020 12:40:4] end [3/4/2020 12:40:4] if not var then [3/4/2020 12:40:4] addItemTable(cid, item) [3/4/2020 12:40:4] else [3/4/2020 12:40:4] removeItemTable(cid, item) [3/4/2020 12:40:4] end [3/4/2020 12:40:4] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "you added the item "..param.." in the list" or "you removed the item "..param.." from the list") [3/4/2020 12:40:4] return true [3/4/2020 12:40:4] Description: [3/4/2020 12:40:4] (LuaInterface::luaGetItemIdByName) Item not found Parte do código referenciado no erro acima : Citar <talkaction words="!autoloot" event="buffer"><![CDATA[ domodlib('Loot_func') local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free if not param or param == "" then ShowItemsTabble(cid) return true elseif tonumber(param) then doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true elseif isInArray({"clean","limpar", "clear"}, param) then setPlayerStorageValue(cid, info.Storages[1], -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true elseif isInArray({"start","stop","on","off"}, param) then setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "Stopped" or "Started")..".") return true elseif isInArray({"money","gold","gps","dinheiro"}, param) then setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Gold Colleting "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true elseif isInArray({"selling","autosell","sell","vender"}, param) then setPlayerStorageValue(cid, info.Storages[4], getPlayerStorageValue(cid, info.Storages[4]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Automatic Itens Selling "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "disabled")..".") return true end local item = getItemIdByName(param, false) if not item then doPlayerSendCancel(cid, "This item does not exist.") return true end local var = isInTable(cid, item) if isInArray({2148,2152,2160},item) then doPlayerSendCancel(cid, "Enter !autoloot money to add money in your list!") return true elseif isInArray(info.BlockItemsList, item) then doPlayerSendCancel(cid, "You can not add this item in the list!") return true elseif not var and #getPlayerStorageTable(cid, info.Storages[1]) >= slots then doPlayerSendCancel(cid, "max "..slots.." from auto loot") return true end if not var then addItemTable(cid, item) else removeItemTable(cid, item) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "you added the item "..param.." in the list" or "you removed the item "..param.." from the list") return true]]></talkaction> Seria problema de compatibilidade? Tem como tornar compatível? me ajudem por favor.
Postado Abril 3, 2020 5 anos 52 minutos atrás, kelnaru disse: Boa tarde, Tenho um datapack que usa a TFS 0.4 e tem um sistema de loot que gostaria de pegar e colocar no meu que usa OTX 2.52. Quando coloco no meu, a coleta de gold funciona normalmente, mas quando tento adicionar algum item da o seguinte erro: Parte do código referenciado no erro acima : Seria problema de compatibilidade? Tem como tornar compatível? me ajudem por favor. Aonde você adicionou este script? Tem como enviar todo o script?
Postado Abril 4, 2020 5 anos eu já sei onde é, é que uma função perdeu o parâmetro, você teria que substituir uma outra função na talkactions. e além disso, talvez tenha que alterar também uma função na lib tbm onde pega o item, em alguns OTX isso acontece... eu sei pq o código é meu e eu fiz uma versão especial para OTX. [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Outubro 5, 2021 3 anos Em 04/04/2020 em 13:22, Vodkart disse: eu já sei onde é, é que uma função perdeu o parâmetro, você teria que substituir uma outra função na talkactions. e além disso, talvez tenha que alterar também uma função na lib tbm onde pega o item, em alguns OTX isso acontece... eu sei pq o código é meu e eu fiz uma versão especial para OTX. Poderia dizer qual função substittuir em talk? E a função da Lib. :B mídias sociais talk to me vídeos
Postado Outubro 5, 2021 3 anos 7 horas atrás, Rogex Joyz disse: Poderia dizer qual função substittuir em talk? E a função da Lib. :B me manda seu código [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
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.