bank.qsrc 2.7 KB

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