1
0

bank 2.7 KB

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