123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- # uni_shop
- !2021/10/27
- if $ARGS[0] = 'start' or $ARGS[0] = '':
- *clr & cla
- $loc = 'uni_shop'
- $loc_arg = 'start'
- $menu_loc = 'uni_shop'
- $menu_arg = 'start'
- $location_type = 'public_indoors'
- killvar '$locclass'
- killvar '$shoplocation'
- menu_off = 0
- gs 'themes', 'indoors'
- if sound = 0:PLAY 'sound/shop.mp3',30
- gs 'stat'
- *clr & cla
- if hour < 8 or hour >= 23:
- 'The store is currently closed.'
- act 'Leave':minut += 2 & gt 'city_island'
- exit
- end
- '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.'
- act 'Browse the aisles': gt 'uni_shop', 'cart'
- act 'Leave the store':minut += 2 & gt 'city_island'
- end
- if $ARGS[0] = 'atm':
- '<center><b><font color="maroon">ATM</font></b></center>'
- '<center><img <<$set_imgh>> src="images/locations/shared/store/atm.jpg"></center>'
- if bankAccount = 1:
- if karta >= bankDebtLimit:
- 'You have <<karta - bankDebtLimit>> <b>₽</b> in your account.'
- 'You have an overdraft limit of <font color="blue"><<bankDebtLimit>></font>!'
- else
- 'You are overdrawn by <font color="red"><<bankDebtLimit - karta>> <b>₽</b></font>.'
- 'You have a remaining credit limit of <font color="blue"><<karta>></font>!'
- end
- '<br>ATM Deposit Fee: 100 <b>₽</b>'
- if bankAccount = 1 and money > 0:
- act 'Deposit money into your bank account':
- cla
- menu_off = 1
- minut += 5
- gs 'stat'
- gs 'bank', 'deposit_cash'
- '"Is there anything else I can do for you?"'
- act 'Move away': gt 'uni_shop', 'start'
- end
- end
- if karta > 0:
- act 'Withdraw money from the ATM':
- cla
- minut += 5
- kartaOUT = input ("How much money do you want to withdraw?")
- if kartaOUT <= 0 or kartaOUT > karta:
- '<br>Invalid operation.'
- else
- karta -= kartaOUT
- money += kartaOUT
- if karta > 0:
- '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have <<karta - bankDebtLimit>> <b>₽</b> left in your bank account.'
- elseif karta = 0:
- '<br>You withdraw <<kartaOUT>> <b>₽</b>. You have no money left in your bank account.'
- else
- '<br>You withdraw <<kartaOUT>> <b>₽</b>. <font color="red">Your bank account is overdrawn by <b><<karta>> ₽</b>.</font>'
- end
- end
- gs 'stat'
- act 'Move away': gt 'uni_shop', 'start'
- end
- else
- 'You have maxed out your overdraft.'
- end
- else
- 'You don''t have a bank account yet!'
- end
- act 'Move away':gt 'uni_shop', 'start'
- end
- if $ARGS[0] = 'cart':
- *clr & cla
- $loc_s = 'uni_shop'
- $args_s = 'cart'
- menu_off = 0
- gs 'themes', 'indoors'
- gs 'item_cart', 'shoppping_aisle', 'uni'
- gs 'stat'
- gs 'themes', 'indoors'
- $backimage= 'images/locations/city/island/unimarket.jpg'
- act 'Exit shopping cart':gt 'uni_shop', 'start'
- end
- --- uni_shop ---------------------------------
|