• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver
Guild Bank Bot - gbbot.mac

Release Guild Bank Bot - gbbot.mac 2.0

No permission to download

Maskoi

old and salty
Joined
Sep 28, 2005
RedCents
82,796¢
I wrote this mac a few years ago since I was way too lazy to keep moving deposited items into my guild bank. I couldn't find any basic macros just to move items. TreeHuginDruid73 fixed some permission issues and added a feature to grab all Spells, Songs, or Defiant armor out of Guild Bank. I use it all time but completely forgot about it otherwise so I decided post it when I saw it while looking through my macros.

This macro will

~ Check available empty guild bank slots make sure it is not full.
~ Check if there are any deposited items and move them to the guild bank.
~ If there are more items than free slots it will deposit only that many.
~ Set all item permissions in guild bank to what you select Banker Only, etc.
~ Grab all Spells, Songs, or Defiant armor out of Guild Bank - TreeHuginDruid73

Just set your variables in the macro and /mac gbbot

Rich (BB code):
|----------------------------------------------------------------
| - gbbot.mac ver 2.0 by Maskoi 11/22/09
|
| ripped code from bartab and dkaa
| major revisions for 2.0 courtesy of TreeHuginDruid73. 
| you must have the guild bank window open and be a guild banker
|
|----------------------------------------------------------------

#turbo 10

#Event BagsFull     "#*#There was no place to put that!#*#"

|-------------------------------------------------------------------------------- 
|SUB: Main
|--------------------------------------------------------------------------------
Sub Main

|-------------------------------------------------------------------
| - Declare your variables:
|   
| - (move_items) move deposited items to guild bank   
|   0=off 1=on
|   
| - (set_all_items_use) reset all items use           
|   0=off    1=on
|   
| - (set_all_items_to) reset all items to             
|   1=Banker Only, 3=Public If Usable, 4=Public
|-------------------------------------------------------------------

   /declare move_items             int outer 1
   /declare remove_guild_spells    int outer 0
   /declare remove_guild_songs     int outer 0
   /declare remove_guild_defiant   int outer 0
   /declare set_all_items_use      int outer 0
   /declare set_all_items_to       int outer 0
   
|-------------------------------------------------------------------
| - Things you don't need to worry about
|-------------------------------------------------------------------
   /declare GuildTreasurer     	  string  outer   "a guild treasurer"
   /declare GuildMerchant         string  outer   "Yenny Werlikanin"
   /declare RangeDist             int     outer   10
   /declare GuildItems		  int     outer
   /declare DefiantItemType	  string  outer 
   /declare count_bank_slots      int     outer
   /declare count_deposited_items int     outer
   /declare itemCount             int     outer
   /declare perm_text             string  outer 
   /declare bank_deposit_count    int     outer 
|-------------------------------------------------------------------   
   
   /if (${set_all_items_to}==1) { 
       /varset perm_text Banker Only
   } else /if (${set_all_items_to}==2) {
       /varset perm_text Single Member
   } else /if (${set_all_items_to}==3) {
       /varset perm_text Public If Usable
   } else /if (${set_all_items_to}==4) {
       /varset perm_text  Public
   }   

|-------------------------------------------------------------------
/if (${move_items})           /call Deposited_Items
/if (${set_all_items_use})    /call Set_All_Items ${set_all_items_to}
/if (${remove_guild_spells})  /call NabSpells
/if (${remove_guild_songs})   /call NabSongs
/if (${remove_guild_defiant}) {
    /varset DefiantItemType "Crude Defiant"
    /call NabDefiant
    /varset DefiantItemType "Simple Defiant"
    /call NabDefiant
    /varset DefiantItemType "Rough Defiant" 
    /call NabDefiant
    /varset DefiantItemType "Ornate Defiant"
    /call NabDefiant
    /varset DefiantItemType "Flawed Defiant"
    /call NabDefiant
    /varset DefiantItemType "Intricate Defiant"
    /call NabDefiant
    /varset DefiantItemType "Elaborate Defiant"
    /call NabDefiant
    /varset DefiantItemType "Elegant Defiant"
    /call NabDefiant
}
|-------------------------------------------------------------------

/if (${Window[GuildBankWnd].Open}) /keypress esc
/delay 5

/endmacro

/return 

|-------------------------------------------------------------------------------- 
|SUB: Deposited_Items - Move the deposited items into guild bank
|--------------------------------------------------------------------------------
Sub Deposited_Items

/target ${GuildTreasurer}
/delay 1s

/if (${Target.ID} && ${Target.CleanName.Equal[${GuildTreasurer}]}) {
    /call MoveInRange
    /delay 10
    /nomodkey /click right target
    /delay 5s ${Window[GuildBankWnd].Open}
    
    /echo Attempting to move deposited items into guild bank.

    /call free_slots_guild_bank
    /if (${count_bank_slots}==0) {
       /echo Sorry can't move any items. Your Guild bank is full.
       /return
    }

    /call how_many_deposited_items
    /if (${count_deposited_items}==0) {
       /echo There are no deposited items to move into the guild bank.
       /return
    }

    /varcalc bank_deposit_count (${count_bank_slots}-${count_deposited_items})

    /if (${count_deposited_items}>${count_bank_slots}) {
        /echo There are not enough free bank slots to move all deposited items.
        /echo Will only move ${bank_deposit_count} items out of ${count_deposited_items} total.
        /varset itemCount ${bank_deposit_count}
    } else {
        /varset itemCount ${count_deposited_items} 
    }

    :itemsleftloop
    /if (${itemCount}>=1) {
        /echo ${itemCount} of ${count_deposited_items} items left to be moved.
        /call Move_Deposited_Items 1
        /varcalc itemCount ${itemCount}-1
        /if (${itemCount}==0) /echo All ${count_deposited_items} items have been moved to your guild bank.
        /goto :itemsleftloop
    }

} 

/return 

|-------------------------------------------------------------------------------- 
|SUB: how_many_deposited_items - Count deposited items
|--------------------------------------------------------------------------------
Sub how_many_deposited_items

    /varset  count_deposited_items ${Window[GuildBankWnd].Child[GBANK_DepositCountLabel].Text.Arg[2,:]}
    /varcalc count_deposited_items (40-${count_deposited_items})

/return 

|-------------------------------------------------------------------------------- 
|SUB: free_slots_guild_bank - Count free slots in guild bank
|--------------------------------------------------------------------------------
Sub free_slots_guild_bank

    /varset  count_bank_slots ${Window[GuildBankWnd].Child[GBANK_BankCountLabel].Text.Arg[2,:]}

/return 

|-------------------------------------------------------------------------------- 
|SUB: Move_Deposited_Items - Move deposited items keystoke commands
|--------------------------------------------------------------------------------
Sub Move_Deposited_Items

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

/return 

|-------------------------------------------------------------------------------- 
|SUB: Set_All_Items - Reset bank item permissions
|--------------------------------------------------------------------------------
Sub Set_All_Items(int perm_num)

/target ${GuildTreasurer}
/delay 1s

/if (${Target.ID} && ${Target.CleanName.Equal[${GuildTreasurer}]}) {
    /call MoveInRange
    /delay 10
    /nomodkey /click right target
    /delay 5s ${Window[GuildBankWnd].Open}
    
    /echo Changing guild bank item permissions.

    /declare i int local

    /for i 1 to ${Window[GuildBankWnd].Child[ItemList].Items}

         /if ((${Window[GuildBankWnd].Child[ItemList].List[${i},4].NotEqual[Banker Only]}) && (${Window[GuildBankWnd].Child[ItemList].List[${i},4].NotEqual[Public If Usable]}) && (${Window[GuildBankWnd].Child[ItemList].List[${i},4].NotEqual[Public]})) {
             /echo Not resetting (${Window[GuildBankWnd].Child[ItemList].List[${i},2]}), permissions for user (${Window[GuildBankWnd].Child[ItemList].List[${i},4]}).
             /next i
         }
     
        /if (${Window[GuildBankWnd].Child[ItemList].List[${i},4].NotEqual[${perm_text}]}) {
            /notify GuildBankWnd GBANK_ItemList listselect ${i}
            /delay 2
            /notify GuildBankWnd GBANK_ItemList leftmouse ${i}
            /delay 2
            /nomodkey /notify GuildBankWnd GBANK_PermissionCombo listselect ${perm_num}
            /delay 2
            /nomodkey /notify GuildBankWnd GBANK_PermissionCombo leftmouse ${perm_num}
            /delay 7
        }
    
    /next i
}

/return 

|-------------------------------------------------------------------------------- 
|SUB: NabSpells - Remove all spells from guild bank
|--------------------------------------------------------------------------------
Sub NabSpells

/echo Removing spells from guild bank.

/target ${GuildTreasurer}
/delay 1s

/if (${Target.ID} && ${Target.CleanName.Equal[${GuildTreasurer}]}) {
    /call MoveInRange
    /delay 10
    /nomodkey /click right target
    /delay 5s ${Window[GuildBankWnd].Open}
    /varset GuildItems ${Window[GuildBankWnd].Child[ItemList].Items}    
    /echo Total of (${GuildItems}) items in Guild Bank.
    
    /declare i int local
    
    :GetSpells    
    /for i 1 to ${Window[GuildBankWnd].Child[ItemList].Items}

        /notify GuildBankWnd GBANK_ItemList listselect ${i}
        /delay 1
    
        /if (${Window[GuildBankWnd].Child[ItemList].List[${i},2].Find[Spell:]}) {
            
            /echo -- Attempting to nab (${Window[GuildBankWnd].Child[ItemList].List[${i},2]}).
            
            /notify GuildBankWnd GBANK_ItemList leftmouse ${i}
            /delay 15
            /nomodkey /shift /notify GuildBankWnd GBANK_WithdrawButton LeftMouseUp
            /delay 15
            
            :KeepItNowSpells         
            /if (${Cursor.ID}) {
                /autoinventory
                /goto :KeepItNowSpells
            }    
            
            /doevents
        }
        
    /next i
}    

/return 

|-------------------------------------------------------------------------------- 
|SUB: NabSongs - Remove all songs from guild bank
|--------------------------------------------------------------------------------
Sub NabSongs

/echo Removing songs from guild bank.

/target ${GuildTreasurer}
/delay 1s

/if (${Target.ID} && ${Target.CleanName.Equal[${GuildTreasurer}]}) {
    /call MoveInRange
    /delay 10
    /nomodkey /click right target
    /delay 5s ${Window[GuildBankWnd].Open}
    /varset GuildItems ${Window[GuildBankWnd].Child[ItemList].Items}    
    /echo Total of (${GuildItems}) items in Guild Bank..
    
    /declare i int local
    
    :GetSongs
    /for i 1 to ${Window[GuildBankWnd].Child[ItemList].Items}
        
        /notify GuildBankWnd GBANK_ItemList listselect ${i}
        /delay 1   
    
        /if (${Window[GuildBankWnd].Child[ItemList].List[${i},2].Find[Song:]}) {
            
            /echo -- Attempting to nab (${Window[GuildBankWnd].Child[ItemList].List[${i},2]}).
            
            /notify GuildBankWnd GBANK_ItemList leftmouse ${i}
            /delay 15
            /nomodkey /shift /notify GuildBankWnd GBANK_WithdrawButton LeftMouseUp
            /delay 15  
            
            :KeepItNowSongs         
            /if (${Cursor.ID}) {
                /autoinventory
                /goto :KeepItNowSongs
            }    
            
            /doevents
        }
        
    /next i
}    

/return 

|-------------------------------------------------------------------------------- 
|SUB: NabDefiant
|--------------------------------------------------------------------------------
Sub NabDefiant

/echo Removing ${DefiantItemType} from guild bank.

/target ${GuildTreasurer}
/delay 1s

/if (${Target.ID} && ${Target.CleanName.Equal[${GuildTreasurer}]}) {
    /call MoveInRange
    /delay 10
    /nomodkey /click right target
    /delay 5s ${Window[GuildBankWnd].Open}
    /varset GuildItems ${Window[GuildBankWnd].Child[ItemList].Items}    
    /echo Total of (${GuildItems}) items in Guild Bank.
    
    /declare i int local
        
    :GetDefiant    
    /for i 1 to ${Window[GuildBankWnd].Child[ItemList].Items}

        /notify GuildBankWnd GBANK_ItemList listselect ${i}
        /delay 1   
    
        /if (${Window[GuildBankWnd].Child[ItemList].List[${i},2].Find[${DefiantItemType}]}) {
    
            /echo -- Attempting to nab (${Window[GuildBankWnd].Child[ItemList].List[${i},2]}).
    
            /notify GuildBankWnd GBANK_ItemList leftmouse ${i}
            /delay 15
            /nomodkey /shift /notify GuildBankWnd GBANK_WithdrawButton LeftMouseUp
            /delay 15     
            
            :KeepItNowDefiant         
            /if (${Cursor.ID}) {
                /autoinventory
                /goto :KeepItNowDefiant
            }    
            
            /doevents
        }
    
    /next i   
}    

/return 

|-------------------------------------------------------------------------------- 
|SUB: MoveInRange
|-------------------------------------------------------------------------------- 
Sub MoveInRange 

    /if (${Target.ID}) /face nolook 
    /delay .5s

    :loopMoveInRange
    /if (${Target.ID}) {
        /face nolook        
        /if (${Target.Distance} > ${RangeDist}) /keypress forward hold 
        /if (${Target.Distance} <= ${RangeDist}) /keypress back        
        /if (${Target.Distance} <= ${RangeDist}) /return
        /delay 1        
        /goto :loopMoveInRange
    }

/return 

|-------------------------------------------------------------------------------- 
|SUB: BagsFull event.
|-------------------------------------------------------------------------------- 
Sub Event_BagsFull

   /echo *** Bags are full, time to cleanup ! ***
   /delay 3s
   /endmacro
   
/return
 
Last edited:
any way to add removal of the ornaments? and bank permissions still is not working for me I tried default ui , im sure it might be something I am doing wrong but still :)
 
Mroutlaw : modify

/varset DefiantItemType "Elegant Defiant"
/call NabDefiant

Add in the word for ornament and most likely it will work for you.

In regards to the bank permissions I had the same issue.

I modified it to :

Sub Set_All_Items(int perm_num)

/target ${GuildTreasurer}
/delay 1s

/if (${Target.ID} && ${Target.CleanName.Equal[${GuildTreasurer}]}) {
/call MoveInRange
/delay 10
/nomodkey /click right target
/delay 5s ${Window[GuildBankWnd].Open}

/echo Changing guild bank item permissions.

/declare i int local

/for i 1 to ${Window[GuildBankWnd].Child[ItemList].Items}


/if (${Window[GuildBankWnd].Child[ItemList].List[${i},4].NotEqual[${perm_text}]}) {
/notify GuildBankWnd GBANK_ItemList listselect ${i}
/delay 10
/notify GuildBankWnd GBANK_ItemList leftmouse ${i}
/delay 10
/nomodkey /notify GuildBankWnd GBANK_PermissionCombo listselect ${perm_num}
/delay 10
/nomodkey /notify GuildBankWnd GBANK_PermissionCombo leftmouse ${perm_num}
/delay 10
}

/next i
}

/return

(All I did was remove the if-then in there which was logic bombing it (as best I could tell...and I am lazy and just wanted everything set to public)

/if ((${Window[GuildBankWnd].Child[ItemList].List[${i},4].NotEqual[Banker Only]}) && (${Window[GuildBankWnd].Child[ItemList].List[${i},4].NotEqual[Public If Usable]}) && (${Window[GuildBankWnd].Child[ItemList].List[${i},4].NotEqual[Public]})) {
/echo Not resetting (${Window[GuildBankWnd].Child[ItemList].List[${i},2]}), permissions for user (${Window[GuildBankWnd].Child[ItemList].List[${i},4]}).
/next i
}

Is the line I removed out.
 
Thanks Maskoi and mroutlaw.
As much as I hate dealing with the guild banker, this macro really helps!!

I used it today to resupply my trader bot.
One thing I noticed..
If I have more than one item. say intricate defiant dagger

intricate defiant dagger
intricate defiant dagger

The mac would nab the first but skip the second. Seems it would select the second after nabbing the first and then it would jump to the next item quickly, skipping the second item.
If there were two, it would nab the first. If three, it would nab the first and last, 4 it would nab first and third. etc... Basically skipping every other one.

(Probably related to i being incremented while ${Window[GuildBankWnd].Child[ItemList].Items} being one less after nabbing an item. ie item 48 is now item 47 but i is already at 48 so skips 47)

I added this to make it check the cursor before moving to the next.

Rich (BB code):
Sub NabDefiant

/echo Removing ${DefiantItemType} from guild bank.

/target ${GuildTreasurer}
/delay 1s

/if (${Target.ID} && ${Target.CleanName.Equal[${GuildTreasurer}]}) {
    /call MoveInRange
    /delay 10
    /nomodkey /click right target
    /delay 5s ${Window[GuildBankWnd].Open}
    /varset GuildItems ${Window[GuildBankWnd].Child[ItemList].Items}    
    /echo Total of (${GuildItems}) items in Guild Bank.
    
    /declare i int local
        
    :GetDefiant    
    /for i 1 to ${Window[GuildBankWnd].Child[ItemList].Items}

:CheckAgain <<----- ADDED (REMOVE THIS TEXT BEFORE USING)

        /notify GuildBankWnd GBANK_ItemList listselect ${i}
        /delay 1   

        /if (${Window[GuildBankWnd].Child[ItemList].List[${i},2].Find[${DefiantItemType}]}) {
    
            /echo -- Attempting to nab (${Window[GuildBankWnd].Child[ItemList].List[${i},2]}).
    
            /notify GuildBankWnd GBANK_ItemList leftmouse ${i}
            /delay 15
            /nomodkey /shift /notify GuildBankWnd GBANK_WithdrawButton LeftMouseUp
            /delay 15     
            
            :KeepItNowDefiant         
            /if (${Cursor.ID}) {
                /autoinventory
                /goto :KeepItNowDefiant
            }    
            /doevents

/goto :CheckAgain  <<----- ADDED (REMOVE THIS TEXT BEFORE USING)

        }
    
    /next i   
}    

/return

A kludge I know but it nabs all of each item.

-Wolf
 
Couldn't find anything to go with what mroutlaw stated. But is there a way to withdrawl stacks of item's, and merge them to redeposit? I know this is a very old page, but new to the whole guild bank feature from starting a little guild w/ some friends.


.......................I guess I wasn't paying attention the the ingame settings haha....Sorry bring up something old haha
 
Last edited:
I'm trying to set all my items in the bank to public. Thats all I want to do, how do I set the /declares for that to work. This is what it looks like currently. I have tried to change the last one to 4 but seems to do nothing.

/declare move_items int outer 1
/declare remove_guild_spells int outer 0
/declare remove_guild_songs int outer 0
/declare remove_guild_defiant int outer 0
/declare set_all_items_use int outer 0
/declare set_all_items_to int outer 0
 
that should be


Rich (BB code):
/declare move_items int outer 0
/declare remove_guild_spells int outer 0
/declare remove_guild_songs int outer 0
/declare remove_guild_defiant int outer 0
/declare set_all_items_use int outer 1
/declare set_all_items_to int outer 4
 
Ill have to try that again, but I believe I had it like that but it still did not work.
 
yeah i am wondering if the mac broke awhile back. Anyone still have luck using? I get an error saying /next without matching /for
gbbot.mac@217(set_all_items(int_perm_num)):/next i...................and the mac ends
 
That fixed the macro breaking, but I receive a lot of "The guild merchant is busy and ignoring your request" spam. It only changed every fifth-or-so item to the status that I configured.

Would also be nice if I could run it on specific items such as defiant gear, or disable it on specific items, such as heroic forge armor drops.

It at least moves items to the main guild bank area with a bit of automation. ;)
 
Is anyone else having issues with this gbbot not changing permissions inside the guild bank?

Code:
Sub Main

|-------------------------------------------------------------------
| - Declare your variables:
|   
| - (move_items) move deposited items to guild bank   
|   0=off 1=on
|   
| - (set_all_items_use) reset all items use           
|   0=off    1=on
|   
| - (set_all_items_to) reset all items to             
|   1=Banker Only, 3=Public If Usable, 4=Public
|-------------------------------------------------------------------

   /declare move_items             int outer 1
   /declare remove_guild_spells    int outer 0
   /declare remove_guild_songs     int outer 0
   /declare remove_guild_defiant   int outer 0
   /declare set_all_items_use      int outer 0
   /declare set_all_items_to       int outer 4
 
Is anyone else having issues with this gbbot not changing permissions inside the guild bank?

Code:
Sub Main

|-------------------------------------------------------------------
| - Declare your variables:
|  
| - (move_items) move deposited items to guild bank  
|   0=off 1=on
|  
| - (set_all_items_use) reset all items use          
|   0=off    1=on
|  
| - (set_all_items_to) reset all items to            
|   1=Banker Only, 3=Public If Usable, 4=Public
|-------------------------------------------------------------------

   /declare move_items             int outer 1
   /declare remove_guild_spells    int outer 0
   /declare remove_guild_songs     int outer 0
   /declare remove_guild_defiant   int outer 0
   /declare set_all_items_use      int outer 0
   /declare set_all_items_to       int outer 4
/declare set_all_items_use int outer 0
to
/declare set_all_items_use int outer 1

also I changed all instances of Banker Only to View Only

and added some more delay for lag.

/if (${Window[GuildBankWnd].Child[ItemList].List[${i},4].NotEqual[${perm_text}]}) {
/notify GuildBankWnd GBANK_ItemList listselect ${i}
/delay 5
/notify GuildBankWnd GBANK_ItemList leftmouse ${i}
/delay 5
/nomodkey /notify GuildBankWnd GBANK_PermissionCombo listselect ${perm_num}
/delay 5
/nomodkey /notify GuildBankWnd GBANK_PermissionCombo leftmouse ${perm_num}
/delay 30
}

Also changed the banker name to a guild banker / to use my banker in my housing guild.

Works like a champ. :)
 

Attachments

Release Guild Bank Bot - gbbot.mac

Users who are viewing this thread

Back
Top
Cart