Global functions to interact with the economy. More...
Global functions to interact with the economy.
Mostly bank functions. Include economy_h.fos for usage.
Initialization | |
|
| |
| void | InitEconomy () |
| Initialize the economy. | |
Prices | |
|
| |
| uint | GetItemPrice (uint pid) |
| int | GetBaseModifier (Critter& player, Critter& trader, bool buy) |
| int | GetItemSellModifier (Critter& player, Critter& trader) |
| int | GetItemBuyModifier (Critter& player, Critter& trader) |
Banks | |
|
| |
| void | BanksAddMoney (uint amount) |
| Add money divided among all banks. | |
| void | BanksRemoveMoney (uint amount) |
| Remove money divided among all banks. | |
| uint | BanksGetTotalMoney () |
| Get total money stored in all banks combined. | |
| bool | BanksTransferToCritter (Critter& critter, uint amount, uint type, bool virtual) |
| string | GetTransferReason (uint type) |
| bool | BanksTransferFromCritter (Critter& critter, uint amount, uint type, bool virtual) |
| bool | BankAddMoney (uint bankid, uint amount) |
| Add some money to the specified bank's reserve. | |
| bool | BankRemoveMoney (uint bankid, uint amount) |
| Remove some money from the specified bank's reserve. | |
| bool | BankSetMoney (uint bankid, uint amount) |
| Set the total money of the specified bank. | |
| bool | BankTransferFromCritter (uint bankId, Critter& critter, uint amount, uint type, bool virtual) |
| bool | BankAccountRemoveMoney (uint bankid, uint account, uint amount) |
| Remove some amount of money from the specified account in the bank. | |
| uint | BankCreateAccount (uint bankid, uint playerid) |
| Create an account for a specific player. | |
| uint | BankDepositMoney (uint bankid, uint playerid, uint account, int amount) |
| Deposit some specified amount of money to the specified account in the bank. | |
| uint | BankWithdrawMoney (uint bankid, uint playerid, uint account, int amount) |
| Withdraw some specified amount of money from the specified account in the bank. | |
| uint | BankTransferMoney (uint bankid, uint fromaccount, uint toaccount, uint amount) |
| Transfer some specified amount of money from one account to another account in the bank. | |
| uint | BankGetAccountOwner (uint bankid, uint account) |
| Get owner of the specified account. | |
| int | BankGetAccountBalance (uint bankid, uint account) |
| Get balance of the specified account. | |
| int | BankGetAccountID (uint bankid, uint playerid) |
| Get AccountID of specified players account. | |
| bool | BankAccountExists (uint bankid, uint account) |
| Check if an account exists in the bank. | |
| bool | BankHasAccess (uint bankid, uint account, uint playerid) |
| Check if a player has access to an account. | |
| uint | BankGetAccessCount (uint bankid, uint account) |
| Check the amount of additional players that have access to a specific account. | |
| uint | BankGetAccountType (uint bankid, uint account) |
| Check the account type. | |
| uint | BankSetAccountType (uint bankid, uint account, uint accounttype) |
| Set the account type. | |
| uint | BankSetCreditRating (uint bankid, uint account, uint rating) |
| Set the credit rating, currently doesn't effect anything. | |
| uint | BankGetCreditRating (uint bankid, uint account) |
| Get the credit rating, currently doesn't effect anything. | |
| uint | BankSetLoan (uint bankid, uint account, uint loan) |
| Set the loan amount. | |
| uint | BankGetLoan (uint bankid, uint account) |
| Get the loan amount. | |
| uint | BankAddAccess (uint bankid, uint account, uint playerid) |
| Give player access to a joint (shared) account. | |
| uint | BankRemoveAccess (uint bankid, uint account, uint playerid) |
| Revoke player access to a joint (shared) account. | |
| uint | BankGetLoanInterest (uint bankid) |
| Get the current loan interest of the bank. | |
| uint | BankSetLoanInterest (uint bankid, uint interest) |
| Set the current loan interest of the bank. | |
| float | BankGetSaveInterest (uint bankid) |
| Get the current save interest of the bank. | |
| uint | BankSetSaveInterest (uint bankid, float interest) |
| Set the current save interest of the bank. | |
| uint | BankGetTotalMoney (uint bankid) |
| Get total amount of money in the bank. | |
| uint | BankGetTotalBalance (uint bankid) |
| Get sum of balances of all accounts in the bank. | |
| float | BankGetReserveRatio (uint bankid) |
| Get ratio of bank reserve vs total balance. | |
| uint | BankTakeLoan (uint bankid, uint account, uint amount) |
| Take a loan with specified account and amount. | |
| uint | BankGetNumberOfAccounts (uint bankid) |
| Get total number of accounts created in the bank. | |
| void InitEconomy | ( | ) |
Initialize the economy.
The only call you'll really need to run, as it'll call other initializers.
| uint GetItemPrice | ( | uint | pid | ) |
| void BanksAddMoney | ( | uint | amount | ) |
Add money divided among all banks.
| amount | How much money to add to reserves, the money will be splittled evenly among the banks |
| void BanksRemoveMoney | ( | uint | amount | ) |
Remove money divided among all banks.
| amount | How much money to remove from reserves, the money will be taken as evenly as possible among the banks |
| uint BanksGetTotalMoney | ( | ) |
Get total money stored in all banks combined.
| bool BanksTransferToCritter | ( | Critter& | critter, | |
| uint | amount, | |||
| uint | type, | |||
| bool | virtual | |||
| ) |
| string GetTransferReason | ( | uint | type | ) |
| bool BanksTransferFromCritter | ( | Critter& | critter, | |
| uint | amount, | |||
| uint | type, | |||
| bool | virtual | |||
| ) |
| bool BankAddMoney | ( | uint | bankid, | |
| uint | amount | |||
| ) |
Add some money to the specified bank's reserve.
| bankid | Bank ID, see _economy.fos | |
| amount | How much money to add to reserves |
| bool BankRemoveMoney | ( | uint | bankid, | |
| uint | amount | |||
| ) |
Remove some money from the specified bank's reserve.
| bankid | Bank ID, see _economy.fos | |
| amount | How much money to remove from reserves |
| bool BankSetMoney | ( | uint | bankid, | |
| uint | amount | |||
| ) |
Set the total money of the specified bank.
| bankid | Bank ID, see _economy.fos | |
| amount | Set amount amount of money in reserves. Can't be negative |
| bool BankTransferFromCritter | ( | uint | bankId, | |
| Critter& | critter, | |||
| uint | amount, | |||
| uint | type, | |||
| bool | virtual | |||
| ) |
| bool BankAccountRemoveMoney | ( | uint | bankid, | |
| uint | account, | |||
| uint | amount | |||
| ) |
Remove some amount of money from the specified account in the bank.
| bankid | Bank ID, see _economy.fos | |
| account | Account ID | |
| amount | Sum to remove from account |
| uint BankCreateAccount | ( | uint | bankid, | |
| uint | playerid | |||
| ) |
| uint BankDepositMoney | ( | uint | bankid, | |
| uint | playerid, | |||
| uint | account, | |||
| int | amount | |||
| ) |
Deposit some specified amount of money to the specified account in the bank.
| bankid | Bank ID, see _economy.fos | |
| playerid | ID of the player critter that deposits the money | |
| account | ID of the account that the player deposits money to | |
| amount | Amount of money that the player wants to deposit |
| uint BankWithdrawMoney | ( | uint | bankid, | |
| uint | playerid, | |||
| uint | account, | |||
| int | amount | |||
| ) |
Withdraw some specified amount of money from the specified account in the bank.
| bankid | Bank ID, see _economy.fos | |
| playerid | ID of the player critter that withdraws the money | |
| account | ID of the account that the player withdraw money from | |
| amount | Amount of money that the player wants to withdraw |
| uint BankTransferMoney | ( | uint | bankid, | |
| uint | fromaccount, | |||
| uint | toaccount, | |||
| uint | amount | |||
| ) |
Transfer some specified amount of money from one account to another account in the bank.
| bankid | Bank ID, see _economy.fos | |
| fromaccount | ID of the account from which money is tranferred | |
| toaccount | ID of the account to which money is tranferred | |
| amount | Amount of money that should be transferred |
| uint BankGetAccountOwner | ( | uint | bankid, | |
| uint | account | |||
| ) |
Get owner of the specified account.
| bankid | Bank ID, see _economy.fos | |
| account | Account ID |
| int BankGetAccountBalance | ( | uint | bankid, | |
| uint | account | |||
| ) |
Get balance of the specified account.
| bankid | Bank ID, see _economy.fos | |
| account | Account ID |
| int BankGetAccountID | ( | uint | bankid, | |
| uint | playerid | |||
| ) |
Get AccountID of specified players account.
| bankid | Bank ID, see _economy.fos | |
| playerid | Player ID |
| bool BankAccountExists | ( | uint | bankid, | |
| uint | account | |||
| ) |
Check if an account exists in the bank.
| bankid | Bank ID, see _economy.fos | |
| account | Account ID |
| bool BankHasAccess | ( | uint | bankid, | |
| uint | account, | |||
| uint | playerid | |||
| ) |
Check if a player has access to an account.
| bankid | Bank ID, see _economy.fos | |
| account | Account ID | |
| playerid | Player ID |
| uint BankGetAccessCount | ( | uint | bankid, | |
| uint | account | |||
| ) |
Check the amount of additional players that have access to a specific account.
| bankid | Bank ID, see _economy.fos | |
| account | Account ID |
| uint BankGetAccountType | ( | uint | bankid, | |
| uint | account | |||
| ) |
Check the account type.
| bankid | Bank ID, see _economy.fos | |
| account | Account ID |
| uint BankSetAccountType | ( | uint | bankid, | |
| uint | account, | |||
| uint | accounttype | |||
| ) |
| uint BankSetCreditRating | ( | uint | bankid, | |
| uint | account, | |||
| uint | rating | |||
| ) |
| uint BankGetCreditRating | ( | uint | bankid, | |
| uint | account | |||
| ) |
Get the credit rating, currently doesn't effect anything.
| bankid | Bank ID, see _economy.fos | |
| account | Account ID |
| uint BankSetLoan | ( | uint | bankid, | |
| uint | account, | |||
| uint | loan | |||
| ) |
| uint BankGetLoan | ( | uint | bankid, | |
| uint | account | |||
| ) |
Get the loan amount.
| bankid | Bank ID, see _economy.fos | |
| account | Account ID |
| uint BankAddAccess | ( | uint | bankid, | |
| uint | account, | |||
| uint | playerid | |||
| ) |
| uint BankRemoveAccess | ( | uint | bankid, | |
| uint | account, | |||
| uint | playerid | |||
| ) |
| uint BankGetLoanInterest | ( | uint | bankid | ) |
Get the current loan interest of the bank.
| bankid | Bank ID, see _economy.fos |
| uint BankSetLoanInterest | ( | uint | bankid, | |
| uint | interest | |||
| ) |
| float BankGetSaveInterest | ( | uint | bankid | ) |
Get the current save interest of the bank.
| bankid | Bank ID, see _economy.fos |
| uint BankSetSaveInterest | ( | uint | bankid, | |
| float | interest | |||
| ) |
| uint BankGetTotalMoney | ( | uint | bankid | ) |
Get total amount of money in the bank.
| bankid | Bank ID, see _economy.fos |
| uint BankGetTotalBalance | ( | uint | bankid | ) |
Get sum of balances of all accounts in the bank.
| bankid | Bank ID, see _economy.fos |
| float BankGetReserveRatio | ( | uint | bankid | ) |
Get ratio of bank reserve vs total balance.
| bankid | Bank ID, see _economy.fos |
| uint BankTakeLoan | ( | uint | bankid, | |
| uint | account, | |||
| uint | amount | |||
| ) |
| uint BankGetNumberOfAccounts | ( | uint | bankid | ) |
Get total number of accounts created in the bank.
| bankid | Bank ID, see _economy.fos |
1.7.1