Trying to see guild bank transaction information
ok, this is a function i am testing via macros for my add on
the only problem i am facing i am trying to have a messege box apear when the tab slots have been changed, displaying that newest transactions info. for now i just want to know the item name that has been transacted what i am trying to do is copy the guild log latest entry into messege box, when any transaction is made in the guild vault(it seams that i need to open the log tab for any value to appear, witch is what i dont want(but if it must happen then it must) or what my main goal is when any transaction happens i want to know what that transaction was = deposit/withdraw itemname what does not work: the only thing my message box displays is the type of the transaction this is my test script that i use in my macro to see how to work it /script local name = GetGuildBankTransaction(1,25);message(name); |
You need to provide other variables to get all the information you need.
type, name, itemLink, count, tab1, tab2, year, month, day, hour = GetGuildBankTransaction(tab, index) http://www.wowwiki.com/API_GetGuildBankTransaction |
yes i relised that
but even then i did so, and it only displays the type or transaction. i am not in a rush nor difficult so even one block of info would help |
ok, i have done what u have told me to look at
and my wow froze what i am trying to do is copy the guild log latest entry into messege box, when any transaction is made in the guild vault(it seams that i need to open the log tab for any value to appear, witch is what i dont want(but if it must happen then it must) or what my main goal is when any transaction happens i want to know what that transaction was = deposit/withdraw itemname |
Hmm, okay, the macro angle doesn't work. But then again I never use macros for stuff like that.
Okay, looks like you will have to use an addon even to just test this as you have to use a query function to get it to grab the information. Here's a block of code I used and it works in a simplistic way. Code:
|
Rofl, tried to turn the addon into a slash command system and it crashed rofl.
The listing way works though so I'll try and work via that route to get the trans info. Ah, looking at the way blizzard deals with the guildbank frame themselves it looks like you have to have the guild bank frame open for the query function and the transaction functions to work properly. Also, it seems directly accessing the newest transaction doesn't work either. You have to go through the whole for loop with the last entry being the newest and 1 being the oldest. Trying another route to make it more useful. Aha, it looks like QueryGuildBankLog function triggers the GUILDBANKLOG_UPDATE event for each tab/tab+1 query it makes. But I still can't get it to just query the last transaction so you may have to read through all transactions and just display the last one. |
1 Attachment(s)
Aha finally got it to work... its annoying but finally works the moment you open the guildbank frame. You have to have it open for it to work unfortunately.
Final Code and a screenshot to show how it is outputting the information : Code:
local tType, tName, itemLink, count, tab1, tab2, year, month, day, hour; |
god thank you very much Crystal
i am very surprised u guided me through the add on making of this function but i am also glad. maybe its because of 2 factors that i actually put in some effort to make a working function just not understanding a few parts and maybe u were kind of intrigued by the idea thank you once more ur the best |
Its cool. And yeah, once I get my head into a problem I don't stop until I resolve it rofl.
|
ok i tested the addon code for the 2nd part that u said would work properly
and somehow id doesn't display any transactions for me maybe because i move things ill test depositing items now but ive been trying to figure out and i dont understand exactly what each line does will u be able to guide me through it>? |
ok it worked now but i had to go to log tab and i disabled arkinventory.. or maybe i dint have to
is there a way i can have it with out going to log tab i want it to react only when i make an transaction |
ok so i believe arkinventory is preventing from any kind of messege to apear when i go to log window
|
Hmm strange. All I did was open the bank and it displayed the transactions linked to each of the bank tabs.
Ah, unless it is to do with permissions. Can you usually view items or the log for each tab ? If not perhaps that functionality isn't available without the right permission. I am an officer in my guild so I have full access to the tabs so could explain why it worked for me. I'll edit the last code post and add comments for you. The updatelog event I would have thought would get triggered but if not you could try adding the following events with RegisterEvent lines: "GUILDBANKBAGSLOTS_CHANGED" - Fired when the guild-bank contents change "GUILDBANK_ITEM_LOCK_CHANGED" "GUILDBANK_UPDATE_MONEY" "GUILDBANK_UPDATE_TABS" "GUILDBANK_UPDATE_TEXT" "GUILDBANK_UPDATE_WITHDRAWMONEY" And then adjust the following line so that each event is checked to run the same query code. Or you could add them as separate elseif sections and call the same block of code the GUILDBANKFRAME_OPENED event uses: if ( event == "GUILDBANKFRAME_OPENED" or event == "GUILDBANKBAGSLOTS_CHANGED" or "GUILDBANK_ITEM_LOCK_CHANGED") then |
thank you i will look at it and see
although on both accounts i am GM, one is GM but not fully since i made a second GM rank , but testing the addon using the original GM |
1 Attachment(s)
Hmm, okay, I'll zip up the whole project and see if the whole thing works for you.
|
ok, i have disabled all the addons, and just that
but it only displays anything once i go to log |
Quote:
|
Quote:
|
My apologies, I'll break down the onEvent function to make things clearer:
Code:
-- Each QueryGuildBank.... call will trigger this update but we only |
Code:
local addonName, addonData = ...; |
All times are GMT -6. The time now is 05:43 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI