Bank Balance Tracker (script)
Bank Balance Tracker (script) | |
---|---|
Category | information |
Front-end | Genie |
Author | Isharon and Celeres |
This script displays your bank balances, which are tracked by trigger. This is useful for people who don't have Premium accounts (and therefore don't have access to bank books).
When you run the script, it will display the (non-zero) balance of every bank that you have used since you installed the triggers. It will also display your totals for each currency and your adjusted net worth in Kronars (how much money you would have if you exchanged your Lirums and Dokoras for Kronars, not including exchange fees).
The triggers update your bank balance every time you deposit, withdraw, or check your balance. They will create separate bank balance variables for each character that you use.
Note: This system does not currently support tie-in banks. If you deposit at a bank that ties into another bank, your account balance at the primary bank will not be updated until you check your balance at that bank. (For example, if you deposit money at Rossman's Landing, your Riverhaven account balance will not be updated until you check your balance at the bank in Riverhaven.)
Instructions
- Install the required Genie settings and scripts (see below).
- Run the Setup Script once per character. This will set your bank balances to 0. (If you don't do this, the Balance Display Script won't be able to compute your currency totals.)
- Your balances will automatically update any time you deposit, withdraw, or check your balance. You can review your balances any time by running the Balance Display Script.
Note: If you were using a previous version, you should remove all of those triggers and install these. You will also need to reset your bank balance variables by running the Setup Script once per character. (The current version doesn't include the currency name in the variables, which makes it easier to use Genie's math functions.)
Changelog
7/7/2014
- Added additional teller messaging for checking your balance
8/6/2013
- If you are at a teller when you run this script, it will now check your balance before updating your bank balance variables.
10/19/2011
- Added support for currency totals and net worth
- Added conversion to plats (for easier reading)
- Note: If you were using a previous version, you should remove all of those triggers and install these. You will also need to reset your bank balance variables by running the Setup Script once per character. (The current version doesn't include the currency name in the variables, which makes it easier to use Genie's math functions.)
Sample Output
Account Balances: Crossing: 7573630 Kronars (757.4 plats) Dirge: 204302 Kronars (20.4 plats) Leth Deriel: 229263 Kronars (22.9 plats) Riverhaven: 644447 Lirums (64.4 plats) Therenborough: 2363299 Lirums (236.3 plats) Muspar'i: 320793 Lirums (32.1 plats) Shard: 3471430 Dokoras (347.1 plats) Hibarnhvidar: 1061380 Dokoras (106.1 plats) Character's Net Worth: Kronars: 8007195 (800.7 plats) Lirums: 3328539 (332.9 plats) Dokoras: 4532810 (453.3 plats) Adjusted Net Worth: 18445811 Kronars (1844.6 plats)
Required Genie Settings
Triggers
You must install the following triggers:
#trigger {^The clerk counts out .+ and hands them over, making a notation|^The clerk slides a small metal box across the counter|^You don't have any .+ to deposit} {#send balance} #trigger {(\d+) platinum} {#var platinum $1} #trigger {(\d+) gold} {#var gold $1} #trigger {(\d+) silver} {#var silver $1} #trigger {(\d+) bronze} {#var bronze $1} #trigger {(\d+) copper} {#var copper $1} #trigger {(Kronars|Lirums|Dokoras)\.\"$} {#var map.$zoneid.bank $platinum$gold$silver$bronze$copper;#var platinum 0;#var gold 0;#var silver 0;#var bronze 0;#var copper 0;#var save} #trigger {^The clerk flips through (his|her) ledger then says, \"\w+, you do not seem to have an account with us\.} {#var map.$zoneid.bank 0;#var platinum 0;#var gold 0;#var silver 0;#var bronze 0;#var copper 0;#var save}
Maps
You must be using the official Genie map bundle. (This is how the triggers know which bank balance to update.)
Setup Script
put #var map.1.bank 0 put #var map.13.bank 0 put #var map.61.bank 0 put #var map.30.bank 0 put #var map.35.bank 0 put #var map.42.bank 0 put #var map.47.bank 0 put #var map.66.bank 0 put #var map.67.bank 0 put #var map.90.bank 0 put #var map.99.bank 0 put #var map.106.bank 0 put #var map.107.bank 0 put #var map.116.bank 0 echo echo Bank balances set to zero! The bank triggers and script will update your bank balances from now on. echo
Balance Display Script
send balance waitforre ^The clerk pages through|^The clerk flips through|^You are send balance waitforre ^The clerk pages through|^The clerk flips through|^You are evalmath TotalKronars $map.1.bank + $map.13.bank + $map.61.bank put #var TotalKronars %TotalKronars evalmath TotalLirums $map.30.bank + $map.35.bank + $map.42.bank + $map.47.bank + $map.90.bank + $map.99.bank + $map.106.bank + $map.107.bank put #var TotalLirums %TotalLirums evalmath TotalDokoras $map.66.bank + $map.67.bank + $map.116.bank put #var TotalDokoras %TotalDokoras evalmath LirKro round(%TotalLirums * 1.25) evalmath DokKro round(%TotalDokoras * 1.385) evalmath NetWorth $TotalKronars + %LirKro + %DokKro put #var NetWorth %NetWorth evalmath pmap.1.bank round(($map.1.bank/10000),1) evalmath pmap.13.bank round(($map.13.bank/10000),1) evalmath pmap.61.bank round(($map.61.bank/10000),1) evalmath pmap.30.bank round(($map.30.bank/10000),1) evalmath pmap.35.bank round(($map.35.bank/10000),1) evalmath pmap.42.bank round(($map.42.bank/10000),1) evalmath pmap.47.bank round(($map.47.bank/10000),1) evalmath pmap.66.bank round(($map.66.bank/10000),1) evalmath pmap.67.bank round(($map.67.bank/10000),1) evalmath pmap.90.bank round(($map.90.bank/10000),1) evalmath pmap.99.bank round(($map.99.bank/10000),1) evalmath pmap.106.bank round(($map.106.bank/10000),1) evalmath pmap.107.bank round(($map.107.bank/10000),1) evalmath pmap.116.bank round(($map.116.bank/10000),1) evalmath PKronars round(($TotalKronars/10000),1) evalmath PLirums round(($TotalLirums/10000),1) evalmath PDokoras round(($TotalDokoras/10000),1) evalmath PNet round(($NetWorth/10000),1) echo echo Account Balances: echo if $map.1.bank > 0 then echo Crossing: $map.1.bank Kronars (%pmap.1.bank plats) if $map.13.bank > 0 then echo Dirge: $map.13.bank Kronars (%pmap.13.bank plats) if $map.61.bank > 0 then echo Leth Deriel: $map.61.bank Kronars (%pmap.61.bank plats) if $map.30.bank > 0 then echo Riverhaven: $map.30.bank Lirums (%pmap.30.bank plats) if $map.35.bank > 0 then echo Throne City: $map.35.bank Lirums (%pmap.35.bank plats) if $map.42.bank > 0 then echo Therenborough: $map.42.bank Lirums (%pmap.42.bank plats) if $map.47.bank > 0 then echo Muspar'i: $map.47.bank Lirums (%pmap.47.bank plats) if $map.66.bank > 0 then echo Chyolvea Tayeu'a: $map.66.bank Dokoras (%pmap.66.bank plats) if $map.67.bank > 0 then echo Shard: $map.67.bank Dokoras (%pmap.67.bank plats) if $map.90.bank > 0 then echo Ratha: $map.90.bank Lirums (%pmap.90.bank plats) if $map.99.bank > 0 then echo Aesry Surlaenis'a: $map.99.bank Lirums (%pmap.99.bank plats) if $map.106.bank > 0 then echo Hara'jaal: $map.106.bank Lirums (%pmap.106.bank plats) if $map.107.bank > 0 then echo Mer'Kresh: $map.107.bank Lirums (%pmap.107.bank plats) if $map.116.bank > 0 then echo Hibarnhvidar: $map.116.bank Dokoras (%pmap.116.bank plats) echo echo $charactername's Net Worth: echo if $TotalKronars > 0 then echo Kronars: $TotalKronars (%PKronars plats) if $TotalLirums > 0 then echo Lirums: $TotalLirums (%PLirums plats) if $TotalDokoras > 0 then echo Dokoras: $TotalDokoras (%PDokoras plats) echo echo Adjusted Net Worth: $NetWorth Kronars (%PNet plats) echo echo send wealth waitforre ^Wealth:$ put #var save