# 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 ATM, 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':
'
ATM'
'> src="images/locations/shared/store/atm.jpg">'
if bankAccount = 1:
if karta >= bankDebtLimit:
'You have <> ₽ in your account.'
'You have an overdraft limit of <>!'
else
'You are overdrawn by <> ₽.'
'You have a remaining credit limit of <>!'
end
'
ATM Deposit Fee: 100 ₽'
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:
'
Invalid operation.'
else
karta -= kartaOUT
money += kartaOUT
if karta > 0:
'
You withdraw <> ₽. You have <> ₽ left in your bank account.'
elseif karta = 0:
'
You withdraw <> ₽. You have no money left in your bank account.'
else
'
You withdraw <> ₽. Your bank account is overdrawn by <> ₽.'
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 ---------------------------------