Code: Select all
| Banking Macro - Originally Written by GD
| Modified by Amadeus (Withdrawl function)
|
| Will deposit all coins and then convert it to the highest denomination.
| If an argument is given, it will withdrawl that many pp after the deposit.
|
| This macro uses two techniques for withdrawing money. The first technique
| is faster, but will only work for withdrawls of less than 2001pp. The second
| method will take a bit more time, but will work for withdrawls of more than 2000pp.
|
|
| NOTES
| * You MUST open your bank before running this macro!
| * Altering this macro to use method 1 for withdrawls of more than
| 2000pp is HIGHLY inadvisable. You will spam yourself offline.
| * /endmacro should work perfectly if you get tired of waiting....
|
| Syntax: /macro Bank.mac (Will deposit all your money in the bank)
| /macro Bank.mac 200 (Will deposit all your money, and then withdraw
| 200pp)
| /macro Bank.mac 200 nd (Will withdraw 200pp without depositing money)
|
#turbo
#define Amount v50
Sub Main
/varcalc Amount $char(plat)+$char(gold)/10+$char(silver)/100+$char(copper)/1000
/varcalc v1 $p0
/varcalc v2 $p0-1
/varcalc v3 $char(plat,bank) - $p0
/sendkey down shift
/if $p1~~"nd" /goto :Withdrawl
:Plat
/if n $char(plat)==0 /goto :Gold
/click left plat
/click left bank plat
:Gold
/if n $char(gold)==0 /goto :Silver
/click left gold
/click left bank gold
:Silver
/if n $char(silver)==0 /goto :Copper
/click left silver
/click left bank silver
:Copper
/if n $char(copper)==0 /goto :ConvertCP
/click left copper
/click left bank copper
:ConvertCP
/if n $char(copper,bank)==0 /goto :ConvertSP
/click left bank copper
/click left bank silver
/click left bank copper
:ConvertSP
/if n $char(silver,bank)==0 /goto :ConvertGP
/click left bank silver
/click left bank gold
/click left bank silver
:ConvertGP
/if n $char(gold,bank)==0 /goto :Done
/click left bank gold
/click left bank plat
/click left bank gold
:Withdrawl
/if $v2==-1.00 /goto :Done
/for v5 0 to $v2
/if $v5==2001 {
/goto :Withdrawl2
}
/next v5
|| Method 1 -- for withdrawls of 1-2000pp
/sendkey down ctrl
/for v6 0 to $v2
/click left bank plat
/click left auto
/next v6
/sendkey up ctrl
/goto :Done
:Withdrawl2
/sendkey up shift
|| Method 2 -- for withdrawls of more than 2000pp
/echo Performing Withdrawl. This may take some time.
/mouseto bank plat
/click left
/mouseto + 23 +45
/delay 20
/for v4 1 to $v3
/delay 0
/click left
/next v4
/mouseto + 66 -22
/delay 20
/click left
/delay 5
/click left auto
:Done
/sendkey up shift
/if $p1~~"nd" {
/echo Withdrawn: $v1pp
} else /if $v2==-1.00 {
/echo Deposited: $Amountpp
} else {
/echo Deposited: $Amountpp ++ Withdrawn: $v6pp
}
/return



