Move Shared Bank to Inventory - dump.mac

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

BrainDeath
a ghoul
a ghoul
Posts: 86
Joined: Sun Mar 07, 2004 5:00 pm

Move Shared Bank to Inventory - dump.mac

Post by BrainDeath » Mon Jan 24, 2005 1:14 pm

This is a small macro I use to dump the contents of my shared bank into my inventory. I use it mainly to move tradeskilled items onto my bazaar trader.

The bank window must be open before you run it.

Uses my common.inc which I included below.

dump.mac

Code: Select all

| dump.mac - dumps shared bank to inventory

#turbo
#include common.inc


Sub Main
   /declare container int local
   /declare slot int local
   /if (!${Window[BigBankWnd].Open}) /call EndMacro "You must open the bank window before running this macro."
   /for container 1 to 2
      /if (${InvSlot[sharedbank${container}].Item.Container}) {
         /if (!${Window[sharedbank${container}].Open}) {
            /itemnotify sharedbank${container} rightmouseup
            /delay 5
         }
         /for slot 1 to ${InvSlot[sharedbank${container}].Item.Container}
             /if (${Me.FreeInventory}>0) {
               /if (${InvSlot[sharedbank${container}].Item.Item[${slot}].ID}) {
                  /shiftkey /itemnotify in sharedbank${container} ${slot} leftmouseup
                  /call WaitForPickup
                  /call ClearCursor
               }
            } else {
               /call EndMacro "Your inventory is full."
            }
         /next slot
      }
   /next container
/return
common.inc

Code: Select all

| common.inc Common Subroutines
| Converted 4/30/2004
| Last Update: 12/6/2004

| Wait for cursor to contain something.
Sub WaitForPickup 
:waiting
   /delay 1 
   /if (!${Cursor.ID}) /goto :waiting
/return 

|Wait for cursor to become empty.
Sub WaitForDrop 
:waiting 
   /delay 1
   /if (${Cursor.ID}) /goto :waiting
/return 

| Send everything on cursor to inventory.
Sub ClearCursor 
:Loop 
   /if (${Cursor.ID}) { 
      /autoinv
      /delay 5
   } 
   /if (${Cursor.ID}) /goto :Loop 
/return 

|Pause while self is targeted.
Sub Pause 
   /if (!${String[${Target}].Equal[${Me}]}) /return
   /echo Pausing!! To resume, type /target clear or target something else. 
   :HoldingPattern 
      /delay 20 
      /if (${String[${Target}].Equal[${Me}]}) /goto :HoldingPattern 
/return 

| Error reporting. 
Sub EndMacro(Error) 
   /echo ${Error}
   /echo An error has occured.. ending macro. 
   /beep
   /endmacro 
/return 

Sub OpenDoor(string Dir)
	/declare Angle int local
	/if (${Dir.Equal[NORTH]}) {
		/varset Angle 0
	} else /If (${Dir.Equal[WEST]}) {
		/varset Angle 90
	} else /If (${Dir.Equal[SOUTH]}) {
		/varset Angle 180
	} else /If (${Dir.Equal[EAST]}) {
		/varset Angle 270
	} else {
		/echo Error in OpenDoor - invalid parameter
      /beep
      /endmacro
   }
   /face Heading ${Angle}
   /delay 10
   /keypress USE
   /delay 10
/return

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Mon Jan 24, 2005 1:39 pm

This is snippets, not MacroDepot(3) where it really belongs.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

BrainDeath
a ghoul
a ghoul
Posts: 86
Joined: Sun Mar 07, 2004 5:00 pm

Post by BrainDeath » Tue Jan 25, 2005 3:27 pm

Now that I think about it, you're absolutely right. Perhaps a mod can move it?

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 7:03 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 7:04 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 7:05 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 7:42 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 7:43 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 7:44 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 7:45 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 8:23 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 8:24 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 8:26 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 8:27 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Move Shared Bank to Inventory - dump.mac

Post by xyilla » Sat Mar 29, 2025 8:28 pm