Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Fala aê clã, to com 1 bug mt chato no meu autoloot no poketibia.

Autoloot funciona perfeitamente em outros itens , porém em alguns item ele buga, acontece o seguinte, dropa 1 pedra do pokémon eu cliko no corpo dele com o autoloot ligado a pedra vem pra minha bag mas nao some do corpo, alguém poderia me ajudar? 

 

obs: gravei um videozinho pra vocês entenderem melhor : 

 

 

 

Editado por davidmr (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
21 horas atrás, davidmr disse:

Fala aê clã, to com 1 bug mt chato no meu autoloot no poketibia.

Autoloot funciona perfeitamente em outros itens , porém em alguns item ele buga, acontece o seguinte, dropa 1 pedra do pokémon eu cliko no corpo dele com o autoloot ligado a pedra vem pra minha bag mas nao some do corpo, alguém poderia me ajudar? 

 

obs: gravei um videozinho pra vocês entenderem melhor : 

 

 

 

 

Posta o script do autoloot fazendo favor

 

Link para o post
Compartilhar em outros sites

DATA/LIB/117 - autoloot.lua

 



itensAutoLoot = {
["future orb"] = {12194, raridade = {40, 80, "Facil"} , 200},
["enchanted gem"] = {13785, raridade = {40, 80, "Facil"} , 300},
["small stone"] = {12337, raridade = {40, 80, "Facil"} , 50},
["stone orb"] = {12196, raridade = {40, 80, "Facil"} , 50},
["rock stone"] = {11445, raridade = {15, 35, "Medio"} , 10000},
["Old amber"] = {12581, raridade = {0.1, 1.0, "Extremamente Raro"} , 2000000},
["Bag Box"] = {12338, raridade = {2, 10, "Raro"} , 20000},
["twisted spoon"] = {12193, raridade = {40, 80, "Facil"} , 200},
["enigma stone"] = {11452, raridade = {15, 35, "Medio"} , 10000},
["bottles of poison"] = {12165, raridade = {40, 80, "Facil"} , 200},
["venom pendant"] = {12282, raridade = {40, 80, "Facil"} , 200},
["snake tail"] = {13863, raridade = {15, 35, "Medio"} , 200},
["venom stone"] = {11443, raridade = {15, 35, "Medio"} , 200},
["fire stone"] = {11447, raridade = {15, 35, "Medio"} , 200},
["magma box"] = {12271, raridade = {15, 35, "Medio"} , 200},
["pot with fire"] = {12342, raridade = {40, 80, "Facil"} , 200},
["pot of lava"] = {12152, raridade = {40, 80, "Facil"} , 200},
["nail"] = {12157, raridade = {40, 80, "Facil"} , 200},
["essence of fire"] = {12162, raridade = {40, 80, "Facil"} , 200},
["pot of moss bug"] = {12171, raridade = {40, 80, "Facil"} , 200},
["bug gosme"] = {13783, raridade = {40, 80, "Facil"} , 200},
["cocoon stone"] = {11448, raridade = {15, 35, "Medio"} , 200},
["seed"] = {12163, raridade = {40, 80, "Facil"} , 200},
["pair of leaves"] = {12155, raridade = {40, 80, "Facil"} , 200},
["bag of pollem"] = {12153, raridade = {40, 80, "Facil"} , 200},
["water gem"] = {12161, raridade = {40, 80, "Facil"} , 200},
["water pendant"] = {12170, raridade = {40, 80, "Facil"} , 200},
["Water Stone"] = {11442, raridade = {15, 35, "Medio"} , 200},
["bulbs"] = {12154, raridade = {40, 80, "Facil"} , 200},
["bug antenna"] = {12184, raridade = {40, 80, "Facil"} , 200},
["comb"] = {12179, raridade = {40, 80, "Facil"} , 200},
["heart stone"] = {11453, raridade = {15, 35, "Medio"} , 200},
["big egg"] = {12211, raridade = {40, 80, "Facil"} , 200},
["zard wing"] = {12270, raridade = {40, 80, "Facil"} , 200},
["dragon tooth"] = {12159, raridade = {40, 80, "Facil"} , 200},
["fire tail"] = {13892, raridade = {40, 80, "Facil"} , 200},
["topknot"] = {13901, raridade = {15, 35, "Medio"} , 200},
["ice orb"] = {12201, raridade = {40, 80, "Facil"} , 200},
["locksmith of shell"] = {12203, raridade = {40, 80, "Facil"} , 200},
["Snowball"] = {13794, raridade = {40, 80, "Facil"} , 200},
["Horn"] = {13789, raridade = {40, 80, "Facil"} , 200},
["ice stone"] = {11454, raridade = {15, 35, "Medio"} , 200},
["strange spikes"] = {13900, raridade = {40, 80, "Facil"} , 200},
["sandbag"] = {12177, raridade = {40, 80, "Facil"} , 200},
["bone"] = {12208, raridade = {40, 80, "Facil"} , 200},
["majesty wing"] = {12268, raridade = {40, 80, "Facil"} , 200},
["sea tail"] = {13898, raridade = {40, 80, "Facil"} , 200},
["feather"] = {12200, raridade = {40, 80, "Facil"} , 200},
["bird break"] = {12172, raridade = {40, 80, "Facil"} , 200},
["crystal stone"] = {11449, raridade = {15, 35, "Medio"} , 200},
["dragon tail"] = {12276, raridade = {40, 80, "Facil"} , 200},
["big wing"] = {12275, raridade = {40, 80, "Facil"} , 200},
["earth stone"] = {11451, raridade = {15, 35, "Medio"} , 200},
["screw"] = {12164, raridade = {40, 80, "Facil"} , 200},
["electric box"] = {12176, raridade = {40, 80, "Facil"} , 200},
["thunder stone"] = {11444, raridade = {15, 35, "Medio"} , 200},
["buzz tail"] = {12169, raridade = {40, 80, "Facil"} , 200},
["ancient stone"] = {12244, raridade = {2, 10, "Raro"} , 200},
["leaf stone"] = {11441, raridade = {15, 35, "Medio"} , 200},
["stick slash"] = {12199, raridade = {40, 80, "Facil"} , 200},
["traces of ghost"] = {12204, raridade = {40, 80, "Facil"} , 200},
["darkness gem"] = {12745, raridade = {40, 80, "Facil"} , 200},
["essence of dark"] = {12206, raridade = {40, 80, "Facil"} , 200},
["darkness stone"] = {11450, raridade = {15, 35, "Medio"} , 200},
["bat wing"] = {12182, raridade = {40, 80, "Facil"} , 200},
["tooth"] = {12175, raridade = {40, 80, "Facil"} , 200},
["strange rock"] = {13867, raridade = {40, 80, "Facil"} , 200},
["gosme"] = {12202, raridade = {40, 80, "Facil"} , 200},
["gyarados tail"] = {12148, raridade = {40, 80, "Facil"} , 200},
["punch stone"] = {11446, raridade = {15, 35, "Medio"} , 200},
["seahorse tail"] = {13864, raridade = {40, 80, "Facil"} , 200},
["ice bra"] = {12168, raridade = {40, 80, "Facil"} , 200},
["dome fossil"] = {12579, raridade = {2, 10, "Raro"} , 200},
["kangskhan war"] = {13888, raridade = {40, 80, "Facil"} , 200},
["pair of claws"] = {12269, raridade = {40, 80, "Facil"} , 200},
["venom flute"] = {12210, raridade = {40, 80, "Facil"} , 200},
["crab claws"] = {12207, raridade = {40, 80, "Facil"} , 200},
["dome fossil"] = {12579, raridade = {2, 10, "Raro"} , 200},
}


local storageUsing = storages.UsingAutoLoot
function doSaveItems(cid, items)
    setPlayerStorageValue(cid, storages.AutoLootList, items)
end


function doCollectAll(cid, col)
    setPlayerStorageValue(cid, storages.AutoLootCollectAll, col == true and "all" or "no")
end


function isCollectAll(cid)
   return getPlayerStorageValue(cid, storages.AutoLootCollectAll):find("all") and true or false
end
function getAllItensInMyList(cid)
    local myList = getPlayerStorageValue(cid, storages.AutoLootList)
    if myList == -1 or myList == "save/" or myList == "load/" or type(myList) ~= "string" then return {} end
    return myList:explode("/")[2]:explode(",")
end


function getAllItensInMyListToClient(cid)
    local myList = getAllItensInMyList(cid)
    local str = "autoloot/"
    for i = 1, #myList do
        info = getItemInfo(getItemIdByName(myList))
        if info then
            if itensAutoLoot[myList] then
               rate = itensAutoLoot[myList].raridade[3]
            else
               rate = "???"
            end
            str = str .. info.clientId .. "," .. info.name .. "," .. rate .. (i == #myList and "" or "/")
        end
    end
    return str == "autoloot/" and "" or str
end


function getAllItensAutoLoot()
local str = "autoloot/" 
      for a, b in pairs(itensAutoLoot) do
        info = getItemInfo(b[1])
        rate = b.raridade[3]
        str = str .. info.clientId .. "," .. info.name .. "," .. rate .. (i == #itensAutoLoot and "" or "/")
      end
      return str
end


 

 

DATA/ACTIONS/SCRIPTS/BASIC/autoLoot.lua

function onUse(cid, item, frompos, item2, topos) 
if isWatchingTv(cid) then return true end
    local quemMatou = getItemAttribute(item.uid, "corpseowner")
    if quemMatou then
    local player = getCreatureByName(quemMatou)
        if isPlayer(player) then
        local isInParyWithPlayer = false
              if isInParty(cid) and isInParty(player) then
                 isInParyWithPlayer = isPartyEquals(player, cid)
              end
            
            if getCreatureName(cid) ~= getCreatureName(player) and not isInParyWithPlayer then
               doPlayerSendCancel(cid, "Você não pode abrir um loot que não é seu.")    
               return true
            end
        end
    end
          local autoLootList = getAllItensInMyList(cid)
          local bag = getPlayerSlotItem(cid, 3).uid
          local itemsToRemove = {}
          
          if isCollectAll(cid) then
            for a = 0, getContainerSize(item.uid) do
                local it = getContainerItem(item.uid, a)
                    if it.uid > 0 then
                       if addItemInFreeBag(bag, it.itemid, it.type) ~= false then
                          table.insert(itemsToRemove, it.uid)
                       end
                    end
            end
         end
          
          if #autoLootList > 0 and not isCollectAll(cid) then
              for a = 0, getContainerSize(item.uid) do
                local it = getContainerItem(item.uid, a)
                    if it.uid > 0 then
                    for i = 1, #autoLootList do 
                            if getItemInfo(it.itemid).name == autoLootList then
                               if addItemInFreeBag(bag, it.itemid, it.type) ~= false then
                                  table.insert(itemsToRemove, it.uid)
                               end
                            end
                        end
                    end
               end
          end
          
          if #itemsToRemove > 0 then
             for i = 1, #itemsToRemove do
                doChangeTypeItem(itemsToRemove, 0)
             end
          end
    
end

 

 

Ae, os 2 arquivos de autoloot, obg por tentar ajudar : )

UPPPP

Link para o post
Compartilhar em outros sites
function onUse(cid, item, frompos, item2, topos) 
if isWatchingTv(cid) then return true end
    local quemMatou = getItemAttribute(item.uid, "corpseowner")
    if quemMatou then
    local player = getCreatureByName(quemMatou)
        if isPlayer(player) then
        local isInParyWithPlayer = false
              if isInParty(cid) and isInParty(player) then
                 isInParyWithPlayer = isPartyEquals(player, cid)
              end
            
            if getCreatureName(cid) ~= getCreatureName(player) and not isInParyWithPlayer then
               doPlayerSendCancel(cid, "Você não pode abrir um loot que não é seu.")    
               return true
            end
        end
    end
          local autoLootList = getAllItensInMyList(cid)
          local bag = getPlayerSlotItem(cid, 3).uid
          local itemsToRemove = {}
          
          if isCollectAll(cid) then
            for a = 0, getContainerSize(item.uid) do
                local it = getContainerItem(item.uid, a)
                    if it.uid > 0 then
                       if addItemInFreeBag(bag, it.itemid, it.type) ~= false then
                          table.insert(itemsToRemove, it.uid)
                       end
                    end
            end
         end
          
          if #autoLootList > 0 and not isCollectAll(cid) then
              for a = 0, getContainerSize(item.uid) do
                local it = getContainerItem(item.uid, a)
                    if it.uid > 0 then
                    for i = 1, #autoLootList do 
                            if getItemInfo(it.itemid).name == autoLootList then
                               if addItemInFreeBag(bag, it.itemid, it.type) ~= false then
                                  table.insert(itemsToRemove, it.uid)
                               end
                            end
                        end
                    end
               end
          end
          
          if #itemsToRemove > 1 then
             for i = 1, #itemsToRemove do
                doChangeTypeItem(itemsToRemove, 1)
             end
          end
    
end

testa, e me fala se esta removendo do corpse..

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por LeoTK
      Salve galera neste tópico irei postar algumas prints do mapa do servidor para quem queira acompanhar e quem sabe até utilizar de inspiração para mapear o seu NTO.
       
      #Att 11/08/2022

       
       
       
       
      Konoha (Em Desenvolvimento)
       
       
       
       
    • Por DiigooMix
      Como o título já diz, será que alguém possui sprite do hitto e se possível as transformações dele?
    • Por OmegaZero
      Olá gostaria que alguém me ajudasse com uma "scripting" não sei se é pela mesma, seria o seguinte uma determinada arma teria a chance de dar double hit e não sei oque fazer alguem poderia ajudar?

      OBS:não sei se é o local correto se não for mova, desculpe
    • Por Madarasenju
      Olá galera do Tibia King, queria por uns npc's no meu server que não tem função de trade nem nada do tipo, queria que eles só andassem como enfeite, Rep+ Pra quem me ajudar... grato desde já.
    • Por SilenceRoot
      A magia é assim o você usa a a magia e ela ficará ativado por 10 segundos, até que o inimigo lance a primeira magia ou todos de uma vez, quando ele lançar a primeira magia, ele não lhe acertará ou seja esquivando dela, e logo em seguida será teletransportado aleatoriamente ao redor do inimigo que usou.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo