ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   GetItemInfo on Guild Bank ?? (https://www.esoui.com/forums/showthread.php?t=836)

Nekudotayim 04/13/14 09:54 AM

GetItemInfo on Guild Bank ??
 
I am able to access the guild bank within scripts but unable to get item names or links from items stored inside. The goal is an addon to retrieve multiple half full stacks from guild bank, merge them local in my backpack and put the stack back on the guild bank. Stacking works well with backbank and own bank, but guld bank wont cause of missing item infos.

Has anyone an idea ? Would appreciate any help. Thanks.

Seerah 04/13/14 11:34 AM

Are you using BAG_GUILDBANK for the bagID along with the correct slotID? (slot ids aren't necessarily the same as the order that you see items in the bank)

Nekudotayim 04/13/14 11:58 AM

icon, slots= GetBagInfo(BAG_GUILDBANK)
for i=1,slots do
linkName = GetItemLink(BAG_GUILDBANK,i)
end

At least this works with BAG_BACKPACK, so it should with guild bank as its handled like another bag aI thought. Right ? Ir how do I get the slotID of each slot ??

Seerah 04/13/14 12:09 PM

That should work. But try this if you want to:

/zgoo mouse
when you have your mouse over an item. See if the slotID is listed in the table for the slot itself.

Nekudotayim 04/13/14 03:14 PM

Great addon, shows item info of guild bank also. The actual problem is the slotID, which changes everytime you open the guild bank. In backpack and regular bank it always starts with 1, in guildbank its variable (1, 800, 2211, ...). How can I get the first slotIndex of a bag ? Couldn't find an appropriate function.

Another idea would be to access ZO_GuildBankBackpack as shown in zgoo, but how to do it ?

Iyanga 04/14/14 12:35 PM

Quote:

Originally Posted by Nekudotayim (Post 4136)
Great addon, shows item info of guild bank also. The actual problem is the slotID, which changes everytime you open the guild bank. In backpack and regular bank it always starts with 1, in guildbank its variable (1, 800, 2211, ...). How can I get the first slotIndex of a bag ? Couldn't find an appropriate function.



GetNextGuildBankSlotId ?

I suspect you feed it with nil or 0 as start and then with the previous return value to iterate.

Nekudotayim 04/14/14 01:26 PM

Managed to get access to the guildbank through ZO_GuildBankBackpack and iteration works well. Also protected function calls (PickupInventoryItem and PlaceInInventory) return true, even got the lazy response of the guildbank managed using zo_callLater, but NOTHING actually happens to the inventories, no items are moved. Probably difficult to tell without viewing the sourcecode but maybe there's a know issue calling protected functions always returning true ? Is it even possible to retrieve items from the guild bank using scripts ?

Thanks again for your help

BadVolt 04/16/14 07:21 AM

Quote:

Originally Posted by Nekudotayim (Post 4293)
Managed to get access to the guildbank through ZO_GuildBankBackpack and iteration works well. Also protected function calls (PickupInventoryItem and PlaceInInventory) return true, even got the lazy response of the guildbank managed using zo_callLater, but NOTHING actually happens to the inventories, no items are moved. Probably difficult to tell without viewing the sourcecode but maybe there's a know issue calling protected functions always returning true ? Is it even possible to retrieve items from the guild bank using scripts ?

Thanks again for your help

Yeah, I encountered this difficulty too. Problem is hidden inside slotindex. It counts like counts=counts+newcounts. It works fine when your just reloged and breaks after that... moreover, there are 1-3 events occures after guildbank loaded, so I had to use ZO_GuildBankBackpack.data. Looks like you also went this way...
May be we can help ech other. I'm trying to dump this ZO_GuildBankBackpack.data to saved variables and loead them later, but I can't dump variables that are linked to itself. Any ideas?

Nekudotayim 04/18/14 11:43 AM

Saving a copy will work, but remember that slot IDs will change ofter. My problem is stil to move items from/to guild bank.


All times are GMT -6. The time now is 12:45 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI