Thread Tools Display Modes
04/13/14, 09:54 AM   #1
Nekudotayim
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
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.
  Reply With Quote
04/13/14, 11:34 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
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)
  Reply With Quote
04/13/14, 11:58 AM   #3
Nekudotayim
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
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 ??
  Reply With Quote
04/13/14, 12:09 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
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.
  Reply With Quote
04/13/14, 03:14 PM   #5
Nekudotayim
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
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 ?

Last edited by Nekudotayim : 04/13/14 at 04:20 PM.
  Reply With Quote
04/14/14, 12:35 PM   #6
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by Nekudotayim View Post
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.
  Reply With Quote
04/14/14, 01:26 PM   #7
Nekudotayim
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
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
  Reply With Quote
04/16/14, 07:21 AM   #8
BadVolt
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 74
Originally Posted by Nekudotayim View Post
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?
  Reply With Quote
04/18/14, 11:43 AM   #9
Nekudotayim
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
Saving a copy will work, but remember that slot IDs will change ofter. My problem is stil to move items from/to guild bank.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » GetItemInfo on Guild Bank ??


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