• IS THIS SITE UGLY? Click "RG3" at the very bottom-left of this page to change it. To dismiss this notice, click the X --->
Guild Bank Bot - gbbot.mac

Utility Guild Bank Bot - gbbot.mac 2.0

Download now: Join us with Level 2 access
or earn your way in with RedCents.
Other Authors
Bartab, dkaa, TreeHuginDruid73,
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
Server Type
Live, Emu, TLP, Test Server
Author
Maskoi
Downloads
9
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Maskoi

Top