If you have inventory panel open, it'll open/close all bags in it.
If you have bank open it'll open/close all bank packs.
Code: Select all
| HandlePacks.mac
| By Catt
| Works best as an alias like:
| alias /op /macro HandlePacks open
| alias /cp /macro HandlePacks close
| Note, if you do NOT have LoY (Big Bank) you may want
| to change the 15 to 7 in bank sections.
|
Sub Main
/declare InvSlot local
/varset InvSlot 0
/if "@Param0"=="open" /goto :Open
/if "@Param0"=="close" /goto :Close
/goto :Syntax
:Open
|###### Main Inventory
/if $invpanel=="TRUE" {
/for InvSlot 0 to 7
/if "$pack(@InvSlot)"=="TRUE" /if "$pack(@InvSlot,open)"=="FALSE" /click right inv @InvSlot
/next InvSlot
}
|###### Bank Inventory
/if $banker(open)=="TRUE" {
/for InvSlot 0 to 15
/if "$pack(bank,@InvSlot)"=="TRUE" /if "$pack(bank,@InvSlot,open)"=="FALSE" /click right bank inv @InvSlot
/next InvSlot
}
/goto :End
:Close
|###### Main Inventory
/if $invpanel=="TRUE" {
/for InvSlot 0 to 7
/if "$pack(@InvSlot)"=="TRUE" /if "$pack(@InvSlot,open)"=="TRUE" /click right inv @InvSlot
/next InvSlot
}
|###### Bank Inventory
/if $banker(open)=="TRUE" {
/for InvSlot 0 to 15
/if "$pack(bank,@InvSlot)"=="TRUE" /if "$pack(bank,@InvSlot,open)"=="TRUE" /click right bank inv @InvSlot
/next InvSlot
}
/goto :End
:Syntax
/echo Syntax: /macro HandlePacks <open|close>
/endmacro
:End
/return
