Bank Balance Tracker (script): Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
}}
}}


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).<br>
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).<br>
<br>
<br>
When you run the script, it will display the (non-zero) balance of every bank that you have used since you installed the triggers.<br>
When you run the script, it will display the (non-zero) balance of every [[Currency|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).<br>
<br>
<br>
The triggers update your bank balance every time you deposit, withdraw, or check your balance. It will create separate bank balance variables for each character that you use.
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.<br>
<br>
'''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 [[RanikMap34a|Rossman's Landing]], your [[RanikMap30|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.

==Changelog==

'''10/19/2011'''
*Added support for currency totals and net worth

==Sample Output==

<pre>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)</pre>


==Required Genie Settings==
==Required Genie Settings==
Line 17: Line 51:
You must install the following triggers:
You must install the following triggers:


<pre>#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}
<pre>#trigger {(\d+) platinum} {#var platinum $1}
#trigger {(\d+) platinum} {#var platinum $1}
#trigger {(\d+) gold} {#var gold $1}
#trigger {(\d+) gold} {#var gold $1}
#trigger {(\d+) silver} {#var silver $1}
#trigger {(\d+) silver} {#var silver $1}
#trigger {(\d+) bronze} {#var bronze $1}
#trigger {(\d+) bronze} {#var bronze $1}
#trigger {(\d+) copper} {#var copper $1}
#trigger {(\d+) copper} {#var copper $1}
#trigger {Kronars\.\"$} {#var map.$zoneid.bank $platinum$gold$silver$bronze$copper Kronars;#var platinum 0;#var gold 0;#var silver 0;#var bronze 0;#var copper 0;#var save}
#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 {Lirums\.\"$} {#var map.$zoneid.bank $platinum$gold$silver$bronze$copper Lirums;#var platinum 0;#var gold 0;#var silver 0;#var bronze 0;#var copper 0;#var save}
#trigger {Dokoras\.\"$} {#var map.$zoneid.bank $platinum$gold$silver$bronze$copper Dokoras;#var platinum 0;#var gold 0;#var silver 0;#var bronze 0;#var copper 0;#var save}
#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 {^You .+ worth .+ dokoras} {#var currency Dokoras}
#trigger {^You .+ worth .+ kronars} {#var currency Kronars}
#trigger {^You .+ worth .+ kronars} {#var currency Kronars}
#trigger {^You .+ worth .+ lirums} {#var currency Lirums}
#trigger {^You .+ worth .+ lirums} {#var currency Lirums}
#trigger {^You .+ worth .+ dokoras} {#var currency Dokoras}
#trigger {(\d+) copper Kronars\)\.$} {#var Kronars $1}
#trigger {(\d+) copper Kronars\)\.$} {#var Kronars $1}
#trigger {(\d+) copper Lirums\)\.$} {#var Lirums $1}
#trigger {(\d+) copper Lirums\)\.$} {#var Lirums $1}
Line 40: Line 72:
You must be using the [http://www.genieclient.com/bulletin/topic/3592-how-to-use-the-genie-map-repository/ official Genie map bundle]. (This is how the triggers know which bank balance to update.)
You must be using the [http://www.genieclient.com/bulletin/topic/3592-how-to-use-the-genie-map-repository/ official Genie map bundle]. (This is how the triggers know which bank balance to update.)


==Script==
==Setup Script==

<pre>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</pre>

==Balance Display Script==

<pre>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)


<pre>echo
echo
echo Account Balances:
if $map.1.bank > 0 then echo The Crossing: $map.1.bank
echo
if $map.13.bank > 0 then echo Dirge: $map.13.bank
if $map.61.bank > 0 then echo Leth Deriel: $map.61.bank
if $map.1.bank > 0 then echo Crossing: $map.1.bank Kronars (%pmap.1.bank plats)
if $map.112.bank > 0 then echo Ilaya Taipa: $map.112.bank
if $map.13.bank > 0 then echo Dirge: $map.13.bank Kronars (%pmap.13.bank plats)
if $map.30.bank > 0 then echo Riverhaven: $map.30.bank
if $map.61.bank > 0 then echo Leth Deriel: $map.61.bank Kronars (%pmap.61.bank plats)
if $map.35.bank > 0 then echo Throne City: $map.35.bank
if $map.30.bank > 0 then echo Riverhaven: $map.30.bank Lirums (%pmap.30.bank plats)
if $map.34a.bank > 0 then echo Rossman's Landing: $map.34a.bank
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
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
if $map.47.bank > 0 then echo Muspar'i: $map.47.bank Lirums (%pmap.47.bank plats)
if $map.67.bank > 0 then echo Shard: $map.67.bank
if $map.66.bank > 0 then echo Chyolvea Tayeu'a: $map.66.bank Dokoras (%pmap.66.bank plats)
if $map.66.bank > 0 then echo Chyolvea Tayeu'a: $map.66.bank
if $map.67.bank > 0 then echo Shard: $map.67.bank Dokoras (%pmap.67.bank plats)
if $map.123.bank > 0 then echo Raven's Point: $map.123.bank
if $map.90.bank > 0 then echo Ratha: $map.90.bank Lirums (%pmap.90.bank plats)
if $map.116.bank > 0 then echo Hibarnhvidar: $map.116.bank
if $map.99.bank > 0 then echo Aesry Surlaenis'a: $map.99.bank Lirums (%pmap.99.bank plats)
if $map.114.bank > 0 then echo Ain Ghazal: $map.114.bank
if $map.106.bank > 0 then echo Hara'jaal: $map.106.bank Lirums (%pmap.106.bank plats)
if $map.127.bank > 0 then echo Boar Clan: $map.127.bank
if $map.107.bank > 0 then echo Mer'Kresh: $map.107.bank Lirums (%pmap.107.bank plats)
if $map.90.bank > 0 then echo Ratha: $map.90.bank
if $map.116.bank > 0 then echo Hibarnhvidar: $map.116.bank Dokoras (%pmap.116.bank plats)
echo
if $map.99.bank > 0 then echo Aesry Surlaenis'a: $map.99.bank
echo $charactername's Net Worth:
if $map.107.bank > 0 then echo Mer'Kresh: $map.107.bank
echo
if $map.106.bank > 0 then echo Hara'jaal: $map.106.bank
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
echo

Revision as of 11:53, 19 October 2011

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

  1. Install the required Genie settings and scripts (see below).
  2. 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.)
  3. 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.

Changelog

10/19/2011

  • Added support for currency totals and net worth

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 {^You .+ worth .+ kronars} {#var currency Kronars}
#trigger {^You .+ worth .+ lirums} {#var currency Lirums}
#trigger {^You .+ worth .+ dokoras} {#var currency Dokoras}
#trigger {(\d+) copper Kronars\)\.$} {#var Kronars $1}
#trigger {(\d+) copper Lirums\)\.$} {#var Lirums $1}
#trigger {(\d+) copper Dokoras\)\.$} {#var Dokoras $1}
#trigger {^\s+No Kronars\.$} {#var Kronars 0}
#trigger {^\s+No Lirums\.$} {#var Lirums 0}
#trigger {^\s+No Dokoras\.$$} {#var Dokoras 0}

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

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