Difference for python/IPO/banksay.py from version 1.5 to 1.6


version 1.5 version 1.6
Line 52
 
Line 52
 again.', 'Thank you, please come again.','Thank you for banking the Imperial Way.', \  again.', 'Thank you, please come again.','Thank you for banking the Imperial Way.', \
 'Thank you for your patronage.', 'Thank you, have a nice day.', 'Thank you. "Service" \  'Thank you for your patronage.', 'Thank you, have a nice day.', 'Thank you. "Service" \
 is our middle name.', 'Thank you. "Service" is our middle name.', 'Thank you for your \  is our middle name.', 'Thank you. "Service" is our middle name.', 'Thank you for your \
 patronage.', 'Thank you, have a nice day.', 'Thank you.  Hows about a big slobbery \ kiss?']  patronage.', 'Thank you, have a nice day.', 'Thank you.  Hows about a big slobbery kiss?']
   
   
   
Line 66
 
Line 66
  if len(text)==2:   if len(text)==2:
  if (CFPython.PayAmount(activator, (int(text[1])*exchange_rate)*fees)):   if (CFPython.PayAmount(activator, (int(text[1])*exchange_rate)*fees)):
  bank.deposit(activatorname, int(text[1]))   bank.deposit(activatorname, int(text[1]))
  message = '%d imperials deposited to bank account.  %s' \   message = '%d recieved, %d imperials deposited to bank account.  %s' \
  %(int(text[1]),random.choice(thanks_message))   %((int(text[1])*(exchange_rate/50))*fees,int(text[1]),random.choice(thanks_message))
  else:   else:
  message = 'You would need %d gold'%((int(text[1])*(exchange_rate/10))*fees)   message = 'You would need %d gold'%((int(text[1])*(exchange_rate/10))*fees)
  else:   else:
Line 79
 
Line 79
  message = '%d imperials withdrawn from bank account.  %s' \   message = '%d imperials withdrawn from bank account.  %s' \
  %(int(text[1]),random.choice(thanks_message))   %(int(text[1]),random.choice(thanks_message))
  id = CFPython.CreateObject('imperial', (x, y))   id = CFPython.CreateObject('imperial', (x, y))
  CFPython.SetQuantity(id, int(text[1]))   CFItemBroker.Item(id).add(int(text[1]))
  else:   else:
  message = 'Not enough imperials on your account'   message = 'Not enough imperials on your account'
  else:   else:
Line 89
 
Line 89
     if len(text)==2:      if len(text)==2:
         inv=CFPython.CheckInventory(activator,'imperial')          inv=CFPython.CheckInventory(activator,'imperial')
         if inv:          if inv:
             pay = CFItemBroker.ItemBroker(inv).subtract(int(text[1]))              pay = CFItemBroker.Item(inv).subtract(int(text[1]))
             if pay:              if pay:
                 id = CFPython.CreateObject('platinum coin', (x, y))                  id = CFPython.CreateObject('platinum coin', (x, y))
                 CFPython.SetQuantity(id, int(text[1])*(exchange_rate/50))                  CFItemBroker.Item(id).add(int(text[1])*(exchange_rate/50))
                 message = random.choice(thanks_message)                  message = random.choice(thanks_message)
             else:              else:
                 message = 'Sorry, you do not have %d imperials' %int(text[1])                  message = 'Sorry, you do not have %d imperials' %int(text[1])
Line 103
 
Line 103
   
 elif text[0] == 'balance':  elif text[0] == 'balance':
     balance = bank.getbalance(activatorname)      balance = bank.getbalance(activatorname)
     message = 'Amount in bank: %d Ip'%(balance)      if balance == 1:
       message = 'Amount in bank: 1 imperial note'
       elif balance:
    message = 'Amount in bank: %d imperial notes'%(balance)
       else:
    message = 'Sorry, you have no balance.'
 else:  else:
  message = 'Do you need help?'   message = 'Do you need help?'
   


Legend:
line(s) removed in v.1.5 
line(s) changed
 line(s) added in v.1.6

File made using version 1.96 of cvs2html by leaf at 2006-02-15 17:27