Guild Bank Manager

magicdragon

New member
Joined
Sep 26, 2007
Messages
137
Reaction score
0
Points
0
I made this mac to look at items in the deposit list, see if there are any like it in the bank list and if there is move it to the bank, set it to public then press the merge button. It seems to be hit and miss, and I'm not sure where my timing is off.

Code:
Sub Main
/declare x int local
/declare deposititem string local
/declare startdeposit int local ${Window[GuildBankWnd].Child[GBANK_DepositList].Items}
/declare newdeposit int local
/declare listcount int local
/declare banklistcount int local

/for x 1 to ${Window[GuildBankWnd].Child[GBANK_DepositList].Items}
:start
/if (${Window[GuildBankWnd].Child[GBANK_ItemList].List[${Window[GuildBankWnd].Child[GBANK_DepositList].List[${x},2]},2]}) {
	/varset deposititem ${Window[GuildBankWnd].Child[GBANK_DepositList].List[${x},2]}
	/echo ${deposititem}
	/varset listcount ${Window[GuildBankWnd].Child[GBANK_DepositList].List[${deposititem},2]}
	/nomodkey /notify GuildBankWnd GBANK_DepositList listselect ${listcount}
	/notify GuildBankWnd GBANK_DepositList leftmouse ${listcount}
	/delay 20s ${Window[GuildBankWnd].Child[GBANK_PromoteButton].Enabled}
	/notify GuildBankWnd GBANK_PromoteButton leftmouseup
	:wait
	/delay 1s
	/varset newdeposit ${Window[GuildBankWnd].Child[GBANK_DepositList].Items}
	/if (${newdeposit}==${startdeposit}) /goto :wait
	/if (${newdeposit}<${startdeposit}) /varset startdeposit ${newdeposit}
	/varset banklistcount ${Window[GuildBankWnd].Child[GBANK_ItemList].List[${deposititem},2]}
	:lookatnext
	/if (${Window[GuildBankWnd].Child[GBANK_ItemList].List[${banklistcount},4].Equal[Public]}) {
		/varcalc banklistcount ${banklistcount}+1
		/echo ${banklistcount}
		/goto :lookatnext
	}
|	/nomodkey /notify GuildBankWnd GBANK_ItemList listselect ${banklistcount}
|	/notify GuildBankWnd GBANK_ItemList leftmouse ${banklistcount}
	/echo set to public
	/notify GuildBankWnd GBANK_PermissionCombo listselect 4
|	/delay 1
|	/notify GuildBankWnd GBANK_PermissionCombo leftmouse 4
	/delay 5s
	/delay 20s ${Window[GuildBankWnd].Child[GBANK_MergeButton].Enabled}
	/delay 2s
	/echo merge stacks
	/nomodkey /notify GuildBankWnd GBANK_MergeButton leftmouseup
	/delay 1s
	/goto :start
}
/next x
/endm
 
I made a similar macro to the one you describe, but without any comparison to what is already in guild bank. This macro will take whatever is in the deposits area and move it to the guild bank area, mark it as public and merge stacks.

It works very well (except sometimes you can get server busy messages and then it resumes once the server is ready again), so perhaps this will help you with your macro.

Code:
Sub Main

/declare i int local

/echo ${Window[GuildBankWnd].Child[DepositList].Items} Items to Mark PUBLIC

/if (!${Window[GuildBankWnd].Child[DepositList].Items}) /return

:moreitems

      /nomodkey /notify GuildBankWnd GBANK_DepositList listselect 1
      /delay 2
      /nomodkey /notify GuildBankWnd GBANK_DepositList leftmouse 1
	  
	  /delay 2s ${Window[GuildBankWnd].Child[GBANK_PromoteButton].Enabled}	  
	  /nomodkey /notify GuildBankWnd GBANK_PromoteButton leftmouseup
	  
	  /delay 1s
      /nomodkey /notify GuildBankWnd GBANK_PermissionCombo listselect 4
      /delay 5
      /nomodkey /notify GuildBankWnd GBANK_PermissionCombo leftmouse 4
      /delay 1s

	  /delay 2s ${Window[GuildBankWnd].Child[GBANK_ViewItemButton].Enabled}
	  /nomodkey /notify GuildBankWnd GBANK_MergeButton leftmouseup
	  
/if (${Window[GuildBankWnd].Child[DepositList].Items}) /goto :moreitems

/return
 
I guess I was making my delays too complex, I copied what you did for delays put the leftmouse 4 line back in and took out the :start /goto :start lines (not sure why I did that anyway) and its working better. thanks.
 
forgive me for being obtuse, but could this be modified to change every item in the guild bank to public? i've got some old storage guild banks and everything was switched to view and it's tedious as shit to manually change things to public before i withdraw.

my paypal is in working order. /cough
 
Code:
| Publicize All Guild Bank Items
|
| Requirements: Open Guild Bank Window
|
| Usage: /macro publicize_guild_bank.mac
Sub Main
    /call VerifyGuildBankWindowOpen
    /call PublicizeAllGuildBankItems
    /return

Sub VerifyGuildBankWindowOpen
    /if (!${Window[GuildBankWnd]}) { 
        /echo You must have the Guild Bank Window open to run this macro.
        /endmacro
    }
    /return

Sub PublicizeAllGuildBankItems
    /declare i int local
    /for i 1 to ${Window[GuildBankWnd].Child[ItemList].Items}
        /call VerifyGuildBankWindowOpen
        /call _PublicizeGuildBankItem ${i}
        /next i
    /return

Sub _PublicizeGuildBankItem(id)
    /if (${Window[GuildBankWnd].Child[ItemList].List[${id}, 4].Equal[Public]}) {
        /return
    }
    /call _SelectGuildBankItem ${id}
    /call _SetPermissionPublic
    /call _WaitForGuildBankReady
    /return

Sub _SelectGuildBankItem(id)
    /nomodkey /notify GuildBankWnd GBANK_ItemList listselect ${id}
    /return

Sub _SetPermissionPublic
    /nomodkey /notify GuildBankWnd GBANK_PermissionCombo listselect 4
    /return

Sub _WaitForGuildBankReady
    /delay 1s ${Window[GuildBankWnd].Child[GBANK_ViewItemButton].Enabled}
    /return
 
Could anyone add code to this that would make it change view only and public as public if useable?
 
Code:
| Make guild bank items public if usable if they are View Only or Public already.
|
| Requirements: Open Guild Bank Window
|
| Usage: /macro publicize.mac
Sub Main
    /call VerifyGuildBankWindowOpen
    /call PublicizeAllGuildBankItems
    /return

Sub VerifyGuildBankWindowOpen
    /if (!${Window[GuildBankWnd]}) { 
        /echo You must have the Guild Bank Window open to run this macro.
        /endmacro
    }
    /return

Sub PublicizeAllGuildBankItems
    /declare i int local
    /for i 1 to ${Window[GuildBankWnd].Child[ItemList].Items}
        /call VerifyGuildBankWindowOpen
        /call _PublicizeGuildBankItem ${i}
        /next i
    /return

Sub _PublicizeGuildBankItem(id)
    /if (${Window[GuildBankWnd].Child[ItemList].List[${id}, 4].Equal[Public]} || ${Window[GuildBankWnd].Child[ItemList].List[${id}, 4].Equal[View Only]}) {
        /call _SelectGuildBankItem ${id}
        /call _SetPermissionPublicIfUsable
        /call _WaitForGuildBankReady
    }
    /return

Sub _SelectGuildBankItem(id)
    /nomodkey /notify GuildBankWnd GBANK_ItemList listselect ${id}
    /return

Sub _SetPermissionPublicIfUsable
    /nomodkey /notify GuildBankWnd GBANK_PermissionCombo listselect 3
    /return

Sub _WaitForGuildBankReady
    /delay 1s ${Window[GuildBankWnd].Child[GBANK_ViewItemButton].Enabled}
    /return
 
thank you!

Thank you soo much! I am looking through it and I understand what you did for the most part, I am trying to learn more and more so i can contribute more to this site! Thanks again!!
 
Ok another question...... Is there a way to add to auto inventory anything that has a quantity value listed in the bottom area of the guild bank?
 
Code:
| Put all stackable items into guild bank.
|
| Requirements: Open Guild Bank Window
|
| Usage: /macro gb_deposit_stackable.mac
Sub Main
    /call VerifyGuildBankWindowOpen
    /call DepositStackableItems
    /return

Sub VerifyGuildBankWindowOpen
    /if (!${Window[GuildBankWnd]}) { 
        /echo You must have the Guild Bank Window open to run this macro.
        /endmacro
    }
    /return

Sub DepositStackableItems
    /declare itemCount int local ${Window[GuildBankWnd].Child[DepositList].Items}
    /declare i         int local
    /for i 1 to ${itemCount}
        /call VerifyGuildBankWindowOpen
        /call _DepositStackableItem ${i}
        /if (${Window[GuildBankWnd].Child[DepositList].Items} != ${itemCount}) {
            /varcalc i ${i} - 1
            /varcalc itemCount ${itemCount} - 1
        }
        /next i
    /return

Sub _DepositStackableItem(id)
    /if (${Window[GuildBankWnd].Child[DepositList].List[${id}, 3].Equal[ ]}) {
        /return
    }
    /call _SelectDepositItem ${id}
    /call _DepositItem
    /call _WaitForGuildBankReady
    /return

Sub _SelectDepositItem(id)
    /nomodkey /notify GuildBankWnd GBANK_DepositList listselect ${id}
    /return

Sub _DepositItem
    /nomodkey /notify GuildBankWnd GBANK_PromoteButton leftmouseup
    /return

Sub _WaitForGuildBankReady
    /delay 1s ${Window[GuildBankWnd].Child[GBANK_ViewItemButton].Enabled}
    /return
 
I meant, put all stackable items in your inventory, I am sorry, I know its late lol
 
I meant, put all stackable items in your inventory, I am sorry, I know its late lol

So you want all the stackable items in the deposit list moved to your inventory or you want all stackable items in the entire guild bank moved to your inventory?
 
Code:
| Place all the stackable items in the deposit list in the guild then
| withdraw and put them in your inventory.
|
| Requirements: Open Guild Bank Window
|
| Usage: /macro gb_withdraw_stackable_deposits.mac
|
| Notes: This macro does not handle edge cases, it assumes everything
|        it wants to do gets done successfully. This macro does not
|        care if you do not have the inventory space. It also does not
|        care about EQs services or your crappy internet so something
|        out of the ordinary happens, get ready for smoke and fire as
|        the world crumbles and is consumed by the fiery wrath of bob.
Sub Main
    /call VerifyGuildBankWindowOpen
    /call VerifyEmptyCursor
    /call WithdrawStackableDeposits
    /return

Sub WithdrawStackableDeposits
    /declare GuildBankWnd string local Window[GuildBankWnd]
    /declare DepositList  string local ${GuildBankWnd}.Child[DepositList]
    /declare ItemList     string local ${GuildBankWnd}.Child[ItemList]
    /declare itemName     string local  
    /declare i            int    local
    /if (!${${DepositList}.Items}) {
        /echo There are no deposits, dummy. COME ON!
        /endmacro
    }
    /for i 1 to ${${DepositList}.Items}
        /if (!${${DepositList}.List[${i}, 3].Equal[ ]}) {
            /varset itemName ${${DepositList}.List[${id}, 2]}
            /call PromoteDepositedItemToBank ${i}
            /call WithdrawItemToInventory ${itemName}
            /varcalc i ${i} - 1
        }
        /next i
    /return

Sub PromoteDepositedItemToBank(id)
    /call VerifyGuildBankWindowOpen
    /call SelectDepositItem ${id}
    /call PressPutItemInBankButton
    /call WaitForGuildBankReady
    /return

Sub WithdrawItemToInventory(list, name)
    /call VerifyGuildBankWindowOpen
    /call SelectItemByName ${list} ${name}
    /call SetItemPermissionsToMe
    /call WithdrawItem
    /call InventoryItem
    /return

Sub SetItemPermissionsToMe
    /call SetPermissionToSingleMember
    /call WaitForNameEntryBox
    /call PressNameEntryOkButton
    /call WaitForGuildBankReady
    /return

Sub WithdrawItem
    /call PressWithdrawButton
    /call WaitForItemOnCursor
    /call InventoryItem
    /call WaitForEmptyCursor
    /call WaitForGuildBankReady
    /return

Sub SelectItemByName(list, name)
    /declare i int local
    /for i 1 to ${${list}.Items}
        /if (${${list}.List[${i}, 3].Equal[${name}]}) {
            /call SelectItem ${i}
            /return
        }
        /next i
    /return

Sub VerifyGuildBankWindowOpen
    /if (!${Window[GuildBankWnd].Open}) { 
        /echo You must have the Guild Bank Window open to run this macro.
        /endmacro
    }
    /return

Sub VerifyEmptyCursor
    /if (${Cursor.ID}) {
        /echo Your cursor must be empty before running this macro.
        /endmacro
    }
    /return

Sub SelectDepositItem(id)
    /nomodkey /notify GuildBankWnd GBANK_DepositList listselect ${id}
    /return

Sub PressPutItemInBankButton
    /nomodkey /notify GuildBankWnd GBANK_PromoteButton leftmouseup
    /return

Sub SelectItem(id)
    /nomodkey /notify GuildBankWnd GBANK_ItemList listselect ${id}
    /return

Sub SetPermissionToSingleMember
    /nomodkey /notify GuildBankWnd GBANK_PermissionCombo listselect 2
    /return

Sub PressNameEntryOkButton
    /nomodkey /notify TextEntryWnd TEW_OKButton leftmouseup
    /return

Sub PressWithdrawButton
    /shift /notify GuildBankWnd GBANK_WithdrawButton leftmouseup
    /return

Sub InventoryItem
    /autoinventory
    /return

Sub WaitForNameEntryBox
    /delay 1s ${Window[TextEntryWnd].Open}
    /return

Sub WaitForGuildBankReady
    /delay 1s ${Window[GuildBankWnd].Child[GBANK_ViewItemButton].Enabled}
    /return

Sub WaitForItemOnCursor
    /delay 1s ${Cursor.ID}
    /return

Sub WaitForEmptyCursor
    /delay 1s !${Curosr.ID}
    /return
 
I am not getting it to autoinventory anything. i am wanting it to inventory anything that has a value in the quantity ie anything that is stackable in the main guild bank or the deposit list. thanks again!

Also I jsut realized, it will have to first make any stackable item public, then withdrawl them.
 
Last edited: