Crossfire Server, Trunk
banksay Namespace Reference

Functions

def cmd_balance (argv)
 
def cmd_coins (_)
 
def cmd_convert (argc)
 
def cmd_deposit (text)
 
def cmd_help ()
 
def cmd_withdraw (argv)
 
def do_deposit (player, amount)
 
def getCoinNameFromArgs (argv)
 
def getExchangeRate (coinName)
 
def main_employee ()
 

Variables

 activator = Crossfire.WhoIsActivator()
 
dictionary ArchType
 
dictionary CoinTypes
 
list thanks_message
 
 whoami = Crossfire.WhoAmI()
 
 x = activator.X
 
 y = activator.Y
 

Detailed Description

Created by: Joris Bontje <jbontje@suespammers.org>

This module implements banking in Crossfire. It provides the 'say' event for
bank tellers.

Function Documentation

◆ cmd_balance()

def banksay.cmd_balance (   argv)
Find out how much money the player has in his/her account.

Definition at line 90 of file banksay.py.

References getCoinNameFromArgs(), getExchangeRate(), and CFBank.open().

Referenced by main_employee().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cmd_coins()

def banksay.cmd_coins (   _)

Definition at line 188 of file banksay.py.

Referenced by main_employee().

+ Here is the caller graph for this function:

◆ cmd_convert()

def banksay.cmd_convert (   argc)

Definition at line 166 of file banksay.py.

References getCoinNameFromArgs(), getExchangeRate(), and make_face_from_files.int.

Referenced by main_employee().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cmd_deposit()

def banksay.cmd_deposit (   text)
Deposit a certain amount of money.

Definition at line 111 of file banksay.py.

References do_deposit(), getCoinNameFromArgs(), getExchangeRate(), and make_face_from_files.int.

Referenced by main_employee().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cmd_help()

def banksay.cmd_help ( )
Print a help message for the player.

Definition at line 80 of file banksay.py.

Referenced by main_employee().

+ Here is the caller graph for this function:

◆ cmd_withdraw()

def banksay.cmd_withdraw (   argv)
Withdraw money from the player's account.

Definition at line 134 of file banksay.py.

References getCoinNameFromArgs(), getExchangeRate(), make_face_from_files.int, and CFBank.open().

Referenced by main_employee().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ do_deposit()

def banksay.do_deposit (   player,
  amount 
)
Deposit the given amount for the player.

Definition at line 73 of file banksay.py.

References CFBank.open().

Referenced by cmd_deposit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCoinNameFromArgs()

def banksay.getCoinNameFromArgs (   argv)
Piece together several arguments to form a coin name.

Definition at line 58 of file banksay.py.

Referenced by cmd_balance(), cmd_convert(), cmd_deposit(), and cmd_withdraw().

+ Here is the caller graph for this function:

◆ getExchangeRate()

def banksay.getExchangeRate (   coinName)
Return the exchange rate for the given type of coin.

Definition at line 66 of file banksay.py.

Referenced by cmd_balance(), cmd_convert(), cmd_deposit(), and cmd_withdraw().

+ Here is the caller graph for this function:

◆ main_employee()

def banksay.main_employee ( )

Definition at line 196 of file banksay.py.

References cmd_balance(), cmd_coins(), cmd_convert(), cmd_deposit(), cmd_help(), cmd_withdraw(), and split().

+ Here is the call graph for this function:

Variable Documentation

◆ activator

banksay.activator = Crossfire.WhoIsActivator()

Definition at line 14 of file banksay.py.

◆ ArchType

dictionary banksay.ArchType
Initial value:
1 = {
2  'SILVER': 'silvercoin',
3  'GOLD': 'goldcoin',
4  'PLATINUM': 'platinacoin',
5  'JADE': 'jadecoin',
6  'AMBERIUM': 'ambercoin',
7  'IMPERIAL NOTE': 'imperial',
8  '10 IMPERIAL NOTE': 'imperial10',
9  '100 IMPERIAL NOTE': 'imperial100',
10 }

Definition at line 32 of file banksay.py.

◆ CoinTypes

dictionary banksay.CoinTypes
Initial value:
1 = {
2  'SILVER': 1,
3  'GOLD': 10,
4  'PLATINUM': 50,
5  'JADE': 5000,
6  'AMBERIUM': 500000,
7  'IMPERIAL NOTE': 10000,
8  '10 IMPERIAL NOTE': 100000,
9  '100 IMPERIAL NOTE': 1000000,
10 }

Definition at line 20 of file banksay.py.

◆ thanks_message

list banksay.thanks_message
Initial value:
1 = [
2  'Thank you for banking the Imperial Way.',
3  'Thank you for banking the Imperial Way.',
4  'Thank you, please come again.',
5  'Thank you, please come again.',
6  'Thank you for your patronage.',
7  'Thank you for your patronage.',
8  'Thank you, have a nice day.',
9  'Thank you, have a nice day.',
10  'Thank you. "Service" is our middle name.',
11  'Thank you. "Service" is our middle name.',
12  'Thank you. Hows about a big slobbery kiss?',
13 ]

Definition at line 44 of file banksay.py.

◆ whoami

banksay.whoami = Crossfire.WhoAmI()

Definition at line 15 of file banksay.py.

◆ x

banksay.x = activator.X

Definition at line 16 of file banksay.py.

◆ y

banksay.y = activator.Y

Definition at line 17 of file banksay.py.