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
/returnCode: 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

