Jump to content


Photo

FindAll : Repeated item instances (Question/Request)

FindAll

    3 replies to this topic

    #1 Humetaru

    Humetaru

      Newbie

    • Members
    • Pip
    • 2 posts

      Posted 25 January 2015 - 06:06 AM

      Hi, I want to ask if there is a way to do a search that shows only items that appear multiple times in different bags and excludes those that don't. Say I have many items that for one reason or another are scattered across many characters/bags, could I do a custom search that showed those unspecified items that repeated without showing those that don't?

       

      In a fashion similar to this:

       

      //findAll multiple

      findAll: ItemA (4 instances)

      findAll: CharA/sack ItemA (12)

      findAll: CharA/sack ItemA (5)

      findAll: CharA/inventory ItemA (3)

      findAll: CharB/sack ItemA (6)

       

      findAll: ItemB (3 instances)

      findAll: CharA/sack ItemB

      findAll: CharC/storage ItemB (2)

      findAll: CharD/safe ItemB

       

      findAll: ItemC (2 instances)

      findAll: CharA/inventory ItemC (10)

      findAll: CharD/safe ItemC (4)

       

      Etc.

       

      And if there isn't could it be implemented? It would save so much time when consolidating Inventory.



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 25 January 2015 - 02:02 PM

      Shouldn't be too hard to add but it would really be better as a separate addon. In fact, I believe I saw something like that written before somewhere. There is a MHCleaner addon, but I have no idea what it does, might be worth checking out.


      • Humetaru likes this

      #3 Humetaru

      Humetaru

        Newbie

      • Members
      • Pip
      • 2 posts

        Posted 26 January 2015 - 06:57 AM

        I couldn't find it, but it would be great if something like this exists already.



        #4 darsovit

        darsovit

          Newbie

        • Members
        • Pip
        • 6 posts

          Posted 23 February 2015 - 01:19 PM

          Hello Humetaru,

           

          I made the following lua script that uses findAll's storage.json (and currently places the output in the same directory). It uses the storage.json and flips the data around a bit, to become a table of items to users, then to their storages (so it'll identify if the data is stored in a character's mog safe and also some in the satchel, etc..

           

          http://pastebin.com/fa7eD3ye

           

          Depending on where you drop the script file, you may need to adjust the line to change the number of ../ put in front of the filenames:

          1. local relative_depth_to_addons_findAll = '../../..'
          If the relative_depth_to_addons_findAll is wrong, you'll see an error message in chat log saying Unable to find storages path
           
          I had the script in windower4/scripts/lua, then ran (from the windower console in game):
          lua exec lua/items_to_chars_builder.json
           
          If you drop it directly into windower4/scripts instead, you'll have to adjust the relative_depth_to_addons_findAll = '../..' and then use: lua exec items_to_chars_builder.json
           
          The script was thrown together quickly based on a python script (that I then realized I couldn't easily get the item names with), so it might have some extra stuff in it. Also it doesn't just find multiples, but everything right now. I have a couple of adjustments I'd like to make, but it should get the job done. :D






          Also tagged with one or more of these keywords: FindAll

          1 user(s) are reading this topic

          0 members, 1 guests, 0 anonymous users