Features
Bank
The Bank app: balance, deposit and withdraw in towns, transfers, savings and shared accounts, the job account, money requests, branches, and Config.Bank.
Bank (bank) shows the character's real balance at the bank the server uses and moves money in and out. It connects to the bank through FXBank in framework/frameworks.lua. Settings are in apps/bank/config.lua (Config.Bank). All amounts in this file are cents: 100 is one dollar.
#What the player can do
- See the balance of the main account and the recent transactions, and open the account ledger with a page per transaction.
- Deposit cash from the pocket and withdraw cash. With
CashInTown.Enabled = truethis works only inside a town; the server checks the player's real position. - Transfer money to an account number, a telegraph address or a character id (off by default,
Transfer.Enabled). The recipient's name is shown before sending whenShowNames = true. - Open savings and shared accounts, name and colour them, add members (as member or viewer), change roles, remove members, leave or close an account, and move money between their accounts.
- See the job account of their company when their rank may see the company till. Depositing to it is open to members; withdrawing needs the boss rank and a reason.
- Send money requests to other players, pay or decline the ones they get, and cancel their own.
- Find the nearest branch with its opening hours and draw a route to it.
- Use their telegraph contacts as the bank's address book.
Every money move is written to a journal. A request that is sent twice is done once. When the result of a bank call is unclear, the operation is held for an administrator and the player cannot start a new bank operation until it is resolved.
#What it needs
| Need | Notes |
|---|---|
| Signal | Deposit, withdraw and transfer need send signal while RequireSignal = true |
| Being in a town | Deposit and withdraw, while CashInTown.Enabled = true |
| A bank | Mode = 'auto' uses vorp_banking on VORP, rsg-banking on RSG, otherwise the pocketbook's own bank (internal) |
#Settings
| Key | Default | What it does |
|---|---|---|
Enabled |
true |
Turns the app on |
Mode |
'auto' |
auto, vorp, rsg, internal or custom |
RequireSignal |
true |
Deposit, withdraw and transfer need a signal |
CashInTown.Enabled |
true |
Deposit and withdraw only inside a town. false: anywhere |
CashInTown.Radius |
220 |
Metres around a town centre, unless the town has its own radius |
CashInTown.Towns |
nine towns | Valentine, Rhodes, Saint Denis (480 m), Blackwater (260 m), Armadillo, Strawberry, Annesburg, Van Horn, Tumbleweed |
MaxAmount |
10000000 |
Largest amount of one operation ($100,000) |
HistoryLimit |
20 |
Recent transactions on the account card |
Transfer.Enabled |
false |
Transfers from the book |
Transfer.MaxNote |
80 |
Note length |
Transfer.Limit |
nil |
Largest transfer in cents. nil uses MaxAmount |
LedgerLimit |
100 |
Rows shown on the account ledger page |
ShowNames |
true |
Show the recipient's name. false shows "hidden account" |
Accounts.Enabled |
true |
Savings and shared accounts |
Accounts.MaxOwn |
3 |
Extra accounts one character can open |
Accounts.MaxMembers |
5 |
People in a shared account, owner included |
Accounts.MaxName |
30 |
Account name length |
Accounts.Job |
true |
Show the job account card to those allowed to see the company till |
Requests.Enabled |
true |
Money requests |
Requests.MaxOpen |
5 |
Waiting requests per character |
Requests.MaxNote |
80 |
Note length |
Requests.Cooldown |
10 |
Seconds between two requests |
Branches |
five branches | Town, coordinates and opening hours. An empty table hides the branch button |
Internal.Name |
'Defter Bankasi' |
Bank name in internal mode |
Vorp.Branch |
'Valentine' |
The vorp_banking branch the book uses (each branch is a separate account) |
Vorp.Label |
nil |
Bank name shown. Empty: <Branch> Bankasi |
Vorp.CreateAccount |
true |
Open the vorp_banking account on the first deposit when there is none |
Rsg.Branch |
'home' |
rsg-banking 3.x: 'home' is the player's chosen home branch, or a fixed branch name |
Rsg.Labels |
five labels | Names shown for rsg-banking branches |
The town and branch coordinates are town centres and bank buildings of the base map. Correct them for your map.
#Another bank script
Set Mode = 'custom' and fill in the custom adapter of FXBank in framework/frameworks.lua. Every adapter has the same functions: Available, Label, HasAccount, OpenAccount, Balance, Credit, Debit, TargetAccount and CreditCharacter. Amounts are whole cents. A function that moves money returns true when it is done, false when nothing changed and nil when the result is unknown; nil holds the operation for an administrator instead of retrying it.