Quantcast Trying to get working unmaintained addon "Move All Items" - ESOUI
Thread Tools Display Modes
05/27/20, 07:37 AM   #1
Sheen
Join Date: Apr 2020
Posts: 3
Question Trying to get working unmaintained addon "Move All Items"

Hello,

I've just discovered this tiny addon (176 lines, no libs required) : https://www.esoui.com/downloads/info...eAllItems.html

It's exactly what I'm looking for, unfortunately, it's no more maintained since 2017.
I'm trying to understand what is the issue, but I'm not a developer and I admit that I don't understand anything.



Addon is loading, buttons are visible and in place, but when clicking on button I got this api error :

---------------------------------------------------------------------------------------
user:/AddOns/MoveAllItems/MoveAllItems.lua:77: table index is nil
stack traceback:
user:/AddOns/MoveAllItems/MoveAllItems.lua:77: in function 'DepositAllItems'
<Locals> button = ud, window = ud, delayStep = 300, toBagId = 3, fromBagId = 1, tempitems = [table:1]{}, items = [table:2]{}, _ = 1, v = [table:3]{bottom = 42, bestItemTypeName = "Nouveau", sortPriorityName = "000Nouveau", isHeader = T, top = 0, num = 6, bagTypeId = 1, typeId = 998} </Locals>
user:/AddOns/MoveAllItems/MoveAllItems.lua:88: in function 'ButtonClickHandler'
<Locals> button = ud </Locals>
---------------------------------------------------------------------------------------



The line 77 is this function :
---------------------------------------------------------------------------------------
local function DepositAllItems(button)
local window = button:GetParent():GetNamedChild("Backpack")
local delayStep = 300

local toBagId
local fromBagId = BAG_BACKPACK
if button.guild == true then toBagId = BAG_GUILDBANK
else toBagId = BAG_BANK end

local tempitems = {}
local items = {}
u
tempitems[v.data.slotIndex] = v.data <----- LINE 77
end
for _,v in pairs(tempitems) do
table.insert(items, v)
end

MoveItems(toBagId, fromBagId, items, delayStep)
end
---------------------------------------------------------------------------------------



The line 88 is this function :
---------------------------------------------------------------------------------------
local function ButtonClickHandler(button)
--figure out which button was pressed
if button.deposit == true then DepositAllItems(button) <-- LINE 88
else WithdrawAllItems(button) end
end
---------------------------------------------------------------------------------------



The error is table is null, so I think syntax has changed because of multiple api upgrade and item table is not created properly, but I'm not able to go further.

I think it does not require much mork but maybe I'm wrong.
If someone has a few time to help me, you're welcome ^^


Thanks.

Last edited by Sheen : 05/27/20 at 07:43 AM.
  Reply With Quote
05/27/20, 08:45 AM   #2
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2,948
If you want to: You can use DoItAll for this (written by Randacrtyl in the addon comments as well!)
It got the same feature and supports FCOItemSaver marked items (not moved) as well as AdvancedFilters + plugins and FCOCraftFilter.
Also got other featrues like extract all, refine all, attach all to mail, trade all, etc.

Else try to change the function to this (untested):
Seems the slotIndex was not found somehow so I've tried to look for slotIndex or slot, else do not add the item.
Lua Code:
  1. local function DepositAllItems(button)
  2.     local window = button:GetParent():GetNamedChild("Backpack")
  3.     local delayStep = 300
  4.  
  5.     local toBagId
  6.     local fromBagId = BAG_BACKPACK
  7.     if button.guild == true then toBagId = BAG_GUILDBANK
  8.     else toBagId = BAG_BANK end
  9.  
  10.     local tempitems = {}
  11.     local items = {}
  12.     for _,v in pairs(window.data) do
  13.         local slotIndex = v.data.slotIndex or v.data.slot
  14.         if slotIndex then
  15.             tempitems[slotIndex] = v.data
  16.         end
  17.     end
  18.     for _,v in pairs(tempitems) do
  19.         table.insert(items, v)
  20.     end
  21.  
  22.     MoveItems(toBagId, fromBagId, items, delayStep)
  23. end

Last edited by Baertram : 05/27/20 at 08:49 AM.
  Reply With Quote
05/27/20, 09:04 AM   #3
Sheen
Join Date: Apr 2020
Posts: 3
Thanks Baertram for your reply, I'll will try.

I've taken a look at "do it all" but the problem is that I want to use it with guild bank, and it's not yet implemented.
  Reply With Quote
05/27/20, 09:11 AM   #4
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2,948
Well looking at the code the addon here is just trying to move the item to the guildbank.
If it fails as the server is not responding again or you get the info (like always) "Please wait for item to be transfered first" it will just do nothing.

I doubt this will work with unresponsive guild banks, and that was the reason why DoItAll is not supporting the mass movements at guild banks as the serves are simply crap and in cowded areas ther eis no way to transfer all via addons as YOU ALWAYS need to wait until the server responsds. And this is nothing an addon would do and repeat -> or you get kicked from the server for spamming

So maybe it works in less crowdy areas, but I doubt it really will work properly. Good luck
  Reply With Quote
05/27/20, 09:20 AM   #5
Sheen
Join Date: Apr 2020
Posts: 3
Roomba is able to wait and continue to works properly.
I don't know how it proceed but it works fine ^^


You code works, you're right the addon is not able to retry upload of item, but I've been able to send 10/15 item before it stop so it still can be useful

Thanks again for your help.

Last edited by Sheen : 05/27/20 at 09:43 AM.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Trying to get working unmaintained addon "Move All Items"

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off