1
0

bank 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # bank
  2. if $ARGS[0] = 'start':
  3. cla
  4. *clr
  5. minut += 2
  6. gs 'stat'
  7. if night_mode = 1:
  8. fcolor = rgb(255, 255, 255)
  9. bcolor = rgb(0, 0, 0)
  10. lcolor = rgb(106, 90, 205)
  11. else
  12. fcolor = rgb(0, 0, 0)
  13. bcolor = rgb(255, 255, 255)
  14. lcolor = rgb(106, 90, 205)
  15. end
  16. '<center><b><font color="maroon">Bank</font></b></center>'
  17. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/bank/bank.jpg"></center>'
  18. if week <= 5 and hour = 16 and minut >= 30 and mey_vika['mey_vika_qw'] >= 32:
  19. !r125
  20. 'Seems like <a href="exec:gs''mey_tamara_events'',''tamara''">Tamara Mikhailovna</a> is heading home.'
  21. end
  22. if bankAccount = 0:
  23. 'Do you want to open an account?'
  24. else
  25. if karta >= 0:
  26. 'You have <<karta>> <b>₽</b> in your account.'
  27. 'You can take out a loan of <font color="blue"><<bankDebtLimit>></font>!'
  28. else
  29. 'You hava a debt of <font color="red"><<-1 * karta>></font> <b>₽</b>.'
  30. 'You can take out a loan of <font color="blue"><<bankDebtLimit + karta>></font>!'
  31. end
  32. end
  33. if BankPapper = 1 and dayBankPapper = daystart:
  34. act 'Show documents':
  35. cls
  36. minut += 15
  37. BankPapper = 2
  38. gs 'stat'
  39. 'You went to the office and showed the required documents to the manager.'
  40. act 'Leave':
  41. minut += 5
  42. if bankloc = 1:
  43. gt 'down'
  44. else
  45. gt 'pavCommercial'
  46. end
  47. end
  48. end
  49. end
  50. if money > 0:
  51. act 'Deposit money':
  52. cla
  53. kartaIN = input ("How much money you want to deposit into the account?")
  54. if kartaIN <= 0 or kartaIN > money:
  55. 'That is not a valid operation.'
  56. else
  57. karta += kartaIN
  58. money -= kartaIN
  59. if bankAccount = 0:
  60. bankAccount = 1
  61. bankDebtLimit = 5000
  62. end
  63. '<br>You deposited <<kartaIN>> <b>₽</b>, your account balance is now <<karta>> <b>₽</b>.'
  64. end
  65. act 'Walk away':gt 'bank', 'start'
  66. end
  67. end
  68. if karta + bankDebtLimit > 0:
  69. act 'Withdraw money':
  70. cla
  71. kartaOUT = input ("How much do you want to withdraw from account?")
  72. if kartaOUT <= 0 or kartaOUT > karta + bankDebtLimit:
  73. 'That is not a valid operation.'
  74. else
  75. karta -= kartaOUT
  76. money += kartaOUT
  77. if karta > 0:
  78. '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have <<karta>> <b>₽</b> left in your bank account.'
  79. elseif karta = 0:
  80. '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have no money left in your bank account.'
  81. else
  82. '<br>You withdraw <<kartaOUT>> <b>₽</b>. <font color="red">Your bank account is overdrawn by <b><<karta>> ₽</b>.</font>'
  83. end
  84. end
  85. act 'Walk away':gt 'bank', 'start'
  86. end
  87. end
  88. act 'Leave':
  89. minut += 2
  90. if bankloc = 1:
  91. gt 'down'
  92. else
  93. gt 'pavCommercial'
  94. end
  95. end
  96. end
  97. --- bank ---------------------------------