bank 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # bank
  2. if $ARGS[0] = 'start':
  3. cla
  4. clr
  5. *clr
  6. minut += 5
  7. gs 'stat'
  8. fcolor = rgb(0, 0, 0)
  9. bcolor = rgb(255, 255, 255)
  10. lcolor = rgb(106, 90, 205)
  11. '<center><b><font color="maroon">Bank</font></b></center>'
  12. '<center><img src="images/etogame/bank.jpg"></center>'
  13. if bankAccount = 0:
  14. 'Do you want to open your account?'
  15. else
  16. if karta >= 0:
  17. 'You have <<karta>> <b>₽</b> in your account.'
  18. 'You have an approved credit of <font color="blue"><<bankDebtLimit>></font>!'
  19. else
  20. 'You hava a debt of <font color="red"><<-1 * karta>></font> <b>₽</b>.'
  21. 'You have an approved credit of <font color="blue"><<bankDebtLimit + karta>></font>!'
  22. end
  23. end
  24. if BankPapper = 1 and dayBankPapper = daystart:
  25. act 'Give documents':
  26. cls
  27. minut += 15
  28. BankPapper = 2
  29. gs 'stat'
  30. 'You went to the office and gave the documents to the manager.'
  31. act 'Leave':
  32. minut += 5
  33. if bankloc = 1:
  34. gt 'down'
  35. else
  36. gt 'pavCommercial'
  37. end
  38. end
  39. end
  40. end
  41. if money > 0:
  42. act 'Deposit money':
  43. cla
  44. minut += 5
  45. kartaIN = input ("How much money you want to deposit into the account?")
  46. if kartaIN <= 0 or kartaIN > money:
  47. 'Not correct operation.'
  48. else
  49. karta += kartaIN
  50. money -= kartaIN
  51. if bankAccount = 0:
  52. bankAccount = 1
  53. bankDebtLimit = 5000
  54. end
  55. '<br>You put on the account <<kartaIN>> <b>₽</b>, now you have <<karta>> <b>₽</b> on it.'
  56. end
  57. act 'Move away':gt 'bank', 'start'
  58. end
  59. end
  60. if karta + bankDebtLimit > 0:
  61. act 'Withdraw money':
  62. cla
  63. minut += 5
  64. kartaOUT = input ("How much do you want to withdraw from account?")
  65. if kartaOUT <= 0 or kartaOUT > karta + bankDebtLimit:
  66. 'Not correct operation.'
  67. else
  68. karta -= kartaOUT
  69. money += kartaOUT
  70. '<br>You debited <<kartaOUT>> <b>₽</b>, now you have <<karta>> <b>₽</b> on it.'
  71. end
  72. act 'Move away':gt 'bank', 'start'
  73. end
  74. end
  75. act 'Leave':
  76. minut += 5
  77. if bankloc = 1:
  78. gt 'down'
  79. else
  80. gt 'pavCommercial'
  81. end
  82. end
  83. end
  84. --- bank ---------------------------------