Ir para conteúdo

Featured Replies

Postado

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.

 

  • Respostas 9
  • Visualizações 783
  • Created
  • Última resposta

Top Posters In This Topic

Postado
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

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.

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

  • 1 year later...
Postado
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

                                                                                                               destinyshield.gif.9f031b59b026058f32a1c50da92ebe2a.gif  mídias sociais  destinyshield.gif.02fca81ab0615e050b2bcefd8a73a2e8.gif

                                                                                                                            talk to me              

                                                                                                                               vídeos           

                                                                                             

                                                                                                            LOGONORMAL.png.815b40b04ec583be88d8a1e2626fe430.png

                                                                                                           

                               

Postado
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

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#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.

Visitante
Responder

Quem Está Navegando 0

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

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo