My banking macro

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

My banking macro

Post by Draekz » Tue Mar 02, 2004 9:42 am

Ok here's the plan, I have a macro that should convert all your money to its highest form and then proceed to put all money in the bank..all plat goes to the shared bank plat slot..the rest (gp,sp,cp) go to their respective slots in your bank.

Anyway, seems to freeze and i cant figure out where i'm missing a delay!

In order to run this, you just need to be within clicking distance of ANY banker and it'll work.

Any help would be great thanks :P just going crossed eyed trying to look through my code for a missing delay..

Anyway here it is:

Code: Select all

| -- Bank.mac
| -- Written by Draekz
| -- Date: 02/03/04
|
| -- To run this macro, just be near a banker close enough to target and run it.
| -- It should target and open bank, convert all money to its highest form and
| -- then move all your plat to your shared bank slot and the rest of the change
| -- to the current characters bank.

#turbo

Sub Main

/target banker
/click right target
/delay 1s
| -- In Solaria MQ2 UI this clicks on the CHANGE button in your BANK WINDOW **MUST EDIT LOC TO
| -- MATCH YOUR CHANGE BUTTON LOC in BANK WINDOW .. Use /mousepos for your LOC
/click left 70 407
/delay 1

/if $char(plat,bank)!="0" {
/mouseto bank plat
/sendkey down shift
/click left
/sendkey up shift
/delay 1
/goto :Plat
}else 
/goto :Plat
/delay 1
/return
| -- This clicks on your PLAT in your INVENTORY WINDOW 

:Plat
/if $char(plat)=="0" /goto :Gold
/mouseto plat
/sendkey down shift
/click left
/sendkey up shift
/delay 1

| --  This clicks on your shared PLAT bank slot.

/mouseto bank shared
/click left
/delay 1

| -- Puts Gold in Bank
:Gold
/if $char(gold)=="0" /goto :silver
/mouseto gold
/sendkey down shift
/click left
/sendkey up shift
/mouseto bank gold
/click left
/delay 1

| -- Puts Silver in Bank
:Silver
/if $char(silver)=="0" /goto :Copper
/mouseto silver
/sendkey down shift
/click left
/sendkey up shift
/mouseto bank silver
/click left
/delay 1

| -- Puts Copper in Bank
:Copper
/if $char(copper)=="0" /goto :Done
/mouseto copper
/sendkey down shift
/click left
/sendkey up shift
/mouseto bank copper
/click left
/delay 1

:Done
/click left 70 407
/delay 1

/if $char(plat,bank)!="0" {
/mouseto bank plat
/sendkey down shift
/click left
/sendkey up shift
/delay 1
/mouseto bank shared
/click left
}else 
/delay 1
/cleanup

/return

Probably very hashed together but im not a l33t macro maker and i just found this idea to be useful while working on a pathing macro of mine.(basically took the banking sub outta another one and modified it a bit).

well! Take care, hope someone can figure out whats going on! ATM it just crashes me to server select..not sure why!

Thanks

Draekz

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Tue Mar 02, 2004 10:02 am

Found an Else with two commands following it that didn't have brackets around them.

Also removed the first /return since the second one had no sub accociated with it that would most likely cause trouble.

Code: Select all

| -- Bank.mac 
| -- Written by Draekz 
| -- Date: 02/03/04 
| 
| -- To run this macro, just be near a banker close enough to target and run it. 
| -- It should target and open bank, convert all money to its highest form and 
| -- then move all your plat to your shared bank slot and the rest of the change 
| -- to the current characters bank. 

#turbo 

Sub Main 

/target banker 
/click right target 
/delay 1s 
| -- In Solaria MQ2 UI this clicks on the CHANGE button in your BANK WINDOW **MUST EDIT LOC TO 
| -- MATCH YOUR CHANGE BUTTON LOC in BANK WINDOW .. Use /mousepos for your LOC 
/click left 70 407 
/delay 1 

/if $char(plat,bank)!="0" { 
/mouseto bank plat 
/sendkey down shift 
/click left 
/sendkey up shift 
/delay 1 
/mouseto bank shared 
/click left 
} else {
/goto :Plat }

| -- This clicks on your PLAT in your INVENTORY WINDOW 

:Plat 
/if $char(plat)=="0" /goto :Gold 
/mouseto plat 
/sendkey down shift 
/click left 
/sendkey up shift 
/delay 1 

| --  This clicks on your shared PLAT bank slot. 

/mouseto bank shared 
/click left 
/delay 1 

| -- Puts Gold in Bank 
:Gold 
/if $char(gold)=="0" /goto :silver 
/mouseto gold 
/sendkey down shift 
/click left 
/sendkey up shift 
/mouseto bank gold 
/click left 
/delay 1 

| -- Puts Silver in Bank 
:Silver 
/if $char(silver)=="0" /goto :Copper 
/mouseto silver 
/sendkey down shift 
/click left 
/sendkey up shift 
/mouseto bank silver 
/click left 
/delay 1 

| -- Puts Copper in Bank 
:Copper 
/if $char(copper)=="0" /goto :Done 
/mouseto copper 
/sendkey down shift 
/click left 
/sendkey up shift 
/mouseto bank copper 
/click left 
/delay 1 

:Done 
/click left 70 407 
/delay 2
/cleanup } 

/return