Open/Close ALL packs

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

Catt
a lesser mummy
a lesser mummy
Posts: 76
Joined: Mon Sep 16, 2002 2:49 am

Open/Close ALL packs

Post by Catt » Thu Jan 08, 2004 7:21 am

This script will open or close all of your packs, inventory and/or bank. It's just a little time/click saver.

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