bank.qsrc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # bank
  2. if $ARGS[0] = 'start':
  3. *clr & cla
  4. $loc = 'bank'
  5. $loc_arg = 'start'
  6. $menu_loc = 'bank'
  7. $menu_arg = 'start'
  8. menu_off = 0
  9. $location_type = 'public_indoors'
  10. minut += 2
  11. gs 'stat'
  12. gs 'themes', 'indoors'
  13. '<center><b><font color="maroon">Bank</font></b></center>'
  14. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/bank/bank.jpg"></center>'
  15. if week <= 5 and hour = 16 and minut >= 30 and mey_vika['mey_vika_qw'] >= 32: 'Seems like <a href="exec:gs''mey_tamara_events'',''tamara''">Tamara Mikhailovna</a> is heading home.'
  16. if bankAccount = 0:
  17. 'Do you want to open an account?'
  18. else
  19. if karta >= 0:
  20. 'You have <<karta>> <b>₽</b> in your account.'
  21. 'You can take out a loan of <font color="blue"><<bankDebtLimit>></font>!'
  22. else
  23. 'You hava a debt of <font color="red"><<-1 * karta>></font> <b>₽</b>.'
  24. 'You can take out a loan of <font color="blue"><<bankDebtLimit + karta>></font>!'
  25. end
  26. end
  27. act 'Leave':
  28. minut += 2
  29. if bankloc = 1:
  30. gt 'city_center'
  31. else
  32. gt 'pav_commercial'
  33. end
  34. end
  35. if BurgerQW['BankTask'] = 1 and BurgerQW['BankTaskDay'] = daystart:
  36. act 'Show documents':
  37. *clr & cla
  38. menu_off = 1
  39. minut += 15
  40. BurgerQW['BankTask'] = 2
  41. gs 'stat'
  42. 'You went to the office and showed the required documents to the manager.'
  43. act 'Leave':
  44. minut += 5
  45. if bankloc = 1:
  46. gt 'city_center'
  47. else
  48. gt 'pav_commercial'
  49. end
  50. end
  51. end
  52. end
  53. if money > 0:
  54. act 'Deposit money':
  55. cla
  56. menu_off = 1
  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 ' + iif(karta >= 0,'<<karta>>','<font color="red"><<karta>></font>') + ' <b>₽</b>.'
  68. end
  69. killvar 'kartaIN'
  70. act 'Walk away':gt 'bank', 'start'
  71. end
  72. end
  73. if karta + bankDebtLimit > 0:
  74. act 'Withdraw money':
  75. cla
  76. menu_off = 1
  77. kartaOUT = input ("How much do you want to withdraw from account?")
  78. if kartaOUT <= 0 or kartaOUT > karta + bankDebtLimit:
  79. 'That is not a valid operation.'
  80. else
  81. karta -= kartaOUT
  82. money += kartaOUT
  83. if karta > 0:
  84. '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have <<karta>> <b>₽</b> left in your bank account.'
  85. elseif karta = 0:
  86. '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have no money left in your bank account.'
  87. else
  88. '<br>You withdraw <<kartaOUT>> <b>₽</b>. <font color="red">Your bank account is overdrawn by <b><<karta>> ₽</b>.</font>'
  89. end
  90. end
  91. killvar 'kartaOUT'
  92. act 'Walk away':gt 'bank', 'start'
  93. end
  94. end
  95. end
  96. --- bank ---------------------------------