bank.qsrc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # bank
  2. if $ARGS[0] = 'start':
  3. *clr & cla
  4. $loc = 'bank'
  5. $metka = '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 'down'
  31. else
  32. gt 'pavCommercial'
  33. end
  34. end
  35. if BankPapper = 1 and dayBankPapper = daystart:
  36. act 'Show documents':
  37. *clr & cla
  38. menu_off = 1
  39. minut += 15
  40. BankPapper = 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 'down'
  47. else
  48. gt 'pavCommercial'
  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 <<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. menu_off = 1
  76. kartaOUT = input ("How much do you want to withdraw from account?")
  77. if kartaOUT <= 0 or kartaOUT > karta + bankDebtLimit:
  78. 'That is not a valid operation.'
  79. else
  80. karta -= kartaOUT
  81. money += kartaOUT
  82. if karta > 0:
  83. '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have <<karta>> <b>₽</b> left in your bank account.'
  84. elseif karta = 0:
  85. '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have no money left in your bank account.'
  86. else
  87. '<br>You withdraw <<kartaOUT>> <b>₽</b>. <font color="red">Your bank account is overdrawn by <b><<karta>> ₽</b>.</font>'
  88. end
  89. end
  90. act 'Walk away':gt 'bank', 'start'
  91. end
  92. end
  93. end
  94. --- bank ---------------------------------