uni_shop.qsrc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. # uni_shop
  2. !2021/10/27
  3. if $ARGS[0] = 'start' or $ARGS[0] = '':
  4. *clr & cla
  5. $loc = 'uni_shop'
  6. $loc_arg = 'start'
  7. $menu_loc = 'uni_shop'
  8. $menu_arg = 'start'
  9. $location_type = 'public_indoors'
  10. killvar '$locclass'
  11. killvar '$shoplocation'
  12. menu_off = 0
  13. gs 'themes', 'indoors'
  14. if sound = 0:PLAY 'sound/shop.mp3',30
  15. gs 'stat'
  16. *clr & cla
  17. if hour < 8 or hour >= 23:
  18. 'The store is currently closed.'
  19. act 'Leave':minut += 2 & gt 'city_island'
  20. exit
  21. end
  22. 'In the store is an <a href="exec: gt ''uni_shop'', ''atm''">ATM</a>, from which you can withdraw money and deposit money into your bank account.'
  23. act 'Browse the aisles': gt 'uni_shop', 'cart'
  24. act 'Leave the store':minut += 2 & gt 'city_island'
  25. end
  26. if $ARGS[0] = 'atm':
  27. '<center><b><font color="maroon">ATM</font></b></center>'
  28. '<center><img <<$set_imgh>> src="images/locations/shared/store/atm.jpg"></center>'
  29. if bankAccount = 1:
  30. if karta >= bankDebtLimit:
  31. 'You have <<karta - bankDebtLimit>> <b>₽</b> in your account.'
  32. 'You have an overdraft limit of <font color="blue"><<bankDebtLimit>></font>!'
  33. else
  34. 'You are overdrawn by <font color="red"><<bankDebtLimit - karta>> <b>₽</b></font>.'
  35. 'You have a remaining credit limit of <font color="blue"><<karta>></font>!'
  36. end
  37. '<br>ATM Deposit Fee: 100 <b>₽</b>'
  38. if bankAccount = 1 and money > 0:
  39. act 'Deposit money into your bank account':
  40. cla
  41. menu_off = 1
  42. minut += 5
  43. gs 'stat'
  44. gs 'bank', 'deposit_cash'
  45. '"Is there anything else I can do for you?"'
  46. act 'Move away': gt 'uni_shop', 'start'
  47. end
  48. end
  49. if karta > 0:
  50. act 'Withdraw money from the ATM':
  51. cla
  52. minut += 5
  53. kartaOUT = input ("How much money do you want to withdraw?")
  54. if kartaOUT <= 0 or kartaOUT > karta:
  55. '<br>Invalid operation.'
  56. else
  57. karta -= kartaOUT
  58. money += kartaOUT
  59. if karta > 0:
  60. '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have <<karta - bankDebtLimit>> <b>₽</b> left in your bank account.'
  61. elseif karta = 0:
  62. '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have no money left in your bank account.'
  63. else
  64. '<br>You withdraw <<kartaOUT>> <b>₽</b>. <font color="red">Your bank account is overdrawn by <b><<karta>> ₽</b>.</font>'
  65. end
  66. end
  67. gs 'stat'
  68. act 'Move away': gt 'uni_shop', 'start'
  69. end
  70. else
  71. 'You have maxed out your overdraft.'
  72. end
  73. else
  74. 'You don''t have a bank account yet!'
  75. end
  76. act 'Move away':gt 'uni_shop', 'start'
  77. end
  78. if $ARGS[0] = 'cart':
  79. *clr & cla
  80. $loc_s = 'uni_shop'
  81. $args_s = 'cart'
  82. menu_off = 0
  83. gs 'themes', 'indoors'
  84. gs 'item_cart', 'shoppping_aisle', 'uni'
  85. gs 'stat'
  86. gs 'themes', 'indoors'
  87. $backimage= 'images/locations/city/island/unimarket.jpg'
  88. act 'Exit shopping cart':gt 'uni_shop', 'start'
  89. end
  90. --- uni_shop ---------------------------------