Bladeren bron

[changed/removed] `karta` now automatically includes the deb limit. You're in debt when `karta < bankDebtLimit`. You've reached you maximum at `karta = 0`. Removed unneeded shortgs functions do to this simplifying checks
[added] extracted repeated code from pav and city clinics to clinic_functions.

anjuna krokus 3 maanden geleden
bovenliggende
commit
551cc90a54
53 gewijzigde bestanden met toevoegingen van 2341 en 2168 verwijderingen
  1. 1 0
      glife.qproj
  2. 3 2
      locations/Cheatmenu_din.qsrc
  3. 4 4
      locations/KGstart.qsrc
  4. 33 35
      locations/Komp.qsrc
  5. 61 61
      locations/TerminalOffice.qsrc
  6. 4 4
      locations/agentned.qsrc
  7. 94 94
      locations/auditions.qsrc
  8. 55 55
      locations/autosalonF.qsrc
  9. 70 39
      locations/bank.qsrc
  10. 4 4
      locations/bdsm_mansion.qsrc
  11. 2 2
      locations/bras.qsrc
  12. 39 519
      locations/city_clinic.qsrc
  13. 27 27
      locations/city_hotel.qsrc
  14. 30 30
      locations/city_mansion_entrance.qsrc
  15. 412 412
      locations/city_musicstore_stock.qsrc
  16. 764 0
      locations/clinic_functions.qsrc
  17. 2 2
      locations/clothing.qsrc
  18. 1 1
      locations/coats.qsrc
  19. 7 7
      locations/gopnew.qsrc
  20. 47 8
      locations/havana.qsrc
  21. 20 6
      locations/husbSex.qsrc
  22. 195 195
      locations/internet_mobile.qsrc
  23. 3 3
      locations/item_cart.qsrc
  24. 2 2
      locations/katja_city.qsrc
  25. 31 9
      locations/kit_din.qsrc
  26. 7 6
      locations/korr.qsrc
  27. 4 4
      locations/korr2x.qsrc
  28. 42 13
      locations/lakecafe.qsrc
  29. 1 1
      locations/library_functions.qsrc
  30. 6 6
      locations/obj_din.qsrc
  31. 2 2
      locations/panties.qsrc
  32. 8 272
      locations/pav_clinic.qsrc
  33. 34 34
      locations/pav_hotelReception.qsrc
  34. 1 1
      locations/pav_park.qsrc
  35. 61 61
      locations/pirsingsalon.qsrc
  36. 2 10
      locations/post_office.qsrc
  37. 1 1
      locations/purses.qsrc
  38. 2 2
      locations/pushkin_ballet_secrets.qsrc
  39. 6 6
      locations/rasputin_host.qsrc
  40. 29 29
      locations/salon.qsrc
  41. 1 1
      locations/saveg.qsrc
  42. 6 0
      locations/saveupdater.qsrc
  43. 23 24
      locations/shoes.qsrc
  44. 44 40
      locations/shop.qsrc
  45. 32 32
      locations/shopdacha.qsrc
  46. 2 12
      locations/shortgs.qsrc
  47. 1 1
      locations/stat.qsrc
  48. 3 3
      locations/stat_display.qsrc
  49. 37 9
      locations/street_event.qsrc
  50. 50 44
      locations/transport_functions.qsrc
  51. 1 1
      locations/underwear_bodysuits.qsrc
  52. 8 8
      locations/uni_admin.qsrc
  53. 16 24
      locations/uni_shop.qsrc

+ 1 - 0
glife.qproj

@@ -82,6 +82,7 @@
 		<Location name="grades"/>
 		<Location name="internet_mobile"/>
 		<Location name="library_functions"/>
+		<Location name="clinic_functions"/>
 	</Folder>
 	<Folder name="Sleep">
 		<Location name="pre_sleep"/>

+ 3 - 2
locations/Cheatmenu_din.qsrc

@@ -453,8 +453,9 @@ end
 
 $cheatmenu['bank_money'] = "gs 'Cheatmenu_din', 'bank_money'"
 if $ARGS[0] = 'bank_money':
-	karta = input ("How much money do you want to have in the bank?")
+	karta = input("How much money do you want to have in the bank?")
 	if karta < 0: karta = 0
+	karta += bankDebtLimit
 	dynamic $cheatmenu['state']
 end
 
@@ -569,7 +570,7 @@ if $ARGS[0] = 'state':
 	'<a href="exec:money = 0 & dynamic $cheatmenu[''state''] & gs ''stat''">Zero money</a>'
 	if bankAccount = 1:
 		'<a href="exec:dynamic $cheatmenu[''bank_money''] & gs ''stat''">Change money in the bank</a>'
-		'<a href="exec: karta = 0 & dynamic $cheatmenu[''state''] & gs ''stat''">Zero money in the bank</a>'
+		'<a href="exec: karta = bankDebtLimit & dynamic $cheatmenu[''state''] & gs ''stat''">Zero money in the bank</a>'
 	else
 		'<b>You need to open a bank account before getting access to change money in the bank</b>'
 	end

+ 4 - 4
locations/KGstart.qsrc

@@ -107,7 +107,7 @@ if KFOnLineReaga > 0:
 		end
 	end
 
-	if karta + bankDebtLimit >= 1000:
+	if karta >= 1000:
 		act 'Payment akkuaunta':
 			karta -= 1000
 			KFOnLineReaga += 30
@@ -115,12 +115,12 @@ if KFOnLineReaga > 0:
 		end
 	end
 
-	if karta + bankDebtLimit > 0:
+	if karta > 0:
 		act 'Buy game coins (1 ₽ = 1 Game Coin)':
 			cla
 			KGOLdonat = input("How many coins do you wish to purchase?")
 
-			if KGOLdonat <= 0 or KGOLdonat > karta:
+			if KGOLdonat <= 0 or karta < KGOLdonat:
 				msg 'Not valid operation'
 			else
 				karta -= KGOLdonat
@@ -135,7 +135,7 @@ else
 	'Welcome to the online game Vertep World'
 	'To play this game you have to pay 1, 000 <b>₽</b> for 30 days via online banking.'
 
-	if karta + bankDebtLimit >= 1000:
+	if karta >= 1000:
 		act 'Payment':
 			karta -= 1000
 			KFOnLineReaga += 30

+ 33 - 35
locations/Komp.qsrc

@@ -9,13 +9,13 @@ if $ARGS[0] = 'start':
 	'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/komp.jpg"></center>'
 	'Your computer boots up and you''re soon looking at your operating system''s main screen.'
 
-	act 'Shut your computer down': 
+	act 'Shut your computer down':
 		killvar '$subs'
 		killvar 'access'
 		gt 'komp', 'fin'
 	end
 	act 'Play Solitaire (0:20)': gt 'komp', 'pasians'
-	
+
 	if AlbinaQW['flashdrive'] = 1:
 		if $loc = 'dachain' or $loc = 'sitr' or $loc = 'bedr' or $loc = 'bedr2x' or ($loc = 'uni_dorm' and $loc_arg = 'dorm_room') or ($loc = 'city_mansion_residence_2' and $loc_arg = 'yoffice') or ($loc = 'pav_shared_apt' and $loc_arg = 'pcsRoom') or ($loc = 'mey_home' and $loc_arg = 'guest_bedroom') or ($loc = 'city_house_res_misc' and $loc_arg = 'livroom') or $loc = 'nichBedroomServant' or (locat['Anya_inroom'] = 0 and $loc = 'bedrPar'):
 			act 'Check Albina''s flash drive': gt 'albina_house_events', 'flash_drive'
@@ -40,7 +40,7 @@ if $ARGS[0] = 'start':
 	!! arrived here from mobile net.
 	!! Sveta can access the internet if > 0
 	if subscription[$subs] > 0:
-		if access['metered'] = 0: 
+		if access['metered'] = 0:
 			act 'Browse the internet': gt 'komp', 'browse'
 		else
 			act 'Browse the internet - You have <<subscription[$subs]>> minutes of access left': gt 'komp', 'browse'
@@ -54,9 +54,9 @@ if $ARGS[0] = 'browse':
 	*clr & cla
 	gs 'stat'
 	menu_off = 0
-	
+
 	act 'Close the browser': gt 'komp','start'
-	
+
 	!! TODO: Update
 	!! check if the original account still valid?
 	!! if account_used > 0
@@ -119,7 +119,7 @@ end
 if $ARGS[0] = 'sale':
 	*clr & cla
 	!! TODO: Update time and internet
-	
+
 	!! IMPORTANT: What happens if an activity takes more time than the minutes Sveta has? We just say "You tried, but could not finish"?
 	if access['metered'] and subscription[$subs] < 15:
 		'You check the website, but realize that <<subscription[$subs]>> minutes won''t be enough to fill out all the forms.'
@@ -176,13 +176,13 @@ if $ARGS[0] = 'porno':
 	else
 		'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/komp.jpg"></center>'
 		'You go to a porn site and browse through videos for a few minutes.'
-		
-		if fame['city_porn'] >= 100: 
+
+		if fame['city_porn'] >= 100:
 			act 'Watch one of your own videos':
 				*clr & cla
 				gs 'stat'
 				'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/porno.jpg"></center>'
-				'You find a video you like the look of and click on it before getting comfortable. When the video loads up, you''re surprised to find that the girl starring in it is you!' 
+				'You find a video you like the look of and click on it before getting comfortable. When the video loads up, you''re surprised to find that the girl starring in it is you!'
 				act 'Watch it':
 					cla
 					elektro += 3
@@ -203,19 +203,19 @@ if $ARGS[0] = 'porno':
 
 					act 'The video ends': gt 'komp', 'porno'
 				end
-				
+
 				act 'Turn it off':
 					cla
 					minut += 5
 					gs 'stat'
 					'You immediately turn the video off and leave the website. If you found that video yourself, then how many people have seen you?'
-					
+
 					act 'Leave this website': gt 'komp', 'browse'
 				end
 			end
 		end
-		
-		
+
+
 		act 'Watch vanilla porn':
 			*clr & cla
 			elektro += 3
@@ -231,7 +231,7 @@ if $ARGS[0] = 'porno':
 
 			act 'The video ends': gt 'komp', 'porno'
 		end
-		
+
 		act 'Watch anal porn':
 			*clr & cla
 			elektro += 3
@@ -247,7 +247,7 @@ if $ARGS[0] = 'porno':
 
 			act 'The video ends': gt 'komp', 'porno'
 		end
-		
+
 		act 'Watch lesbian porn':
 			*clr & cla
 			elektro += 3
@@ -260,10 +260,10 @@ if $ARGS[0] = 'porno':
 			gs 'arousal', 'porn', 30
 			minut -= 30
 			gs 'stat'
-		
+
 			act 'The video ends': gt 'komp', 'porno'
 		end
-		
+
 		act 'Watch BBC porn':
 			*clr & cla
 			elektro += 3
@@ -315,7 +315,7 @@ if $ARGS[0] = 'masturbate':
 		end
 
 		act 'Stop masturbating': divanmastr = 0 & gt 'komp', 'porno'
-		
+
 		gs 'arousal', 'end'
 		gs 'stat'
 
@@ -579,10 +579,10 @@ if $ARGS[0] = 'rabota':
 				'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/camwhore1.jpg"></center>'
 				'You click the button and get taken to the full job description.'
 				'<i>You will be required to expose your body in front of viewers and fulfil their every wish. Payment is based on a tip system: Customers on the website buy tokens which they can use to tip girls they enjoy watching.'
-				'The website will cover all costs during your shows, but how much money you make is up to you: The better you are at attracting viewers, and the more you''re willing to do to please them, the more likely they will be to tip you.' 
+				'The website will cover all costs during your shows, but how much money you make is up to you: The better you are at attracting viewers, and the more you''re willing to do to please them, the more likely they will be to tip you.'
 				'Any tokens you earn will be converted to rubles and paid into your bank account immediately after a session ends. The website also hides your stream for viewers from your region, so the chance of you being recognized by someone you know in real life is very low.'
 				'If you''re interested, please fill in the questionnaire below.</i>'
-				
+
 				if bankAccount = 0:
 					'You need a valid bank account to be able to register for this job.'
 				else
@@ -629,7 +629,7 @@ if $ARGS[0] = 'rabota':
 				'A quick search of the listed address tells you that it''s located somewhere in the red light district of the city.'
 				if pornstudio = 0: 'You''ve heard rumors that an underground porn studio is located somewhere in that area.'
 				if pornstudio = 1: 'The porn studio is located in that area. This job listing suddenly makes more sense to you.'
-				
+
 				if pcs_inhib >= 40:
 					act 'Write down the address':
 						cla
@@ -684,11 +684,11 @@ if $ARGS[0] = 'agent' :
 	*nl
 	'<b>Property listing</b>:'
 	if func('homes_properties', 'is_property_of_status', 'rented', 'city_apartment') :
-		if func('homes_properties', 'get_rent_days', 'city_apartment') > 0: 
+		if func('homes_properties', 'get_rent_days', 'city_apartment') > 0:
 			'You have <B><<func(''homes_properties'', ''get_rent_days'', ''city_apartment'')>> days</B> remaining on the rental of your St. Petersburg apartment.'
 			*nl
 		end
-		if karta + bankDebtLimit >= func('homes_properties', 'get_rent_amount', 'city_apartment'):
+		if karta >= func('homes_properties', 'get_rent_amount', 'city_apartment'):
 			act 'Pay rent on St. Petersburg':
 				cla
 				gs 'homes_properties', 'pay_rent', 'city_apartment', 'card'
@@ -707,14 +707,14 @@ if $ARGS[0] = 'agent' :
 		'Current sale price is listed at: <<func(''homes_properties'', ''get_property_sales_price'', ''village_cottage'')>> <b>₽</b>.'
 		*nl
 	end
-	
+
 	if func('homes_properties', 'is_property_of_status', 'rented', 'old_town_apartment'):
-		if func('homes_properties', 'get_rent_days', 'old_town_apartment') >= 0: 
+		if func('homes_properties', 'get_rent_days', 'old_town_apartment') >= 0:
 			'You have <B><<func(''homes_properties'', ''get_rent_days'', ''old_town_apartment'')>> days</B> remaining on the rental of your Pushkin apartment.'
 			*nl
 		end
-		
-		if karta + bankDebtLimit >= func('homes_properties', 'get_rent_amount', 'old_town_apartment'):
+
+		if karta >= func('homes_properties', 'get_rent_amount', 'old_town_apartment'):
 			act 'Pay rent on Pushkin':
 				cla
 				gs 'homes_properties', 'pay_rent', 'old_town_apartment', 'card'
@@ -739,19 +739,17 @@ end
 
 if $ARGS[0] = 'bank':
 	'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/online_bank.jpg"></center>'
-	if karta + bankDebtLimit >= 10:
+	if karta >= 10:
 		*pl
-
 		'You can buy prepaid internet access online through your bank account. 1 hour of internet only costs 10 <b>₽</b>! *'
-
 		*pl
 
-		if karta >= 0:
-			'You have <<karta>> <b>₽</b> in your account.'
+		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"><<-1 * karta>> <b>₽</b></font>.'
-			'You have a remaining credit limit of <font color="blue"><<bankDebtLimit + karta>></font>!'
+			'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
 
 		*pl
@@ -761,7 +759,7 @@ if $ARGS[0] = 'bank':
 			cla
 			intinp = input ("How many hours of internet access do you wish to purchase? (1hr = 10 <b>₽</b>)")
 
-			if intinp <= 0 or intinp * 10 > karta + bankDebtLimit:
+			if intinp <= 0 or karta < intinp * 10:
 				'Invalid amount.'
 			else
 				karta -= intinp * 10

+ 61 - 61
locations/TerminalOffice.qsrc

@@ -50,12 +50,12 @@ end
 !Office a Manager = 1x
 !==================================================
 if $ARGS[0] = '11':
-	
+
 	!You can buy the item if you know that you can buy
 	!Can try to give the documents from Anatoly Chubais
 	!Can I ask when running accounting
 	!Can I ask when works Director
-	
+
 	cla
 	gs 'TerminalOffice', 'TerminalOfficeScreen', 'Sales', 'terminal2'
 	'"What can I help you with?" the manager asks you.'
@@ -63,25 +63,25 @@ if $ARGS[0] = '11':
 	act 'Leave the office': minut += 1 & gt 'TerminalOffice', '00'
 
 	if verakassir > 0:
-		
+
 		!Buy goods
-		
+
 		!Flag zapolanski storage, reduction
 		!this flag allows you to go shopping
 		DoNotBuy = 2
-		
+
 		!Amount and Quantity that we can buy(store)
 		MaxQuantityA = 0
 		MaxQuantity1 = 0
 		MaxQuantity2 = 0
 		MaxCost = 0
-		
+
 		!Description size of storage
 		TovarLimitRepository1 = 30
 		TovarLimitRepository2 = 100
-		
+
 		'You talk with the Manager about buying small trinkets...'
-		
+
 		!Get current balances
 		TovarRepository1 = mc_inventory['trinkets_home']
 		if TovarRepository1 => TovarLimitRepository1:
@@ -91,7 +91,7 @@ if $ARGS[0] = '11':
 			'You have '+ TovarRepository1 +' trinkets stored in your home. You''re only able to store <<TovarLimitRepository1>> trinkets.'
 			MaxQuantity1 = TovarLimitRepository1 - TovarRepository1
 		end
-		
+
 		if YouCanGar > 0:
 			!Get the current balances in the garage
 			TovarRepository2 = mc_inventory['trinkets_garage']
@@ -103,7 +103,7 @@ if $ARGS[0] = '11':
 				MaxQuantity2 = TovarLimitRepository2 - TovarRepository2
 			end
 		end
-		
+
 		if DoNotBuy = 2:
 			'You think about it for a while, realize that you just have nowhere to store the goods and decide to turn down the purchase.'
 		else
@@ -111,19 +111,19 @@ if $ARGS[0] = '11':
 			act 'The small trinkets cost 100 <b>₽</b>. Please put in how many trinkets you want to purchase.':
 				minut += 13
 				MaxQuantityA = input("How many trinkets do you want to buy for 100 <b>₽</b> apiece?")
-				
+
 				if MaxQuantityA > (MaxQuantity1 + MaxQuantity2):
 					'<b><font color=red>You have nowhere to store the surplus <<MaxQuantityA-(MaxQuantity1 + MaxQuantity2)>> ' + iif(MaxQuantityA - (MaxQuantity1 + MaxQuantity2) = 1, 'trinket', 'trinkets') + '.</front></b>'
 					cla
 					act 'Leave': gt 'TerminalOffice', '11'
 				end
-				
+
 				MaxCost = MaxQuantityA * 100
-				
-				if MaxCost > money:
+
+				if money < MaxCost:
 					!If not enough money
 					'You don''t have enough money on you. You will have to withdraw money before proceeding with the purchase.'
-					if (money + karta >= MaxCost) or (karta >= MaxCost):
+					if money + karta >= MaxCost:
 						!The player can be plastic money
 						'You have enough money on your credit card, and you offer them to pay with that.'
 						'"I''m sorry, we don''t own a card terminal," the Manager replies, "We accept only cash."'
@@ -132,11 +132,11 @@ if $ARGS[0] = '11':
 					act 'Leave': gt 'TerminalOffice', '11'
 				else
 					!If the money is written off money to fill warehouses
-						
+
 					money -= MaxCost
-					
+
 					'You''ve purchased <<MaxQuantityA>> trinkets, worth <<MaxCost>>.'
-					
+
 					!First populate channelise 1
 					if MaxQuantityA => MaxQuantity1:
 						mc_inventory['trinkets_home'] = TovarRepository1 + MaxQuantity1
@@ -147,48 +147,48 @@ if $ARGS[0] = '11':
 						mc_inventory['trinkets_home'] = TovarRepository1 + MaxQuantityA
 						MaxQuantityA = 0
 					end
-					
+
 					!Now fill channelise 2
 					if MaxQuantityA > 0:
 						mc_inventory['trinkets_garage'] = TovarRepository2 + MaxQuantityA
 					end
-					
-					if YouCanGar = 0 and money > 100: 
+
+					if YouCanGar = 0 and money > 100:
 						'You''ve purchased plenty of trinkets, but you''ve been thinking about expanding your business. But where could you store them all? Maybe you should ask your stepfather if you could use some free space in his garage...'
 					end
-					
+
 					cla
 					act 'Complete your purchase': gt 'TerminalOffice', '11'
-				end	
+				end
 			end
-			
+
 			act 'Buy small trinkets for 100 <b>₽</b> called "Eyeballs".':
 				!Purchase spend time
 				minut += 13
-				
+
 				MaxQuantityA = MaxQuantity1 + MaxQuantity2
 				MaxCost = MaxQuantityA * 100
-				
+
 				!Hammered warehouses
-				if MaxCost > money:
+				if money < MaxCost:
 					!If not enough money
 					'You don''t have enough money on you. You will have to withdraw money before proceeding with the purchase.'
-					if (money + karta >= MaxCost) or (karta >= MaxCost):
+					if money + karta >= MaxCost:
 						!The player can be plastic money
 						'You have enough money on your credit card, and you offer them to pay with that.'
 						'"I''m sorry, we don''t own a card terminal," the Manager replies, "We accept only cash."'
 					end
-					
+
 					cla
 					act 'Leave': gt 'TerminalOffice', '11'
 				else
-				
+
 					!If the money is written off money to fill warehouses
-						
+
 					money -= MaxCost
-					
+
 					'You''ve purchased <<MaxQuantityA>> trinkets, worth <<MaxCost>>.'
-					
+
 					!First populate channelise 1
 					if MaxQuantityA => MaxQuantity1:
 						mc_inventory['trinkets_home'] = TovarRepository1 + MaxQuantity1
@@ -199,23 +199,23 @@ if $ARGS[0] = '11':
 						mc_inventory['trinkets_home'] = TovarRepository1 + MaxQuantityA
 						MaxQuantityA = 0
 					end
-					
+
 					!Now fill channelise 2
 					if MaxQuantityA > 0:
 						mc_inventory['trinkets_garage'] = TovarRepository2 + MaxQuantityA
 					end
-					
-					if YouCanGar = 0 and money > 100: 
+
+					if YouCanGar = 0 and money > 100:
 						'You''ve purchased plenty of trinkets, but you''ve been thinking about expanding your business. But where could you store them all? Maybe you should ask your stepfather if you could use some free space in his garage...'
 					end
-					
+
 					cla
 					act 'Complete your purchase': gt 'TerminalOffice', '11'
-				end	
-			end			
+				end
+			end
 		end
 	end
-	
+
 	if YouNotOpenDoorDir = 1:
 		!Where the Director, the Door was closed dir
 		act 'Ask about the Director':
@@ -225,7 +225,7 @@ if $ARGS[0] = '11':
 			act 'Leave': YouNotOpenDoorDir = 0 & gt 'TerminalOffice', '11'
 		end
 	end
-	
+
 	!Where is the accountant? Buch the door was closed
 	if YouNotOpenDoorBuh = 1:
 		act 'Ask about the accountant':
@@ -235,7 +235,7 @@ if $ARGS[0] = '11':
 			act 'Leave': YouNotOpenDoorBuh = 0 & gt 'TerminalOffice', '11'
 		end
 	end
-	
+
 	!He Has papers, but a Manager should say to go to the accounting Department.
 	if AboutDocsManager=0 and BurgerQW['TerminalTask'] = 1 and BurgerQW['TerminalTaskDay'] = daystart:
 		'"I''m Anatoly Chubais from the company "OOO Bystroushka limited". Do you have the required documents with you?"'
@@ -247,7 +247,7 @@ if $ARGS[0] = '11':
 	end
 
 	!The GG yet topics of conversation.
-	if verakassir = 0 and YouNotOpenDoorDir = 0 and YouNotOpenDoorBuh = 0 and BurgerQW['TerminalTask'] = 0: 
+	if verakassir = 0 and YouNotOpenDoorDir = 0 and YouNotOpenDoorBuh = 0 and BurgerQW['TerminalTask'] = 0:
 		'You have nothing to say or left to do. You can leave the office.'
 	end
 end
@@ -261,14 +261,14 @@ if $ARGS[0] = '21':
 
 	if TerminalOfficeBuhWorkTime = 1:
 		!You can give the documents
-		
+
 		cla
 		gs 'TerminalOffice', 'TerminalOfficeScreen', 'The accountant''s office', 'terminal3'
 		act 'Leave the office': minut += 1 & gt 'TerminalOffice', '00'
-		
+
 		!GG not a complete idiot, so will limit communication with only Buch documents, then that thread again
 		'A cute girl looks up from her monitor, turns to you and asks, "What can I help you with?"'
-		
+
 		if BurgerQW['TerminalTask'] = 1 and BurgerQW['TerminalTaskDay'] = daystart:
 			'"I was talking with Anatoly Chubais from the company ''OOO Bystroushka limited''. I was instructed to deliver these documents."'
 			'"Yes, I''ve been expecting these, may I?" She holds out her hand.'
@@ -280,22 +280,22 @@ if $ARGS[0] = '21':
 				'You hand the girl the folder. She opens it and quickly checks the contents.'
 				'"Tell Anatoly Borisovich that Elizabeth said thank you."'
 				'The girl smiles and then turns her attention to her monitor and starts rapidly typing away on her keyboard.'
-				
+
 				act 'Leave the office': minut += 1 & gt 'TerminalOffice', '00'
 			end
 		else
 			'You have nothing to say or left to do. You can leave the office.'
 		end
-		
+
 	else
 		!Accountant is not in place
 		cla
 		gs 'TerminalOffice', 'TerminalOfficeScreen', 'A door with a sign', 'terminal6'
 		act 'Move away from the door': minut += 1 & gt 'TerminalOffice', '00'
 		'You knock, but there is only silence. You try pushing down the handle, but realize that the door is locked. You''ll have to come back at a different time.'
-		
+
 		YouNotOpenDoorBuh = 1
-		
+
 	end
 end
 
@@ -307,18 +307,18 @@ if $ARGS[0] = '31':
 	if TerminalOfficeDirWorkTime  = 1:
 		!You can try to give the documents
 		!You can try to talk
-		
+
 		cla
 		gs 'TerminalOffice', 'TerminalOfficeScreen', 'The Director''s office', 'terminal1'
 		act 'Leave the office': minut += 1 & gt 'TerminalOffice', '00'
-		
+
 		!Before the development of the plot 'Talk' the Director will constantly be on the phone and send he tries out of the office
 		'You knock and open the door. Behind a massive desk, you see a man. He''s talking on the phone and apparently not in the mood. He''s a bit surprised as you aren''t the person he was expecting, so he dismissively waves his hand, clearly indicating that you need to leave the office.'
-		
-		if AboutBussines = 0: 
+
+		if AboutBussines = 0:
 			act 'Talk':
 				gs 'TerminalOffice', 'TerminalOfficeScreen', 'The Director''s office', 'terminal1'
-				
+
 				'"I was told to come and see you about a business proposal..." you start.'
 				'"I heard there was a possibility of a good, legitimate and profitable trade business going on..." you continue.'
 				'The man puts the phone to his side and irritably answers, "Can''t you see I''m in middle of a phone call? Leave!"'
@@ -326,11 +326,11 @@ if $ARGS[0] = '31':
 				delact 'Talk'
 			end
 		end
-	
+
 		if AboutDocs = 0 and BurgerQW['TerminalTask'] = 1 and BurgerQW['TerminalTaskDay'] = daystart:
 			act 'Give him the documents':
 				gs 'TerminalOffice', 'TerminalOfficeScreen', 'The Director''s office', 'terminal1'
-				
+
 				'You walk up to the desk. You''re ignored by the man, but you refuse to turn back, you have an important assignment from the boss.'
 				'"I was told by Anatoly Chubais from the company "OOO Bystroushka limited" to hand over these documents to you."'
 				'The man stops talking on the phone, frowns, and, pointing towards the door, asserts, "You need to head over to the accountant''s office."'
@@ -338,18 +338,18 @@ if $ARGS[0] = '31':
 				delact 'Give him the documents'
 			end
 		end
-		
+
 		if AboutBussines = 1 or AboutDocs = 1: 'You have nothing to say or left to do. You can leave the office.'
-		
+
 	else
 		!The Director is not in place
 		cla
 		gs 'TerminalOffice', 'TerminalOfficeScreen', 'A door with a sign', 'terminal5'
 		act 'Move away from the door': minut += 1 & gt 'TerminalOffice', '00'
 		'You knock, but there is only silence. You try pushing down the handle, but realize that the door is locked. You''ll have to come back at a different time.'
-		
+
 		YouNotOpenDoorDir = 1
-		
+
 	end
 end
 --- TerminalOffice ---------------------------------

+ 4 - 4
locations/agentned.qsrc

@@ -115,7 +115,7 @@ if $ARGS[0] = 'buy':
 			else
 				'A(n) <<$property_display[i]>> is available for sale for <<func(''agentned'', ''format_price_string'', property_sales_price[i])>> <b>₽</b>.'
 			end
-			if karta + bankDebtLimit >= property_sales_price[i]:
+			if karta >= property_sales_price[i]:
 				if $property_code[i] = 'city_apartment': act 'Buy the <<$property_display[i]>>': gs 'agentned', 'buy_property', 'city_apartment'
 				if $property_code[i] = 'village_cottage': act 'Buy the <<$property_display[i]>>': gs 'agentned', 'buy_property', 'village_cottage'
 				if $property_code[i] = 'matryona_mansion': act 'Buy the <<$property_display[i]>>': gs 'agentned', 'buy_property', 'matryona_mansion'
@@ -239,7 +239,7 @@ if $ARGS[0] = 'finalise_sale':
 	minut += 30
 	'You spend thirty minutes filling out the paperwork for the sale of your <<$property_display[ARGS[2]]>>. <<func(''agentned'', ''format_price_string'', ( (offer*95)/100) )>><b>₽</b> has been paid into your bank account.'
 	gs 'homes_properties', 'sell_property', $ARGS[1], offer
-	karta += (offer*95)/100
+	karta += (offer * 95) / 100
 	delact 'Sell the <<$property_display[ARGS[2]]>>'
 	gs 'stat'
 	killvar 'property_display' & killvar 'property_sales_price'
@@ -289,10 +289,10 @@ if $ARGS[0] = 'view_property_details':
 	'<center><b><font color = maroon>Real Estate Agency</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
 	*nl
-	'<<func(''agentned'', ''get_rent_detail_dialogue'', $ARGS[1] )>> The receptionist says as he starts pulling out the paperwork, "Rent is <<func(''agentned'', ''format_price_string'', ARGS[2] )>><b>₽</b> and leases have to be renewed every 30 days. Payment will be automatically deducted from your account or you can come into the office to pay. Last, but not least, you must make pay the first month when you sign for the lease."'
+	'<<func(''agentned'', ''get_rent_detail_dialogue'', $ARGS[1])>> The receptionist says as he starts pulling out the paperwork, "Rent is <<func(''agentned'', ''format_price_string'', ARGS[2] )>><b>₽</b> and leases have to be renewed every 30 days. Payment will be automatically deducted from your account or you can come into the office to pay. Last, but not least, you must make pay the first month when you sign for the lease."'
 	'<br>He pulls out a pen and slides the paperwork onto the counter. "Interested? You can move in right away," he says calmly.'
 
-	if money >= ARGS[2] or karta+bankDebtLimit >= ARGS[2]:
+	if money >= ARGS[2] or karta >= ARGS[2]:
 		act 'Agree and pay':
 			*clr & cla
 			cls

+ 94 - 94
locations/auditions.qsrc

@@ -12,7 +12,7 @@
 !! audition['roletype'] = 9 - A main character with nude scenes
 
 !! Audition Types
-!! 
+!!
 !! $audition['type'] = 'general' - general audition no special events usually for a minor speaking role
 !! $audition['type'] = 'extra' - an audition basically just to confirm scheduling and check that the PC isn''t grossly ugly
 !! $audition['type'] = 'titty' - an audition based solely on appearance and size of breasts, usually for a role as an extra
@@ -70,7 +70,7 @@ if $ARGS[0] = 'setup':
 end
 
 if $ARGS[0] = 'audition_end':
-	
+
 end
 
 if $ARGS[0] = 'role_denied':
@@ -96,7 +96,7 @@ end
 
 if $ARGS[0] = 'audition_result':
 	audition['result'] = ((audition['scene_prep'] * 5) + pcs_perform + audition['bonus'] - audition['penalty'])
-	if audition['cast_couch'] > 0:	
+	if audition['cast_couch'] > 0:
 		if audition['cast_couch'] > 5 and audition['cast_couch'] < 13:
 			actress['cast_couch_vag'] += 1
 			if audition['cast_couch_virgin'] = 1:
@@ -120,9 +120,9 @@ if $ARGS[0] = 'extra_audition':
 
 
 end
-	
+
 if $ARGS[0] = 'tit_audition':
-	cla & *clr
+	*clr & cla
 	if pcs_inhib > 45:
 		gs 'willpower', 'skill', 'pcs_inhib', 'force', 'easy'
 	else
@@ -142,13 +142,13 @@ if $ARGS[0] = 'tit_audition':
 		else
 			'"You have wonderful skin, very smooth and soft looking, even from here. That will be great for the camera. Now show me your breasts please."'
 		end
-		act'"Excuse me??"':
-			cla & *clr
+		act '"Excuse me??"':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			'"Excuse me??" you ask, stunned. "What did you just ask me?"'
 			'The woman sighs in exasperation. "Ugh, this is why I hate dealing with amateurs. Did you even read what you''re auditioning for? You''re here for a bit role where you won''t be on screen for more than 10 seconds. This role <i>only</i> exists to show some tits on screen to excite the audience. And my job is to pick pretty girls with big pretty tits to make that a reality. Now either show me your tits and stop wasting my time or get out."'
-			act'Refuse':
-				cla & *clr
+			act 'Refuse':
+				*clr & cla
 				'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/hallway.jpg"></center>'
 				'Blushing, you can''t do it and leave the room red faced while you hear the casting director sneer in disgust again.'
 				'"Next!"'
@@ -158,7 +158,7 @@ if $ARGS[0] = 'tit_audition':
 				if will_cost <= pcs_willpwr:
 					*nl
 					act 'Show her your tits (<<will_cost>> Willpower)':
-						cla & *clr
+						*clr & cla
 						'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/showtits.jpg"></center>'
 						'Your face heats with embarassment, both at her beratement and because of how uncomfotable you are with doing this but you pull your clothes aside to reveal your breasts to the woman. She immediately consults her papers and makes notations before looking back up as you continue to stand in the middle of the room with your breasts out.'
 						'"How big are those? <<$titsize>>s?"'
@@ -171,11 +171,11 @@ if $ARGS[0] = 'tit_audition':
 						end
 						act 'Continue': gt 'auditions', 'tit_audition_result'
 					end
-				
+
 				end
 			else
 				act 'Show her your tits':
-					cla & *clr
+					*clr & cla
 					'<center><video autoplay loop src="images/locations/city/citycenter/aurora/auditions/showtits.mp4"></video></center>'
 					'Your face heats with embarassment from her beratement but you otherwise brazenly pull out your breasts to show them to her. She immediately consults her papers and makes notations before looking back up as you continue to stand in the middle of the room with your breasts out.'
 					'"How big are those? <<$titsize>>s?"'
@@ -190,12 +190,12 @@ if $ARGS[0] = 'tit_audition':
 				end
 			end
 		end
-		
+
 		if pcs_inhib < 50:
 			if will_cost <= pcs_willpwr:
 				*nl
 				act 'Show her your tits (<<will_cost>> Willpower)':
-					cla & *clr
+					*clr & cla
 					'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/showtits.jpg"></center>'
 					'You blush with embarassment at the request but do as she says anyways seeing how you signed up for this in the first place. She immediately consults her papers and makes notations before looking back up as you continue to stand in the middle of the room with your breasts out.'
 					'"How big are those? <<$titsize>>s?"'
@@ -211,7 +211,7 @@ if $ARGS[0] = 'tit_audition':
 			end
 		else
 			act 'Show her your tits':
-				cla & *clr
+				*clr & cla
 				'<center><video autoplay loop src="images/locations/city/citycenter/aurora/auditions/showtits.mp4"></video></center>'
 				'Not even slightly shy, you brazenly pull out your tits to show them to her in all their glory. She immediately consults her papers and makes notations before looking back up as you continue to stand in the middle of the room with your breasts out.'
 				'"How big are those? <<$titsize>>s?"'
@@ -230,7 +230,7 @@ end
 
 
 if $ARGS[0] = 'tit_audition_result':
-	cla & *clr
+	*clr & cla
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 	if audition['roletits'] > tits:
 		'"Well, if it were up to me, I''d hire you. You''ve got a great complexion and nice perky boobs, but the director specifically asked for, in his own words, ''big fat titties,'' and unfortunately you''re just too small. Thanks for coming anyways, maybe another time. Next!"'
@@ -261,16 +261,16 @@ if $ARGS[0] = 'tit_audition_result':
 end
 
 if $ARGS[0] = 'general_tit_audition':
-	cla & *clr
+	*clr & cla
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
-	
+
 end
 
 !! ----------------------------------- Reluctant Results -----------------------------------------
 
 if $ARGS[0] = 'reluctant_swallow_end':
 	actress['cast_couch'] += 1
-	cla & *clr
+	*clr & cla
 	gs 'auditions','audition_result'
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
@@ -295,8 +295,8 @@ if $ARGS[0] = 'reluctant_swallow_end':
 		end
 		'<<$boydesc>> reaches over to a stack of papers and looks through it for a bit before pulling one out and sliding it across the table towards you with a pen.'
 		'"Here''s the contract. Just sign here and it''s all official."'
-		act'Sign the contract':
-			if $clothingworntype = 'none':
+		act 'Sign the contract':
+			if $clothingworntype = 'nude':
 				gt 'auditions', 'naked_signature'
 			else
 				gt 'auditions', 'signature'
@@ -308,8 +308,8 @@ if $ARGS[0] = 'reluctant_swallow_end':
 		elseif audition['cast_couch'] = 2:
 			'"Meh," he shrugs noncommittally, sitting down behind the desk. "You should''ve swallowed. Maybe then I''d have considered it. Really impolite to spit out a man''s cum like that. Now get out. I have real applicants to audition."'
 		end
-		act'Leave the room':
-			cla & *clr
+		act 'Leave the room':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			'You blink, finding yourself taken aback by the moment. That''s it? After everything? <<$boydesc>>''s already stopped paying attention to you and is sifting through papers on his desk.'
 			if $clothingworntype ! 'nude':
@@ -319,9 +319,9 @@ if $ARGS[0] = 'reluctant_swallow_end':
 			end
 			act 'Close the door': gt 'auditions', 'reflection'
 		end
-		
-		act'What the fuck?!':
-			cla & *clr
+
+		act 'What the fuck?!':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			if audition['cast_couch'] = 1:
 				'"What the fuck?!" You flush with anger and glare at <<$boydesc>>. "You just pressured me into sucking your dick, tricked me into thinking that it would help me land this role! I even swallowed your fucking cum! And now you''re just going to toss me out like some kind of gutter whore?"'
@@ -342,7 +342,7 @@ end
 
 if $ARGS[0] = 'reluctant_facial_end':
 	actress['cast_couch'] += 1
-	cla & *clr
+	*clr & cla
 	gs 'auditions','audition_result'
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
@@ -359,16 +359,16 @@ if $ARGS[0] = 'reluctant_facial_end':
 		act 'Sign the contract': gt 'auditions', 'facial_signature_upset'
 	else
 		'"Pfff," he huffs. "As if. I''ve had better before. Either get better at acting or practice giving head cause neither one is a good enough justification to get you the job. Now get out. I have real applicants to audition."'
-		act'Leave the room':
-			cla & *clr
+		act 'Leave the room':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			'You blink, finding yourself not exactly surprised, but also unable to conjure a response.'
 			'Without another word, you pick up your things and leave the room, stepping out into the hallway.'
 			act 'Close the door': gt 'auditions', 'reflection'
 		end
-		
-		act'What the fuck?!':
-			cla & *clr
+
+		act 'What the fuck?!':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			if cumloc[11] > 0:
 				'"What the fuck?!" Something suddenly snaps inside you and you''re filled with a harder emotion than before. "You just pressured me into sucking your dick, tricked me into thinking that it would help me land this role, <i>came on my fucking face</i>," you say, waving your cum covered hand at him, "and now you''re just going to toss me out like some kind of gutter whore?"'
@@ -393,7 +393,7 @@ end
 
 if $ARGS[0] = 'reluctant_results':
 	actress['cast_couch'] += 1
-	cla & *clr
+	*clr & cla
 	gs 'auditions','audition_result'
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
@@ -436,26 +436,26 @@ if $ARGS[0] = 'reluctant_results':
 		else
 			'"You''re almost as lousy a fuck as you are you an actress. Nowhere good enough to justify giving you the part. Now get out. I have real applicants to audition. Maybe I''ll get lucky and one of them will have good acting ability while also being willing to put out."'
 		end
-		act'Speechless':
-			cla & *clr
+		act 'Speechless':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			'You blink, unable to conjure a response.'
 			'Without another word, you pick up your things and leave the room, stepping out into the hallway.'
 			act 'Close the door': gt 'auditions', 'reflection'
 		end
-		
-		act'Clench your jaw in anger and leave':
-			cla & *clr
+
+		act 'Clench your jaw in anger and leave':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
-			
+
 			if actress['cast_couch_deny'] > 0:'<i>Great, another stingy fucker,</i> you think to yourself. <i>And another wasted audition spent on the casting couch.</i>'
-			
+
 			'As pissed off as you are, there isn''t anything you can do about this. You grab your things and stomp to the door, slamming it shut on the way out.'
 			act 'Leave': gt 'auditions', 'reflection'
 		end
-		
-!!{		act'What the fuck?!':
-			cla & *clr
+
+!!{		act 'What the fuck?!':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			if audition['cast_couch'] < 6:
 				if cumloc[11] > 0:
@@ -505,7 +505,7 @@ end
 if $ARGS[0] = 'reluctant_virgin_results':
 	actress['cast_couch'] += 1
 	gs 'auditions','audition_result'
-	cla & *clr
+	*clr & cla
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 	'"Okay. I... I gave... I gave you my virginity... I get the role now right? You promised me right?"'
 	if audition['result'] >= audition['requirement']:
@@ -518,16 +518,16 @@ if $ARGS[0] = 'reluctant_virgin_results':
 		'You feel the blood drain from your face.'
 		'"What?"'
 		'"I''m saying that you''ve got a tight pussy and all but holy fuck are you a bad actress. I can''t justify hiring you just because of this performance, particularly when your last performance was so bad. You should try porn instead, maybe they''d hire you based on just a tight pussy. Now get out. I have real applicants to audition and maybe one of them will have good acting ability while also putting out.'
-		act'Speechless':
-			cla & *clr
+		act 'Speechless':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			'You blink, unable to conjure a response.'
 			'Without another word, you pick up your things and leave the room, stepping out into the hallway.'
 			act 'Close the door': gt 'auditions', 'reflection'
 		end
-		
-		act'What the fuck?!':
-			cla & *clr
+
+		act 'What the fuck?!':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			if cumloc[11] > 0:
 				'"What the fuck?!" Something suddenly snaps inside you and you''re practically blind with rage. "You just pressured me into fucking you for this! You tricked me into thinking that it would help me land this role! I gave you my virginity! You <i>came on my fucking face</i>," you say, waving your cum covered hand at him, "and now you''re just going to toss me out like some kind of gutter whore?"'
@@ -560,7 +560,7 @@ end
 
 if $ARGS[0] = 'neutral_results':
 	actress['cast_couch'] += 1
-	cla & *clr
+	*clr & cla
 	gs 'auditions','audition_result'
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
@@ -568,7 +568,7 @@ if $ARGS[0] = 'neutral_results':
 		'"Okay. I sucked you off, I even swallowed. I get the role now right? That was the deal."'
 	elseif audition['cast_couch'] > 0 and audition['cast_couch'] < 6:
 		'"Okay. I sucked you off. I get the role now right? That was the deal."'
-		
+
 	elseif audition['cast_couch'] = 12:
 		'"Okay, I fucked you. Even let you cum inside me. So now I get the part right? That was the deal."'
 	elseif audition['cast_couch'] >= 6 and audition['cast_couch'] < 13:
@@ -608,26 +608,26 @@ if $ARGS[0] = 'neutral_results':
 		else
 			'"You''re almost as lousy a fuck as you are you an actress. Nowhere good enough to justify giving you the part. Now get out. I have real applicants to audition. Maybe I''ll get lucky and one of them will have good acting ability while also being willing to put out."'
 		end
-		act'Speechless':
-			cla & *clr
+		act 'Speechless':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			'You blink, unable to conjure a response.'
 			'Without another word, you pick up your things and leave the room, stepping out into the hallway.'
 			act 'Close the door': gt 'auditions', 'reflection'
 		end
-		
-		act'Clench your jaw in anger and leave':
-			cla & *clr
+
+		act 'Clench your jaw in anger and leave':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
-			
+
 			if actress['cast_couch_deny'] > 0:'<i>Great, another stingy fucker,</i> you think to yourself. <i>And another wasted audition spent on the casting couch.</i>'
-			
+
 			'As pissed off as you are, there isn''t anything you can do about this. You grab your things and stomp to the door, slamming it shut on the way out.'
 			act 'Leave': gt 'auditions', 'reflection'
 		end
-		
-		act'What the fuck?!':
-			cla & *clr
+
+		act 'What the fuck?!':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			if audition['cast_couch'] < 6:
 				if cumloc[11] > 0:
@@ -677,7 +677,7 @@ end
 if $ARGS[0] = 'neutral_virgin_results':
 	actress['cast_couch'] += 1
 	gs 'auditions','audition_result'
-	cla & *clr
+	*clr & cla
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 	'"Okay. I fucked you and gave you my virginity. I get the role now right? You promised me."'
 	if audition['result'] >= audition['requirement']:
@@ -696,16 +696,16 @@ if $ARGS[0] = 'neutral_virgin_results':
 		end
 		'"What?"'
 		'"I''m saying that it''s nice to bang virgins and all but holy fuck are you a bad actress. I can''t justify hiring you just because of this performance, particularly when your last performance was so bad. You should try porn instead, maybe they''d hire you based on just a tight pussy. Now get out. I have real applicants to audition and maybe one of them will have good acting ability while also putting out.'
-		act'Speechless':
-			cla & *clr
+		act 'Speechless':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			'You blink, unable to conjure a response.'
 			'Without another word, you pick up your things and leave the room, stepping out into the hallway.'
 			act 'Close the door': gt 'auditions', 'reflection'
 		end
-		
-		act'What the fuck?!':
-			cla & *clr
+
+		act 'What the fuck?!':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			if cumloc[11] > 0:
 				'"What the fuck?!" Something suddenly snaps inside you and you''re practically blind with rage. "You just pressured me into fucking you for this! You tricked me into thinking that it would help me land this role! I gave you my virginity! You <i>came on my fucking face</i>," you say, pointing at your spunk covered visage, "and now you''re just going to toss me out like some kind of gutter whore?"'
@@ -738,7 +738,7 @@ end
 
 if $ARGS[0] = 'slutty_results':
 	actress['cast_couch'] += 1
-	cla & *clr
+	*clr & cla
 	gs 'auditions','audition_result'
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
@@ -779,26 +779,26 @@ if $ARGS[0] = 'slutty_results':
 		else
 			'"You''re almost as lousy a fuck as you are you an actress. Nowhere good enough to justify giving you the part. Now get out. I have real applicants to audition. Maybe I''ll get lucky and one of them will have good acting ability while also being willing to put out."'
 		end
-		act'Speechless':
-			cla & *clr
+		act 'Speechless':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			'You blink, unable to conjure a response.'
 			'Without another word, you pick up your things and leave the room, stepping out into the hallway.'
 			act 'Close the door': gt 'auditions', 'reflection'
 		end
-		
-		act'Clench your jaw in anger and leave':
-			cla & *clr
+
+		act 'Clench your jaw in anger and leave':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
-			
+
 			if actress['cast_couch_deny'] > 0:'<i>Great, another stingy fucker,</i> you think to yourself. <i>And another wasted audition spent on the casting couch.</i>'
-			
+
 			'As pissed off as you are, there isn''t anything you can do about this. You grab your things and stomp to the door, slamming it shut on the way out.'
 			act 'Leave': gt 'auditions', 'reflection'
 		end
-		
-		act'What the fuck?!':
-			cla & *clr
+
+		act 'What the fuck?!':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			if audition['cast_couch'] < 6:
 				if cumloc[11] > 0:
@@ -847,9 +847,9 @@ end
 
 if $ARGS[0] = 'slutty_virgin_results':
 	actress['cast_couch'] += 1
-	
+
 	gs 'auditions','audition_result'
-	cla & *clr
+	*clr & cla
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 	'"Soooo..." you say with a sultry smile. "Pretty good, fucking a virgin right? Good enough to make her an actress, am I right?"'
 	if audition['result'] >= audition['requirement']:
@@ -868,16 +868,16 @@ if $ARGS[0] = 'slutty_virgin_results':
 		end
 		'"What?"'
 		'"I''m saying that it''s nice to bang virgins and all but ho-ly, you are as bad a fuck as you are an actress. Even the hooker on the corner knows how to work it better than you. You should try porn instead, maybe they''d hire you based on just a tight pussy. Now get out. I have real applicants to audition and maybe one of them will have good acting ability while also putting out.'
-		act'Speechless':
-			cla & *clr
+		act 'Speechless':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			'You blink, unable to conjure a response.'
 			'Without another word, you pick up your things and leave the room, stepping out into the hallway.'
 			act 'Close the door': gt 'auditions', 'reflection'
 		end
-		
-		act'What the fuck?!':
-			cla & *clr
+
+		act 'What the fuck?!':
+			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 			if cumloc[11] > 0:
 				'"What the fuck?!" Something suddenly snaps inside you and you''re practically blind with rage. "You just pressured me into fucking you for this! You tricked me into thinking that it would help me land this role! I gave you my virginity! You <i>came on my fucking face</i>," you say, pointing at your spunk covered visage, "and now you''re just going to toss me out like some kind of gutter whore?"'
@@ -912,7 +912,7 @@ end
 
 
 if $ARGS[0] = 'signature':
-	cla & *clr
+	*clr & cla
 	'<center><img <<$set_imgh>> src="images/shared/misc/signature.jpg"></center>'
 	'You reach over to pick up the pen and sign your name at the bottom of the page.'
 	if cumloc[0] > 0 and $pantyworntype ! 'none':
@@ -920,7 +920,7 @@ if $ARGS[0] = 'signature':
 	elseif cumloc[0] > 0:
 		'As the pen scribbles on paper you feel a random glob of cum drip from your pussy and faintly splat onto the carpet.'
 	elseif cumloc[3] > 0:
-		'As the pen scribbles on paper you feel yet another glob of cum dribble from your anus, lingering uncomfortably between your asscheeks.'		
+		'As the pen scribbles on paper you feel yet another glob of cum dribble from your anus, lingering uncomfortably between your asscheeks.'
 	end
 	*nl
 	'<i>	<<$pcs_firstname>> <<$pcs_lastname>>.</i>'
@@ -931,7 +931,7 @@ if $ARGS[0] = 'signature':
 end
 
 if $ARGS[0] = 'naked_signature':
-	cla & *clr
+	*clr & cla
 	'<center><img <<$set_imgh>> src="images/shared/misc/signature.jpg"></center>'
 	'You reach over to pick up the pen and sign your name at the bottom of the page.'
 	if cumloc[0] > 0:
@@ -939,7 +939,7 @@ if $ARGS[0] = 'naked_signature':
 	elseif cumloc[3] > 0:
 		'As the pen scribbles on paper you feel yet another glob of cum squeeze out of your asshole and dribble down your left cheek.'
 	elseif cumloc[11] > 0:
-		'As the pen scribbles on paper, a drop of cum falls from your face and spatters on the page next to your name.'		
+		'As the pen scribbles on paper, a drop of cum falls from your face and spatters on the page next to your name.'
 	end
 	'"Love the view by the way," <<$boydesc>> says, shamelessly ogling your naked body while you sign.'
 	*nl
@@ -959,7 +959,7 @@ end
 
 
 if $ARGS[0] = 'facial_signature_upset':
-	cla & *clr
+	*clr & cla
 	'<center><img <<$set_imgh>> src="images/shared/misc/signature.jpg"></center>'
 	'You pick up the pen he hands you and sign it.'
 	*nl
@@ -981,8 +981,8 @@ if $ARGS[0] = 'audition_escape':
 	gs 'auditions', 'role_denied'
 	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/room.jpg"></center>'
 	'"I have to go!" you yelp and rush out of the room.'
-	act'Rush out the door':
-		cla & *clr
+	act 'Rush out the door':
+		*clr & cla
 		'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/hallway.jpg"></center>'
 		if actress['audition_pressure'] = 1 and actress['cast_couch'] < 1 and actress['cast_seduce'] < 1:
 			'You slam the door behind you and clutch your hand to your breast, heart pounding.'
@@ -1047,7 +1047,7 @@ end
 
 !! ----------------------------------- Post Casting Couch Reflection -----------------------------------------
 
-	
+
 if $ARGS[0] = 'reflection':
 	gs 'arousal', 'end'
 	if $clothingworntype = 'nude':
@@ -1081,7 +1081,7 @@ if $ARGS[0] = 'reflection_end':
 end
 
 !!if $ARGS[0] = 'reflect_first_time':
-!!	cla & *clr
+!!	*clr & cla
 !!	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/aurora/auditions/hallway.jpg"></center>'
 !!	'The door shuts behind you and you lean against it, thinking about what just happened.'
 !!	''

+ 55 - 55
locations/autosalonF.qsrc

@@ -2,7 +2,7 @@
 if $ARGS[0] = 'start':
 	$loc_arg = $ARGS[0]
 	$loc = 'autosalonF'
-    $location_type = 'event'
+	$location_type = 'event'
 	menu_off = 1
 	cla
 	*clr
@@ -40,7 +40,7 @@ if $ARGS[0] = 'start':
 	$car_table += '<TR><TD><a href="exec:GS ''carF1'',''111''">Bentley Continental GT</a>.</TD><TD> - </TD><TD> 13,000,000 <b>₽</b> </TD>'
 	$car_table += '<TR><TD><a href="exec:GS ''carF1'',''112''">Ferrari 458 Italia</a>.</TD><TD> - </TD><TD> 14,000,000 <b>₽</b> </TD>'
 	$car_table += '</table></center>'
-	
+
 	$car_table
 
 	act 'Talk to the manager': gt 'autosalonF', 'manager1'
@@ -59,107 +59,107 @@ if $ARGS[0] = 'manager1':
 	minut += 5
 	'<center><b>Car Dealership</b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/industrial/cardealer/manager.jpg"></center>'
-	'You have <<karta>> <b>₽</b> in your bank account.'
-	'The manager smiles affably and explains routinely what is required to purchase a car: A driver''s license and the sum, in full, in your bank account.' 
+	'You have <<karta - bankDebtLimit>> <b>₽</b> in your bank account.'
+	'The manager smiles affably and explains routinely what is required to purchase a car: A driver''s license and the sum, in full, in your bank account.'
 	'"With how the economy is right now, we can''t accept payment by installments at this time I''m afraid," he apologizes. "A few new laws have also been passed too: We cannot accept cash payment - the Duma believes that will help fight crime - and it is currently not possible to own more than one car, according to the Oblast''s new anti-corruption law.'
 
-	act 'Leave':gt 'city_industrial'
+	act 'Leave': gt 'city_industrial'
 
 	if prava = 1:
-		if karta + bankDebtLimit >= 535800:
-			act 'Buy a LADA Kalina (535,800 <b>₽</b>)':gt 'autosalonF', 'buy', 535800, 'LADA Kalina', 6, 400
+		if karta >= 535800:
+			act 'Buy a LADA Kalina (535,800 <b>₽</b>)': gt 'autosalonF', 'buy', 535800, 'LADA Kalina', 6, 400
 		end
 
-		if karta + bankDebtLimit >= 645000:
-			act 'Buy a LADA Vesta (645,000 <b>₽</b>)':gt 'autosalonF', 'buy', 645000, 'LADA Vesta', 7, 450
+		if karta  >= 645000:
+			act 'Buy a LADA Vesta (645,000 <b>₽</b>)': gt 'autosalonF', 'buy', 645000, 'LADA Vesta', 7, 450
 		end
 
-		if karta + bankDebtLimit >= 625000:
-			act 'Buy a Chevrolet Niva (625,000 <b>₽</b>)':gt 'autosalonF', 'buy', 625000, 'Chevrolet NIVA', 8, 500
+		if karta >= 625000:
+			act 'Buy a Chevrolet Niva (625,000 <b>₽</b>)': gt 'autosalonF', 'buy', 625000, 'Chevrolet NIVA', 8, 500
 		end
 
-		if karta + bankDebtLimit >= 600000:
-			act 'Buy a UAZ Hunter (600,000 <b>₽</b>)':gt 'autosalonF', 'buy', 600000, 'UAZ HUNTER', 9, 300
+		if karta >= 600000:
+			act 'Buy a UAZ Hunter (600,000 <b>₽</b>)': gt 'autosalonF', 'buy', 600000, 'UAZ HUNTER', 9, 300
 		end
 
-		if karta + bankDebtLimit >= 760000:
-			act 'Buy a UAZ Patriot (760,000 <b>₽</b>)':gt 'autosalonF', 'buy', 760000, 'UAZ Patriot', 10, 400
+		if karta >= 760000:
+			act 'Buy a UAZ Patriot (760,000 <b>₽</b>)': gt 'autosalonF', 'buy', 760000, 'UAZ Patriot', 10, 400
 		end
 
-		if karta + bankDebtLimit >= 884000:
-			act 'Buy a Ford Focus (884,000 <b>₽</b>)':gt 'autosalonF', 'buy', 884000, 'Ford Focus', 13, 800
+		if karta >= 884000:
+			act 'Buy a Ford Focus (884,000 <b>₽</b>)': gt 'autosalonF', 'buy', 884000, 'Ford Focus', 13, 800
 		end
 
-		if karta + bankDebtLimit >= 649990:
-			act 'Buy a Renault LOGAN (649,990 <b>₽</b>)':gt 'autosalonF', 'buy', 649990, 'Renault LOGAN', 102, 1000
+		if karta >= 649990:
+			act 'Buy a Renault LOGAN (649,990 <b>₽</b>)': gt 'autosalonF', 'buy', 649990, 'Renault LOGAN', 102, 1000
 		end
 
-		if karta + bankDebtLimit >= 1329000:
-			act 'Buy a Ford Mondeo (1,329,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1329000, 'Ford Mondeo', 110, 2000
+		if karta >= 1329000:
+			act 'Buy a Ford Mondeo (1,329,000 <b>₽</b>)': gt 'autosalonF', 'buy', 1329000, 'Ford Mondeo', 110, 2000
 		end
 
-		if karta + bankDebtLimit >= 1484000:
-			act 'Buy a Toyota Camry (1,484,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1484000, 'Toyota Camry', 104, 3000
+		if karta >= 1484000:
+			act 'Buy a Toyota Camry (1,484,000 <b>₽</b>)': gt 'autosalonF', 'buy', 1484000, 'Toyota Camry', 104, 3000
 		end
 
-		if karta + bankDebtLimit >= 1749990:
-			act 'Buy a Mitsubishi L200 (1,749,990 <b>₽</b>)':gt 'autosalonF', 'buy', 1749990, 'Mitsubishi L200', 95, 2000
+		if karta >= 1749990:
+			act 'Buy a Mitsubishi L200 (1,749,990 <b>₽</b>)': gt 'autosalonF', 'buy', 1749990, 'Mitsubishi L200', 95, 2000
 		end
 
-		if karta + bankDebtLimit >= 1097000:
-			act 'Buy a Toyota Corolla (1,097,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1097000, 'Toyota Corolla', 103, 3000
+		if karta >= 1097000:
+			act 'Buy a Toyota Corolla (1,097,000 <b>₽</b>)': gt 'autosalonF', 'buy', 1097000, 'Toyota Corolla', 103, 3000
 		end
 
-		if karta + bankDebtLimit >= 1299700:
-			act 'Buy a Mazda 6 (1,299,700 <b>₽</b>)':gt 'autosalonF', 'buy', 1299700, 'Mazda 6', 105, 3000
+		if karta >= 1299700:
+			act 'Buy a Mazda 6 (1,299,700 <b>₽</b>)': gt 'autosalonF', 'buy', 1299700, 'Mazda 6', 105, 3000
 		end
 
-		if karta + bankDebtLimit >= 2950000:
-			act 'Buy a Mercedes-Benz E-Class (2,950,000 <b>₽</b>)':gt 'autosalonF', 'buy', 2950000, 'Mercedes-Benz E-Class', 106, 5000
+		if karta >= 2950000:
+			act 'Buy a Mercedes-Benz E-Class (2,950,000 <b>₽</b>)': gt 'autosalonF', 'buy', 2950000, 'Mercedes-Benz E-Class', 106, 5000
 		end
 
-		if karta + bankDebtLimit >= 2914000:
-			act 'Buy an Audi A6 (2,914,000 <b>₽</b>)':gt 'autosalonF', 'buy', 2914000, 'Audi A6', 109, 5000
+		if karta >= 2914000:
+			act 'Buy an Audi A6 (2,914,000 <b>₽</b>)': gt 'autosalonF', 'buy', 2914000, 'Audi A6', 109, 5000
 		end
 
-		if karta + bankDebtLimit >= 3374000:
-			act 'Buy a Lexus RX 350(3,374,000 <b>₽</b>)':gt 'autosalonF', 'buy', 3374000, 'Lexus RX 350', 97, 4000
+		if karta >= 3374000:
+			act 'Buy a Lexus RX 350(3,374,000 <b>₽</b>)': gt 'autosalonF', 'buy', 3374000, 'Lexus RX 350', 97, 4000
 		end
 
-		if karta + bankDebtLimit >= 2721000:
-			act 'Buy a BMW 3-Seria (2,721,000 <b>₽</b>)':gt 'autosalonF', 'buy', 2721000, 'BMW 3-Seria', 101, 4000
+		if karta >= 2721000:
+			act 'Buy a BMW 3-Seria (2,721,000 <b>₽</b>)': gt 'autosalonF', 'buy', 2721000, 'BMW 3-Seria', 101, 4000
 		end
 
-		if karta + bankDebtLimit >= 7000000:
-			act 'Buy a BMW M5 (7,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 7000000, 'BMW M5', 107, 6000
+		if karta >= 7000000:
+			act 'Buy a BMW M5 (7,000,000 <b>₽</b>)': gt 'autosalonF', 'buy', 7000000, 'BMW M5', 107, 6000
 		end
 
-		if karta + bankDebtLimit >= 5366000:
-			act 'Buy a BMW X6 (5,366,000 <b>₽</b>)':gt 'autosalonF', 'buy', 5366000, 'BMW X6', 99, 4000
+		if karta >= 5366000:
+			act 'Buy a BMW X6 (5,366,000 <b>₽</b>)': gt 'autosalonF', 'buy', 5366000, 'BMW X6', 99, 4000
 		end
 
-		if karta + bankDebtLimit >= 5000000:
-			act 'Buy an Audi Q7 (5,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 5000000, 'Audi Q7', 96, 5000
+		if karta >= 5000000:
+			act 'Buy an Audi Q7 (5,000,000 <b>₽</b>)': gt 'autosalonF', 'buy', 5000000, 'Audi Q7', 96, 5000
 		end
 
-		if karta + bankDebtLimit >= 5500000:
-			act 'Buy a Porsche Cayenne (5,500,000 <b>₽</b>)':gt 'autosalonF', 'buy', 5500000, 'Porsche Cayenne', 98, 3000
+		if karta >= 5500000:
+			act 'Buy a Porsche Cayenne (5,500,000 <b>₽</b>)': gt 'autosalonF', 'buy', 5500000, 'Porsche Cayenne', 98, 3000
 		end
 
-		if karta + bankDebtLimit >= 6500000:
-			act 'Buy a Jaguar XJ (6,500,000 <b>₽</b>)':gt 'autosalonF', 'buy', 6500000, 'Jaguar XJ', 108, 4000
+		if karta >= 6500000:
+			act 'Buy a Jaguar XJ (6,500,000 <b>₽</b>)': gt 'autosalonF', 'buy', 6500000, 'Jaguar XJ', 108, 4000
 		end
 
-		if karta + bankDebtLimit >= 7600000:
-			act 'Buy a Mercedes-Benz S-Class (7,600,000 <b>₽</b>)':gt 'autosalonF', 'buy', 7600000, 'Mercedes-Benz S-Class', 100, 8000
+		if karta >= 7600000:
+			act 'Buy a Mercedes-Benz S-Class (7,600,000 <b>₽</b>)': gt 'autosalonF', 'buy', 7600000, 'Mercedes-Benz S-Class', 100, 8000
 		end
 
-		if karta + bankDebtLimit >= 13000000:
-			act 'Buy a Bentley Continental GT (13,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 13000000, 'Bentley Continental GT', 111, 8000
+		if karta >= 13000000:
+			act 'Buy a Bentley Continental GT (13,000,000 <b>₽</b>)': gt 'autosalonF', 'buy', 13000000, 'Bentley Continental GT', 111, 8000
 		end
 
-		if karta + bankDebtLimit >= 14000000:
-			act 'Buy a Ferrari 458 Italia (14,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 14000000, 'Ferrari 458 Italia', 112, 10000
+		if karta >= 14000000:
+			act 'Buy a Ferrari 458 Italia (14,000,000 <b>₽</b>)': gt 'autosalonF', 'buy', 14000000, 'Ferrari 458 Italia', 112, 10000
 		end
 	end
 end
@@ -177,10 +177,10 @@ if $ARGS[0] = 'buy':
 	car['current_condition'] = ARGS[4]
 	wrek = 0
 
-	'The manager draws up a purchasing contract, and you inform the bank of the impending transaction. Once the bank has confirmed the write-off, the manager hands you the key to your new car.' 
+	'The manager draws up a purchasing contract, and you inform the bank of the impending transaction. Once the bank has confirmed the write-off, the manager hands you the key to your new car.'
 	'"It''s waiting for you outside," he says. "The fuel tank is almost empty though, so you should stop by the gas station right away."'
 
-	act 'Leave':gt'city_industrial'
+	act 'Leave': gt'city_industrial'
 end
 
 --- autosalonF ---------------------------------

+ 70 - 39
locations/bank.qsrc

@@ -29,6 +29,7 @@ if $ARGS[0] = 'start':
 			act 'Open account':
 				cla
 				bankAccount = 1
+				karta = 5000
 				bankDebtLimit = 5000
 				'You are led to on open office and a member of the bank staff goes through your details and ID, then takes 50 <b>₽</b> from you before setting up your account'
 				'"Your account is now open with your 50 <b>₽</b> and an overdraft protection of 5,000 <b>₽</b>"'
@@ -61,23 +62,23 @@ if $ARGS[0] = 'start':
 			end
 		end
 
-		if karta + bankDebtLimit > 0:
+		if karta > 0:
 			act 'Withdraw money':
 				cla
 				menu_off = 1
 				kartaOUT = input ("How much do you want to withdraw from account?")
 
-				if kartaOUT <= 0 or kartaOUT > karta + bankDebtLimit:
+				if kartaOUT <= 0 or kartaOUT > karta:
 					'That is not a valid operation.'
 				else
 					karta -= kartaOUT
 					money += kartaOUT
-					if karta > 0:
-						'<br>You withdraw <<kartaOUT>> <b>₽</b>. You have <<karta>> <b>₽</b> left in your bank account.'
-					elseif karta = 0:
+					if karta > bankDebtLimit:
+						'<br>You withdraw <<kartaOUT>> <b>₽</b>. You have <<karta - bankDebtLimit>> <b>₽</b> left in your bank account.'
+					elseif karta = bankDebtLimit:
 						'<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>'
+						'<br>You withdraw <<kartaOUT>> <b>₽</b>. <font color="red">Your bank account is overdrawn by <b><<bankDebtLimit - karta>> ₽</b>.</font>'
 					end
 				end
 				killvar 'kartaOUT'
@@ -86,25 +87,25 @@ if $ARGS[0] = 'start':
 				act 'Walk away':gt 'bank', 'start'
 			end
 
-			if bankDebtLimitRaised = 0 and karta >= 10000:
+			if bankDebtLimitRaised = 0 and karta >= 15000:
 				act 'See about increasing your credit limit':
 					if $region = 'city':
 						gt 'bank', 'loan_officer', 'start'
 					else
-						'You approach the teller and say, “Hello, Id like to talk to someone about increasing my credit limit.”'
+						'You approach the teller and say, “Hello, I''d like to talk to someone about increasing my credit limit.”'
 						*nl
-						'The teller nods and tells you, “Unfortunately our credit limit functions are being handled through our Saint Petersburg branch. I’m sure they’d be happy to help you there.”'
+						'The teller nods and tells you, “Unfortunately our credit limit functions are being handled through our Saint Petersburg branch. I''m sure they''d be happy to help you there.”'
 						delact 'See about increasing your credit limit'
 					end
 				end
 			end
 		end
-		if karta >= 0:
-			'You have <<karta>> <b>₽</b> in your account.'
+		if karta >= bankDebtLimit:
+			'You have <<karta - bankDebtLimit>> <b>₽</b> in your account.'
 			'You can take out a loan of <font color="blue"><<bankDebtLimit>></font>!'
 		else
-			'You hava a debt of <font color="red"><<-1 * karta>></font> <b>₽</b>.'
-			'You can take out a loan of <font color="blue"><<bankDebtLimit + karta>></font>!'
+			'You hava a debt of <font color="red"><<bankDebtLimit - karta>></font> <b>₽</b>.'
+			'You can take out a loan of <font color="blue"><<karta>></font>!'
 		end
 	end
 
@@ -340,9 +341,9 @@ if $ARGS[0] = 'loan_officer':
 			gs 'fame', 'city', 'sex', 3
 			gs 'arousal', 'end'
 
-			bankDebtLimit = 50000
-			money += karta + bankDebtLimit
-			karta = -bankDebtLimit
+			bankDebtLimit += 45000
+			money += 45000
+
 			bankDebtLimitRaised = 1
 			minut += 30
 			gs 'stat'
@@ -352,6 +353,23 @@ if $ARGS[0] = 'loan_officer':
 	end
 end
 
+
+if $ARGS[0] = 'deposit_cash':
+	kartaIN = input ("How much money do you want to deposit into your account?")
+
+	if kartaIN <= 0 or kartaIN > money:
+		'Invalid operation.'
+	else
+		atmDeposit[] += kartaINATM - 100
+		atmDepositDate[] = daystart + 2
+		money -= kartaINATM
+
+		'<br>You deposit <<kartaINATM>> <b>₽</b> into your account.'
+		'It will take 2 days for funds to be available. Your new balance will be <<karta - bankDebtLimit + atmDeposit[]>> <b>₽</b>.'
+	end
+end
+
+
 if $ARGS[0] = 'cikl':
 	!!------------------------------------------------------------------------------------------------------------
 	!!	Banking
@@ -361,7 +379,7 @@ if $ARGS[0] = 'cikl':
 	!!Not very realistic but won''t make anyone too rich.
 
 	if bankAccount = 1:
-		kartatotal = karta
+		kartatotal = karta - bankDebtLimit
 		:kartaloop
 		if kartatotal > 20000000:
 			kartacount += 1
@@ -371,10 +389,10 @@ if $ARGS[0] = 'cikl':
 		else
 			largekarta[0] = kartatotal
 		end
-		if karta >= 2000000:
+		if karta - bankDebtLimit >= 2000000:
 			!! yearly interest of 2.3% recalculated into daily interest = 0.006% daily
 			intrate = 60
-		elseif karta >= 0:
+		elseif karta - bankDebtLimit >= 0:
 			!! yearly interest of 1.15% recalculated into daily interest = 0.003% daily
 			intrate = 30
 		else
@@ -382,16 +400,16 @@ if $ARGS[0] = 'cikl':
 			intrate = 550
 		end
 		:intloop
-		if kartacount > 0:
+		if kartacount = 0:
+			smallmoneypos += (largekarta[0] * intrate)
+			largekarta[0] = 0
+			if kartacount ! 0: kartacount = 0
+		else
 			smallmoneypos += (largekarta[kartacount] * intrate)
 			if smallmoneypos >= 1000000 or smallmoneypos <= -1000000: karta += smallmoneypos / 1000000 & smallmoneypos = smallmoneypos mod 1000000
 			largekarta[kartacount] = 0
 			kartacount -= 1
 			jump 'intloop'
-		else
-			smallmoneypos += (largekarta[0] * intrate)
-			largekarta[0] = 0
-			if kartacount ! 0: kartacount = 0
 		end
 
 		if smallmoneypos >= 1000000 or smallmoneypos <= -1000000:
@@ -399,21 +417,34 @@ if $ARGS[0] = 'cikl':
 			smallmoneypos = smallmoneypos mod 1000000
 		end
 
-		if atmDeposit > 0 and atmDepositDate <= daystart:
-			karta += atmDeposit
-			atmDeposit = 0
+
+		bank_i = 0
+		:atmdeposit_loop
+		if arrsize('atmDeposit') > 0:
+			if atmDepositDate[bank_i] <= daystart:
+				if atmDeposit[bank_i] > 0:
+					karta += atmDeposit[bank_i]
+				end
+				killvar 'atmDeposit', bank_i
+				killvar 'atmDepositDate', bank_i
+			else
+				bank_i += 1
+			end
+			jump 'atmdeposit_loop'
 		end
+		killvar 'bank_i'
+
 
 
 		! Daily Internet and mobile checks
 		$internet_action_messages = func('internet_mobile', 'check_subscription_actions')
-		count = ARRSIZE('$internet_action_messages')
-		i = 0
+		count = arrsize('$internet_action_messages')
+		bank_i = 0
 		:loop_messages
-			if $internet_action_messages[i] ! '': *pl $internet_action_messages[i]
-			i += 1
-		if i < count: jump 'loop_messages'
-		killvar 'i'
+			if $internet_action_messages[bank_i] ! '': *pl $internet_action_messages[bank_i]
+			bank_i += 1
+		if bank_i < count: jump 'loop_messages'
+		killvar 'bank_i'
 		killvar 'count'
 	end
 
@@ -525,14 +556,14 @@ if $ARGS[0] = 'cikl':
 		! Utilities for all apartments.
 		if func('homes_properties', 'get_owned_homes_count') > 0 and electroday = 0:
 			gs 'housing', 'util'
-			if bankAccount = 1 and karta >= elektro:
+			if bankAccount = 1 and karta - bankDebtLimit >= elektro:
 				'<b><font color="green"><<elektro>> <b>₽</b> for utilities, has been automatically deducted from your bank account.</font></b>'
 				electroday = 1
 				if elektro >= 2000:
 					elektro = 2000 + rand(0, 100)
 					karta -= elektro * hcount_util
 				end
-			elseif bankAccount = 1 and karta + bankDebtLimit >= elektro:
+			elseif bankAccount = 1 and karta >= elektro:
 				'<b><font color="green"><<elektro>> <b>₽</b> for utilities, has been automatically deducted from your bank account and overdraw facility. Please contact your bank.</font></b>'
 				electroday = 1
 				if elektro >= 2000:
@@ -554,11 +585,11 @@ if $ARGS[0] = 'cikl':
 		! Cable for all apartments
 		if kabel > 0 and kabelday = 0:
 			gs 'housing', 'cable'
-			if bankAccount = 1 and karta >= (300 * hcount_cable):
+			if bankAccount = 1 and karta - bankDebtLimit >= (300 * hcount_cable):
 				'<b><font color="green">300 <b>₽</b> has been deducted from your bank account, for you cable TV subscription.</font></b>'
 				kabelday = 1
 				karta -= 300 * hcount_cable
-			elseif bankAccount = 1 and karta + bankDebtLimit >= (300 * hcount_cable):
+			elseif bankAccount = 1 and karta >= (300 * hcount_cable):
 				'<b><font color="green">300 <b>₽</b> has been deducted from your bank account and overdraw facility, for you cable TV subscription.</font></b>'
 				kabelday = 1
 				karta -= 300 * hcount_cable
@@ -586,8 +617,8 @@ if $ARGS[0] = 'cikl':
 		:loop_rent_payments
 			if property_days[bank_i] <= 2:
 				!From bank
-				if bankAccount = 1 and karta + bankDebtLimit >= property_rent[bank_i]:
-					'<b><font color="green">Your rent payment of <<property_rent[bank_i]>> <b>₽</b> for your <<$property_name[bank_i]>>, has automatically been deducted from your bank account' + iif(kart >= 0, '', ' and overdraw facility. Please contact your bank regarding your overdraw repayment') + '.</font></b>'
+				if bankAccount = 1 and karta >= property_rent[bank_i]:
+					'<b><font color="green">Your rent payment of <<property_rent[bank_i]>> <b>₽</b> for your <<$property_name[bank_i]>>, has automatically been deducted from your bank account' + iif(karta >= bankDebtLimit, '', ' and overdraw facility. Please contact your bank regarding your overdraw repayment') + '.</font></b>'
 					gs 'homes_properties', 'pay_rent', $property_code[bank_i], 'card'
 					!karta -= property_rent[bank_i]
 					!gs 'homes_properties', 'add_rent_days', $property_code[bank_i]

+ 4 - 4
locations/bdsm_mansion.qsrc

@@ -67,7 +67,7 @@ if $ARGS[0] = 'start':
 				act 'Enter the club':gt 'bdsm_hallway', 'foyer'
 			end
 		end
-		gs 'taxi'		
+		gs 'taxi'
 	else
 		act 'Go to the elite settlement':gt 'city_suburbs', 'start'
 	end
@@ -155,7 +155,7 @@ if $ARGS[0] = 'office':
 		*nl
 		'You cannot afford the 10,000 rubes required to extend your club membership.'
 	else
-		if money > 10000:
+		if money >= 10000:
 			act 'Pay 10,000 <b>₽</b> to extend your membership and return to the dressing room':
 				bdsmclub['payday'] = daystart
 				bdsmclub['training_daystart'] = daystart
@@ -163,11 +163,11 @@ if $ARGS[0] = 'office':
 				gt 'bdsm_dressing'
 			end
 		end
-		if karta > 10000:
+		if karta >= 10000:
 			act 'Pay 10,000 <b>₽</b> to extend your membership and return to the dressing room':
 				bdsmclub['payday'] = daystart
 				bdsmclub['training_daystart'] = daystart
-				money -= 10000
+				karta -= 10000
 				gt 'bdsm_dressing'
 			end
 		end

+ 2 - 2
locations/bras.qsrc

@@ -238,7 +238,7 @@ if $ARGS[0] = 'view_bra_item':
 			else
 				'You do not have enough cash to buy this bra.'
 			end
-			if karta + bankDebtLimit >= price:
+			if karta >= price:
 				act 'Buy (card)':
 					karta -= price
 					dynamic $ARGS[2] + '_bras[<<ARGS[3]>>] = 1'
@@ -267,7 +267,7 @@ if $ARGS[0] = 'view_bra_item':
 					else
 						'You do not have enough cash to buy this set.'
 					end
-					if karta + bankDebtLimit >= price_set:
+					if karta >= price_set:
 						act 'Buy set (card)':
 							karta -= price_set
 							dynamic $ARGS[2] + '_bras[<<ARGS[3]>>] = 1'

+ 39 - 519
locations/city_clinic.qsrc

@@ -2,21 +2,20 @@
 $location_type = 'public_indoors'
 
 if $ARGS[0] = 'start':
+	*clr & cla
 	CLOSE ALL
-	$sexloc = 'city_clinic'
-	$loc = 'city_clinic'
-	$loc_arg = 'start'
+	menu_off = 0
+	gs 'shortgs', 'setloc', 'city_clinic', 'start'
 	$location_type = 'indoors'
-	$menu_loc = 'city_clinic'
-	$menu_arg = 'start'
+	$sexloc = 'city_clinic'
+
 	killvar 'temp_small_mbottle_ids'
 	killvar 'temp_medium_mbottle_ids'
-	menu_off = 0
-	*clr & cla
 	hosprand = rand(0, 10)
 	minut += 5
 	gs 'stat'
 	gs 'themes', 'indoors'
+
 	'<center><b><font color="maroon">Clinic</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/shared/clinic/poli.jpg"></center>'
 	'A sign inside the clinic lists some of the services the clinic has to offer:'
@@ -44,7 +43,7 @@ if $ARGS[0] = 'start':
 	if workhosp = 1 and hour >= 8 and hour <= 9 and week < 6:act 'Begin your work day': gt 'city_clinic', 'beginwork'
 
 	act 'Leave the clinic': minut += 5 & gt 'city_residential'
-	act 'See a cosmetic surgeon': gt 'city_clinic','cosmetic1'
+	act 'See a cosmetic surgeon': gt 'city_clinic', 'cosmetic1'
 	if lact_ev['pcs_knows_milkbank'] >= 1:
 		act 'Go to the breast milk donation office': minut += 5 & gt 'city_clinic','milk_donation_room'
 	end
@@ -89,22 +88,7 @@ if $ARGS[0] = 'start':
 
 	act 'Go to the STD clinic': gt 'city_clinic', 'stdclinic'
 
-	if money >= 15000 and preg = 1 and pregchem < 1863 and knowpreg = 1:
-		act 'Get an abortion (15,000 <b>₽</b>)':
-			cla
-			money -= 15000
-
-			'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/abort.jpg"></center>'
-			'You spread out on a gynecological chair at an angle where you can''t see what''s going on. You feel nauseous and violated as a nurse hands you a single aspirin and a glass of muddy-looking water to down it with.'
-
-			gs 'medical_din','abortion'
-
-			minut += 60
-			gs 'stat'
-
-			act 'Return to the entrance': gt 'city_clinic', 'start'
-		end
-	end
+	gs 'clinic_functions', 'set_abortion_act'
 
 	if experimentQW['discovered'] = 1:
 		*nl
@@ -172,192 +156,12 @@ if $ARGS[0] = 'start':
 
 	if katjob > 0: act 'Visit the chief doctor': gt 'city_clinic', 'glavdoc'
 
-	if (pcs_teeth > -1 and (dentistday < daystart or dentistday = 0)) or (pcs_missing_teeth > 0  and pcs_brace = 0):
-		act 'Go to the dentist':
-			*clr & cla
-			'<center><img <<$set_imgh>> src="images/locations/shared/clinic/dentist.jpg"></center>'
-			menu_off = 1
-			minut += 15
-			gs 'stat'
-
-			if pcs_brace = 1:
-				pcs_brace = 0
-				pcs_teeth -= 1
-				'The dentist spends 15 minutes taking off your brace and cleaning up. You look in the mirror afterwards and your teeth are '+iif(pcs_teeth = 0, 'now straight', 'straighter, but can still use some more work.')
-				gs 'AppearanceSystem', 'UpdateBaseAppearance'
-				gs 'stat'
-			else
-				if pcs_missing_teeth = 1:
-					zubpay = 30000
-					'The dentist examines you and says it will cost 3000 <b>₽</b> to replace your tooth.'
-				elseif pcs_missing_teeth > 1:
-					zubpay = pcs_missing_teeth * 30000
-					'The dentist examines you and says it will cost <<pcs_missing_teeth * 30000>> <b>₽</b> to fill the gaps.'
-				elseif pcs_teeth = 0:
-					zubpay = 3000
-					'The dentist examines you and says, it will cost 3000 <b>₽</b> to brighten and polish your teeth.'
-				elseif pcs_teeth > 0:
-					zubpay = 4500
-					'The dentist examinees you and says it will cost 4500 <b>₽</b> to straighten your teeth and that you''ll have to wear a brace for three months. However, he states that he can''t promise they will be completely straight after one treatment.'
-				end
-
-				if money < zubpay and karta + bankDebtLimit < zubpay:
-					*nl
-					'You do not have enough money to fix your teeth.'
-				else
-					if money >= zubpay:
-						act 'Sort out your teeth (cash)':
-							*clr & cla
-							money -= zubpay
-							minut += 60
-							if pcs_missing_teeth > 0:
-								pcs_missing_teeth = 0
-								'You pay the dentist to fix your teeth and he has restored your winning smile within an hour.'
-							elseif pcs_teeth > 0:
-								dentistday = daystart + 180
-								pcs_brace = 1
-								'You pay the dentist to straighten your teeth. After an hour of work, he has attached a brace to your teeth and tells you to come back in six months to have it taken off.'
-							else
-								dentistday = daystart + 90
-								pcs_teeth = -1
-								'You pay the dentist to brighten and polish your teeth and an hour later, your smile is much brighter and more attractive.'
-							end
-							gs 'AppearanceSystem', 'UpdateBaseAppearance'
-							gs 'stat'
-
-							act 'Leave the clinic': minut += 5 & gt 'city_residential'
-						end
-					end
-					if karta + bankDebtLimit >= zubpay:
-						act 'Sort out your teeth (card)':
-							*clr & cla
-							karta -= zubpay
-							minut += 60
-							if pcs_missing_teeth > 0:
-								pcs_missing_teeth = 0
-								'You pay the dentist to fix your teeth and he has restored your winning smile within an hour.'
-							elseif pcs_teeth > 0:
-								dentistday = daystart + 180
-								pcs_brace = 1
-								'You pay the dentist to straighten your teeth. After an hour of work, he has attached a brace to your teeth and tells you to come back in six months to have it taken off.'
-							else
-								dentistday = daystart + 90
-								pcs_teeth = -1
-								'You pay the dentist to brighten and polish your teeth and an hour later, your smile is much brighter and more attractive.'
-							end
-							gs 'AppearanceSystem', 'UpdateBaseAppearance'
-							gs 'stat'
-
-							act 'Leave the clinic': minut += 5 & gt 'city_residential'
-						end
-					end
-				end
-			end
-			act 'Leave the clinic': minut += 5 & gt 'city_residential'
-		end
-	end
-
-	if glassqw = 1:
-		act'Visit the optometrist (0:35)':
-			*clr & cla
-			menu_off = 1
-			minut += 35
-			gs'stat'
-			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/clinic/optometrist.jpg"></center>'
-			'The optometrist takes you through a series of tests to measure the condition of your eyes.'
-			'He looks at you as if he has bad news for you. "Well, you probably already expected this, but your vision has deteriorated significantly. You''re going to need glasses to be able to read. The prescription I''m writing for you is for a simple set of rimmed glasses which you can pick up at the front desk before you leave."'
-			'He hands you a piece of paper. "Of course you can get a different pair elsewhere if you want better looking ones, the details for which ones you need are on your prescription. You can also get laser vision correction if you really don''t want to use glasses, but I''m going to be honest with you: that''s a very expensive procedure."'
-			pcs_nerd += 1
-			glassqw = 2
-			glass = 1
-			blizoruk += 1
-			act 'Return to the entrance': gt 'city_clinic', 'start'
-		end
-	end
-
-	if glass > 0:
-		act 'Go to the optometrist':
-			*clr & cla
-			menu_off = 1
-			gs 'stat'
-			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/clinic/optometrist.jpg"></center>'
-			'The optometrist examines your eyes and says that he can perform laser eye surgery for 75,000 <b>₽</b>. Of course, reading books can cause your eyesight to deteriorate again.'
-
-			if glass = 1: 'The optometrist also tells you about the option to buy glasses for 4,500 <b>₽</b>.'
-
-			act 'Return to the entrance': gt 'city_clinic', 'start'
-
-			if glass = 1:
-				if money < 4500 and karta + bankDebtLimit < 4500:
-					*nl
-					'You can''t afford the more stylish glasses.'
-				else
-					if money >= 4500:
-						act 'Buy glasses (4,500 <b>₽</b>) (cash)':
-							cla
-							money -= 4500
-							minut += 60
-							glass = 2
-							gs 'AppearanceSystem', 'UpdateBaseAppearance'
-							gs 'stat'
-							'You buy a new, more stylish pair of glasses.'
-
-							act 'Return to the entrance': gt 'city_clinic', 'start'
-						end
-					end
-					if karta + bankDebtLimit >= 4500:
-						act 'Buy glasses (4,500 <b>₽</b>) (card)':
-							cla
-							karta -= 4500
-							minut += 60
-							glass = 2
-							gs 'AppearanceSystem', 'UpdateBaseAppearance'
-							gs 'stat'
-							'You buy a new, more stylish pair of glasses.'
+	gs 'clinic_functions', 'set_dentist_act'
 
-							act 'Return to the entrance': gt 'city_clinic', 'start'
-						end
-					end
-				end
-			end
-
-			if glass ! 0:
-				if money < 75000 and karta + bankDebtLimit < 75000:
-					*nl
-					'You can''t afford the laser eye correction surgery.'
-				else
-					if money >= 75000:
-						act 'Pay for laser correction (75,000 <b>₽</b>) (cash)':
-							cla
-							money -= 75000
-							minut += 60
-							blizoruk = 0
-							glass = 0
-							gs 'body_desc'
-							gs 'stat'
-							'You undergo laser eye surgery. Your eyesight is much better now.'
-							act 'Return to the entrance': gt 'city_clinic', 'start'
-						end
-					end
-					if karta + bankDebtLimit >= 75000:
-						act 'Pay for laser correction (75,000 <b>₽</b>) (card)':
-							cla
-							karta -= 75000
-							minut += 60
-							blizoruk = 0
-							glass = 0
-							gs 'AppearanceSystem', 'UpdateBaseAppearance'
-							gs 'stat'
-							'You undergo laser eye surgery. Your eyesight is much better now.'
-							act 'Return to the entrance': gt 'city_clinic', 'start'
-						end
-					end
-				end
-			end
-		end
-	end
+	gs 'clinic_functions', 'set_optometrist_acts'
 end
 
+
 if $ARGS[0] = 'stdclinic':
 	$menu_arg = $ARGS[0]
 	menu_off = 0
@@ -381,102 +185,19 @@ if $ARGS[0] = 'stdclinic':
 			gs 'city_clinic', 'stdcheck'
 		end
 	end
-
-	if karta + bankDebtLimit >= 1000:
+	if karta >= 1000:
 		act 'Get tested for STDs (1,000 <b>₽</b>) (card)':
 			karta -= 1000
 			gs 'city_clinic', 'stdcheck'
 		end
 	end
 
-	if GerpesNapr > 0 and GerpesUkolDay ! daystart:
-		if money < 450 and karta + bankDebtLimit < 450: *nl & 'You can''t afford your herpes shot.'
-
-		if money >= 450:
-			act 'Get herpes shot (450 <b>₽</b>) (cash) You need <<GerpesNapr>> more injections to complete the treatment':
-				money -= 450
-				gs 'city_clinic', 'herpes_shot'
-			end
-		end
-
-		if karta + bankDebtLimit >= 450:
-			act 'Get herpes shot (450 <b>₽</b>) (card) You need <<GerpesNapr>> more injections to complete the treatment':
-				karta -= 450
-				gs 'city_clinic', 'herpes_shot'
-			end
-		end
-	end
-
-	if TriperNapr > 0 and TriperUkolDay ! daystart:
-		if money < 750 and karta + bankDebtLimit < 750: *nl & 'You can''t afford your gonorrhea shot.'
-
-		if money >= 750:
-			act 'Get gonorrhea shot (750 <b>₽</b>) (cash) You need <<TriperNapr>> more injections to complete the treatment':
-				money -= 750
-				gs 'city_clinic', 'gonorrhea_shot'
-			end
-		end
-
-		if karta + bankDebtLimit >= 750:
-			act 'Get gonorrhea shot (750 <b>₽</b>) (card) You need <<TriperNapr>> more injections to complete the treatment':
-				karta -= 750
-				gs 'city_clinic', 'gonorrhea_shot'
-			end
-		end
-	end
-
-	if SifNapr = 1:
-		if money < 1000 and karta + bankDebtLimit < 1000: *nl & 'You can''t afford your syphilis shot.'
-
-		if money >= 1000:
-			act 'Get syphilis shot (1,000 <b>₽</b>) (cash)':
-				money -= 1000
-				gs 'city_clinic', 'syphilis_shot'
-			end
-		end
-
-		if karta + bankDebtLimit >= 1000:
-			act 'Get syphilis shot (1,000 <b>₽</b>) (card)':
-				karta -= 1000
-				gs 'city_clinic', 'syphilis_shot'
-			end
-		end
-	end
-
-	if GerpesOnce = 1 and week = 1 and day <= 10:
-		if money < 45000 and karta + bankDebtLimit < 45000: *nl & 'You to go to private clinic and completely cure your herpes.'
-
-		if money >= 45000:
-			act 'Go to private clinic and completely cure your herpes (45,000 <b>₽</b>) (cash)':
-				money -= 45000
-				gs 'city_clinic', 'herpes_cure'
-			end
-		end
-
-		if karta + bankDebtLimit >= 45000:
-			act 'Go to private clinic and completely cure your herpes (45,000 <b>₽</b>) (card)':
-				karta -= 45000
-				gs 'city_clinic', 'herpes_cure'
-			end
-		end
-	end
-
-	if KandidozOnce = 1 and week = 1 and day <= 10:
-		if money < 15000 and karta + bankDebtLimit < 15000: *nl & 'You can''t afford to go to the private clinic and completely cure your yeast infection.'
-
-		if money >= 15000:
-			act 'Go to private clinic and completely cure your yeast infection. (15,000 <b>₽</b>) (cash)':
-				money -= 15000
-				gs 'city_clinic', 'yeast_cure'
-			end
-		end
-
-		if karta + bankDebtLimit >= 15000:
-			act 'Go to private clinic and completely cure your yeast infection. (15,000 <b>₽</b>) (card)':
-				karta -= 15000
-				gs 'city_clinic', 'yeast_cure'
-			end
-		end
+	gs 'clinic_functions', 'set_std_herpes_shot_act'
+	gs 'clinic_functions', 'set_std_gonorrhea_shot_act'
+	gs 'clinic_functions', 'set_std_syphilis_shot_act'
+	if week = 1 and day <= 10:
+		gs 'clinic_functions', 'set_std_herpes_cure_act'
+		gs 'clinic_functions', 'set_std_yeast_cure_act'
 	end
 end
 
@@ -574,45 +295,6 @@ if $ARGS[0] = 'stdcheck':
 	end
 end
 
-if $ARGS[0] = 'herpes_shot':
-	*clr & cla
-	minut += 15
-	GerpesUkolDay = daystart
-	GerpesNapr -= 1
-	gs 'stat'
-	'You see the nurse and she gives you a painful injection in your ass.'
-
-	if GerpesNapr = 0:Gerpes = -10 & 'You have completed the treatment.'
-	act 'Leave': gt 'city_clinic', 'start'
-end
-
-if $ARGS[0] = 'gonorrhea_shot':
-	*clr & cla
-	minut += 15
-	TriperUkolDay = daystart
-	TriperNapr -= 1
-	gs 'stat'
-	'You see the nurse and she gives you a painful injection in your ass.'
-
-	if TriperNapr = 0:TriperOral = 0 & TriperOralSigns = 0 & Triper = 0 & Venera -= 1 & TriperOnce = 0 & 'You have completed the treatment.'
-
-	act 'Leave': gt 'city_clinic', 'start'
-end
-
-if $ARGS[0] = 'syphilis_shot':
-	*clr & cla
-	minut += 60
-	SifNapr = 0
-	SifacOnce = 0
-	Sifilis = 0
-	Venera -= 1
-	gs 'stat'
-	'You see the nurse and she gives you a painful injection in your ass.'
-
-	'"That''s it. You might still feel a little off, but the infection is now cured."'
-
-	act 'Leave': gt 'city_clinic', 'start'
-end
 
 if $ARGS[0] = 'yeast_cure':
 	*clr & cla
@@ -1286,7 +968,9 @@ if $ARGS[0] = '2':
 end
 
 if $ARGS[0] = 'cosmetic1':
-	menu_off = 1
+	gs 'shortgs', 'setloc', 'city_clinic', 'cosmetic1'
+	gs 'stat'
+
 	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmetic1.jpg"></center>'
 	'You''re greeted by a nurse who explains what procedures are available.'
 	*nl
@@ -1294,197 +978,33 @@ if $ARGS[0] = 'cosmetic1':
 	'"Fillable breast implants allow you to fill them after the surgery. We stock silicone you use to fill them."'
 	'"String implants slowly absorb your body fluids and grow larger over time. We can also drain it for you if it becomes too large."'
 	*nl
-	if money >= 80000 and lashair = 0:
-		'<a href="exec:gt ''city_clinic'', ''electrolysis''">Electrolysis</a> laser hair removal of legs and pubic area - 80,000 <b>₽</b>'
-		else
-		'Electrolysis - laser hair removal of legs and pubic area - 80,000 <b>₽</b>'
-	end
-	if money >= 25000 and pcs_lip < 4:
-		'<a href="exec:gt ''city_clinic'', ''lipPlus''">Lip enlargement surgery</a> - 25,000 <b>₽</b>'
-		else
-		'Lip enlargement surgery - 25,000 <b>₽</b>'
-	end
-	if money >= 30000 and pcs_lip ! 0:
-		'<a href="exec:gt ''city_clinic'', ''lipMin''">Lip reduction surgery</a> - 30,000 <b>₽</b>'
-		else
-		'Lip reduction surgery - 30,000 <b>₽</b>'
-	end
-	if money >= 90000 and pcs_eyesize < 3:
-		'<a href="exec:gt ''city_clinic'', ''eyePlus''">Eye enlargement surgery</a> - 90,000 <b>₽</b>'
-		else
-		'Eye enlargement surgery - 90,000 <b>₽</b>'
-	end
-	if money >= 90000 and pcs_eyesize ! 0:
-		'<a href="exec:gt ''city_clinic'', ''eyeMin''">Eye reduction surgery</a> - 90,000 <b>₽</b>'
-		else
-		'Eye reduction surgery - 90,000 <b>₽</b>'
-	end
-	if money >= 75000 and pcs_mass['body'] > 40:
-		'<a href="exec:gt ''city_clinic'', ''lyposuction''">Liposuction</a> - 75,000 <b>₽</b>'
-		else
-		'Liposuction - 75,000 <b>₽</b>'
-	end
-	''
-	if money >= 90000 and bodyVars['bust_silicone'] ! 0:
-		'<a href="exec:brSurTemp = 0 & stringimplant = 0 & fillimplant = 0 & gt ''city_clinic'', ''bImplantA''">Remove breast implants</a> - 90,000 <b>₽</b>'
-		else
-		'Remove breast implants - 90,000 <b>₽</b>'
-	end
-	if money >= 170000 and fillimplant = 0 and stringimplant = 0:
-		'<a href="exec:brSurTemp = 10 & gt ''city_clinic'', ''bImplantA''">Get small breast implants</a> - 170,000 <b>₽</b>'
-		else
-		'Get small breast implants - 170,000 <b>₽</b>'
-	end
-	if money >= 180000 and fillimplant = 0 and stringimplant = 0:
-		'<a href="exec:brSurTemp = 20 & gt ''city_clinic'', ''bImplantA''">Get medium breast implants</a> - 180,000 <b>₽</b>'
-		else
-		'Get medium breast implants - 180,000 <b>₽</b>'
-	end
-	if money >= 190000 and fillimplant = 0 and stringimplant = 0:
-		'<a href="exec:brSurTemp = 30 & gt ''city_clinic'', ''bImplantA''">Get large breast implants</a> - 190,000 <b>₽</b>'
-		else
-		'Get large breast implants - 190,000 <b>₽</b>'
-	end
-	if money >= 200000 and fillimplant = 0 and stringimplant = 0:
-		'<a href="exec:brSurTemp = 40 & gt ''city_clinic'', ''bImplantA''">Get XXL breast implants</a> - 200,000 <b>₽</b>'
-		else
-		'Get XXL breast implants - 200,000 <b>₽</b>'
-	end
-	if money >= 200000 and bodyVars['bust_silicone'] = 0 and fillimplant = 0 and stringimplant = 0:
-		'<a href="exec:brSurTemp = 20 & fillimplant = 1 & gt ''city_clinic'', ''bImplantA''">Get fillable implants</a> - 200,000 <b>₽</b>'
-		else
-		'Get fillable implants - 200,000 <b>₽</b>'
-	end
-	if money >= 250000 and bodyVars['bust_silicone'] = 0 and fillimplant = 0 and stringimplant = 0:
-		'<a href="exec:brSurTemp = 20 & stringimplant = 1 & gt ''city_clinic'', ''bImplantA''">Get string implants</a> - 250,000 <b>₽</b>'
-		else
-		'Get string implants - 250,000 <b>₽</b>'
-	end
-	if stringimplant = 1 and bodyVars['bust_silicone'] >= 30 and money >= 2000:'<a href="exec: bodyVars[''bust_silicone''] -= 10 & money -= 2000 & MSG ''You drain some of your string implant''">Drain string implant</a> - 2,000 <b>₽</b>'
-	''
-	if money >= 500:
-		'<a href="exec:siliconeBag += 1 & money -= 500 & MSG ''You buy a silicone bag.''">Buy silicone bag</a> - 500 <b>₽</b>'
-		else
-		'Buy silicone bag - 500 <b>₽</b>'
-	end
-
-	act 'Go back': gt 'city_clinic','start'
-end
-
-if $ARGS[0] = 'electrolysis':
-	*clr & cla
-	minut += 120
-	pcs_leghair = 0
-	pcs_pubes = 0
-	lashair = 1
-	money -= 80000
-	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/electrolysis.jpg"></center>'
-	'The surgeon has you strip completely and lie down on the table. Over the next few hours, you''re treated by a laser over and over again. When the treatment is finished and you get up from the table, your skin feels silky smooth.'
-
-	act 'Continue': gt 'city_clinic', 'cosmetic1'
-end
-
-if $ARGS[0] = 'lipPlus':
-	*clr & cla
-	minut += 60
-	pcs_lip += 1
-	money -= 25000
-	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
-	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
-	'When you wake up, the procedure is complete and your lips are fuller.'
-
-	act 'Continue': gt 'city_clinic', 'cosmetic1'
-end
+	gs 'clinic_functions', 'set_electrolysis_act'
+	gs 'clinic_functions', 'set_lip_enlargement_act'
+	gs 'clinic_functions', 'set_lip_reduction_act'
+	gs 'clinic_functions', 'set_eye_enlargement_act'
+	gs 'clinic_functions', 'set_eye_reduction_act'
+	gs 'clinic_functions', 'set_liposuction_act'
 
-if $ARGS[0] = 'lipMin':
-	*clr & cla
-	minut += 60
-	pcs_lip -= 1
-	money -= 30000
-	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
-	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
-	'When you wake up, the procedure is complete and your lips are thinner.'
+	*nl
 
-	act 'Continue': gt 'city_clinic', 'cosmetic1'
-end
+	gs 'clinic_functions', 'set_remove_breast_implant_act'
+	gs 'clinic_functions', 'set_get_small_breast_implant_act'
+	gs 'clinic_functions', 'set_get_medium_breast_implant_act'
+	gs 'clinic_functions', 'set_get_large_breast_implant_act'
+	gs 'clinic_functions', 'set_get_XXL_breast_implant_act'
+	gs 'clinic_functions', 'set_get_fillable_breast_implant_act'
+	gs 'clinic_functions', 'set_get_string_breast_implant_act'
 
-if $ARGS[0] = 'eyePlus':
-	*clr & cla
-	minut += 60
-	pcs_eyesize += 1
-	money -= 90000
-	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
-	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
-	'When you wake up again, the procedure is complete and your eyes are larger.'
-
-	act 'Continue': gt 'city_clinic', 'cosmetic1'
-end
+	*nl
 
-if $ARGS[0] = 'eyeMin':
-	*clr & cla
-	minut += 60
-	pcs_eyesize -= 1
-	money -= 90000
-	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
-	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
-	'When you wake up, the procedure is complete and your eyes are smaller.'
+	gs 'clinic_functions', 'set_drain_string_breast_implant_act'
+	gs 'clinic_functions', 'set_buy_silicone_bag_act'
 
-	act 'Continue': gt 'city_clinic', 'cosmetic1'
+	act 'Go back': gt 'city_clinic','start'
 end
 
-if $ARGS[0] = 'lyposuction':
-	*clr & cla
-	minut += 60
-	pcs_mass['body'] -= 40
-	if pcs_mass['body'] < 11: pcs_mass['body'] = 11
-	money -= 75000
-	gs 'body', 'softreset'
-	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
-	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
-	'When you wake up, the procedure is complete and you''re looking thinner.'
 
-	act 'Continue': gt 'city_clinic', 'cosmetic1'
-end
 
-if $ARGS[0] = 'bImplantA':
-	*clr & cla
-	minut += 60
-	bodyVars['bust_silicone'] = brSurTemp
-	! Get String Implants
-	if stringimplant = 1:
-		money -= 250000
-	! Get Fillable Implants
-	elseif fillimplant = 1:
-		money -= 200000
-	! Get XXL Implants
-	elseif bodyVars['bust_silicone'] = 40:
-		money -= 200000
-	! Get Large Implants
-	elseif bodyVars['bust_silicone'] = 30:
-		money -= 190000
-	! Get Medium Implants
-	elseif bodyVars['bust_silicone'] = 20:
-		money -= 180000
-	! Get Small Implants
-	elseif bodyVars['bust_silicone'] = 10:
-		money -= 170000
-	! Remove any implants
-	elseif bodyVars['bust_silicone'] = 0:
-		money -= 90000
-	end
-	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
-	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply... we''ll be done before you know it."'
-	'When you wake up again, the procedure is complete and you look down at your new breasts.'
-
-	act 'Continue': gt 'city_clinic', 'cosmetic1'
-end
 
 if $ARGS[0] = 'milk_advertisement':
 	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/milkbank/milk_advertisement.jpg"></center>'

+ 27 - 27
locations/city_hotel.qsrc

@@ -129,38 +129,38 @@ end
 
 if $ARGS[0] = 'pay_the_room':
 	hotel_room_id = ARGS[1]
-	if totalCost<=money:
-		act 'Pay with cash':
-			cla
-			money-=totalCost
-			hotelRoom['city'] = hotel_room_id
-			hotelRoomDays['city'] = daystart + hotelRoomDays['city']
-			'You count the money and give it to her. She gives you the key to your room in return. She says happily: "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!"'
-			act 'Step away from the reception desk': gt 'city_hotel'
-			killvar 'totalCost'
-			killvar 'hotel_room_id'
-		end
-	end
-	if totalCost<=karta+bankDebtLimit:
-		act 'Pay with card':
-			cla
-			karta-=totalCost
-			'hotel_room_id: <<hotel_room_id>>'
-			hotelRoom['city'] = hotel_room_id
-			hotelRoomDays['city'] = daystart + hotelRoomDays['city']
-			'You swipe your card and wait a moment for ''APPROVED'' to appear on the tiny screen. As soon as the receipt is printed, she hands it to you with the key to your room. "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!" she says with a smile.'
-			act 'Step away from the reception desk': gt 'city_hotel'
-			killvar 'totalCost'
-			killvar 'hotel_room_id'
-		end
-	end
-
-	if totalCost > karta+bankDebtLimit and totalCost > money:
+	if money < totalCost and karta < totalCost:
 		if ARGS[1] = 1: act 'You can''t afford to stay in the hotel for that long.': gt 'city_hotel'
 		if ARGS[1] = 2: act 'You can''t afford to stay in a luxury room at this hotel for that long.': gt 'city_hotel'
 		if ARGS[1] = 3: act 'You can''t afford to stay in the Royal Suite at this hotel for that long.': gt 'city_hotel'
 		killvar 'totalCost'
 		killvar 'hotel_room_id'
+	else
+		if money >= totalCost:
+			act 'Pay with cash':
+				cla
+				money -= totalCost
+				hotelRoom['city'] = hotel_room_id
+				hotelRoomDays['city'] = daystart + hotelRoomDays['city']
+				'You count the money and give it to her. She gives you the key to your room in return. She says happily: "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!"'
+				act 'Step away from the reception desk': gt 'city_hotel'
+				killvar 'totalCost'
+				killvar 'hotel_room_id'
+			end
+		end
+		if karta >= totalCost:
+			act 'Pay with card':
+				cla
+				karta -= totalCost
+				'hotel_room_id: <<hotel_room_id>>'
+				hotelRoom['city'] = hotel_room_id
+				hotelRoomDays['city'] = daystart + hotelRoomDays['city']
+				'You swipe your card and wait a moment for ''APPROVED'' to appear on the tiny screen. As soon as the receipt is printed, she hands it to you with the key to your room. "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!" she says with a smile.'
+				act 'Step away from the reception desk': gt 'city_hotel'
+				killvar 'totalCost'
+				killvar 'hotel_room_id'
+			end
+		end
 	end
 
 	act 'You change your mind':

+ 30 - 30
locations/city_mansion_entrance.qsrc

@@ -7,10 +7,10 @@ if $ARGS[0] = '':
 	$menu_arg = ''
 	menu_off = 0
 	gs 'stat'
-	
+
 	*clr & cla
 	property_construction_status = func('homes_properties', 'get_property_construction_status')
-	property_owned = func('homes_properties', 'is_property_of_status', 'owned', 'matryona_mansion') 
+	property_owned = func('homes_properties', 'is_property_of_status', 'owned', 'matryona_mansion')
 	if property_construction_status = 0:
 		'<center><h4>Your Land</h4></center>'
 		'<center><img <<$set_imgh>> src="images/locations/city/suburb/mansion/o_empty_field.jpg"></center>'
@@ -24,7 +24,7 @@ if $ARGS[0] = '':
 		'<center><img <<$set_imgh>> src="images/locations/city/suburb/mansion/matryona_mansion.jpg"></center>'
 		'<center>Your fully built mansion stands here. </center>'
 	end
-	
+
 	*nl
 	if car > 0 and cardrive = 18:
 		cardrive = 18
@@ -47,14 +47,14 @@ if $ARGS[0] = '':
 	end
 
 	act 'Go to the suburbs':
-		minut += 10 
+		minut += 10
 		gt 'city_suburbs', 'start'
 	end
 
-	if property_owned: 
+	if property_owned:
 		if property_construction_status = 2  : act 'Walk inside the mansion': minut += 4 & gt 'city_mansion_residence_1', 'yfoyer'
 
-		if karta + bankDebtLimit >= 500000 and property_construction_status = 0:
+		if karta >= 500000 and property_construction_status = 0:
 			act 'Pay for running utilities and the building foundation (500,000 <b>₽</b>)':
 				cls
 				karta -= 500000
@@ -68,7 +68,7 @@ if $ARGS[0] = '':
 			end
 		end
 
-		if karta + bankDebtLimit >= 1500000 and property_construction_status = 1:
+		if karta >= 1500000 and property_construction_status = 1:
 			act 'Pay for the finishing touches on the mansion (1,500,000 <b>₽</b>)':
 				cls
 				karta -= 1500000
@@ -82,7 +82,7 @@ if $ARGS[0] = '':
 			end
 		end
 
-		if karta + bankDebtLimit >= 500000 and property_construction_status = 2 and ymanrem[3] = 0:
+		if karta >= 500000 and property_construction_status = 2 and ymanrem[3] = 0:
 			act 'Pay for the construction of the rooms (500,000 <b>₽</b>)':
 				cls
 				karta -= 500000
@@ -97,7 +97,7 @@ if $ARGS[0] = '':
 		end
 
 		if property_construction_status > 0:
-			if karta + bankDebtLimit >= 800000 and banaMansion = 0:
+			if karta >= 800000 and banaMansion = 0:
 				act 'Pay for the construction of the sauna (800,000 <b>₽</b>)':
 					cls
 					karta -= 800000
@@ -111,7 +111,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 500000 and bassMansion = 0:
+			if karta >= 500000 and bassMansion = 0:
 				act 'Pay for the construction of the pool area (500,000 <b>₽</b>)':
 					cls
 					karta -= 500000
@@ -126,7 +126,7 @@ if $ARGS[0] = '':
 			end
 		end
 		if property_construction_status = 2:
-			if karta + bankDebtLimit >= 250000 and ymanrem[3] = 1:
+			if karta >= 250000 and ymanrem[3] = 1:
 				act 'Pay for the renovations of the main hall (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -139,7 +139,7 @@ if $ARGS[0] = '':
 					act 'Leave':gt $curloc
 				end
 
-			elseif karta + bankDebtLimit >= 150000 and ymanrem[3] = 2:
+			elseif karta >= 150000 and ymanrem[3] = 2:
 				act 'Decorate the main hall (150,000 <b>₽</b>)':
 					cls
 					karta -= 150000
@@ -153,7 +153,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[4] = 0:
+			if karta >= 250000 and ymanrem[4] = 0:
 				act 'Pay for the renovations of the bedroom (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -165,7 +165,7 @@ if $ARGS[0] = '':
 
 					act 'Leave':gt $curloc
 				end
-			elseif karta + bankDebtLimit >= 300000 and ymanrem[4] = 1:
+			elseif karta >= 300000 and ymanrem[4] = 1:
 				act 'Decorate the bedroom (300,000 <b>₽</b>)':
 					cls
 					karta -= 300000
@@ -179,7 +179,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[5] = 0:
+			if karta >= 250000 and ymanrem[5] = 0:
 				act 'Pay for the renovations of the bathroom (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -191,7 +191,7 @@ if $ARGS[0] = '':
 
 					act 'Leave':gt $curloc
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[5] = 1:
+			elseif karta >= 250000 and ymanrem[5] = 1:
 				act 'Decorate the bathroom (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -205,7 +205,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[6] = 0:
+			if karta >= 250000 and ymanrem[6] = 0:
 				act 'Pay for the renovations of the kitchen (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -217,7 +217,7 @@ if $ARGS[0] = '':
 
 					act 'Leave':gt $curloc
 				end
-			elseif karta + bankDebtLimit >= 350000 and ymanrem[6] = 1:
+			elseif karta >= 350000 and ymanrem[6] = 1:
 				act 'Decorate the kitchen (350,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -231,7 +231,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[7] = 0:
+			if karta >= 250000 and ymanrem[7] = 0:
 				act 'Pay for the renovations of the living room (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -243,7 +243,7 @@ if $ARGS[0] = '':
 
 					act 'Leave':gt $curloc
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[7] = 1:
+			elseif karta >= 250000 and ymanrem[7] = 1:
 				act 'Decorate the living room (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -258,7 +258,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[8] = 0:
+			if karta >= 250000 and ymanrem[8] = 0:
 				act 'Pay for the renovations of the fireplace room (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -270,7 +270,7 @@ if $ARGS[0] = '':
 
 					act 'Leave':gt $curloc
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[8] = 1:
+			elseif karta >= 250000 and ymanrem[8] = 1:
 				act 'Decorate the fireplace room (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -284,7 +284,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[9] = 0:
+			if karta >= 250000 and ymanrem[9] = 0:
 				act 'Pay for the renovations of the nursery room (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -296,7 +296,7 @@ if $ARGS[0] = '':
 
 					act 'Leave':gt $curloc
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[9] = 1:
+			elseif karta >= 250000 and ymanrem[9] = 1:
 				act 'Decorate the nursery (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -310,7 +310,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[10] = 0:
+			if karta >= 250000 and ymanrem[10] = 0:
 				act 'Pay for the renovations of the library (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -322,7 +322,7 @@ if $ARGS[0] = '':
 
 					act 'Leave':gt $curloc
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[10] = 1:
+			elseif karta >= 250000 and ymanrem[10] = 1:
 				act 'Decorate the library (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -336,7 +336,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[11] = 0:
+			if karta >= 250000 and ymanrem[11] = 0:
 				act 'Pay for the renovations of the gym (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -348,7 +348,7 @@ if $ARGS[0] = '':
 
 					act 'Leave':gt $curloc
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[11] = 1:
+			elseif karta >= 250000 and ymanrem[11] = 1:
 				act 'Decorate the gym (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -362,7 +362,7 @@ if $ARGS[0] = '':
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[12] = 0:
+			if karta >= 250000 and ymanrem[12] = 0:
 				act 'Pay for the renovations of the office (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -374,7 +374,7 @@ if $ARGS[0] = '':
 
 					act 'Leave':gt $curloc
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[12] = 1:
+			elseif karta >= 250000 and ymanrem[12] = 1:
 				act 'Decorate the office (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000

+ 412 - 412
locations/city_musicstore_stock.qsrc

@@ -1,427 +1,427 @@
 # city_musicstore_stock
 
 if $ARGS[0]='electric':
-    *clr & cla
-    $store = 'musicstore'
-    '<center><table border=1>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio Equipment</a></center>
-        </TH>
-    </table></center>'
-    '<center><font size="+4" color="red"><b>Warning: Right now, these guitars have no effect on gameplay!</b></font></center>'
-    '<center><table border=1>
-        <tr>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/burny-rlg55-vld.jpg" align="left"></td>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/epiphone-les-paul-express.jpg" align="left"></td>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/fender-american-professional-stratocaster.jpg" align="left"></td>
-        </tr>
-        <tr>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/fender-player-tele.jpg" align="left"></td>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/gibson-2019-les-paul.jpg" align="left"></td>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/yamaha-pacifica-012-rm.jpg" align="left"></td>
-        </tr>
-    </table>
-    </center>' 
-    act 'Leave': gt 'city_musicstore', 'musicshop'
-
-    if karta >= 43990 and  ml_guitars['burny-rlg55-vld'] = 0:
-        act 'Buy the Burny RLG55 VLD with card (43,990 P)': 
-            ml_guitars['burny-rlg55-vld'] = 1
-            karta -= 43990
-            ml_boughtguitar += 1  
-            ml_gigbag = 1
-            gs 'stat'
-            gt 'city_musicstore_stock', 'electric'
-        end        
-    end
-
-    if money >= 43990 and  ml_guitars['burny-rlg55-vld'] = 0:
-        act 'Buy the Burny RLG55 VLD with cash (43,990 P)': 
-            ml_guitars['burny-rlg55-vld'] = 1
-            money -= 43990
-            ml_boughtguitar += 1  
-            ml_gigbag = 1 
-            gs 'stat'         
-            gt 'city_musicstore_stock', 'electric'
-        end        
-    end
-
-    if karta >= 14280  and ml_guitars['epiphone-les-paul-express'] = 0:
-        act 'Buy the Epiphone Les Paul Express with card (14,280 P)': 
-            ml_guitars['epiphone-les-paul-express'] = 1
-            karta -= 14280
-            ml_boughtguitar += 1   
-            ml_gigbag = 1   
-            gs 'stat'      
-            gt 'city_musicstore_stock', 'electric'
-        end        
-    end
-
-    if money >= 14280  and ml_guitars['epiphone-les-paul-express'] = 0:
-        act 'Buy the Epiphone Les Paul Express with cash (14,280 P)': 
-            ml_guitars['epiphone-les-paul-express'] = 1
-            money -= 14280
-            ml_boughtguitar += 1   
-            ml_gigbag = 1
-            gs 'stat'         
-            gt 'city_musicstore_stock', 'electric'
-        end        
-    end
-
-    if karta >= 179000 and ml_guitars['fender-american-professional-stratocaster'] = 0:
-        act 'Buy the Fender American Professional Stratocaster with card (179,000 P)':
-            ml_guitars['fender-american-professional-stratocaster'] = 1
-            karta -= 179000            
-            ml_boughtguitar += 1 
-            ml_hardcase = 1 
-            gs 'stat'          
-            gt 'city_musicstore_stock', 'electric'
-        end
-    end
-
-    if money >= 179000 and ml_guitars['fender-american-professional-stratocaster'] = 0:
-        act 'Buy the Fender American Professional Stratocaster with cash (179,000 P)':
-            ml_guitars['fender-american-professional-stratocaster'] = 1
-            money -= 179000            
-            ml_boughtguitar += 1 
-            ml_hardcase = 1 
-            gs 'stat'          
-            gt 'city_musicstore_stock', 'electric'
-        end
-    end
-
-    if karta >= 83000 and ml_guitars['fender-player-tele'] = 0:
-        act 'Buy the Fender Player Tele with card (83,000 P)':
-            ml_guitars['fender-player-tele'] = 1
-            karta -= 83000
-            ml_boughtguitar += 1            
-            ml_hardcase = 1  
-            gs 'stat'
-            gt 'city_musicstore_stock', 'electric'
-        end
-    end
-
-        if money >= 83000 and ml_guitars['fender-player-tele'] = 0:
-        act 'Buy the Fender Player Tele with cash (83,000 P)':
-            ml_guitars['fender-player-tele'] = 1
-            money -= 83000
-            ml_boughtguitar += 1            
-            ml_hardcase = 1  
-            gs 'stat'
-            gt 'city_musicstore_stock', 'electric'
-        end
-    end
-
-    if karta >= 241000 and ml_guitars['gibson-2019-les-paul'] = 0:
-        act 'Buy the Gibson 2019 Les Paul with card (241,000 P)':
-            ml_guitars['gibson-2019-les-paul'] = 1
-            karta -= 241000
-            ml_boughtguitar += 1  
-            ml_hardcase = 1
-            gs 'stat'            
-            gt 'city_musicstore_stock', 'electric'
-        end        
-    end 
-
-    if money >= 241000 and ml_guitars['gibson-2019-les-paul'] = 0:
-        act 'Buy the Gibson 2019 Les Paul with cash (241,000 P)':
-            ml_guitars['gibson-2019-les-paul'] = 1
-            money -= 241000
-            ml_boughtguitar += 1  
-            ml_hardcase = 1  
-            gs 'stat'          
-            gt 'city_musicstore_stock', 'electric'
-        end        
-    end 
-
-    if karta >= 17990 and ml_guitars['yamaha-pacifica-012-rm'] = 0:
-        act 'Buy the Yamaha Pacifica 012 RM with card (17,900 P)':
-            ml_guitars['yamaha-pacifica-012-rm'] = 1
-            karta -= 17990
-            ml_boughtguitar += 1    
-            ml_gigbag =  1 
-            gs 'stat'       
-            gt 'city_musicstore_stock', 'electric'
-        end
-    end
-
-    if money >= 17990 and ml_guitars['yamaha-pacifica-012-rm'] = 0:
-        act 'Buy the Yamaha Pacifica 012 RM with cash (17,900 P)':
-            ml_guitars['yamaha-pacifica-012-rm'] = 1
-            money -= 17990
-            ml_boughtguitar += 1    
-            ml_gigbag =  1 
-            gs 'stat'       
-            gt 'city_musicstore_stock', 'electric'
-        end
-    end
+	*clr & cla
+	$store = 'musicstore'
+	'<center><table border=1>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio Equipment</a></center>
+		</TH>
+	</table></center>'
+	'<center><font size="+4" color="red"><b>Warning: Right now, these guitars have no effect on gameplay!</b></font></center>'
+	'<center><table border=1>
+		<tr>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/burny-rlg55-vld.jpg" align="left"></td>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/epiphone-les-paul-express.jpg" align="left"></td>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/fender-american-professional-stratocaster.jpg" align="left"></td>
+		</tr>
+		<tr>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/fender-player-tele.jpg" align="left"></td>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/gibson-2019-les-paul.jpg" align="left"></td>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/yamaha-pacifica-012-rm.jpg" align="left"></td>
+		</tr>
+	</table>
+	</center>'
+	act 'Leave': gt 'city_musicstore', 'musicshop'
+
+	if karta >= 43990 and  ml_guitars['burny-rlg55-vld'] = 0:
+		act 'Buy the Burny RLG55 VLD with card (43,990 P)':
+			ml_guitars['burny-rlg55-vld'] = 1
+			karta -= 43990
+			ml_boughtguitar += 1
+			ml_gigbag = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if money >= 43990 and  ml_guitars['burny-rlg55-vld'] = 0:
+		act 'Buy the Burny RLG55 VLD with cash (43,990 P)':
+			ml_guitars['burny-rlg55-vld'] = 1
+			money -= 43990
+			ml_boughtguitar += 1
+			ml_gigbag = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if karta >= 14280  and ml_guitars['epiphone-les-paul-express'] = 0:
+		act 'Buy the Epiphone Les Paul Express with card (14,280 P)':
+			ml_guitars['epiphone-les-paul-express'] = 1
+			karta -= 14280
+			ml_boughtguitar += 1
+			ml_gigbag = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if money >= 14280  and ml_guitars['epiphone-les-paul-express'] = 0:
+		act 'Buy the Epiphone Les Paul Express with cash (14,280 P)':
+			ml_guitars['epiphone-les-paul-express'] = 1
+			money -= 14280
+			ml_boughtguitar += 1
+			ml_gigbag = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if karta >= 179000 and ml_guitars['fender-american-professional-stratocaster'] = 0:
+		act 'Buy the Fender American Professional Stratocaster with card (179,000 P)':
+			ml_guitars['fender-american-professional-stratocaster'] = 1
+			karta -= 179000
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if money >= 179000 and ml_guitars['fender-american-professional-stratocaster'] = 0:
+		act 'Buy the Fender American Professional Stratocaster with cash (179,000 P)':
+			ml_guitars['fender-american-professional-stratocaster'] = 1
+			money -= 179000
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if karta >= 83000 and ml_guitars['fender-player-tele'] = 0:
+		act 'Buy the Fender Player Tele with card (83,000 P)':
+			ml_guitars['fender-player-tele'] = 1
+			karta -= 83000
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+		if money >= 83000 and ml_guitars['fender-player-tele'] = 0:
+		act 'Buy the Fender Player Tele with cash (83,000 P)':
+			ml_guitars['fender-player-tele'] = 1
+			money -= 83000
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if karta >= 241000 and ml_guitars['gibson-2019-les-paul'] = 0:
+		act 'Buy the Gibson 2019 Les Paul with card (241,000 P)':
+			ml_guitars['gibson-2019-les-paul'] = 1
+			karta -= 241000
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if money >= 241000 and ml_guitars['gibson-2019-les-paul'] = 0:
+		act 'Buy the Gibson 2019 Les Paul with cash (241,000 P)':
+			ml_guitars['gibson-2019-les-paul'] = 1
+			money -= 241000
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if karta >= 17990 and ml_guitars['yamaha-pacifica-012-rm'] = 0:
+		act 'Buy the Yamaha Pacifica 012 RM with card (17,900 P)':
+			ml_guitars['yamaha-pacifica-012-rm'] = 1
+			karta -= 17990
+			ml_boughtguitar += 1
+			ml_gigbag =  1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
+
+	if money >= 17990 and ml_guitars['yamaha-pacifica-012-rm'] = 0:
+		act 'Buy the Yamaha Pacifica 012 RM with cash (17,900 P)':
+			ml_guitars['yamaha-pacifica-012-rm'] = 1
+			money -= 17990
+			ml_boughtguitar += 1
+			ml_gigbag =  1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'electric'
+		end
+	end
 end
 
 
 if $ARGS[0]='acoustic':
-    *clr & cla
-    $store = 'musicstore'
-    '<center><table border=1>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio Equipment</a></center>
-        </TH>
-    </table></center>'
-    '<center><font size="+4" color="red"><b>Warning: Right now, these guitars have no effect on gameplay!</b></font></center>'
-    '<center><table border=1>
-        <tr>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-hdc-28e.jpg" align="left"></td>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-d10e-01.jpg" align="left"></td>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-ed-sheeran.jpg" align="left"></td>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-lx-1.jpg" align="left"></td>
-        </tr>
-    </table>
-    </center>'
-    act 'Leave': gt 'city_musicstore', 'musicshop'
-
-    if karta >= 320000 and ml_guitars['martin-hdc-28e'] = 0:
-        act 'Buy the Martin HDC-28E with card (320,000 P)': 
-            ml_guitars['martin-hdc-28e'] = 1
-            karta -= 320000
-            ml_boughtguitar += 1  
-            ml_hardcase = 1 
-            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1      
-            gs 'stat' 
-            gt 'city_musicstore_stock', 'acoustic'
-        end
-    end
-
-    if money >= 320000 and ml_guitars['martin-hdc-28e'] = 0:
-        act 'Buy the Martin HDC-28E with cash (320,000 P)': 
-            ml_guitars['martin-hdc-28e'] = 1
-            money -= 320000
-            ml_boughtguitar += 1  
-            ml_hardcase = 1 
-            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1  
-            gs 'stat'     
-            gt 'city_musicstore_stock', 'acoustic'
-        end
-    end    
-
-    if karta >= 81990 and ml_guitars['martin-d10e-01'] = 0:    
-        act 'Buy the Martin D-10E-01 with card (81,990 P)':
-            ml_guitars['martin-d10e-01'] = 1
-            karta -= 81990
-            ml_boughtguitar += 1 
-            ml_hardcase = 1
-            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
-            gs 'stat'    
-            gt 'city_musicstore_stock', 'acoustic'
-        end
-    end
-
-    if money >= 81990 and ml_guitars['martin-d10e-01'] = 0:    
-        act 'Buy the Martin D-10E-01 with cash (81,990 P)':
-            ml_guitars['martin-d10e-01'] = 1
-            money -= 81990
-            ml_boughtguitar += 1 
-            ml_hardcase = 1
-            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
-            gs 'stat'    
-            gt 'city_musicstore_stock', 'acoustic'
-        end
-    end
-
-    if karta >= 63900 and ml_guitars['martin-ed-sheeran'] = 0:
-        act 'Buy the Martin Ed Sheeran Signature Edition with card (63,900 P)':
-            ml_guitars['martin-ed-sheeran'] = 1
-            karta -= 63900
-            ml_boughtguitar += 1     
-            ml_hardcase = 1
-            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1  
-            gs 'stat'        
-            gt 'city_musicstore_stock', 'acoustic'
-        end
-    end
-
-    if money >= 63900 and ml_guitars['martin-ed-sheeran'] = 0:
-        act 'Buy the Martin Ed Sheeran Signature Edition with cash (63,900 P)':
-            ml_guitars['martin-ed-sheeran'] = 1
-            money -= 63900
-            ml_boughtguitar += 1     
-            ml_hardcase = 1
-            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1  
-            gs 'stat'        
-            gt 'city_musicstore_stock', 'acoustic'
-        end
-    end
-
-    if karta >= 41990 and ml_guitars['martin-lx-1'] = 0:
-        act 'Buy the Martin LX-1 with card (41,900 P)': 
-            ml_guitars['martin-lx-1'] = 1
-            karta -= 41900
-            ml_boughtguitar += 1
-            ml_gigbag = 1
-            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1 
-            gs 'stat'  
-            gt 'city_musicstore_stock', 'acoustic'
-        end
-    end
-
-        if money >= 41990 and ml_guitars['martin-lx-1'] = 0:
-        act 'Buy the Martin LX-1 with cash (41,900 P)': 
-            ml_guitars['martin-lx-1'] = 1
-            money -= 41900
-            ml_boughtguitar += 1
-            ml_gigbag = 1
-            if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1  
-            gs 'stat' 
-            gt 'city_musicstore_stock', 'acoustic'
-        end
-    end
+	*clr & cla
+	$store = 'musicstore'
+	'<center><table border=1>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio Equipment</a></center>
+		</TH>
+	</table></center>'
+	'<center><font size="+4" color="red"><b>Warning: Right now, these guitars have no effect on gameplay!</b></font></center>'
+	'<center><table border=1>
+		<tr>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-hdc-28e.jpg" align="left"></td>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-d10e-01.jpg" align="left"></td>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-ed-sheeran.jpg" align="left"></td>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/martin-lx-1.jpg" align="left"></td>
+		</tr>
+	</table>
+	</center>'
+	act 'Leave': gt 'city_musicstore', 'musicshop'
+
+	if karta >= 320000 and ml_guitars['martin-hdc-28e'] = 0:
+		act 'Buy the Martin HDC-28E with card (320,000 P)':
+			ml_guitars['martin-hdc-28e'] = 1
+			karta -= 320000
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'acoustic'
+		end
+	end
+
+	if money >= 320000 and ml_guitars['martin-hdc-28e'] = 0:
+		act 'Buy the Martin HDC-28E with cash (320,000 P)':
+			ml_guitars['martin-hdc-28e'] = 1
+			money -= 320000
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'acoustic'
+		end
+	end
+
+	if karta >= 81990 and ml_guitars['martin-d10e-01'] = 0:
+		act 'Buy the Martin D-10E-01 with card (81,990 P)':
+			ml_guitars['martin-d10e-01'] = 1
+			karta -= 81990
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'acoustic'
+		end
+	end
+
+	if money >= 81990 and ml_guitars['martin-d10e-01'] = 0:
+		act 'Buy the Martin D-10E-01 with cash (81,990 P)':
+			ml_guitars['martin-d10e-01'] = 1
+			money -= 81990
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'acoustic'
+		end
+	end
+
+	if karta >= 63900 and ml_guitars['martin-ed-sheeran'] = 0:
+		act 'Buy the Martin Ed Sheeran Signature Edition with card (63,900 P)':
+			ml_guitars['martin-ed-sheeran'] = 1
+			karta -= 63900
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'acoustic'
+		end
+	end
+
+	if money >= 63900 and ml_guitars['martin-ed-sheeran'] = 0:
+		act 'Buy the Martin Ed Sheeran Signature Edition with cash (63,900 P)':
+			ml_guitars['martin-ed-sheeran'] = 1
+			money -= 63900
+			ml_boughtguitar += 1
+			ml_hardcase = 1
+			if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'acoustic'
+		end
+	end
+
+	if karta >= 41990 and ml_guitars['martin-lx-1'] = 0:
+		act 'Buy the Martin LX-1 with card (41,900 P)':
+			ml_guitars['martin-lx-1'] = 1
+			karta -= 41900
+			ml_boughtguitar += 1
+			ml_gigbag = 1
+			if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'acoustic'
+		end
+	end
+
+		if money >= 41990 and ml_guitars['martin-lx-1'] = 0:
+		act 'Buy the Martin LX-1 with cash (41,900 P)':
+			ml_guitars['martin-lx-1'] = 1
+			money -= 41900
+			ml_boughtguitar += 1
+			ml_gigbag = 1
+			if ml_guitar['carried'] = 0: ml_guitar['carried'] = 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'acoustic'
+		end
+	end
 end
 
 if $ARGS[0]='amplifier':
-    *clr & cla
-    $store = 'musicstore'
-    '<center><table border=1>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio Equipment</a></center>
-        </TH>
-    </table></center>'
-    '<center><font size="+4" color="red"><b>Warning: Right now, these amplifiers have no effect on gameplay!</b></font></center>'
-    '<center><table border=1>
-        <tr>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/kustom-kg112fx.jpg" align="left"></td>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/orange-rocker-32.jpg" align="left"></td>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/blackstar-artisan-15.jpg" align="left"></td>
-        </tr>
-    </table>
-    </center>'
-    act 'Leave': gt 'city_musicstore', 'musicshop'
-    if karta >= 10790 and ml_amplifiers['kustom-kg112fx'] = 0:
-        act 'Buy Kustom KG112FX with card (10,790 P)':
-            ml_amplifiers['kustom-kg112fx'] = 1
-            karta -= 10790
-            ml_boughtamp += 1
-            gs 'stat'
-            gt 'city_musicstore_stock', 'amplifier'
-        end
-    end
-
-    if money >= 10790 and ml_amplifiers['kustom-kg112fx'] = 0:
-        act 'Buy Kustom KG112FX with cash (10,790 P)':
-            ml_amplifiers['kustom-kg112fx'] = 1
-            money -= 10790
-            ml_boughtamp += 1
-            gs 'stat'
-            gt 'city_musicstore_stock', 'amplifier'
-        end
-    end   
-
-    if karta >= 99990 and ml_amplifiers['orange-rocker-32'] = 0:
-        act 'Buy Orange Rocker 32 with card (99,990 P)':
-            ml_amplifiers['orange-rocker-32'] = 1
-            karta -= 99990
-            ml_boughtamp += 1
-            gs 'stat'
-            gt 'city_musicstore_stock', 'amplifier'
-        end
-    end
-
-    if money >= 99990 and ml_amplifiers['orange-rocker-32'] = 0:
-        act 'Buy Orange Rocker 32 with cash (99,990 P)':
-            ml_amplifiers['orange-rocker-32'] = 1
-            money -= 99990
-            ml_boughtamp += 1
-            gs 'stat'
-            gt 'city_musicstore_stock', 'amplifier'
-        end
-    end    
-
-    if karta >= 145900 and ml_amplifiers['blackstar-artisan-15'] = 0:
-        act 'Buy Blackstar Artisan 15 with card (145.900 P)':
-            ml_amplifiers['blackstar-artisan-15'] = 1
-            karta -= 145900
-            ml_boughtamp += 1
-            gs 'stat'
-            gt 'city_musicstore_stock', 'amplifier'
-        end
-    end
-
-        if money >= 145900 and ml_amplifiers['blackstar-artisan-15'] = 0:
-        act 'Buy Blackstar Artisan 15 with cash (145.900 P)':
-            ml_amplifiers['blackstar-artisan-15'] = 1
-            money -= 145900
-            ml_boughtamp += 1
-            gs 'stat'
-            gt 'city_musicstore_stock', 'amplifier'
-        end
-    end
+	*clr & cla
+	$store = 'musicstore'
+	'<center><table border=1>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio Equipment</a></center>
+		</TH>
+	</table></center>'
+	'<center><font size="+4" color="red"><b>Warning: Right now, these amplifiers have no effect on gameplay!</b></font></center>'
+	'<center><table border=1>
+		<tr>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/kustom-kg112fx.jpg" align="left"></td>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/orange-rocker-32.jpg" align="left"></td>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/blackstar-artisan-15.jpg" align="left"></td>
+		</tr>
+	</table>
+	</center>'
+	act 'Leave': gt 'city_musicstore', 'musicshop'
+	if karta >= 10790 and ml_amplifiers['kustom-kg112fx'] = 0:
+		act 'Buy Kustom KG112FX with card (10,790 P)':
+			ml_amplifiers['kustom-kg112fx'] = 1
+			karta -= 10790
+			ml_boughtamp += 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'amplifier'
+		end
+	end
+
+	if money >= 10790 and ml_amplifiers['kustom-kg112fx'] = 0:
+		act 'Buy Kustom KG112FX with cash (10,790 P)':
+			ml_amplifiers['kustom-kg112fx'] = 1
+			money -= 10790
+			ml_boughtamp += 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'amplifier'
+		end
+	end
+
+	if karta >= 99990 and ml_amplifiers['orange-rocker-32'] = 0:
+		act 'Buy Orange Rocker 32 with card (99,990 P)':
+			ml_amplifiers['orange-rocker-32'] = 1
+			karta -= 99990
+			ml_boughtamp += 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'amplifier'
+		end
+	end
+
+	if money >= 99990 and ml_amplifiers['orange-rocker-32'] = 0:
+		act 'Buy Orange Rocker 32 with cash (99,990 P)':
+			ml_amplifiers['orange-rocker-32'] = 1
+			money -= 99990
+			ml_boughtamp += 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'amplifier'
+		end
+	end
+
+	if karta >= 145900 and ml_amplifiers['blackstar-artisan-15'] = 0:
+		act 'Buy Blackstar Artisan 15 with card (145.900 P)':
+			ml_amplifiers['blackstar-artisan-15'] = 1
+			karta -= 145900
+			ml_boughtamp += 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'amplifier'
+		end
+	end
+
+		if money >= 145900 and ml_amplifiers['blackstar-artisan-15'] = 0:
+		act 'Buy Blackstar Artisan 15 with cash (145.900 P)':
+			ml_amplifiers['blackstar-artisan-15'] = 1
+			money -= 145900
+			ml_boughtamp += 1
+			gs 'stat'
+			gt 'city_musicstore_stock', 'amplifier'
+		end
+	end
 end
 
 if $ARGS[0]='studio':
-    *clr & cla
-    $store = 'musicstore'
-    '<center><table border=1>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
-        </TH>
-        <TH>
-            <center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio Equipment</a></center>
-        </TH>
-    </table></center>'
-
-    '<center><table border=1>
-        <tr>
-            <td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/home-studio.jpg" align="left"></td>
-        </tr>
-    </table>
-    </center>'
-    act 'Leave': gt 'city_musicstore', 'musicshop'
-    if karta >= 19980 and ml_studio['scarlet-3rd-gen'] = 0:
-        act 'Buy Focusrite Scarlett Solo Studio 3rd Gen with card (19,980 P)':
-            ml_studio['scarlet-3rd-gen'] = 1
-            karta -= 19980
-            gs 'stat'
-            gt 'city_musicstore_stock', 'studio'
-        end
-    end
-
-    if money >= 19980 and ml_studio['scarlet-3rd-gen'] = 0:
-        act 'Buy Focusrite Scarlett Solo Studio 3rd Gen  with cash (19,980 P)':
-            ml_studio['scarlet-3rd-gen'] = 1
-            money -= 19980
-            gs 'stat'
-            gt 'city_musicstore_stock', 'studio'
-        end
-    end
+	*clr & cla
+	$store = 'musicstore'
+	'<center><table border=1>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''electric'', ''store'', ''<<$store>>''">Electric guitars</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''acoustic'', ''store'', ''<<$store>>''">Acoustic guitars</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''amplifier'', ''store'', ''<<$store>>''">Amplifiers</a></center>
+		</TH>
+		<TH>
+			<center><a href="exec:gs ''city_musicstore_stock'', ''studio'', ''store'', ''<<$store>>''">Studio Equipment</a></center>
+		</TH>
+	</table></center>'
+
+	'<center><table border=1>
+		<tr>
+			<td><img src="images/locations/city/citycenter/mall/musicstore/musictorestock/home-studio.jpg" align="left"></td>
+		</tr>
+	</table>
+	</center>'
+	act 'Leave': gt 'city_musicstore', 'musicshop'
+	if karta >= 19980 and ml_studio['scarlet-3rd-gen'] = 0:
+		act 'Buy Focusrite Scarlett Solo Studio 3rd Gen with card (19,980 P)':
+			ml_studio['scarlet-3rd-gen'] = 1
+			karta -= 19980
+			gs 'stat'
+			gt 'city_musicstore_stock', 'studio'
+		end
+	end
+
+	if money >= 19980 and ml_studio['scarlet-3rd-gen'] = 0:
+		act 'Buy Focusrite Scarlett Solo Studio 3rd Gen  with cash (19,980 P)':
+			ml_studio['scarlet-3rd-gen'] = 1
+			money -= 19980
+			gs 'stat'
+			gt 'city_musicstore_stock', 'studio'
+		end
+	end
 end
 --- city_musicstore_stock ---------------------------------

+ 764 - 0
locations/clinic_functions.qsrc

@@ -0,0 +1,764 @@
+# clinic_functions
+
+if $ARGS[0] = 'set_abortion_act':
+	if preg = 1 and pregchem < 1863 and knowpreg = 1:
+		if max(money, karta) < 15000:
+			act 'Get an abortion (<font color="red">15,000 <b>₽</b></font>)': '<br><font color="red">You don''t have enough money to have an abortion.</font>'
+		else
+			act 'Get an abortion (15,000 <b>₽</b>)':
+				cla
+				if money >= 15000:
+					act 'Pay in cash':
+						xgt 'clinic_functions', 'get_abortion', 'money'
+					end
+				end
+				if karta >= 15000:
+					act 'Pay with card':
+						xgt 'clinic_functions', 'get_abortion', 'karta'
+					end
+				end
+				act 'Return to the entrance': gt $loc, $loc_arg
+			end
+		end
+	end
+end
+
+if $ARGS[0] = 'get_abortion':
+	if $ARGS[1] = 'money':
+		money -= 15000
+	else
+		karta -= 15000
+	end
+
+	minut += 60
+	if $region = 'city':
+		'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/abort.jpg"></center>'
+	end
+	'You spread out on a gynecological chair at an angle where you can''t see what''s going on. You feel nauseous and violated as a nurse hands you a single aspirin and a glass of muddy-looking water to down it with.'
+
+	gs 'medical_din', 'abortion'
+
+	gs 'stat'
+	act 'Return to the entrance': gt $loc, $loc_arg
+end
+
+
+
+if $ARGS[0] = 'set_dentist_act':
+	if (pcs_teeth > -1 and (dentistday < daystart or dentistday = 0)) or (pcs_missing_teeth > 0  and pcs_brace = 0):
+		act 'Go to the dentist':
+			*clr & cla
+			'<center><img <<$set_imgh>> src="images/locations/shared/clinic/dentist.jpg"></center>'
+			menu_off = 1
+			minut += 15
+			gs 'stat'
+
+			if pcs_brace = 1:
+				pcs_brace = 0
+				pcs_teeth -= 1
+				'The dentist spends 15 minutes taking off your brace and cleaning up. You look in the mirror afterwards and your teeth are '+iif(pcs_teeth = 0, 'now straight', 'straighter, but can still use some more work.')
+				gs 'AppearanceSystem', 'UpdateBaseAppearance'
+				gs 'stat'
+			else
+				if pcs_missing_teeth = 1:
+					zubpay = 30000
+					'The dentist examines you and says it will cost 3000 <b>₽</b> to replace your tooth.'
+				elseif pcs_missing_teeth > 1:
+					zubpay = pcs_missing_teeth * 30000
+					'The dentist examines you and says it will cost <<pcs_missing_teeth * 30000>> <b>₽</b> to fill the gaps.'
+				elseif pcs_teeth = 0:
+					zubpay = 3000
+					'The dentist examines you and says, it will cost 3000 <b>₽</b> to brighten and polish your teeth.'
+				elseif pcs_teeth > 0:
+					zubpay = 4500
+					'The dentist examinees you and says it will cost 4500 <b>₽</b> to straighten your teeth and that you''ll have to wear a brace for three months. However, he states that he can''t promise they will be completely straight after one treatment.'
+				end
+
+				if max(money, karta) < zubpay:
+					*nl
+					'You do not have enough money to fix your teeth.'
+				else
+					dynamic "
+						if money >= <<zubpay>>:
+							act 'Sort out your teeth (<<zubpay>> <b>₽</b>) (cash)':
+								xgt 'clinic_functions', 'fix_teeth', <<zubpay>>, 'money'
+							end
+						end
+						if karta >= <<zubpay>>:
+							act 'Sort out your teeth (<<zubpay>> <b>₽</b>) (card)':
+								xgt 'clinic_functions', 'fix_teeth', <<zubpay>>, 'karta'
+							end
+						end
+					"
+				end
+				killvar 'zubpay'
+			end
+
+			act 'Return to the entrance': gt $loc, $loc_arg
+		end
+	end
+end
+
+if $ARGS[0] = 'fix_teeth':
+	act 'Return to the entrance': gt $loc, $loc_arg
+
+	if $ARGS[2] = 'money':
+		money -= ARGS[1]
+	else
+		karta -= ARGS[1]
+	end
+
+	minut += 60
+	if pcs_missing_teeth > 0:
+		pcs_missing_teeth = 0
+		'You pay the dentist to fix your teeth and he has restored your winning smile within an hour.'
+	elseif pcs_teeth > 0:
+		dentistday = daystart + 180
+		pcs_brace = 1
+		'You pay the dentist to straighten your teeth. After an hour of work, he has attached a brace to your teeth and tells you to come back in six months to have it taken off.'
+	else
+		dentistday = daystart + 90
+		pcs_teeth = -1
+		'You pay the dentist to brighten and polish your teeth and an hour later, your smile is much brighter and more attractive.'
+	end
+	gs 'AppearanceSystem', 'UpdateBaseAppearance'
+	gs 'stat'
+end
+
+
+
+if $ARGS[0] = 'set_optometrist_acts':
+	if glassqw = 1:
+		act 'Visit the optometrist (0:35)':
+			*clr & cla
+			menu_off = 1
+			minut += 35
+			gs 'stat'
+			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/clinic/optometrist.jpg"></center>'
+			'The optometrist takes you through a series of tests to measure the condition of your eyes.'
+			'He looks at you as if he has bad news for you. "Well, you probably already expected this, but your vision has deteriorated significantly. You''re going to need glasses to be able to read. The prescription I''m writing for you is for a simple set of rimmed glasses which you can pick up at the front desk before you leave."'
+			'He hands you a piece of paper. "Of course you can get a different pair elsewhere if you want better looking ones, the details for which ones you need are on your prescription. You can also get laser vision correction if you really don''t want to use glasses, but I''m going to be honest with you: that''s a very expensive procedure."'
+			pcs_nerd += 1
+			glassqw = 2
+			glass = 1
+			blizoruk += 1
+			act 'Return to the entrance': gt $loc, $loc_arg
+		end
+	end
+
+	if glass > 0:
+		act 'Go to the optometrist':
+			*clr & cla
+			menu_off = 1
+			gs 'stat'
+			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/clinic/optometrist.jpg"></center>'
+			'The optometrist examines your eyes and says that he can perform laser eye surgery for 75,000 <b>₽</b>. Of course, reading books can cause your eyesight to deteriorate again.'
+
+			if glass = 1: 'The optometrist also tells you about the option to buy glasses for 4,500 <b>₽</b>.'
+
+			act 'Return to the entrance': gt $loc, $loc_arg
+
+			if glass = 1:
+				if max(money, karta) < 4500:
+					*nl
+					'You can''t afford the more stylish glasses.'
+				else
+					if money >= 4500:
+						act 'Buy glasses (4,500 <b>₽</b>) (cash)':
+							xgt 'clinic_functions', 'buy_stylish_glasses', 'money'
+						end
+					end
+					if karta >= 4500:
+						act 'Buy glasses (4,500 <b>₽</b>) (card)':
+							xgt 'clinic_functions', 'buy_stylish_glasses', 'karta'
+						end
+					end
+				end
+			end
+
+			if glass ! 0:
+				if max(money, karta) < 75000:
+					*nl
+					'You can''t afford the laser eye correction surgery.'
+				else
+					if money >= 75000:
+						act 'Pay for laser correction (75,000 <b>₽</b>) (cash)':
+							xgt 'clinic_functions', 'buy_laser_correction', 'money'
+						end
+					end
+					if karta >= 75000:
+						act 'Pay for laser correction (75,000 <b>₽</b>) (card)':
+							xgt 'clinic_functions', 'buy_laser_correction', 'karta'
+						end
+					end
+				end
+			end
+		end
+	end
+end
+
+if $ARGS[0] = 'buy_stylish_glasses':
+	if $ARGS[1] = 'money':
+		money -= 4500
+	else
+		karta -= 4500
+	end
+	minut += 60
+	glass = 2
+	gs 'AppearanceSystem', 'UpdateBaseAppearance'
+	gs 'stat'
+	'You buy a new, more stylish pair of glasses.'
+
+	act 'Return to the entrance': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'buy_laser_correction':
+	if $ARGS[1] = 'money':
+		money -= 75000
+	else
+		karta -= 75000
+	end
+	minut += 60
+	blizoruk = 0
+	glass = 0
+	gs 'body_desc'
+	gs 'stat'
+	'You undergo laser eye surgery. Your eyesight is much better now.'
+	act 'Return to the entrance': gt $loc, $loc_arg
+end
+
+
+
+
+if $ARGS[0] = 'set_std_herpes_shot_act':
+	if GerpesNapr > 0 and GerpesUkolDay ! daystart:
+		if max(money, karta) < 450:
+			*nl
+			'You can''t afford your herpes shot.'
+		else
+			if money >= 450:
+				act 'Get herpes shot (450 <b>₽</b>) (cash) You need <<GerpesNapr>> more injections to complete the treatment':
+					money -= 450
+					xgt 'clinic_functions', 'herpes_shot'
+				end
+			end
+			if karta >= 450:
+				act 'Get herpes shot (450 <b>₽</b>) (card) You need <<GerpesNapr>> more injections to complete the treatment':
+					karta -= 450
+					xgt 'clinic_functions', 'herpes_shot'
+				end
+			end
+		end
+	end
+end
+
+if $ARGS[0] = 'set_std_gonorrhea_shot_act':
+	if TriperNapr > 0 and TriperUkolDay ! daystart:
+		if max(money, karta) < 750:
+			*nl
+			'You can''t afford your gonorrhea shot.'
+		else
+			if money >= 750:
+				act 'Get gonorrhea shot (750 <b>₽</b>) (cash) You need <<TriperNapr>> more injections to complete the treatment':
+					money -= 750
+					xgt 'clinic_functions', 'gonorrhea_shot'
+				end
+			end
+			if karta >= 750:
+				act 'Get gonorrhea shot (750 <b>₽</b>) (card) You need <<TriperNapr>> more injections to complete the treatment':
+					karta -= 750
+					xgt 'clinic_functions', 'gonorrhea_shot'
+				end
+			end
+		end
+	end
+end
+
+if $ARGS[0] = 'set_std_syphilis_shot_act':
+	if SifNapr = 1:
+		if max(money, karta) < 1000:
+			*nl
+			'You can''t afford your syphilis shot.'
+		else
+			if money >= 1000:
+				act 'Get syphilis shot (1,000 <b>₽</b>) (cash)':
+					money -= 1000
+					xgt 'clinic_functions', 'syphilis_shot'
+				end
+			end
+			if karta >= 1000:
+				act 'Get syphilis shot (1,000 <b>₽</b>) (card)':
+					karta -= 1000
+					xgt 'clinic_functions', 'syphilis_shot'
+				end
+			end
+		end
+	end
+end
+
+if $ARGS[0] = 'set_std_herpes_cure_act':
+	if GerpesOnce = 1 and week = 1 and day <= 10:
+		if max(money, karta) < 45000:
+			*nl
+			'You to go to private clinic and completely cure your herpes.'
+		else
+			if money >= 45000:
+				act 'Go to private clinic and completely cure your herpes (45,000 <b>₽</b>) (cash)':
+					money -= 45000
+					xgt 'clinic_functions', 'herpes_cure'
+				end
+			end
+			if karta >= 45000:
+				act 'Go to private clinic and completely cure your herpes (45,000 <b>₽</b>) (card)':
+					karta -= 45000
+					xgt 'clinic_functions', 'herpes_cure'
+				end
+			end
+		end
+	end
+end
+if $ARGS[0] = 'set_std_yeast_cure_act':
+	if KandidozOnce = 1:
+		if max(money, karta) < 15000:
+			*nl
+			'You can''t afford to go to the private clinic and completely cure your yeast infection.'
+		else
+			if money >= 15000:
+				act 'Go to private clinic and completely cure your yeast infection. (15,000 <b>₽</b>) (cash)':
+					money -= 15000
+					xgt 'clinic_functions', 'yeast_cure'
+				end
+			end
+			if karta >= 15000:
+				act 'Go to private clinic and completely cure your yeast infection. (15,000 <b>₽</b>) (card)':
+					karta -= 15000
+					xgt 'clinic_functions', 'yeast_cure'
+				end
+			end
+		end
+	end
+end
+
+
+if $ARGS[0] = 'herpes_shot':
+	*clr & cla
+	minut += 15
+	GerpesUkolDay = daystart
+	GerpesNapr -= 1
+	gs 'stat'
+	'You see the nurse and she gives you a painful injection in your ass.'
+
+	if GerpesNapr = 0:Gerpes = -10 & 'You have completed the treatment.'
+	act 'Leave': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'gonorrhea_shot':
+	*clr & cla
+	minut += 15
+	TriperUkolDay = daystart
+	TriperNapr -= 1
+	gs 'stat'
+	'You see the nurse and she gives you a painful injection in your ass.'
+
+	if TriperNapr = 0:TriperOral = 0 & TriperOralSigns = 0 & Triper = 0 & Venera -= 1 & TriperOnce = 0 & 'You have completed the treatment.'
+
+	act 'Leave': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'syphilis_shot':
+	*clr & cla
+	minut += 60
+	SifNapr = 0
+	SifacOnce = 0
+	Sifilis = 0
+	Venera -= 1
+	gs 'stat'
+	'You see the nurse and she gives you a painful injection in your ass.'
+	'"That''s it. You might still feel a little off, but the infection is now cured."'
+
+	act 'Leave': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'yeast_cure':
+	*clr & cla
+	menu_off = 1
+	day += 3
+	week += 3
+	KandidozOnce = 0
+	Kandidoz = 0
+	gs 'stat'
+	'There''s an ambulance waiting outside. It drives you to a cutting edge medical facility, where you spend 3 days being treated and pampered.'
+	'After a long recovery, you have been completely cured of your yeast infection.'
+
+	act 'Leave': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'herpes_cure':
+	*clr & cla
+	menu_off = 1
+	day += 3
+	week += 3
+	GerpesOnce = 0
+	Gerpes = 0
+	OrHerpes = 0
+	GenHerpes = 0
+	Venera -= 1
+	gs 'stat'
+	'There''s an ambulance waiting outside. It drives you to a cutting edge medical facility, where you spend 3 days being treated and pampered.'
+	'After a long recovery, you have been completely cured of your herpes.'
+
+	act 'Leave': gt $loc, $loc_arg
+end
+
+
+
+if $ARGS[0] = 'set_electrolysis_act':
+	if lashair = 0:
+		if max(money, karta) >= 80000:
+			'<a href="exec: gt ''clinic_functions'', ''electrolysis''">Electrolysis</a> laser hair removal of legs and pubic area - 80,000 <b>₽</b>'
+		else
+			'Electrolysis - laser hair removal of legs and pubic area - 80,000 <b>₽</b>'
+		end
+	else
+		'Electrolysis - laser hair removal of legs and pubic area - 80,000 <b>₽</b> - You have no hair to remove.'
+	end
+end
+if $ARGS[0] = 'set_lip_enlargement_act':
+	if pcs_lip < 4:
+		if max(money, karta) >= 25000:
+			'<a href="exec: gt ''clinic_functions'', ''lipPlus''">Lip enlargement surgery</a> - 25,000 <b>₽</b>'
+		else
+			'Lip enlargement surgery - 25,000 <b>₽</b>'
+		end
+	else
+		'Lip enlargement surgery - 25,000 <b>₽</b> - Your lips are already big.'
+	end
+end
+if $ARGS[0] = 'set_lip_reduction_act':
+	if pcs_lip > 0:
+		if max(money, karta) >= 30000:
+			'<a href="exec: gt ''clinic_functions'', ''lipMin''">Lip reduction surgery</a> - 30,000 <b>₽</b>'
+		else
+			'Lip reduction surgery - 30,000 <b>₽</b>'
+		end
+	else
+		'Lip reduction surgery - 30,000 <b>₽</b> - Your lips are already thin'
+	end
+end
+if $ARGS[0] = 'set_eye_enlargement_act':
+	if pcs_eyesize < 3:
+		if max(money, karta) >= 90000:
+			'<a href="exec: gt ''clinic_functions'', ''eyePlus''">Eye enlargement surgery</a> - 90,000 <b>₽</b>'
+		else
+			'Eye enlargement surgery - 90,000 <b>₽</b>'
+		end
+	else
+		'Eye enlargement surgery - 90,000 <b>₽</b> - Your eyes are already big.'
+	end
+end
+if $ARGS[0] = 'set_eye_reduction_act':
+	if pcs_eyesize > 0:
+		if max(money, karta) >= 90000:
+			'<a href="exec: gt ''clinic_functions'', ''eyeMin''">Eye reduction surgery</a> - 90,000 <b>₽</b>'
+		else
+			'Eye reduction surgery - 90,000 <b>₽</b>'
+		end
+	else
+		'Eye reduction surgery - 90,000 <b>₽</b> - Your eyes are already small.'
+	end
+end
+if $ARGS[0] = 'set_liposuction_act':
+	if pcs_mass['body'] > 40:
+		if max(money, karta) >= 75000:
+			'<a href="exec: gt ''clinic_functions'', ''lyposuction''">Liposuction</a> - 75,000 <b>₽</b>'
+		else
+			'Liposuction - 75,000 <b>₽</b>'
+		end
+	else
+		'Liposuction - 75,000 <b>₽</b> - You''re already thin.'
+	end
+end
+
+if $ARGS[0] = 'set_remove_breast_implant_act':
+	if bodyVars['bust_silicone'] ! 0:
+		if max(money, karta) >= 90000:
+			'<a href="exec: stringimplant = 0 & fillimplant = 0 & gt ''clinic_functions'', ''bImplantA'', 0">Remove breast implants</a> - 90,000 <b>₽</b>'
+		else
+			'Remove breast implants - 90,000 <b>₽</b>'
+		end
+	else
+		'Remove breast implants - 90,000 <b>₽</b> - You have no breast implants.'
+	end
+end
+if $ARGS[0] = 'set_get_small_breast_implant_act':
+	if fillimplant = 0 and stringimplant = 0:
+		if max(money, karta) >=  170000:
+			'<a href="exec: gt ''clinic_functions'', ''bImplantA'', 10">Get small breast implants</a> - 170,000 <b>₽</b>'
+		else
+			'Get small breast implants - 170,000 <b>₽</b>'
+		end
+	else
+		'Get small breast implants - 170,000 <b>₽</b> - You already have ' + iif(fillimplant = 1, 'fillable', 'string') + ' implants.'
+	end
+end
+if $ARGS[0] = 'set_get_medium_breast_implant_act':
+	if fillimplant = 0 and stringimplant = 0:
+		if max(money, karta) >=  180000:
+			'<a href="exec: gt ''clinic_functions'', ''bImplantA'', 20">Get medium breast implants</a> - 180,000 <b>₽</b>'
+		else
+			'Get medium breast implants - 180,000 <b>₽</b>'
+		end
+	else
+		'Get medium breast implants - 180,000 <b>₽</b> - You already have ' + iif(fillimplant = 1, 'fillable', 'string') + ' implants.'
+	end
+end
+if $ARGS[0] = 'set_get_large_breast_implant_act':
+	if fillimplant = 0 and stringimplant = 0:
+		if max(money, karta) >=  190000:
+			'<a href="exec: gt ''clinic_functions'', ''bImplantA'', 30">Get large breast implants</a> - 190,000 <b>₽</b>'
+		else
+			'Get large breast implants - 190,000 <b>₽</b>'
+		end
+	else
+		'Get large breast implants - 190,000 <b>₽</b> - You already have ' + iif(fillimplant = 1, 'fillable', 'string') + ' implants.'
+	end
+end
+if $ARGS[0] = 'set_get_XXL_breast_implant_act':
+	if fillimplant = 0 and stringimplant = 0:
+		if max(money, karta) >=  200000:
+			'<a href="exec: gt ''clinic_functions'', ''bImplantA'', 40">Get XXL breast implants</a> - 200,000 <b>₽</b>'
+		else
+			'Get XXL breast implants - 200,000 <b>₽</b>'
+		end
+	else
+		'Get XXL breast implants - 200,000 <b>₽</b> - You already have ' + iif(fillimplant = 1, 'fillable', 'string') + ' implants.'
+	end
+end
+if $ARGS[0] = 'set_get_fillable_breast_implant_act':
+	if fillimplant = 0 and stringimplant = 0:
+		if max(money, karta) >=  200000:
+			'<a href="exec: fillimplant = 1 & gt ''clinic_functions'', ''bImplantA'', 20">Get fillable implants</a> - 200,000 <b>₽</b>'
+		else
+			'Get fillable implants - 200,000 <b>₽</b>'
+		end
+	else
+		'Get fillable implants - 200,000 <b>₽</b> - You already have ' + iif(fillimplant = 1, 'fillable', 'string') + ' implants.'
+	end
+end
+if $ARGS[0] = 'set_get_string_breast_implant_act':
+	if fillimplant = 0 and stringimplant = 0:
+		if max(money, karta) >=  200000:
+			'<a href="exec: stringimplant = 1 & gt ''clinic_functions'', ''bImplantA'', 20">Get string implants</a> - 250,000 <b>₽</b>'
+		else
+			'Get string implants - 250,000 <b>₽</b>'
+		end
+	else
+		'Get string implants - 250,000 <b>₽</b> - You already have ' + iif(fillimplant = 1, 'fillable', 'string') + ' implants.'
+	end
+end
+
+if $ARGS[0] = 'set_drain_string_breast_implant_act':
+	if stringimplant = 1 and bodyVars['bust_silicone'] >= 30:
+		if max(money, karta) >= 2000:
+			'<a href="exec: xgt ''clinic_functions'', ''bImplantA'', ''drain''">Drain string implant</a> - 2,000 <b>₽</b>'
+		else
+			'Drain string implant - 2,000 <b>₽</b>'
+		end
+	end
+end
+if $ARGS[0] = 'set_buy_silicone_bag_act':
+	if fillimplant = 1:
+		if max(money, karta) >= 500:
+			'<a href="exec: xgt ''clinic_functions'', ''bImplantA'', ''bag''">Buy silicone bag</a> - 500 <b>₽</b>'
+		else
+			'Buy silicone bag - 500 <b>₽</b>'
+		end
+	else
+		'Buy silicone bag - 500 <b>₽</b> - You don''t have fillable implants.'
+	end
+end
+
+
+
+if $ARGS[0] = 'electrolysis':
+	menu_off = 1
+	if money >= 80000:
+		money -= 80000
+	else
+		karta -= 80000
+	end
+	minut += 120
+	pcs_leghair = 0
+	pcs_pubes = 0
+	lashair = 1
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/electrolysis.jpg"></center>'
+	'The surgeon has you strip completely and lie down on the table. Over the next few hours, you''re treated by a laser over and over again. When the treatment is finished and you get up from the table, your skin feels silky smooth.'
+
+	act 'Continue': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'lipPlus':
+	menu_off = 1
+	if money >= 25000:
+		money -= 25000
+	else
+		karta -= 25000
+	end
+	minut += 60
+	pcs_lip += 1
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
+	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
+	'When you wake up, the procedure is complete and your lips are fuller.'
+
+	act 'Continue': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'lipMin':
+	menu_off = 1
+	if money >= 30000:
+		money -= 30000
+	else
+		karta -= 30000
+	end
+	minut += 60
+	pcs_lip -= 1
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
+	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
+	'When you wake up, the procedure is complete and your lips are thinner.'
+
+	act 'Continue': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'eyePlus':
+	menu_off = 1
+	if money >= 90000:
+		money -= 90000
+	else
+		karta -= 90000
+	end
+	minut += 60
+	pcs_eyesize += 1
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
+	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
+	'When you wake up again, the procedure is complete and your eyes are larger.'
+
+	act 'Continue': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'eyeMin':
+	menu_off = 1
+	if money >= 90000:
+		money -= 90000
+	else
+		karta -= 90000
+	end
+	minut += 60
+	pcs_eyesize -= 1
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
+	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
+	'When you wake up, the procedure is complete and your eyes are smaller.'
+
+	act 'Continue': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'lyposuction':
+	menu_off = 1
+	if money >= 75000:
+		money -= 75000
+	else
+		karta -= 75000
+	end
+	minut += 60
+	pcs_mass['body'] -= 40
+	if pcs_mass['body'] < 11: pcs_mass['body'] = 11
+	gs 'body', 'softreset'
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
+	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply. We''ll be done before you know it."'
+	'When you wake up, the procedure is complete and you''re looking thinner.'
+
+	act 'Continue': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'bImplantA':
+	menu_off = 1
+	if stringimplant = 1:
+		! Get String Implants
+		temp_pay_amount = 250000
+	elseif fillimplant = 1:
+		! Get Fillable Implants
+		temp_pay_amount = 200000
+	elseif ARGS[1] = 40:
+		! Get XXL Implants
+		temp_pay_amount = 200000
+	elseif ARGS[1] = 30:
+		! Get Large Implants
+		temp_pay_amount = 190000
+	elseif ARGS[1] = 20:
+		! Get Medium Implants
+		temp_pay_amount = 180000
+	elseif ARGS[1] = 10:
+		! Get Small Implants
+		temp_pay_amount = 170000
+	elseif ARGS[1] = 0:
+		! Remove any implants
+		temp_pay_amount = 90000
+	end
+
+	if money >= temp_pay_amount:
+		money -= temp_pay_amount
+	else
+		karta -= temp_pay_amount
+	end
+	killvar 'temp_pay_amount'
+
+
+	minut += 60
+	bodyVars['bust_silicone'] = ARGS[1]
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/locations/city/residential/clinic/cosmeticsur.jpg"></center>'
+	'The surgeon has you strip, put on a gown and lie down on the table, where he gives you a mask. "Just breathe in deeply... we''ll be done before you know it."'
+	'When you wake up again, the procedure is complete and you look down at your new breasts.'
+
+	act 'Continue': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'bImplantB':
+	menu_off = 1
+	if $ARGS[1] = 'drain':
+		if money >= 2000:
+			money -= 2000
+		else
+			karta -= 2000
+		end
+		bodyVars['bust_silicone'] -= 10
+		msg 'You drain some of your string implant'
+	elseif $ARGS[1] = 'bag':
+		if money >= 500:
+			money -= 500
+		else
+			karta -= 500
+		end
+		siliconeBag += 1
+		msg 'You buy a silicone bag.'
+	end
+	gs 'stat'
+
+	act 'Continue': gt $loc, $loc_arg
+end
+
+
+
+--- clinic_functions ---------------------------------------

+ 2 - 2
locations/clothing.qsrc

@@ -1534,7 +1534,7 @@ if $ARGS[0] = 'view_clothing_item':
 			act 'Leave': gt $loc, $loc_arg
 			if CloInhibit > pcs_inhib:
 				'You don''t feel daring enough to wear an outfit this revealing and can''t bring yourself to buy it.'
-			elseif karta + bankDebtLimit < Price and money < Price:
+			elseif karta < Price and money < Price:
 				'You cannot afford this outfit.'
 			else
 				if money >= Price:
@@ -1547,7 +1547,7 @@ if $ARGS[0] = 'view_clothing_item':
 						gs 'clothing', 'view_clothing_item_buy', $ARGS[4], $ARGS[1], ARGS[2], ARGS[3]
 					end
 				end
-				if karta + bankDebtLimit >= Price:
+				if karta >= Price:
 					act 'Buy (card)':
 						h = 0
 						if CloStyle = 2:h = 10

+ 1 - 1
locations/coats.qsrc

@@ -170,7 +170,7 @@ if $ARGS[0] = 'view_coat_item':
 			else
 				'You do not have enough cash to buy these coat.'
 			end
-			if karta + bankDebtLimit >= price:
+			if karta >= price:
 				act 'Buy (card)':
 					karta -= price
 					dynamic $ARGS[2] + '_coats[<<ARGS[3]>>] = 1'

+ 7 - 7
locations/gopnew.qsrc

@@ -48,7 +48,7 @@ if $ARGS[0] = 'start0':
 		cla
 		'You wordlessly shake your head and keep walking, hoping he''ll get the message and leave you alone. He''s not giving up that easily though, and follows you.'
 		'"Come on, babe! Relax! We''re decent guys, you don''t have to be scared around us! We just want to have a good time!" he reassures you. He seems fairly genuine in his offer.'
-		
+
 		act 'Agree to have a beer with them': gt 'gopnew', 'pivas'
 		act 'Decline again, more clearly this time':
 			cla & *clr
@@ -64,7 +64,7 @@ if $ARGS[0] = 'start0':
 				'"Leave me the fuck alone!" you scream at the hoodlum, and push him away. He won''t let you leave though, and blocks the exit while he grabs you by the arm.'
 				'"All I wanted to do was be nice, and you had to go and be a rude bitch! You''re coming with me, now!" he shouts angrily. All the kindness is gone from his eyes, and he looks like he won''t hesitate to use violence if you don''t do as he says.'
 				'His friends look at the two of you intently now, also upset that you won''t join them.'
-				
+
 				act 'Submit and let him take you into the alley':
 					cla
 					'Deciding you can''t take them all on at once, you stop resisting and let the man take you further into the alley. At the back end, he roughly pushes you against the wall. His friends get up and follow the two of you, a greedy look in their eyes.'
@@ -733,7 +733,7 @@ if $ARGS[0] = 'tf':
 		act 'Continue':
 			cla & *clr
 			minut += 3
-			
+
 			gs 'boyStat', 'A102'
 			spafinloc = 11
 			gs 'cum_manage'
@@ -779,7 +779,7 @@ if $ARGS[0] = 'dolg':
 	cla & *clr
 	minut += 3
 	gnewQW = 7
-	gopdolg = money + stolmoney + karta + 10000
+	gopdolg = money + stolmoney + (karta - bankDebtLimit) + 10000
 	gopdaydolg = daystart + 10
 
 	'<center><img <<$set_imgh>> src="images/locations/city/residential/street/gopnews.jpg"></center>'
@@ -1314,7 +1314,7 @@ end
 if $ARGS[0] = 'mistress_1':
 	cla
 	'The guys look warily at you, knowing they are no match for your fighting skills. You get a few terse nods but otherwise nobody will look you in the eye.'
-	
+
 	act 'Leave': gt 'city_residential'
 	act 'Demand a beer':
 		cla & *clr
@@ -1322,14 +1322,14 @@ if $ARGS[0] = 'mistress_1':
 		gs 'stat'
 		'<center><img <<$set_imgh>> src="images/pc/activities/drinking/beer_1.jpg"></center>'
 		'One of them hands you a beer, and you slam it before tossing the bottle down.'
-		
+
 		act 'Leave': gt 'city_residential'
 		act 'Demand another beer':
 			cla
 			gs 'drugs', 'alcohol', 'beer'
 			gs 'stat'
 			'Another one gives you a second beer, still not looking at you. You slam it down too, and then throw it down hard. The sound of the bottle shattering makes them all flinch, but otherwise gets no reaction.'
-			
+
 			act 'Leave': gt 'city_residential'
 			!!gs 'gopnew', 'succubus_option'
 		end

+ 47 - 8
locations/havana.qsrc

@@ -70,18 +70,57 @@ if $ARGS[0] = 'start':
 	$epayments['loc_arg'] = 'start'
 	$epayments['banner']= 'locations/city/citycenter/gym/desk.jpg'
 
-	'<center><table width="90%" align="center" width="90%" cellspacing="0" cellpadding="0" valign="top">'
-	if money >= 3000 or karta + bankDebtLimit => 3000:
-		'<tr><td> <a href="exec: epayments[''value''] = 3000 & epayments[''quantity''] = 30 & gs ''shortgs'',''payments'' ">3,000<b> ₽</b> for 30 lessons</a></td>'
+	$temp_table =	'<center><table width="90%" align="center" width="90%" cellspacing="0" cellpadding="0" valign="top">'
+	$temp_table +=	'<tr>'
+	$temp_table +=		'<td>'
+	if money >= 1500 or karta => 1500:
+		$temp_table +=		'<a href="exec: epayments[''value''] = 1500 & epayments[''quantity''] = 10 & gs ''shortgs'',''payments'' ">1,500<b> ₽</b> for 10 lessons</a>'
+	else
+		$temp_table +=		'1,500<b> ₽</b> for 10 lessons'
 	end
-	if money >= 2250 or karta + bankDebtLimit => 2250:
-		'<td> <a href="exec: epayments[''value''] = 2250 & epayments[''quantity''] = 20 & gs ''shortgs'',''payments'' ">2,250<b> ₽</b> for 20 lessons</a></td>'
+	$temp_table +=		'</td>'
+	$temp_table +=		'<td>'
+	if money >= 2250 or karta => 2250:
+		$temp_table +=		'<a href="exec: epayments[''value''] = 2250 & epayments[''quantity''] = 20 & gs ''shortgs'',''payments'' ">2,250<b> ₽</b> for 20 lessons</a>'
+	else
+		$temp_table +=		'2,250<b> ₽</b> for 20 lessons'
 	end
-	if money >= 1500 or karta + bankDebtLimit => 1500:
-		'<td><a href="exec: epayments[''value''] = 1500 & epayments[''quantity''] = 10 & gs ''shortgs'',''payments'' ">1,500<b> ₽</b> for 10 lessons</a></td>'
+	$temp_table +=		'</td>'
+	$temp_table +=		'<td>'
+	if money >= 3000 or karta => 3000:
+		$temp_table +=		'<a href="exec: epayments[''value''] = 7500 & epayments[''quantity''] = 50 & gs ''shortgs'',''payments'' ">7,500<b> ₽</b> for 50 lessons</a>'
+	else
+		$temp_table +=		'7,500<b> ₽</b> for 50 lessons'
+	end
+	$temp_table +=		'</td>'
+	$temp_table +=	'</tr>'
+	$temp_table +=	'<tr>'
+	$temp_table +=		'<td>'
+	if money >= 1500 or karta => 1500:
+		$temp_table +=		'<a href="exec: epayments[''value''] = 15000 & epayments[''quantity''] = 100 & gs ''shortgs'',''payments'' ">15,000<b> ₽</b> for 100 lessons</a>'
+	else
+		$temp_table +=		'15,000<b> ₽</b> for 100 lessons'
+	end
+	$temp_table +=		'</td>'
+	$temp_table +=		'<td>'
+	if money >= 2250 or karta => 2250:
+		$temp_table +=		'<a href="exec: epayments[''value''] = 22500 & epayments[''quantity''] = 200 & gs ''shortgs'',''payments'' ">22,500<b> ₽</b> for 200 lessons</a>'
+	else
+		$temp_table +=		'22,500<b> ₽</b> for 200 lessons'
+	end
+	$temp_table +=		'</td>'
+	$temp_table +=		'<td>'
+	if money >= 3000 or karta => 3000:
+		$temp_table +=		'<a href="exec: epayments[''value''] = 75000 & epayments[''quantity''] = 500 & gs ''shortgs'',''payments'' ">75,000<b> ₽</b> for 500 lessons</a>'
+	else
+		$temp_table +=		'75,000<b> ₽</b> for 500 lessons'
 	end
-	'</tr></table></center>'
+	$temp_table +=		'</td>'
+	$temp_table +=	'</tr>'
+	$temp_table +=	'</table></center>'
 
+	'<<$temp_table>>'
+	killvar '$temp_table'
 end
 
 if $ARGS[0] = 'dressing_room':

+ 20 - 6
locations/husbSex.qsrc

@@ -49,21 +49,35 @@ if $ARGS[0] = 'room':
 
 		if pcs_apprnc >= 60:'"You have a fine little wife. We will use her and perhaps she will even be able to make us reconsider the amount of your debt. Unless of course you want to come back with us." The thug laughs.'
 
-		if money+stolmoney+karta >= 100000:
+		if money + stolmoney + karta >= 100000:
 			act 'Suggest you pay the money':
 				cla
-				if money >= 100000:money -= 100000 & husbdolg = 2
-				if money+stolmoney >= 100000:money = money+stolmoney-100000 & husbdolg = 2 & stolmoney = 0
-				if money+stolmoney+karta >= 100000:money = money+stolmoney+karta-100000 & husbdolg = 2 & stolmoney = 0 & karta = 0
+				temp_debt = 100000
+				temp_amount = min(money, temp_debt)
+				money -= temp_amount
+				temp_debt = temp_amount
+				if temp_debt > 0 and stolmoney > 0:
+					temp_amount = min(stolmoney, temp_debt)
+					stolmoney -= temp_amount
+					temp_debt -= temp_amount
+				end
+				if temp_debt > 0:
+					karta -= temp_debt
+					temp_debt = 0
+				end
+				killvar 'temp_amount'
+				killvar 'temp_debt'
+
+				husbdolg = 2
 
 				'"I have the money, I will pay his debt" you say.'
 				'"Good for you, but there is still the matter of our expenses. And we have a different payment in mind." Says the grinning thug.'
 
-				act 'Open your mouth':gt 'husbSex', 'dolg'
+				act 'Open your mouth': gt 'husbSex', 'dolg'
 			end
 		end
 
-		act 'Open your mouth':gt 'husbSex', 'dolg'
+		act 'Open your mouth': gt 'husbSex', 'dolg'
 	end
 
 	if sexrand = 0:

+ 195 - 195
locations/internet_mobile.qsrc

@@ -2,55 +2,55 @@
 
 !! {  Plans and Subscriptions
 
-subscription[<plan name>]           The subscription itself that will be checked to see if Sveta can access the internet
-                                    Possible values:
-                                        Monthly subscriptions:
-                                            0: subscription is inactive, either never bought or expired.
-                                            1: subscription is active
-                                                                                    
-                                        Metered plans:
-                                            Any integer number, which means the available minutes left within the plan.
-                                            This is how the old mobile minutes and internet time worked, but tracked in minutes,
-                                            not hours for the internet.
-
-subscription[<plan name>-date]      The day the subscription was bought for the home (or mobile), this will be the renewal day.
-                                    automatically set to `day`.
-                                    Possible values 0-31, 1-31 are renewal days, 0 means the plan never expires.
-
-
-subscription[<plan name>-price]     The monthly fee of the subscription.
-
-subscription[<plan name>-discount]  The discount on the plan - relevant if the original discount was greater than the monthly
-                                    fee. If the value is higher than 0, payments come from this first until the value gets to
-                                    0.
-
-subscription[<plan nam>-type]       The type of the subscription. 
-                                    Possible values:
-                                        1: Monthly subscription
-                                        2: Metered plan
-                                        
-                                        
+subscription[<plan name>]		The subscription itself that will be checked to see if Sveta can access the internet
+									Possible values:
+										Monthly subscriptions:
+											0: subscription is inactive, either never bought or expired.
+											1: subscription is active
+
+										Metered plans:
+											Any integer number, which means the available minutes left within the plan.
+											This is how the old mobile minutes and internet time worked, but tracked in minutes,
+											not hours for the internet.
+
+subscription[<plan name>-date]	The day the subscription was bought for the home (or mobile), this will be the renewal day.
+									automatically set to `day`.
+									Possible values 0-31, 1-31 are renewal days, 0 means the plan never expires.
+
+
+subscription[<plan name>-price]	The monthly fee of the subscription.
+
+subscription[<plan name>-discount]	The discount on the plan - relevant if the original discount was greater than the monthly
+										fee. If the value is higher than 0, payments come from this first until the value gets to
+										0.
+
+subscription[<plan nam>-type]		The type of the subscription.
+									Possible values:
+										1: Monthly subscription
+										2: Metered plan
+
+
 
 Plan Names
 
-free:           A subscription that is freely available, libraries, friends and lovers apartment, etc. that has a computer.
-                The value of this plan is always 1 and the subscription date is 0.
+free:		A subscription that is freely available, libraries, friends and lovers apartment, etc. that has a computer.
+				The value of this plan is always 1 and the subscription date is 0.
 
-mobile:         Mobile telephone (only internet or calls too?) and laptop if taken somewhere else. 
-                If at a location where subscription['free'] is used, she has to ask first to be able to use her own laptop
-                with the local internet, otherwise it will still use the mobile subscription - if there is none, it won''t work. 
+mobile:		Mobile telephone (only internet or calls too?) and laptop if taken somewhere else.
+				If at a location where subscription['free'] is used, she has to ask first to be able to use her own laptop
+				with the local internet, otherwise it will still use the mobile subscription - if there is none, it won''t work.
 
-metered_mobile  Cheaper option for broke Svetas. When subscription['mobile'] = 0 check for this and if
-                `subscription['metered_mobile'] > 0` then use it.
+metered_mobile	Cheaper option for broke Svetas. When subscription['mobile'] = 0 check for this and if
+				`subscription['metered_mobile'] > 0` then use it.
 
-<property code> This is a monthly subscription that can be used in a specific home owned/rented by Sveta.
-                This is tracking the internet subscription per home. So if Sveta owns several places, she has a separate
-                subscription for each of them.
-                For allowed values see `homes_properties`.
+<property code>	This is a monthly subscription that can be used in a specific home owned/rented by Sveta.
+					This is tracking the internet subscription per home. So if Sveta owns several places, she has a separate
+					subscription for each of them.
+					For allowed values see `homes_properties`.
 
-monthly_calls   A monthly mobile subscription giving unlimited call minutes and text message
+monthly_calls	A monthly mobile subscription giving unlimited call minutes and text message
 
-metered_calls   A mobile plan that gives a set amount of minutes that can be used.
+metered_calls	A mobile plan that gives a set amount of minutes that can be used.
 
 }
 
@@ -58,172 +58,172 @@ if subscription['free'] = 0: subscription['free'] = 1
 
 !! Used for metered calls/texts/internet.
 !! $ARGS[1] = subscription name, i.e., 'metered_mobile' for mobile net or 'metered_calls' for phone calls and text messages
-!! ARGS[2]  = the number of units purchased (minutes, calls, etc.) right now relevant for metered mobile internet 
+!! ARGS[2]  = the number of units purchased (minutes, calls, etc.) right now relevant for metered mobile internet
 !! ARGS[3]  = the number of sms messages that can be sent with this top up - only for metered_calls
 !! NOTE: Putting this on top so if we decide not to use it, it is easy to find and delete
 if $ARGS[0] = 'top_up_metered':
-    subscription[$ARGS[1]] += ARGS[2]
-    subscription['<<$ARGS[1]>>-date'] = day
-    if $ARGS[1] = 'metered_calls': subscription['<<$ARGS[1]>>-sms_limit'] += ARGS[3]
-    if subscription['<<$ARGS[1]>>-type'] = 0:  subscription['<<$ARGS[1]>>-type'] = 2
+	subscription[$ARGS[1]] += ARGS[2]
+	subscription['<<$ARGS[1]>>-date'] = day
+	if $ARGS[1] = 'metered_calls': subscription['<<$ARGS[1]>>-sms_limit'] += ARGS[3]
+	if subscription['<<$ARGS[1]>>-type'] = 0:  subscription['<<$ARGS[1]>>-type'] = 2
 end
 
 !! In case we decide that internet prices are different for different homes (mobile definitely should be)
-!! $ARGS[1] = The plan name - see on top, generally the name of a property or a mobile plan. 
+!! $ARGS[1] = The plan name - see on top, generally the name of a property or a mobile plan.
 !! ARGS[2]  = Subscription fee - the price to be paid every month
 !! ARGS[3]  = The remaining amount from the discount when it was more than the monthly fee. Optional value
-!!            See valid values in set_home.qsrc
+!!			See valid values in set_home.qsrc
 if $ARGS[0] = 'buy_subscription':
-    subscription[$ARGS[1]] = 1
-    subscription['<<$ARGS[1]>>-date'] = day
-    subscription['<<$ARGS[1]>>-price'] = ARGS[2] 
-    subscription['<<$ARGS[1]>>-discount'] = ARGS[3] 
-    if subscription['<<$ARGS[1]>>-type'] = 0: subscription['<<$ARGS[1]>>-type'] = 1
+	subscription[$ARGS[1]] = 1
+	subscription['<<$ARGS[1]>>-date'] = day
+	subscription['<<$ARGS[1]>>-price'] = ARGS[2]
+	subscription['<<$ARGS[1]>>-discount'] = ARGS[3]
+	if subscription['<<$ARGS[1]>>-type'] = 0: subscription['<<$ARGS[1]>>-type'] = 1
 end
 
 !! Nightly check called from cikl - check for subscription renewal and suspension.
 if $ARGS[0] = 'check_subscription_actions':
 	!! Get a list of the properties and their attributes that the player rented:
 	!! $property_code[], $property_name[], $property_display[], $property_status_display[], $property_type[]
-	!! property_status[], property_construction_status[], property_is_renovated[], property_sales_price[], 
-    !! property_renovation_value[]
+	!! property_status[], property_construction_status[], property_is_renovated[], property_sales_price[],
+	!! property_renovation_value[]
 	gs 'homes_properties', 'get_accessible_properties', 'home'
 	count = ARRSIZE('$property_name')
 	if count > 0:
 		i = 0
 		:home_internet_subscription_loop
-			if (property_status[i] = 1 or property_status[i] = 2) and subscription[$property_code[i]] = 1: 
-                if subscription['<<$property_code[i]>>-date'] = day: gs 'internet_mobile', 'renew_subscription', $property_code[i]
-                if subscription['<<$property_code[i]>>-suspension_month'] = month and subscription['<<$property_code[i]>>-suspension_day'] >= day: gs 'internet_mobile', 'renew_subscription', $property_code[i]
-                if subscription['<<$property_code[i]>>-suspension_month'] <= month and subscription['<<$property_code[i]>>-suspension_day'] < day: gs 'internet_mobile', 'suspend_subscription', $property_code[i]
-                $result[j] = 'Internet Subscription for <<$property_display[i]>>: <<subscription[''<<$property_code[i]>>-contract_message'']>>'
-                j += 1
-            end
+			if (property_status[i] = 1 or property_status[i] = 2) and subscription[$property_code[i]] = 1:
+				if subscription['<<$property_code[i]>>-date'] = day: gs 'internet_mobile', 'renew_subscription', $property_code[i]
+				if subscription['<<$property_code[i]>>-suspension_month'] = month and subscription['<<$property_code[i]>>-suspension_day'] >= day: gs 'internet_mobile', 'renew_subscription', $property_code[i]
+				if subscription['<<$property_code[i]>>-suspension_month'] <= month and subscription['<<$property_code[i]>>-suspension_day'] < day: gs 'internet_mobile', 'suspend_subscription', $property_code[i]
+				$result[j] = 'Internet Subscription for <<$property_display[i]>>: <<subscription[''<<$property_code[i]>>-contract_message'']>>'
+				j += 1
+			end
 			i += 1
 		if i < count: jump 'home_internet_subscription_loop'
 	end
 	gs 'homes_properties', 'clean_up_property_data'
 
-    if subscription['mobile'] = 1:
-        if subscription['mobile-date'] = day: gs 'internet_mobile', 'renew_subscription', 'mobile'
-        if subscription['mobile-suspension_month'] = month and subscription['mobile-suspension_day'] >= day: gs 'internet_mobile', 'renew_subscription', 'mobile'
-        if subscription['mobile-suspension_month'] <= month and subscription['mobile-suspension_day'] < day: gs 'internet_mobile', 'suspend_subscription', 'mobile'
-        $result[j] = 'You Mobile Internet Subscription: <<subscription[''mobile-contract_message'']>>'
-        j += 1
-    end
-    if subscription['monthly_calls'] = 1:
-        if subscription['monthly_calls-date'] = day: gs 'internet_mobile', 'renew_subscription', 'monthly_calls'
-        if subscription['monthly_calls-suspension_month'] = month and subscription['monthly_calls-suspension_day'] >= day: gs 'internet_mobile', 'renew_subscription', 'monthly_calls'
-        if subscription['monthly_calls-suspension_month'] <= month and subscription['monthly_calls-suspension_day'] < day: gs 'internet_mobile', 'suspend_subscription', 'monthly_calls'
-        $result[j] = 'You mobile contract: <<subscription[''monthly_calls-contract_message'']>>'
-        j += 1
-    end
-    killvar 'count' & killvar 'i' & killvar 'j'
+	if subscription['mobile'] = 1:
+		if subscription['mobile-date'] = day: gs 'internet_mobile', 'renew_subscription', 'mobile'
+		if subscription['mobile-suspension_month'] = month and subscription['mobile-suspension_day'] >= day: gs 'internet_mobile', 'renew_subscription', 'mobile'
+		if subscription['mobile-suspension_month'] <= month and subscription['mobile-suspension_day'] < day: gs 'internet_mobile', 'suspend_subscription', 'mobile'
+		$result[j] = 'You Mobile Internet Subscription: <<subscription[''mobile-contract_message'']>>'
+		j += 1
+	end
+	if subscription['monthly_calls'] = 1:
+		if subscription['monthly_calls-date'] = day: gs 'internet_mobile', 'renew_subscription', 'monthly_calls'
+		if subscription['monthly_calls-suspension_month'] = month and subscription['monthly_calls-suspension_day'] >= day: gs 'internet_mobile', 'renew_subscription', 'monthly_calls'
+		if subscription['monthly_calls-suspension_month'] <= month and subscription['monthly_calls-suspension_day'] < day: gs 'internet_mobile', 'suspend_subscription', 'monthly_calls'
+		$result[j] = 'You mobile contract: <<subscription[''monthly_calls-contract_message'']>>'
+		j += 1
+	end
+	killvar 'count' & killvar 'i' & killvar 'j'
 end
 
-!! Cancelling a subscription (currently uused only for metered_calls and metered_mobile to clean them up when a monthly subscription 
+!! Cancelling a subscription (currently uused only for metered_calls and metered_mobile to clean them up when a monthly subscription
 !! is bought to repplace them)
 !! $ARGS[1] - subscription name
-if $ARGS[0] = 'cancel_subscription': 
-    subscription[$ARGS[1]] = 0
-    subscription['<<$ARGS[1]>>-date'] = 0
-    subscription['<<$ARGS[1]>>-sms_limit'] = 0
-    subscription['<<$ARGS[1]>>-type'] = 0
-    subscription['<<$ARGS[1]>>-price'] = 0
-    subscription['<<$ARGS[1]>>-discount'] = 0
+if $ARGS[0] = 'cancel_subscription':
+	subscription[$ARGS[1]] = 0
+	subscription['<<$ARGS[1]>>-date'] = 0
+	subscription['<<$ARGS[1]>>-sms_limit'] = 0
+	subscription['<<$ARGS[1]>>-type'] = 0
+	subscription['<<$ARGS[1]>>-price'] = 0
+	subscription['<<$ARGS[1]>>-discount'] = 0
 end
 
 !! Renewing the subscription
 if $ARGS[0] = 'renew_subscription':
-    renewfee = subscription['<<$ARGS[1]>>-price']
-    acc_discount = subscription['<<$ARGS[1]>>-discount']
-    app_discount = MIN(acc_discount,renewfee)
-    finalfee = app_discount
-    rem_discount = acc_discount-app_discount
-
-    if karta+bankDebtLimit > finalfee:
-        karta -= finalfee        
-        subscription['<<$ARGS[1]>>-discount'] = rem_discount
-        if app_discount > 0: $discounttext = '<<renewfee>>₽ and you had <<acc_discount>><b>₽</b> left on your account. After applying <<app_discount>><b>₽</b> to your monthly fee, your final payable was <b><font color="green"><<finalfee>>₽</b></font>  and you were left with <<rem_discount>><b>₽</b> on your account.'
-        $subscription['<<$ARGS[1]>>-contract_message'] = 'Your monthly fee was' + iif(app_discount > 0, $discounttext, '<b><font color="green"><<renewfee>>₽</font></b> which was taken from your bank account.')
-        if subscription['<<$ARGS[1]>>-suspension_month'] > 0: subscription['<<$ARGS[1]>>-suspension_month'] = 0
-        if subscription['<<$ARGS[1]>>-suspension_day'] > 0: subscription['<<$ARGS[1]>>-suspension_day'] = 0
-    else
-        remainingday = 5
-        if subscription['<<$ARGS[1]>>-suspension_day'] > 0: remainingday = subscription['<<$ARGS[1]>>-suspension_day'] - day
-        if app_discount > 0: $discounttext = ' and you had <<acc_discount>><b>₽</b> left on your account. After applying <<app_discount>><b>₽</b> to your monthly fee, your final payable was <<finalfee>><b>₽</b>  and you were left with <<rem_discount>><b>₽</b> on your account.'
-        $subscription['<<$ARGS[1]>>-contract_message'] = 'Your monthly fee was <<renewfee>><b>₽</b>'+ iif(app_discount >0, $discounttext,', unfortunately your payment was declined. We will try to take the payment over the next <b><font color="red"><<remainingday>> days</font></b> before suspending services.')
-        gs 'internet_mobile', 'set_suspension_date', $ARGS[1]
-    end
-    killvar 'renewfee'
-    killvar 'acc_discount'
-    killvar 'app_discount'
-    killvar 'finalfee'
-    killvar 'rem_discount'
-    killvar '$discounttext'
-    killvar 'remainingday'
+	renewfee = subscription['<<$ARGS[1]>>-price']
+	acc_discount = subscription['<<$ARGS[1]>>-discount']
+	app_discount = MIN(acc_discount,renewfee)
+	finalfee = app_discount
+	rem_discount = acc_discount-app_discount
+
+	if karta > finalfee:
+		karta -= finalfee
+		subscription['<<$ARGS[1]>>-discount'] = rem_discount
+		if app_discount > 0: $discounttext = '<<renewfee>>₽ and you had <<acc_discount>><b>₽</b> left on your account. After applying <<app_discount>><b>₽</b> to your monthly fee, your final payable was <b><font color="green"><<finalfee>>₽</b></font>  and you were left with <<rem_discount>><b>₽</b> on your account.'
+		$subscription['<<$ARGS[1]>>-contract_message'] = 'Your monthly fee was' + iif(app_discount > 0, $discounttext, '<b><font color="green"><<renewfee>>₽</font></b> which was taken from your bank account.')
+		if subscription['<<$ARGS[1]>>-suspension_month'] > 0: subscription['<<$ARGS[1]>>-suspension_month'] = 0
+		if subscription['<<$ARGS[1]>>-suspension_day'] > 0: subscription['<<$ARGS[1]>>-suspension_day'] = 0
+	else
+		remainingday = 5
+		if subscription['<<$ARGS[1]>>-suspension_day'] > 0: remainingday = subscription['<<$ARGS[1]>>-suspension_day'] - day
+		if app_discount > 0: $discounttext = ' and you had <<acc_discount>><b>₽</b> left on your account. After applying <<app_discount>><b>₽</b> to your monthly fee, your final payable was <<finalfee>><b>₽</b>  and you were left with <<rem_discount>><b>₽</b> on your account.'
+		$subscription['<<$ARGS[1]>>-contract_message'] = 'Your monthly fee was <<renewfee>><b>₽</b>'+ iif(app_discount >0, $discounttext,', unfortunately your payment was declined. We will try to take the payment over the next <b><font color="red"><<remainingday>> days</font></b> before suspending services.')
+		gs 'internet_mobile', 'set_suspension_date', $ARGS[1]
+	end
+	killvar 'renewfee'
+	killvar 'acc_discount'
+	killvar 'app_discount'
+	killvar 'finalfee'
+	killvar 'rem_discount'
+	killvar '$discounttext'
+	killvar 'remainingday'
 end
 
 !! Transfer existing subscription from one home to another if Sveta is moving.
 if $ARGS[0] = 'transfer_subscription':
-    allowed = func('internet_mobile', 'check_allowed_location', $ARGS[1])
-    allowed = allowed and func('internet_mobile', 'check_allowed_location', $ARGS[2])
-    if allowed:
-        subscription[$ARGS[2]] = subscription[$ARGS[1]]
-        subscription['<<ARGS[2]>>-date'] = subscription['<<$ARGS[1]>>-date']
-        subscription['<<ARGS[2]>>-price'] = subscription['<<$ARGS[1]>>-price']
-        subscription['<<ARGS[2]>>-discount'] = subscription['<<$ARGS[1]>>-discount']
-        !! This one is always 1 because only type 1 subscriptions can be transferred, but making it "future proof"
-        subscription['<<ARGS[2]>>-type'] = subscription['<<$ARGS[1]>>-type']
-        subscription[$ARGS[0]] = 0
-        killvar 'allowed'
-    end
+	allowed = func('internet_mobile', 'check_allowed_location', $ARGS[1])
+	allowed = allowed and func('internet_mobile', 'check_allowed_location', $ARGS[2])
+	if allowed:
+		subscription[$ARGS[2]] = subscription[$ARGS[1]]
+		subscription['<<ARGS[2]>>-date'] = subscription['<<$ARGS[1]>>-date']
+		subscription['<<ARGS[2]>>-price'] = subscription['<<$ARGS[1]>>-price']
+		subscription['<<ARGS[2]>>-discount'] = subscription['<<$ARGS[1]>>-discount']
+		!! This one is always 1 because only type 1 subscriptions can be transferred, but making it "future proof"
+		subscription['<<ARGS[2]>>-type'] = subscription['<<$ARGS[1]>>-type']
+		subscription[$ARGS[0]] = 0
+		killvar 'allowed'
+	end
 end
 
 !! This is a separate "function" because the check is a bit long, and can change if we realize it isn't the best way to do it.
-!! Spoiler alert: It is not, I'm pretty sure. 
-!! 
+!! Spoiler alert: It is not, I'm pretty sure.
+!!
 if $ARGS[0] = 'check_allowed_location':
-    gs 'homes_properties_attr', 'get_property_attr', $ARGS[1]
-    result = property['internet_enabled'] = 1
-    killvar 'property'
+	gs 'homes_properties_attr', 'get_property_attr', $ARGS[1]
+	result = property['internet_enabled'] = 1
+	killvar 'property'
 end
 
 !! $ARGS[1] - this is expected only if the location allows the use of subscription['free'], otherwise pass ''
 !! $ARGS[2] - Limitation code: : 'noporn', 'nocamshow'
 !! and on...can be up to 10 arguments.
 if $ARGS[0] = 'get_access':
-    killvar 'access'
-    $subsname = iif($ARGS[1] = '', func('homes_properties', 'get_property_code'), func('homes_properties', 'get_property_code', $ARGS[1]))
-    if func('homes_properties', 'free_internet_available', $subsname) ! 0:
-        $access['subscription'] = 'free'
-    elseif $ARGS[1] = 'free':
-        $access['subscription'] = 'free'
-    elseif subscription[$subsname] = 1:
-        $access['subscription'] = $subsname
-    elseif subscription['mobile'] = 1:
-        $access['subscription'] = 'mobile'
-    elseif subscription['metered_mobile'] > 0:
-        $access['subscription'] = 'metered_mobile'
-    else
-        $access = 'denied'
-    end
-
-    if $access ! 'denied':
-        if subscription['<<$access[''subscription'']>>-type'] = 2: access['metered'] = 1
-        count = ARRSIZE('ARGS')
-        if count > 2:
-            k = 2
-            :loop_args
-                access[$ARGS[k]] = 1
-                k += 1
-            if k < count: jump 'loop_args'
-        end
-        if access['noporn'] = 1: $access['noporn'] = 'You can''t search for porn on this computer'
-        if access['nocamshow'] = 1: $access['nocamshow'] = 'You can''t do a cam show in this place'
-        killvar 'count' & killvar 'k'
-    end  
-    killvar 'subsname'  
+	killvar 'access'
+	$subsname = iif($ARGS[1] = '', func('homes_properties', 'get_property_code'), func('homes_properties', 'get_property_code', $ARGS[1]))
+	if func('homes_properties', 'free_internet_available', $subsname) ! 0:
+		$access['subscription'] = 'free'
+	elseif $ARGS[1] = 'free':
+		$access['subscription'] = 'free'
+	elseif subscription[$subsname] = 1:
+		$access['subscription'] = $subsname
+	elseif subscription['mobile'] = 1:
+		$access['subscription'] = 'mobile'
+	elseif subscription['metered_mobile'] > 0:
+		$access['subscription'] = 'metered_mobile'
+	else
+		$access = 'denied'
+	end
+
+	if $access ! 'denied':
+		if subscription['<<$access[''subscription'']>>-type'] = 2: access['metered'] = 1
+		count = ARRSIZE('ARGS')
+		if count > 2:
+			k = 2
+			:loop_args
+				access[$ARGS[k]] = 1
+				k += 1
+			if k < count: jump 'loop_args'
+		end
+		if access['noporn'] = 1: $access['noporn'] = 'You can''t search for porn on this computer'
+		if access['nocamshow'] = 1: $access['nocamshow'] = 'You can''t do a cam show in this place'
+		killvar 'count' & killvar 'k'
+	end
+	killvar 'subsname'
 end
 
 !! Adds a new limiation with a custom message
@@ -232,67 +232,67 @@ end
 !! $ARGS[1] - Limitation code: : 'noporn', 'nocamshow'
 !! $ARGS[2] - Custom message - optional
 if $ARGS[0] = 'add_limitation':
-    access[$ARGS[1]] = 1
-    $access[$ARGS[1]] = $ARGS[2]
+	access[$ARGS[1]] = 1
+	$access[$ARGS[1]] = $ARGS[2]
 end
 
 !!Remove the limiation passed in $ARGS[1] and set's it's custom message to ''
 !!
 !! $ARGS[1] - Limitation code: : 'noporn', 'nocamshow'
 if $ARGS[0] = 'remove_limitation':
-    access[$ARGS[1]] = 0
-    $access[$ARGS[1]] = ''
+	access[$ARGS[1]] = 0
+	$access[$ARGS[1]] = ''
 end
 
 !! Sets the message to limitation passed in $ARGS[1] if the limitation is active
 !!
 !! $ARGS[1] - Limitation code: : 'noporn', 'nocamshow'
-!! $ARGS[2] - Custom message 
+!! $ARGS[2] - Custom message
 if $ARGS[0] = 'set_limitation_message':
-    if access[$ARGS[1]] = 1: $access[$ARGS[1]] = $ARGS[2]
+	if access[$ARGS[1]] = 1: $access[$ARGS[1]] = $ARGS[2]
 end
 
 !! Sets the date when the subscription will be cancelled if not paid.
 !!
 !! $ARGS[1] - the subscription name
 if $ARGS[0] = 'set_suspension_date':
-    temp_month = month
-    if month = 2:
-        if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0):
-            switchday = 29
-        else
-            switchday = 28
-        end
-    elseif month = 4 or month = 6 or month = 9 or month = 11:
-        switchday = 30
-    else
-        switchday = 31
-    end
-    temp_day = day + 5
-    if temp_day > switchday:
-        temp_day -= switchday
-        temp_month += 1
-    end
-    subscription[$ARGS[1]+'suspension_day'] = temp_day
-    subscription[$ARGS[1]+'suspension_month'] = temp_month
-    killvar 'temp_month'
-    killvar 'temp_day'
+	temp_month = month
+	if month = 2:
+		if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0):
+			switchday = 29
+		else
+			switchday = 28
+		end
+	elseif month = 4 or month = 6 or month = 9 or month = 11:
+		switchday = 30
+	else
+		switchday = 31
+	end
+	temp_day = day + 5
+	if temp_day > switchday:
+		temp_day -= switchday
+		temp_month += 1
+	end
+	subscription[$ARGS[1]+'suspension_day'] = temp_day
+	subscription[$ARGS[1]+'suspension_month'] = temp_month
+	killvar 'temp_month'
+	killvar 'temp_day'
 end
 
 !! Sending an sms on a metered contract
 if $ARGS[0] = 'send_sms':
-    if subscription['metered_calls'] = 1: subscription['sms_limit'] -= 1  
+	if subscription['metered_calls'] = 1: subscription['sms_limit'] -= 1
 end
 
 !! Using the internet - if metered, it lowers the minutes left
 !! $ARGS[1] - the name of the subscription used (this could be completely unnecessary, at this point there is an active
-!!                                               $access which holds the subscription used.)
+!!											   $access which holds the subscription used.)
 !! ARGS[2] - the number of minutes used
 if $ARGS[0] = 'use_internet':
-    if $subscription['<<$ARGS[1]>>-type'] = 'metered': 
-        subscription[$ARGS[1]] -= ARGS[2]
-        if subscription[$ARGS[1]] < 0: subscription[$ARGS[1]] = 0
-    end
+	if $subscription['<<$ARGS[1]>>-type'] = 'metered':
+		subscription[$ARGS[1]] -= ARGS[2]
+		if subscription[$ARGS[1]] < 0: subscription[$ARGS[1]] = 0
+	end
 end
 
 !! Checks if Sveta still has access to the internet - use it while she is on the computer, mostly relevant for metered net,
@@ -300,9 +300,9 @@ end
 !! Use it as a func() returns 1 or 0 based on the subscription[$ARGS[1]]  value
 !!
 !! $ARGS[1] - the name of the subscription (this could be completely unnecessary, at this point there is an active
-!!                                          $access which holds the subscription used.)
+!!										  $access which holds the subscription used.)
 if $ARGS[0] = 'check_internet_access':
-    if subscription[$ARGS[1]] > 0: result = 1
+	if subscription[$ARGS[1]] > 0: result = 1
 end
 
 

+ 3 - 3
locations/item_cart.qsrc

@@ -82,15 +82,15 @@ if $ARGS[0] = 'cart_total':
 	*p '<center><table border=5 cellspacing=0 cellpadding=5 bgcolor='+$bcolor+'><TR>'
 	$item_line[2] = ''
 	if cart_tally > 0:
-		if cart_tally > karta + bankDebtLimit and cart_tally > money:
+		if karta < cart_tally and money < cart_tally:
 			$item_line[2] = '<TD>&nbsp;You cannot afford this&nbsp;</TD>'
 		else
-			if cart_tally <= money:
+			if money >= cart_tally:
 				$item_line[2] = '<TD>&nbsp;<a href="exec:gt ''item_cart'', ''cash'', <<i>>">Buy (cash)</a>&nbsp;</TD>'
 			else
 				$item_line[2] = '<TD>&nbsp;Not enough cash&nbsp;</TD>'
 			end
-			if cart_tally <= karta + bankDebtLimit:
+			if karta >= cart_tally:
 				$item_line[2] += '<TD>&nbsp;<a href="exec:gt ''item_cart'', ''card'', <<i>>">Buy (card)</a>&nbsp;</TD>'
 			else
 				$item_line[2] += '<TD>&nbsp;Not enough on card&nbsp;</TD>'

+ 2 - 2
locations/katja_city.qsrc

@@ -230,7 +230,7 @@ if $ARGS[0] = 'Pussy-Cats':
 						gs 'npc_relationship', 'modify', 'A14', 'love'
 						'"This is really nice. As always, your fashion sense is impeccable," you say and her face lights up like a Christmas tree.'
 						'You look at the price tag and see that it costs <<price>>.'
-						if money > price:
+						if money >= price:
 							act 'Buy the dress (cash)':
 								cla
 								'"I''ll buy it, but only after you try on what I picked for you."'
@@ -239,7 +239,7 @@ if $ARGS[0] = 'Pussy-Cats':
 								act 'Katja''s turn': gt 'katja_city', 'pussy_cat_outfit<<rand(1,2)>>'
 							end
 						end
-						if karta > price:
+						if karta >= price:
 							act 'Buy the dress (card)':
 								cla
 								'"I''ll buy it, but only after you try on what I picked for you."'

+ 31 - 9
locations/kit_din.qsrc

@@ -108,23 +108,45 @@ $santehnikend = {
 		end
 	elseif money < 1500:
 		'You do not have enough cash on you.'
-		if money+stolmoney >= 1500:
+		if money + stolmoney >= 1500:
 			'You remember the stash in your table and with that you''ll have enough.'
 			act 'Pay':
-				money = money+stolmoney & stolmoney = 0
-				money -= 1500
+				temp_debt = 1500
+				temp_amount = min(money, temp_debt)
+				money -= temp_amount
+				temp_debt = temp_amount
+				if temp_debt > 0 and stolmoney > 0:
+					temp_amount = min(stolmoney, temp_debt)
+					stolmoney -= temp_amount
+					temp_debt -= temp_amount
+				end
+				killvar 'temp_amount'
+				killvar 'temp_debt'
 				gt $curloc
 			end
-		elseif money+stolmoney + karta >= 1500:
+		elseif money + stolmoney + karta >= 1500:
 			'You know that even with your stash in the apartment you are short, but you could get the extra from the ATM.'
 			act 'Walk down to the ATM and get the extra money, then pay':
 				minut += 10
-				money = money + stolmoney & stolmoney = 0
-				karta -= (1500 - money)
-				money = 0
+				temp_debt = 1500
+				temp_amount = min(money, temp_debt)
+				money -= temp_amount
+				temp_debt = temp_amount
+				if temp_debt > 0 and stolmoney > 0:
+					temp_amount = min(stolmoney, temp_debt)
+					stolmoney -= temp_amount
+					temp_debt -= temp_amount
+				end
+				if temp_debt > 0:
+					karta -= temp_debt
+					temp_debt = 0
+				end
+				killvar 'temp_amount'
+				killvar 'temp_debt'
+
 				gt $curloc
 			end
-		elseif money+stolmoney < 1500:
+		else
 			act 'I did not have enough money':
 				*clr & cla
 				gs'stat'
@@ -134,7 +156,7 @@ $santehnikend = {
 				act 'Suggest a loan':dynamic $santehnikend2
 			end
 		end
-		if money+stolmoney<1500 and shameless > 14:
+		if money + stolmoney < 1500 and shameless > 14:
 			act 'Offer a favor instead':
 				*clr & cla
 				gs 'stat'

+ 7 - 6
locations/korr.qsrc

@@ -132,22 +132,23 @@ if BurgerQW['IlyQW']  = 3 and hour >= 9 and hour <= 20:
 	BurgerQW['IlyQW']  = 4
 	if DolgRS <= moneySUM:
 		money = moneySUM - 650000
-		karta = 0
+		karta = bankDebtLimit
 		stolmoney = 0
 		minut += 120
 		'The police arrive and take you to court. You manage to pay off your debts and are released.'
 
-		act 'Leave the courthouse':gt 'city_center'
+		act 'Leave the courthouse': gt 'city_center'
 	else
 		DolgRS = 650000 - moneySUM - 60000
 		money = 0
-		karta = 0
+		karta = bankDebtLimit
 		stolmoney = 0
 		vidage += 7
 		year += 5
 		age = year - ((pcs_dob - (pcs_dob mod 10000)) / 10000)
 		money = 2000
 		'The police arrive and take you to court. After standing trial, you are given five years of jail time and are required to pay your debt of <<DolgRS>>.'
+
 		act 'Serve your time':
 			*clr & cla
 			srok_kolvo = 1
@@ -180,7 +181,7 @@ if BurgerQW['IlyQW']  = 3 and hour >= 9 and hour <= 20:
 			gs 'uniutil', 'student', 'unenroll'
 			gs 'stat'
 
-			'Time drags on slowly. Your life and work are tedious and monotonous. You''ve been sewing for five years, having meals in the dining room and going to sleep surrounded by other female inmates. 1,000 <b>₽</b> of your 2,000 <b>₽</b> per month salary goes towards your debt repayment.' 
+			'Time drags on slowly. Your life and work are tedious and monotonous. You''ve been sewing for five years, having meals in the dining room and going to sleep surrounded by other female inmates. 1,000 <b>₽</b> of your 2,000 <b>₽</b> per month salary goes towards your debt repayment.'
 			'As slow as it seems, time doesn''t stand still and your torment finally comes to an end. You are released and given 2,000 <b>₽</b>. You board the train and return to the city.'
 
 			act 'Get off the train': gt 'city_industrial_train', 'outside'
@@ -196,7 +197,7 @@ if BurgerQW['IlyQWDay'] ! daystart and BurgerQW['IlyQW']  = 1 and hour >= 8 and
 		*clr & cla
 		gs 'stat'
 		'You walk up to the door and look through the peephole. You see a few men, and even in the dark, you recognize them from their caps. "<<$pcs_firstname>> <<$pcs_lastname>>! This is the police, open up!"'
-		
+
 		act 'Answer the door':
 			*clr & cla
 			minut += 120
@@ -204,7 +205,7 @@ if BurgerQW['IlyQWDay'] ! daystart and BurgerQW['IlyQW']  = 1 and hour >= 8 and
 			gs 'stat'
 			'You open the door, wondering what they want from you. There are several men in uniform and others in civilian clothes. A lean and skinny man with with a weeks worth of stubble and a pistol in a holster slung under his armpit speaks to you. "Please take a seat while we search the apartment. This is a warrant for your arrest and this is a search warrant for your apartment. You can read them." The men start searching your apartment and a few minutes later, one of them reappears. "Here are the keys. According to the description, these look like the keys to the office and the safe where the money was stolen." The detective frowns at you and nods to the officer, who pulls your hands behind your back and snaps the handcuffs around your wrists.'
 			wait 1500
-			'You''re escorted out of the building in handcuffs and pushed into a police car. After the door slams shut, the car starts up and drives through the city streets until it stops outside the police station and you''re pulled out and brought into an interview room where the dectective is waiting for you. He takes the handcuffs off you and offers you a seat. You sit in a hard and uncomfortable chair while the detective turns the TV on and inserts a video tape. On the screen is footage from a security camera in Bystroeshke showing you appear in the corridor and entering the office before exiting a few minutes later holding a thick envelope. The detective takes the tape out and inserts another one.' 
+			'You''re escorted out of the building in handcuffs and pushed into a police car. After the door slams shut, the car starts up and drives through the city streets until it stops outside the police station and you''re pulled out and brought into an interview room where the dectective is waiting for you. He takes the handcuffs off you and offers you a seat. You sit in a hard and uncomfortable chair while the detective turns the TV on and inserts a video tape. On the screen is footage from a security camera in Bystroeshke showing you appear in the corridor and entering the office before exiting a few minutes later holding a thick envelope. The detective takes the tape out and inserts another one.'
 			'It shows Chubais'' office. The door opens and you walk in holding some keys. You go to the safe, open it with one of the keys and take the envelope with <<$BurgerQW[''IlySecurityCamDesc'']>> written on it. The detective turns the TV off, picks up a plastic bag with the keys inside and finally speaks. "Tests prove that the keys found in your apartment are those to the office and the safe of Bystroezhki. The tapes from the surveillance cameras clearly show you entering the office and taking 650,000 rubles." He takes out a pen and paper and begins to write. While writing, he looks up to you with gloomy eyes and says "A confession will help you in the court. Since this is a first time offense and provided you return the money, you may be given a suspended sentence if you admit your guilt."'
 			act 'Sign confession':
 				*clr & cla

+ 4 - 4
locations/korr2x.qsrc

@@ -100,7 +100,7 @@ if BurgerQW['IlyQW']  = 3 and hour >= 9 and hour <= 20:
 	BurgerQW['IlyQW']  = 4
 	if DolgRS <= moneySUM:
 		money = moneySUM-650000
-		karta = 0
+		karta = bankDebtLimit
 		stolmoney = 0
 		minut += 120
 		'The police arrive and take you to court. You manage to pay off your debts and are released.'
@@ -108,7 +108,7 @@ if BurgerQW['IlyQW']  = 3 and hour >= 9 and hour <= 20:
 	elseif DolgRS > moneySUM:
 		DolgRS = 650000-moneySUM-60000
 		money = 0
-		karta = 0
+		karta = bankDebtLimit
 		stolmoney = 0
 		vidage += 7
 		year += 5
@@ -146,7 +146,7 @@ if BurgerQW['IlyQW']  = 3 and hour >= 9 and hour <= 20:
 			young_shop_work = 0
 			gs 'uniutil', 'student', 'unenroll'
 			gs 'stat'
-			'Time drags on slowly. Your life and work are tedious and monotonous. You sew, have meals in the dining room and go to sleep surrounded by other female inmates. 1,000 <b>₽</b> of your 2,000 <b>₽</b> per month salary goes towards your debt repayment.' 
+			'Time drags on slowly. Your life and work are tedious and monotonous. You sew, have meals in the dining room and go to sleep surrounded by other female inmates. 1,000 <b>₽</b> of your 2,000 <b>₽</b> per month salary goes towards your debt repayment.'
 			'As slow as it seems, time doesn''t stand still and your torment finally comes to an end. You''re released and given 2,000 <b>₽</b>. You board the train and return to the city.'
 			act 'Get off the train': gt 'city_industrial_train', 'outside'
 		end
@@ -166,7 +166,7 @@ if BurgerQW['IlyQWDay'] ! daystart and BurgerQW['IlyQW']  = 1 and hour >= 8 and
 			gs 'stat'
 			'You open the door, wondering what they want from you. There are several men in uniform and others in civilian clothes. A lean and skinny man with with a weeks worth of stubble and a pistol in a holster slung under his armpit speaks to you. "Please take a seat while we search the apartment. This is a warrant for your arrest and this is a search warrant for your apartment. You can read them." The men start searching your apartment and a few minutes later, one of them reappears. "Here are the keys. According to the description, these look like the keys to the office and the safe where the money was stolen." The detective frowns at you and nods at the officer, who pulls your hands behind your back and snaps the handcuffs around your wrists.'
 			wait 1500
-			'You''re escorted out of the building in handcuffs and pushed into a police car. After the door slams shut, the car starts up and drives through the city streets until it stops outside the police station and you''re pulled out and brought into an interview room where the dectective is waiting for you. He takes the handcuffs off you and offers you a seat. You sit in a hard and uncomfortable chair while the detective turns the TV on and inserts a video tape. On the screen is footage from a security camera in Bystroeshke showing you appear in the corridor and enter the office before exiting a few minutes later holding a thick envelope. The detective takes the tape out and inserts another one.' 
+			'You''re escorted out of the building in handcuffs and pushed into a police car. After the door slams shut, the car starts up and drives through the city streets until it stops outside the police station and you''re pulled out and brought into an interview room where the dectective is waiting for you. He takes the handcuffs off you and offers you a seat. You sit in a hard and uncomfortable chair while the detective turns the TV on and inserts a video tape. On the screen is footage from a security camera in Bystroeshke showing you appear in the corridor and enter the office before exiting a few minutes later holding a thick envelope. The detective takes the tape out and inserts another one.'
 			'It shows Chubais'' office. The door opens and you walk in holding some keys. You go to the safe, open it with one of the keys and take the envelope with <<$BurgerQW[''IlySecurityCamDesc'']>> written on it. The detective turns the TV off, picks up a plastic bag with the keys inside and finally speaks. "Tests prove that the keys found in your apartment are those to the office and the safe of Bystroezhki. The tapes from the surveillance cameras clearly show you entering the office and taking 650,000 rubles." He takes out a pen and paper and begins to write. While writing, he looks up at you with gloomy eyes. "A confession will help you in the court. Since this is a first time offense and provided you return the money, you may be given a suspended sentence if you admit your guilt."'
 			act 'Sign the confession':
 				cla

+ 42 - 13
locations/lakecafe.qsrc

@@ -55,7 +55,7 @@ if $ARGS[0] = 'main':
 		end
 
 		if hour => 23: 'Several <a href="exec:gt ''lakecafe'',''bandits''">shady looking men</a> are sitting around a small table in a fairly secluded corner of the diner. They talk in hushed voices amongst each another, and look like they might very well be criminals.'
-	
+
 		'The diner has a single <a href="exec:gt ''laketoilet'', ''main''">toilet</a> available, for both males and females.'
 
 		act 'Order from the menu (0:05)':gs 'food_menu'
@@ -64,7 +64,7 @@ if $ARGS[0] = 'main':
 		end
 	end
 
-	if LCwork2 >= 1 and LCwork2day ! daystart and hour = 18: 
+	if LCwork2 >= 1 and LCwork2day ! daystart and hour = 18:
 		act 'Help out in the kitchen': gt 'lakecafe', 'Kitchen'
 	end
 end
@@ -275,7 +275,7 @@ if $ARGS[0] = 'barmensha':
 									end
 								else
 									act 'Say you won''t do it (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
-								end	
+								end
 								act 'Walk away':
 									*clr & cla
 									npc_love['A89'] -= 30
@@ -312,7 +312,7 @@ if $ARGS[0] = 'barmensha':
 								end
 							else
 								act 'Say you won''t do it (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
-							end	
+							end
 							act 'Walk away':
 								*clr & cla
 								npc_love['A89'] -= 5
@@ -486,21 +486,49 @@ if $ARGS[0] = 'bandits':
 			act 'Watch them leave': gt 'lakecafe', 'main'
 		else
 			if (money + stolmoney + karta) >= workDolg:
-				money += stolmoney+karta
-				stolmoney = 0
-				karta = 0
-				money -= workDolg
+				temp_debt = workDolg
+				temp_amount = min(money, temp_debt)
+				money -= temp_amount
+				temp_debt = temp_amount
+				if temp_debt > 0 and stolmoney > 0:
+					temp_amount = min(stolmoney, temp_debt)
+					stolmoney -= temp_amount
+					temp_debt -= temp_amount
+				end
+				if temp_debt > 0:
+					karta -= temp_debt
+					temp_debt = 0
+				end
+				killvar 'temp_amount'
+				killvar 'temp_debt'
+
 				workDolg = 0
+
 				'You don''t have the full amount on you, but you tell them that you have the rest at home. "Oh really? Very original! We''re coming with you! I''m not letting you out of my sight for even one second until your debt is paid!" one of the men grunts.'
 				'The men follow you to your home, and wait impatiently while you collect the money you owe them. When you produce the full amount, they actually seem a bit surprised.'
 				'"Huh. I guess you weren''t lying after all," one says after counting it twice. "Consider your debt paid, miss. Pleasure doing business."'
 				act 'Close the door behind them': gt $home['entrance'], 'start'
 			else
-				money += stolmoney + karta
-				stolmoney = 0
-				karta = 0
-				workDolg -= money
-				money = 0
+				temp_debt = workDolg
+				temp_amount = min(money, temp_debt)
+				money -= temp_amount
+				workDolg -= temp_amount
+				temp_debt = temp_amount
+				if temp_debt > 0 and stolmoney > 0:
+					temp_amount = min(stolmoney, temp_debt)
+					stolmoney -= temp_amount
+					workDolg -= temp_amount
+					temp_debt -= temp_amount
+				end
+				if temp_debt > 0 and karta > 0:
+					temp_amount = min(karta, temp_debt)
+					karta -= temp_amount
+					workDolg -= temp_amount
+					temp_debt -= temp_amount
+				end
+				killvar 'temp_amount'
+				killvar 'temp_debt'
+
 				workDolg += 10000
 				'"I... I don''t have the money, I''m sorry!" you tell the guys, who roughly grab you by the shoulders the moment you confess.'
 				'"Oh, you will be sorry!" one laughs at you. They walk to your apartment with you between them, never even asking for directions.'
@@ -508,6 +536,7 @@ if $ARGS[0] = 'bandits':
 				'"Still not enough, huh?" the man holding you the gun mutters as the other finishes his search. "So, here''s what''s gonna happen. Since you can''t pay your debt and we have to go through all this trouble getting it back, consider your debt increased by another 10,000 <b>₽</b>. Don''t you worry your pretty little head, though. We''re going to give you an alternative way to pay it off."'
 				'"Ha! That pretty face will come in handy there!" the other laughs.'
 				'Without explaining further, they drag you to a car outside your apartment and throw you into the back seat. About half an hour later, the car pulls over and one of the men tells you to get out. You''re at a sauna building in the city.'
+
 				act 'Get out of the car':
 					*clr & cla
 					minut += 30

+ 1 - 1
locations/library_functions.qsrc

@@ -747,7 +747,7 @@ if $ARGS[0] = 'pay_debt_act':
 					gt $loc, $loc_arg
 				end
 			end
-			if karta + bankDebtLimit >= lib_debt:
+			if karta >= lib_debt:
 				act 'Pay your debt (card)':
 					karta -= lib_debt
 					lib_debt = 0

+ 6 - 6
locations/obj_din.qsrc

@@ -692,10 +692,10 @@ if $ARGS[0] = 'stats':
 		end
 		if accessible_property['city_apartment'] = 1:
 			rentdue = func('homes_properties', 'get_rent_amount', 'city_apartment')
-			if karta >= rentdue or money >= rentdue or money + stolmoney >= rentdue or karta + bankDebtLimit >= rentdue:
+			if karta >= rentdue or money >= rentdue or money + stolmoney >= rentdue:
 				*nl
 				*p 'The monthly rent for your city apartment is <<rentdue>> <b>₽</b>. '
-				if karta >= rentdue:
+				if karta - bankDebtLimit >= rentdue:
 					!From bank
 					*p 'You can make an advance <a href="exec:karta -=rentdue & gs ''homes_properties'', ''add_rent_days'', ''city_apartment'' & gs ''$menu_obnovit''">payment</a> from your bank account.'
 				elseif money >= rentdue:
@@ -710,7 +710,7 @@ if $ARGS[0] = 'stats':
 					!From cash and drawer
 					*p 'You can make an advance <a href="exec:money -= (rentdue - stolmoney) & stolmoney = 0 & gs ''homes_properties'', ''add_rent_days'', ''city_apartment'' & gs ''$menu_obnovit''">payment</a> from your on-hand cash and the cash in your stash drawer.'
 					*nl
-				elseif karta + bankDebtLimit >= rentdue:
+				elseif karta >= rentdue:
 					!From bank and overdraw
 					*p 'You can make an advance <a href="exec:karta -= rentdue & gs ''homes_properties'', ''add_rent_days'', ''city_apartment'' & gs ''$menu_obnovit''">payment</a> from your bank account and overdraw facility.'
 					*nl
@@ -723,10 +723,10 @@ if $ARGS[0] = 'stats':
 		end
 		if accessible_property['old_town_apartment'] > 0:
 			rentdue = func('homes_properties', 'get_rent_amount', 'old_town_apartment')
-			if karta >= rentdue or money >= rentdue or money + stolmoney >= rentdue or karta + bankDebtLimit >= rentdue:
+			if karta >= rentdue or money >= rentdue or money + stolmoney >= rentdue:
 				*nl
 				*p 'The monthly rent for your Pushkin apartment is <<rentdue>> <b>₽</b>. '
-				if karta >= rentdue:
+				if karta - bankDebtLimit >= rentdue:
 					!From bank
 					*p 'You can make an advance <a href="exec:karta -= rentdue &  gs ''homes_properties'', ''set_access'', ''old_town_apartment'', 1 & gs ''homes_properties'', ''add_rent_days'', ''old_town_apartment'' & gs ''$menu_obnovit''">payment</a> from your bank account.'
 					*nl
@@ -742,7 +742,7 @@ if $ARGS[0] = 'stats':
 					!From cash and drawer
 					*p 'You can make an advance <a href="exec:money -= (rentdue - stolmoney) & stolmoney = 0 & gs ''homes_properties'', ''set_access'', ''old_town_apartment'', 1 & gs ''homes_properties'', ''add_rent_days'', ''old_town_apartment'' & gs ''$menu_obnovit''">payment</a> from your on-hand cash and the cash in your stash drawer.'
 					*nl
-				elseif karta + bankDebtLimit >= rentdue:
+				elseif karta >= rentdue:
 					!From bank and overdraw
 					*p 'You can make an advance <a href="exec:karta -= rentdue & gs ''homes_properties'', ''set_access'', ''old_town_apartment'', 1 & gs ''homes_properties'', ''add_rent_days'', ''old_town_apartment'' & gs ''$menu_obnovit''">payment</a> from your bank account and overdraw facility.'
 					*nl

+ 2 - 2
locations/panties.qsrc

@@ -238,7 +238,7 @@ if $ARGS[0] = 'view_panty_item':
 			else
 				'You do not have enough cash to buy these panties.'
 			end
-			if karta + bankDebtLimit >= price:
+			if karta >= price:
 				act 'Buy (card)':
 					karta -= price
 					dynamic $ARGS[2] + '_panties[<<ARGS[3]>>] = 1'
@@ -267,7 +267,7 @@ if $ARGS[0] = 'view_panty_item':
 					else
 						'You do not have enough cash to buy this set.'
 					end
-					if karta + bankDebtLimit >= price_set:
+					if karta >= price_set:
 						act 'Buy set (card)':
 							karta -= price_set
 							dynamic $ARGS[2] + '_panties[<<ARGS[3]>>] = 1'

+ 8 - 272
locations/pav_clinic.qsrc

@@ -94,186 +94,10 @@ if $ARGS[0] = '':
 			end
 		end
 
-		if (pcs_teeth > -1 and (dentistday < daystart or dentistday = 0)) or (pcs_missing_teeth > 0  and pcs_brace = 0):
-			act 'Go to the dentist':
-				*clr & cla
-				'<center><img <<$set_imgh>> src="images/locations/shared/clinic/dentist.jpg"></center>'
-				menu_off = 1
-				minut += 15
-				gs 'stat'
+		gs 'clinic_functions', 'set_dentist_act'
 
-				if pcs_brace = 1:
-					pcs_brace = 0
-					pcs_teeth -= 1
-					'The dentist spends 15 minutes taking off your brace and cleaning up. You look in the mirror afterwards and your teeth are '+iif(pcs_teeth = 0, 'now straight', 'straighter, but can still use some more work.')
-					gs 'AppearanceSystem', 'UpdateBaseAppearance'
-					gs 'stat'
-				else
-					if pcs_missing_teeth = 1:
-						zubpay = 30000
-						'The dentist examines you and says it will cost you <<zubpay>> <b>₽</b> to replace your tooth'
-					elseif pcs_missing_teeth > 1:
-						zubpay = pcs_missing_teeth * 30000
-						'The dentist examines you and says it will cost you <<zubpay>> <b>₽</b> to fill the gaps'
-					elseif pcs_teeth = 0:
-						zubpay = 3000
-						'The dentist examines you and says it will cost you <<zubpay>> <b>₽</b> to brighten and polish your teeth.'
-					elseif pcs_teeth > 0:
-						zubpay = 4500
-						'The dentist examinees you and says it will cost you <<zubpay>><b>₽</b> to straighten your teeth and you will have to wear a brace for three months. However, he states that he can''t promise they will be completely straight after one treatment.'
-					end
+		gs 'clinic_functions', 'set_optometrist_acts'
 
-					if money < zubpay and karta + bankDebtLimit < zubpay:
-						*nl
-						'You don''t have enough money to fix your teeth.'
-					else
-						if money >= zubpay:
-							act 'Sort out your teeth (cash)':
-								*clr & cla
-								money -= zubpay
-								minut += 60
-								if pcs_missing_teeth > 0:
-									pcs_missing_teeth = 0
-									'You pay the dentist to fix your teeth and he has restored your winning smile within an hour.'
-								elseif pcs_teeth > 0:
-									dentistday = daystart + 180
-									pcs_brace = 1
-									'You pay the dentist to straighten your teeth. After an hour of work, he has attached a brace to your teeth and tells you to come back in six months to have it taken off.'
-								else
-									dentistday = daystart + 90
-									pcs_teeth = -1
-									'You pay the dentist to brighten and polish your teeth and an hour later, your smile is much brighter and more attractive.'
-								end
-								gs 'AppearanceSystem', 'UpdateBaseAppearance'
-								gs 'stat'
-
-								act 'Leave the clinic': minut += 5 & gt 'pav_commercial'
-							end
-						end
-						if karta + bankDebtLimit >= zubpay:
-							act 'Sort out your teeth (card)':
-								*clr & cla
-								karta -= zubpay
-								minut += 60
-								if pcs_missing_teeth > 0:
-									pcs_missing_teeth = 0
-									'You pay the dentist to fix your teeth and he has restored your winning smile within an hour.'
-								elseif pcs_teeth > 0:
-									dentistday = daystart + 180
-									pcs_brace = 1
-									'You pay the dentist to straighten your teeth. After an hour of work, he has attached a brace to your teeth and tells you to come back in six months to have it taken off.'
-								else
-									dentistday = daystart + 90
-									pcs_teeth = -1
-									'You pay the dentist to brighten and polish your teeth and an hour later, your smile is much brighter and more attractive.'
-								end
-								gs 'AppearanceSystem', 'UpdateBaseAppearance'
-								gs 'stat'
-
-								act 'Leave the clinic': minut += 5 & gt 'pav_commercial'
-							end
-						end
-					end
-				end
-				act 'Leave the clinic': minut += 5 & gt 'pav_commercial'
-			end
-		end
-
-		if glassqw = 1:
-			act 'Visit the optometrist (0:35)':
-				*clr & cla
-				menu_off = 1
-				minut += 35
-				gs 'stat'
-				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/clinic/optometrist.jpg"></center>'
-				'The optometrist takes you through a series of tests to measure the condition of your eyes.'
-				'He looks at you as if he has bad news for you. "Well, you probably already expected this, but your vision has deteriorated significantly. You''re going to need glasses to be able to read. The prescription I''m writing for you is for a simple set of rimmed glasses which you can pick up at the front desk before you leave."'
-				'He hands you a piece of paper. "Of course you can get a different pair elsewhere if you want better looking ones, the details for which ones you need are on your prescription. You can also get laser vision correction if you really don''t want to use glasses, but I''m going to be honest with you: that''s a very expensive procedure."'
-				pcs_nerd += 1
-				glassqw = 2
-				glass = 1
-				blizoruk += 1
-				act 'Leave': gt $curloc
-			end
-		end
-
-		if glass > 0:
-			act 'Go to the optometrist':
-				*clr & cla
-				menu_off = 1
-				gs 'stat'
-				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/clinic/optometrist.jpg"></center>'
-				'The optometrist examines your eyes and says that he can perform laser eye surgery for 75,000 <b>₽</b>. Of course, reading books can cause your eyesight to deteriorate again.'
-
-				if glass = 1: 'The optometrist also tells you about the option to buy glasses for 4,500 <b>₽</b>.'
-
-				act 'Return to the entrance': gt 'pav_clinic'
-
-				if glass = 1:
-					if money < 4500 and karta + bankDebtLimit < 4500:
-						*nl
-						'You can''t afford the more stylish glasses.'
-					else
-						if money >= 4500:
-							act 'Buy glasses (4,500 <b>₽</b>) (cash)':
-								cla
-								money -= 4500
-								minut += 60
-								glass = 2
-								gs 'stat'
-								'You buy a new, more stylish pair of glasses.'
-
-								act 'Return to the entrance': gt 'pav_clinic'
-							end
-						end
-						if karta + bankDebtLimit >= 4500:
-							act 'Buy glasses (4,500 <b>₽</b>) (card)':
-								cla
-								karta -= 4500
-								minut += 60
-								glass = 2
-								gs 'stat'
-								'You buy a new, more stylish pair of glasses.'
-
-								act 'Return to the entrance': gt 'pav_clinic'
-							end
-						end
-					end
-				end
-
-				if glass ! 0:
-					if money < 75000 and karta + bankDebtLimit < 75000:
-						*nl
-						'You can''t afford the laser eye correction surgery.'
-					else
-						if money >= 75000:
-							act 'Pay for laser correction (75,000 <b>₽</b>) (cash)':
-								cla
-								money -= 75000
-								minut += 60
-								blizoruk = 0
-								glass = 0
-								gs 'stat'
-								'You undergo laser eye surgery. Your eyesight is much better now.'
-								act 'Return to the entrance': gt 'pav_clinic'
-							end
-						end
-						if karta + bankDebtLimit >= 75000:
-							act 'Pay for laser correction (75,000 <b>₽</b>) (card)':
-								cla
-								karta -= 75000
-								minut += 60
-								blizoruk = 0
-								glass = 0
-								gs 'stat'
-								'You undergo laser eye surgery. Your eyesight is much better now.'
-								act 'Return to the entrance': gt 'pav_clinic'
-							end
-						end
-					end
-				end
-			end
-		end
 
 		if (pcs_health < (pcs_vital * 10 + pcs_stren * 5) or pain['total'] > 10) and clinic['docheal'] ! daystart:
 			act 'See a doctor about your health (1:00)':
@@ -669,66 +493,16 @@ if $ARGS[0] = 'sexual_health':
 		end
 	end
 
-	if karta + bankDebtLimit >= 1000:
+	if karta >= 1000:
 		act 'Get tested for STDs (1,000 <b>₽</b>) (card)':
 			karta -= 1000
 			gs 'pav_clinic', 'std_test'
 		end
 	end
 
-	if GerpesNapr > 0 and GerpesUkolDay ! daystart:
-		if money < 450 and karta + bankDebtLimit < 450: *nl & 'You can''t afford your herpes shot.'
-
-		if money >= 450:
-			act 'Get herpes shot (450 <b>₽</b>) (cash) You need <<GerpesNapr>> more injections to complete the treatment':
-				money -= 450
-				gs 'pav_clinic', 'herpes_shot'
-			end
-		end
-
-		if karta + bankDebtLimit >= 450:
-			act 'Get herpes shot (450 <b>₽</b>) (card) You need <<GerpesNapr>> more injections to complete the treatment':
-				karta -= 450
-				gs 'pav_clinic', 'herpes_shot'
-			end
-		end
-	end
-
-	if TriperNapr > 0 and TriperUkolDay ! daystart:
-		if money < 750 and karta + bankDebtLimit < 750: *nl & 'You can''t afford your gonorrhea shot.'
-
-		if money >= 750:
-			act 'Get gonorrhea shot (750 <b>₽</b>) (cash) You need <<TriperNapr>> more injections to complete the treatment':
-				money -= 750
-				gs 'pav_clinic', 'gonorrhea_shot'
-			end
-		end
-
-		if karta + bankDebtLimit >= 750:
-			act 'Get gonorrhea shot (750 <b>₽</b>) (card) You need <<TriperNapr>> more injections to complete the treatment':
-				karta -= 750
-				gs 'pav_clinic', 'gonorrhea_shot'
-			end
-		end
-	end
-
-	if SifNapr = 1:
-		if money < 1000 and karta + bankDebtLimit < 1000: *nl & 'You can''t afford your syphilis shot.'
-
-		if money >= 1000:
-			act 'Get syphilis shot (1,000 <b>₽</b>) (cash)':
-				money -= 1000
-				gs 'pav_clinic', 'syphilis_shot'
-			end
-		end
-
-		if karta + bankDebtLimit >= 1000:
-			act 'Get syphilis shot (1,000 <b>₽</b>) (card)':
-				karta -= 1000
-				gs 'pav_clinic', 'syphilis_shot'
-			end
-		end
-	end
+	gs 'clinic_functions', 'set_std_herpes_shot_act'
+	gs 'clinic_functions', 'set_std_gonorrhea_shot_act'
+	gs 'clinic_functions', 'set_std_syphilis_shot_act'
 end
 
 if $ARGS[0] = 'std_test':
@@ -746,44 +520,6 @@ if $ARGS[0] = 'std_test':
 	act 'Leave': gt 'pav_clinic'
 end
 
-if $ARGS[0] = 'herpes_shot':
-	*clr & cla
-	minut += 15
-	GerpesUkolDay = daystart
-	GerpesNapr -= 1
-	gs 'stat'
-	'You see the nurse and she gives you a painful injection in your ass.'
-
-	if GerpesNapr = 0:Gerpes = -10 & 'You have completed the treatment.'
-	act 'Leave': gt 'pav_clinic'
-end
-
-if $ARGS[0] = 'gonorrhea_shot':
-	*clr & cla
-	minut += 15
-	TriperUkolDay = daystart
-	TriperNapr -= 1
-	gs 'stat'
-	'You see the nurse and she gives you a painful injection in your ass.'
-
-	if TriperNapr = 0:TriperOral = 0 & TriperOralSigns = 0 & Triper = 0 & Venera -= 1 & TriperOnce = 0 & 'You have completed the treatment.'
-
-	act 'Leave': gt 'pav_clinic'
-end
-
-if $ARGS[0] = 'syphilis_shot':
-	*clr & cla
-	minut += 60
-	SifNapr = 0
-	SifacOnce = 0
-	Sifilis = 0
-	Venera -= 1
-	gs 'stat'
-	'You see the nurse and she gives you a painful injection in your ass.'
-	'"That''s it. You might still feel a little off, but the infection is now cured."'
-
-	act 'Leave': gt 'pav_clinic'
-end
 
 if $ARGS[0] = 'referral':
 	menu_off = 1
@@ -1189,7 +925,7 @@ if $ARGS[0] = 'spravka_money':
 				act 'Leave':gt 'pav_clinic'
 			end
 		end
-		if karta + bankDebtLimit >= 2000:
+		if karta >= 2000:
 			act 'Pay him the 2,000 <b>₽</b> (card)':
 				*clr & cla
 				minut += 5
@@ -1238,7 +974,7 @@ if $ARGS[0] = 'spravka_money_pale':
 				gs 'pav_clinic', 'spravka_money_pale2'
 			end
 		end
-		if karta + bankDebtLimit >= 2000:
+		if karta >= 2000:
 			act 'Pay him the 2,000 <b>₽</b> (card)':
 				*clr & cla
 				minut += 5

+ 34 - 34
locations/pav_hotelReception.qsrc

@@ -135,9 +135,9 @@ if $ARGS[0] = '':
 				'Luxury room - 1500 <b>₽</b> / night;'
 				*nl
 				act'Normal room':
-					cla 
+					cla
 					hotelRoomDays['pav'] = input ("For how long would you like to stay?")
-					if hotelRoomDays['pav'] > 0 : 
+					if hotelRoomDays['pav'] > 0 :
 						totalCost = hotelRoomDays['pav'] * 500
 						'"A normal room for <<hotelRoomDays[''pav'']>> days, that would be <<totalCost>><b>₽</b> in total." says the receptionist, "would you like to pay with cash or with card?"'
 						gs 'pav_hotelReception', 'pay_the_room', 1
@@ -149,7 +149,7 @@ if $ARGS[0] = '':
 				act'Luxury room':
 					cla
 					hotelRoomDays['pav'] = input ("For how long would you like to stay?")
-					if hotelRoomDays['pav'] > 0 : 
+					if hotelRoomDays['pav'] > 0 :
 						totalCost = hotelRoomDays['pav'] * 1500
 						'"A luxury room for <<hotelRoomDays[''pav'']>> days, that will be <<totalCost>><b>₽</b>" says the receptionist, "would you like to pay with cash or with card?"'
 						gs 'pav_hotelReception', 'pay_the_room', 2
@@ -167,41 +167,41 @@ end
 
 if $ARGS[0] = 'pay_the_room':
 	hotel_room_id = ARGS[1]
-	if totalCost<=money:
-		act 'Pay with cash':
-			cla
-			money -= totalCost
-			hotelRoom['pav'] = hotel_room_id
-			hotelRoomDays['pav'] = daystart + hotelRoomDays['pav']
-			'You count the money and give it to her. She gives you the key to your room in return. She says happily: "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!"'
-			act 'Step away from the reception desk': gt 'pav_hotel'
+	if karta < totalCost and money < totalCost:
+		act 'You can''t afford to stay in the hotel for that long.':
 			killvar 'totalCost'
 			killvar 'hotel_room_id'
+			gt 'pav_hotel'
 		end
-	end
-	if totalCost<=karta+bankDebtLimit:
-		act 'Pay with card':
-			cla
-			karta -= totalCost
-			hotelRoom['pav'] = hotel_room_id
-			hotelRoomDays['pav'] = daystart + hotelRoomDays['pav']
-			'You swipe your card and wait a moment for ''APPROVED'' to appear on the tiny screen. As soon as the receipt is printed, she hands it to you with the key to your room. "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!" she says with a smile.'
-			act 'Step away from the reception desk': gt 'pav_hotel'
-			killvar 'totalCost'
-			killvar 'hotel_room_id'
+	else
+		if money >= totalCost:
+			act 'Pay with cash':
+				cla
+				money -= totalCost
+				hotelRoom['pav'] = hotel_room_id
+				hotelRoomDays['pav'] = daystart + hotelRoomDays['pav']
+				'You count the money and give it to her. She gives you the key to your room in return. She says happily: "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!"'
+				act 'Step away from the reception desk': gt 'pav_hotel'
+				killvar 'totalCost'
+				killvar 'hotel_room_id'
+			end
 		end
-	end
-
-	if totalCost > karta+bankDebtLimit and totalCost > money: 
-		act 'You can''t afford to stay in the hotel for that long.': 
-			killvar 'totalCost' 
-			killvar 'hotel_room_id'
-			gt 'pav_hotel'
+		if karta >= totalCost:
+			act 'Pay with card':
+				cla
+				karta -= totalCost
+				hotelRoom['pav'] = hotel_room_id
+				hotelRoomDays['pav'] = daystart + hotelRoomDays['pav']
+				'You swipe your card and wait a moment for ''APPROVED'' to appear on the tiny screen. As soon as the receipt is printed, she hands it to you with the key to your room. "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!" she says with a smile.'
+				act 'Step away from the reception desk': gt 'pav_hotel'
+				killvar 'totalCost'
+				killvar 'hotel_room_id'
+			end
 		end
 	end
 
-	act 'You change your mind': 
-		killvar 'totalCost' 
+	act 'You change your mind':
+		killvar 'totalCost'
 		killvar 'hotel_room_id'
 		gt 'pav_hotel'
 	end
@@ -342,7 +342,7 @@ if $ARGS[0] = 'pavlbarcont':
 		'"This was not what we agreed to." You say. "I need more..."'
 		'"Sure, you can have more, but you need to do some extra work for that."'
 		'<<$npc_nickname[''A217'']>> takes your hand and moves it towards his crotch.'
-		
+
 		gs 'willpower', 'bj', 'resist'
 		if will_cost <= pcs_willpwr:
 			act 'Be content with what you have (<<will_cost>> Willpower)':
@@ -405,7 +405,7 @@ if $ARGS[0] = 'pavlbarcont':
 		'"You are right <<$pcs_firstname>>, come with me to my car I''ll give you a bonus today."'
 		'You are excited at the prospect of finally getting the money you earned but you are unsure if you can trust <<$npc_nickname[''A217'']>>.'
 		minut += 5
-		
+
 		gs 'willpower', 'misc', 'resist'
 		if will_cost <= pcs_willpwr:
 			act 'Take no chances, accept the amount for today (<<will_cost>> Willpower)':
@@ -609,7 +609,7 @@ if $ARGS[0] = 'pavgenprosmf':
 		else
 			'<<$boydesc>> holds your head and pulls his dick out of your mouth saying: "Put a condom on me, it''s time to test that pussy of yours."'
 			'"I don''t have any." You tell him.'
-			
+
 			gs 'willpower', 'foreplay', 'force'
 			if will_cost <= pcs_willpwr:
 				act 'It feels a lot better without a condom (<<will_cost>> Willpower)':

+ 1 - 1
locations/pav_park.qsrc

@@ -690,7 +690,7 @@ if $ARGS[0] = 'set_sleep_act':
 		pavlovsk_home = func('homes_properties', 'has_access', 'shared_apartment') or func('homes_properties', 'has_access', 'meynold_household') or func('homes_properties', 'has_access', 'parents_home') or func('homes_properties', 'has_access', 'lyceum_dorm')
 		if pavlovsk_home = 0 and workPTU <= 2 and HotelRoom['pav'] < 1:
 			!nowhere to live in town
-			if money >= 500 or karta+bankDebtLimit >= 500:
+			if money >= 500 or karta >= 500:
 				'It''s pretty dark now. Maybe you could get a room in the hotel?'
 			else
 				'It''s pretty dark now and you have nowhere to stay nearby. Maybe you should try to sleep on a bench?'

+ 61 - 61
locations/pirsingsalon.qsrc

@@ -59,7 +59,7 @@ end
 
 if $ARGS[0] = 'count':
 	!!Counting the tattoos and piercings just in case
-	
+
 	tattCount = 0
 
 	if tatarm >= 1: tattCount += 1
@@ -128,7 +128,7 @@ if $ARGS[0] = 'tongue_pir':
 			else
 				'You don''t have enough cash for this piercing.'
 			end
-			if karta + bankDebtLimit >= 3000:
+			if karta >= 3000:
 				act 'Buy this piercing for 3,000 <b>₽</b> (card)':
 					'You buy the piercing.'
 					cla
@@ -140,7 +140,7 @@ if $ARGS[0] = 'tongue_pir':
 				'You don''t have enough money in your bank for this piercing.'
 			end
 		end
-	elseif (money >= 5000) or (karta + bankDebtLimit >= 5000):
+	elseif (money >= 5000) or (karta >= 5000):
 		if money >= 5000:
 			act 'Get your tongue pierced with this piercing for 5,000 <b>₽</b> (cash)':
 				cls
@@ -157,7 +157,7 @@ if $ARGS[0] = 'tongue_pir':
 				act 'Leave':gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 5000:
+		if karta >= 5000:
 			act 'Get your tongue pierced with this piercing for 5,000 <b>₽</b> (card)':
 				cls
 				minut += 30
@@ -215,7 +215,7 @@ if $ARGS[0] = 'lip_pir':
 			else
 				'You don''t have enough cash for this piercing.'
 			end
-			if karta + bankDebtLimit >= 4000:
+			if karta >= 4000:
 				act 'Buy this piercing for 4,000 <b>₽</b> (card)':
 					'You buy the piercing.'
 					cla
@@ -227,7 +227,7 @@ if $ARGS[0] = 'lip_pir':
 				'You don''t have enough money in your bank for this piercing.'
 			end
 		end
-	elseif (money >= 6000) or (karta + bankDebtLimit >= 6000):
+	elseif (money >= 6000) or (karta >= 6000):
 		if money >= 6000:
 			act 'Get your lip pierced with this piercing for 6,000 <b>₽</b> (cash)':
 				cls
@@ -244,7 +244,7 @@ if $ARGS[0] = 'lip_pir':
 				act 'Leave':gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 6000:
+		if karta >= 6000:
 			act 'Get your lip pierced with this piercing for 6,000 <b>₽</b> (card)':
 				cls
 				minut += 30
@@ -302,7 +302,7 @@ if $ARGS[0] = 'ears_pir':
 			else
 				'You don''t have enough cash for these earrings.'
 			end
-			if karta + bankDebtLimit >= 1000:
+			if karta >= 1000:
 				act 'Buy these earrings for 1,000 <b>₽</b> (card)':
 					'You buy the earrings.'
 					cla
@@ -314,7 +314,7 @@ if $ARGS[0] = 'ears_pir':
 				'You don''t have enough money in your bank for these earrings.'
 			end
 		end
-	elseif (money >= 3000) or (karta + bankDebtLimit >= 3000):
+	elseif (money >= 3000) or (karta >= 3000):
 		if money >= 3000:
 			act 'Get your ears pierced with these earrings for 3,000 <b>₽</b> (cash)':
 				cls
@@ -331,7 +331,7 @@ if $ARGS[0] = 'ears_pir':
 				act 'Leave':gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 3000:
+		if karta >= 3000:
 			act 'Get your ears pierced with these earrings for 3,000 <b>₽</b> (card)':
 				cls
 				minut += 30
@@ -389,7 +389,7 @@ if $ARGS[0] = 'nose_pir':
 			else
 				'You don''t have enough cash for this piercing.'
 			end
-			if karta + bankDebtLimit >= 2000:
+			if karta >= 2000:
 				act 'Buy this piercing for 2,000 <b>₽</b> (card)':
 					'You buy the piercing.'
 					cla
@@ -401,7 +401,7 @@ if $ARGS[0] = 'nose_pir':
 				'You don''t have enough money in your bank for this piercing.'
 			end
 		end
-	elseif (money >= 5000) or (karta + bankDebtLimit >= 5000):
+	elseif (money >= 5000) or (karta >= 5000):
 		if money >= 5000:
 			act 'Get your nose pierced with this piercing for 5,000 <b>₽</b> (cash)':
 				cls
@@ -418,7 +418,7 @@ if $ARGS[0] = 'nose_pir':
 				act 'Leave':gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 5000:
+		if karta >= 5000:
 			act 'Get your nose pierced with this piercing for 5,000 <b>₽</b> (card)':
 				cls
 				minut += 30
@@ -476,7 +476,7 @@ if $ARGS[0] = 'brow_pir':
 			else
 				'You don''t have enough cash for this piercing.'
 			end
-			if karta + bankDebtLimit >= 2000:
+			if karta >= 2000:
 				act 'Buy this piercing for 2,000 <b>₽</b> (card)':
 					'You buy the piercing.'
 					cla
@@ -488,7 +488,7 @@ if $ARGS[0] = 'brow_pir':
 				'You don''t have enough money in your bank for this piercing.'
 			end
 		end
-	elseif (money >= 5000) or (karta + bankDebtLimit >= 5000):
+	elseif (money >= 5000) or (karta >= 5000):
 		if money >= 5000:
 			act 'Get your brow pierced with this piercing for 5,000 <b>₽</b> (cash)':
 				cls
@@ -505,7 +505,7 @@ if $ARGS[0] = 'brow_pir':
 				act 'Leave':gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 5000:
+		if karta >= 5000:
 			act 'Get your brow pierced with this piercing for 5,000 <b>₽</b> (card)':
 				cls
 				minut += 30
@@ -563,7 +563,7 @@ if $ARGS[0] = 'nip_pir':
 			else
 				'You don''t have enough cash for these piercings.'
 			end
-			if karta + bankDebtLimit >= 6000:
+			if karta >= 6000:
 				act 'Buy these piercings for 6,000 <b>₽</b> (card)':
 					'You buy the piercings.'
 					cla
@@ -575,7 +575,7 @@ if $ARGS[0] = 'nip_pir':
 				'You don''t have enough money in your bank for this piercing.'
 			end
 		end
-	elseif (money >= 10000) or (karta + bankDebtLimit >= 10000):
+	elseif (money >= 10000) or (karta >= 10000):
 		if money >= 10000:
 			act 'Get your nipples pierced with these piercings for 10,000 <b>₽</b> (cash)':
 				cls
@@ -592,7 +592,7 @@ if $ARGS[0] = 'nip_pir':
 				act 'Leave':gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 10000:
+		if karta >= 10000:
 			act 'Get your nipples pierced with these piercings for 10,000 <b>₽</b> (card)':
 				cls
 				minut += 30
@@ -650,7 +650,7 @@ if $ARGS[0] = 'belly_pir':
 			else
 				'You don''t have enough cash for this piercing.'
 			end
-			if karta + bankDebtLimit >= 7000:
+			if karta >= 7000:
 				act 'Buy this piercing for 7,000 <b>₽</b> (card)':
 					'You buy the piercing.'
 					cla
@@ -662,7 +662,7 @@ if $ARGS[0] = 'belly_pir':
 				'You don''t have enough money in your bank for this piercing.'
 			end
 		end
-	elseif (money >= 10000) or (karta + bankDebtLimit >= 10000):
+	elseif (money >= 10000) or (karta >= 10000):
 		if money >= 10000:
 			act 'Get your belly button pierced with this piercing for 10,000 <b>₽</b> (cash)':
 				cls
@@ -679,7 +679,7 @@ if $ARGS[0] = 'belly_pir':
 				act 'Leave':gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 10000:
+		if karta >= 10000:
 			act 'Get your belly button pierced with this piercing for 10,000 <b>₽</b> (card)':
 				cls
 				minut += 30
@@ -737,7 +737,7 @@ if $ARGS[0] = 'pubic_pir':
 			else
 				'You don''t have enough cash for this piercing.'
 			end
-			if karta + bankDebtLimit >= 10000:
+			if karta >= 10000:
 				act 'Buy this piercing for 10,000 <b>₽</b> (card)':
 					'You buy the piercing.'
 					cla
@@ -749,7 +749,7 @@ if $ARGS[0] = 'pubic_pir':
 				'You don''t have enough money in your bank for this piercing.'
 			end
 		end
-	elseif (money >= 25000) or (karta + bankDebtLimit >= 25000):
+	elseif (money >= 25000) or (karta >= 25000):
 		if money >= 25000:
 			act 'Get your pussy pierced with this piercing for 25,000 <b>₽</b> (cash)':
 				cls
@@ -766,7 +766,7 @@ if $ARGS[0] = 'pubic_pir':
 				act 'Leave':gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 25000:
+		if karta >= 25000:
 			act 'Get your pussy pierced with this piercing for 25,000 <b>₽</b> (card)':
 				cls
 				minut += 30
@@ -814,7 +814,7 @@ if $ARGS[0] = 'arm_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/arms/tatarm<<n>>.jpg"></center>'
 
-	if (money < 8000) and (karta + bankDebtLimit < 8000):
+	if (money < 8000) and (karta < 8000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 8000:
@@ -828,7 +828,7 @@ if $ARGS[0] = 'arm_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 8000:
+		if karta >= 8000:
 			act 'Get this tattoo 8,000 <b>₽</b> (card)':
 				cla
 				tatarm = n
@@ -869,7 +869,7 @@ if $ARGS[0] = 'ass_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/ass/tatass<<n>>.jpg"></center>'
 
-	if (money < 10000) and (karta + bankDebtLimit < 10000):
+	if (money < 10000) and (karta < 10000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 10000:
@@ -883,7 +883,7 @@ if $ARGS[0] = 'ass_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 10000:
+		if karta >= 10000:
 			act 'Get this tattoo 10,000 <b>₽</b> (card)':
 				cla
 				tatass = n
@@ -924,7 +924,7 @@ if $ARGS[0] = 'back_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/back/tatback<<n>>.jpg"></center>'
 
-	if (money < 10000) and (karta + bankDebtLimit < 10000):
+	if (money < 10000) and (karta < 10000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 10000:
@@ -938,7 +938,7 @@ if $ARGS[0] = 'back_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 10000:
+		if karta >= 10000:
 			act 'Get this tattoo 10,000 <b>₽</b> (card)':
 				cla
 				tatback = n
@@ -979,7 +979,7 @@ if $ARGS[0] = 'belly_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/belly/tatblly<<n>>.jpg"></center>'
 
-	if (money < 10000) and (karta + bankDebtLimit < 10000):
+	if (money < 10000) and (karta < 10000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 10000:
@@ -993,7 +993,7 @@ if $ARGS[0] = 'belly_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 10000:
+		if karta >= 10000:
 			act 'Get this tattoo 10,000 <b>₽</b> (card)':
 				cla
 				tatblly = n
@@ -1034,7 +1034,7 @@ if $ARGS[0] = 'breast_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/breasts/tatbrst<<n>>.jpg"></center>'
 
-	if (money < 15000) and (karta + bankDebtLimit < 15000):
+	if (money < 15000) and (karta < 15000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 15000:
@@ -1048,7 +1048,7 @@ if $ARGS[0] = 'breast_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 15000:
+		if karta >= 15000:
 			act 'Get this tattoo 15,000 <b>₽</b> (card)':
 				cla
 				tatbrst = n
@@ -1089,7 +1089,7 @@ if $ARGS[0] = 'chest_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/chest/tatchst<<n>>.jpg"></center>'
 
-	if (money < 12000) and (karta + bankDebtLimit < 12000):
+	if (money < 12000) and (karta < 12000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 12000:
@@ -1103,7 +1103,7 @@ if $ARGS[0] = 'chest_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 12000:
+		if karta >= 12000:
 			act 'Get this tattoo 12,000 <b>₽</b> (card)':
 				cla
 				tatchst = n
@@ -1144,7 +1144,7 @@ if $ARGS[0] = 'face_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/face/tatfce<<n>>.jpg"></center>'
 
-	if (money < 10000) and (karta + bankDebtLimit < 10000):
+	if (money < 10000) and (karta < 10000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 10000:
@@ -1158,7 +1158,7 @@ if $ARGS[0] = 'face_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 10000:
+		if karta >= 10000:
 			act 'Get this tattoo 10,000 <b>₽</b> (card)':
 				cla
 				tatfce = n
@@ -1199,7 +1199,7 @@ if $ARGS[0] = 'foot_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/foot/tatankle<<n>>.jpg"></center>'
 
-	if (money < 8000) and (karta + bankDebtLimit < 8000):
+	if (money < 8000) and (karta < 8000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 8000:
@@ -1213,7 +1213,7 @@ if $ARGS[0] = 'foot_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 8000:
+		if karta >= 8000:
 			act 'Get this tattoo 8,000 <b>₽</b> (card)':
 				cla
 				tatankle = n
@@ -1254,7 +1254,7 @@ if $ARGS[0] = 'hand_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/hand/tathnd<<n>>.jpg"></center>'
 
-	if (money < 7000) and (karta + bankDebtLimit < 7000):
+	if (money < 7000) and (karta < 7000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 7000:
@@ -1268,7 +1268,7 @@ if $ARGS[0] = 'hand_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 7000:
+		if karta >= 7000:
 			act 'Get this tattoo 7,000 <b>₽</b> (card)':
 				cla
 				tathand = n
@@ -1309,7 +1309,7 @@ if $ARGS[0] = 'leg_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/legs/tatleg<<n>>.jpg"></center>'
 
-	if (money < 10000) and (karta + bankDebtLimit < 10000):
+	if (money < 10000) and (karta < 10000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 10000:
@@ -1323,7 +1323,7 @@ if $ARGS[0] = 'leg_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 10000:
+		if karta >= 10000:
 			act 'Get this tattoo 10,000 <b>₽</b> (card)':
 				cla
 				tatleg = n
@@ -1364,7 +1364,7 @@ if $ARGS[0] = 'lip_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/lip/tatlip<<n>>.jpg"></center>'
 
-	if (money < 5000) and (karta + bankDebtLimit < 5000):
+	if (money < 5000) and (karta < 5000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 5000:
@@ -1378,7 +1378,7 @@ if $ARGS[0] = 'lip_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 5000:
+		if karta >= 5000:
 			act 'Get this tattoo 5,000 <b>₽</b> (card)':
 				cla
 				tatlip = n
@@ -1419,7 +1419,7 @@ if $ARGS[0] = 'neck_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/neck/tatnck<<n>>.jpg"></center>'
 
-	if (money < 8000) and (karta + bankDebtLimit < 8000):
+	if (money < 8000) and (karta < 8000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 8000:
@@ -1433,7 +1433,7 @@ if $ARGS[0] = 'neck_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 8000:
+		if karta >= 8000:
 			act 'Get this tattoo 8,000 <b>₽</b> (card)':
 				cla
 				tatneck = n
@@ -1474,7 +1474,7 @@ if $ARGS[0] = 'vag_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/pubic/tatvag<<n>>.jpg"></center>'
 
-	if (money < 20000) and (karta + bankDebtLimit < 20000):
+	if (money < 20000) and (karta < 20000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 20000:
@@ -1488,7 +1488,7 @@ if $ARGS[0] = 'vag_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 20000:
+		if karta >= 20000:
 			act 'Get this tattoo 20,000 <b>₽</b> (card)':
 				cla
 				tatvag = n
@@ -1529,7 +1529,7 @@ if $ARGS[0] = 'shoulder_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/shoulder/tatshldr<<n>>.jpg"></center>'
 
-	if (money < 8000) and (karta + bankDebtLimit < 8000):
+	if (money < 8000) and (karta < 8000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 8000:
@@ -1543,7 +1543,7 @@ if $ARGS[0] = 'shoulder_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 8000:
+		if karta >= 8000:
 			act 'Get this tattoo 8,000 <b>₽</b> (card)':
 				cla
 				tatlech = n
@@ -1584,7 +1584,7 @@ if $ARGS[0] = 'side_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/side/tatside<<n>>.jpg"></center>'
 
-	if (money < 12000) and (karta + bankDebtLimit < 12000):
+	if (money < 12000) and (karta < 12000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 12000:
@@ -1598,7 +1598,7 @@ if $ARGS[0] = 'side_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 12000:
+		if karta >= 12000:
 			act 'Get this tattoo 12,000 <b>₽</b> (card)':
 				cla
 				tatside = n
@@ -1639,7 +1639,7 @@ if $ARGS[0] = 'tramp_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/trampStamp/tatlowbck<<n>>.jpg"></center>'
 
-	if (money < 12000) and (karta + bankDebtLimit < 12000):
+	if (money < 12000) and (karta < 12000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 12000:
@@ -1653,7 +1653,7 @@ if $ARGS[0] = 'tramp_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 12000:
+		if karta >= 12000:
 			act 'Get this tattoo 12,000 <b>₽</b> (card)':
 				cla
 				tatupb = n
@@ -1694,7 +1694,7 @@ if $ARGS[0] = 'under_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/underBreast/tatundbreast<<n>>.jpg"></center>'
 
-	if (money < 12000) and (karta + bankDebtLimit < 12000):
+	if (money < 12000) and (karta < 12000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 12000:
@@ -1708,7 +1708,7 @@ if $ARGS[0] = 'under_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 12000:
+		if karta >= 12000:
 			act 'Get this tattoo 12,000 <b>₽</b> (card)':
 				cla
 				tatunder = n
@@ -1749,7 +1749,7 @@ if $ARGS[0] = 'wrist_get':
 	cla
 	'<center><img src="images/pc/body/tattoos/wrists/tatwrst<<n>>.jpg"></center>'
 
-	if (money < 7000) and (karta + bankDebtLimit < 7000):
+	if (money < 7000) and (karta < 7000):
 		'You cannot afford this tattoo.'
 	else
 		if money >= 7000:
@@ -1763,7 +1763,7 @@ if $ARGS[0] = 'wrist_get':
 				act 'Return': gt 'pirsingsalon', 'start'
 			end
 		end
-		if karta + bankDebtLimit >= 7000:
+		if karta >= 7000:
 			act 'Get this tattoo 7,000 <b>₽</b> (card)':
 				cla
 				tatwrist = n

+ 2 - 10
locations/post_office.qsrc

@@ -138,7 +138,7 @@ if $ARGS[0] = 'start':
 						gs 'pain', 4, 'tummy', 'hit'
 						gs 'stat'
 						'<center><video autoplay loop src="images/locations/shared/postoffice/punch.mp4"></video></center>'
-						'The man punches you in the gut. "Go away bitch, your face is covered in cum!"' 
+						'The man punches you in the gut. "Go away bitch, your face is covered in cum!"'
 						'You quickly stagger away.'
 
 						act 'Recover': minut += rand(3, 5) & gt 'post_office', 'leave'
@@ -178,16 +178,8 @@ if $ARGS[0] = 'counter':
 			menu_off = 1
 			minut += 5
 			gs 'stat'
-			kartaIN = input ("How much money do you want to deposit into your account?")
 
-			if kartaIN <= 0 or kartaIN > money:
-				'Invalid operation.'
-			else
-				karta += kartaIN
-				money -= kartaIN
-
-				'<br>You deposit <<kartaIN>> <b>₽</b> into your account. You now have <<karta>> <b>₽</b> in your account.'
-			end
+			gs 'bank', 'deposit_cash'
 
 			'"Is there anything else I can do for you?"'
 

+ 1 - 1
locations/purses.qsrc

@@ -178,7 +178,7 @@ if $ARGS[0] = 'view_purse_item':
 			else
 				'You do not have enough cash to buy this purse.'
 			end
-			if karta + bankDebtLimit >= price:
+			if karta >= price:
 				act 'Buy (card)':
 					karta -= price
 					dynamic $ARGS[2] + '_purses[<<ARGS[3]>>] = 1'

+ 2 - 2
locations/pushkin_ballet_secrets.qsrc

@@ -123,10 +123,10 @@ if $ARGS[0]= 'enrol':
 	'The subscriptions include classes in gymnastics, yoga and introductory ballet. For advanced classes, there is an additional instructor charge. A personal trainer is on hand to assist at all times if you so need one.'
 	'We also have a small café which attracts a members discount and your membership card can purchase items directly from the vending machine which will be billed to your account.'
 	*nl
-	if money >= 5000 or (karta + bankDebtLimit >= 5000):
+	if money >= 5000 or (karta >= 5000):
 		'<td> <a href="exec: epayments[''value''] = 5000 & balletqw[''membership''] = daystart + 30	& gs ''shortgs'',''payments'' ">Purchase a monthly subscription for 5,000<b> ₽</b> and get one week free!</a></td>'
 	end
-	if money >= 1500 or (karta + bankDebtLimit >= 1500):
+	if money >= 1500 or (karta >= 1500):
 		'<td> <a href="exec: epayments[''value''] = 1500 & balletqw[''membership''] = daystart + 7	& gs ''shortgs'',''payments'' ">Purchase a weekly subscription for 1,500<b> ₽</b></a></td>'
 	end
 end

+ 6 - 6
locations/rasputin_host.qsrc

@@ -135,7 +135,7 @@ if $ARGS[0] = 'options':
 				'<center><img <<$set_imgh>> src="images/locations/pushkin/rasputin/nadia_3.jpg"></center>'
 				'You tell Nadia that you would like to buy a ticket for a burlesque show.'
 
-				if money < 3000 and karta + bankDebtLimit < 3000:
+				if money < 3000 and karta < 3000:
 					cla
 					*nl
 					gs 'stat'
@@ -159,7 +159,7 @@ if $ARGS[0] = 'options':
 						end
 					end
 
-					if karta + bankDebtLimit >= 3000:
+					if karta >= 3000:
 						act 'Pay with card':
 							cla
 							*nl
@@ -184,7 +184,7 @@ if $ARGS[0] = 'options':
 				'<center><img <<$set_imgh>> src="images/locations/pushkin/rasputin/nadia_3.jpg"></center>'
 				'You tell Nadia that you would like to buy a ticket for an exotic variety show.'
 
-				if money < 4000 and karta + bankDebtLimit < 4000:
+				if money < 4000 and karta < 4000:
 					cla
 					*nl
 					minut += 1
@@ -209,7 +209,7 @@ if $ARGS[0] = 'options':
 						end
 					end
 
-					if karta + bankDebtLimit >= 4000:
+					if karta >= 4000:
 						act 'Pay with card':
 							cla
 							*nl
@@ -234,7 +234,7 @@ if $ARGS[0] = 'options':
 				'<center><img <<$set_imgh>> src="images/locations/pushkin/rasputin/nadia_3.jpg"></center>'
 				'You tell Nadia that you would like to buy tickets for both shows.'
 
-				if money < 7000 and karta + bankDebtLimit < 7000:
+				if money < 7000 and karta < 7000:
 					cla
 					*nl
 					gs 'stat'
@@ -259,7 +259,7 @@ if $ARGS[0] = 'options':
 						end
 					end
 
-					if karta + bankDebtLimit >= 7000:
+					if karta >= 7000:
 						act 'Pay with card':
 							cla
 							*nl

+ 29 - 29
locations/salon.qsrc

@@ -129,7 +129,7 @@ if $ARGS[0] = 'services':
 
 	act 'Move away':gs 'salon', 'cleanvar' & gt 'salon', 'start'
 	gs 'salon', 'discount', 1000
-	if money >= salon_rate or karta + bankDebtLimit >= salon_rate:
+	if money >= salon_rate or karta >= salon_rate:
 		act 'Tanning booth <<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b>':
 			gs 'salon', 'discount', 1000
 			if masseuse['jobtype'] > 0:
@@ -152,7 +152,7 @@ if $ARGS[0] = 'services':
 	act 'See the eyelash specialist':gt 'salon', 'eyelashes'
 
 	gs 'salon', 'discount', 5000
-	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and salon['skin_care_day'] < max(daystart - 7,1):
+	if (money >= salon_rate or karta >= salon_rate) and salon['skin_care_day'] < max(daystart - 7,1):
 		act 'Skin care <<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b>':
 			gs 'salon', 'discount', 5000
 			if masseuse['jobtype'] > 0:
@@ -176,7 +176,7 @@ if $ARGS[0] = 'services':
 	end
 
 	gs 'salon', 'discount', 25000
-	if money >= salon_rate or karta + bankDebtLimit >= salon_rate:
+	if money >= salon_rate or karta >= salon_rate:
 		act 'Full body rejuvination <<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b>':
 			gs 'salon', 'discount', 25000
 			if masseuse['jobtype'] > 0:
@@ -198,11 +198,11 @@ if $ARGS[0] = 'services':
 		gs 'salon', 'discount', 1000
 		if  pcs_pubes > 2 or pcs_leghair > 2:
 			gs 'salon', 'discount', 1000
-			if money >= salon_rate or karta + bankDebtLimit >= salon_rate:
+			if money >= salon_rate or karta >= salon_rate:
 				act 'Partial or full body hair removal up to <<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b>':
 					gt 'salon', 'hair_removal'
 				end
-			elseif  money < salon_rate and karta + bankDebtLimit  < salon_rate:
+			elseif  money < salon_rate and karta < salon_rate:
 				act 'Body hair removal <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>':
 					msg'You don''t have enough money for this!'
 				end
@@ -214,7 +214,7 @@ if $ARGS[0] = 'services':
 		end
 
 		gs 'salon', 'discount', 500
-		if pcs_pubes > 20 and money >= salon_rate or karta + bankDebtLimit >= salon_rate:
+		if pcs_pubes > 20 and money >= salon_rate or karta >= salon_rate:
 			act 'Dye your pubic hair <<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b>':
 				gs 'salon', 'discount', 500
 				if masseuse['jobtype'] > 0:
@@ -226,7 +226,7 @@ if $ARGS[0] = 'services':
 				$epayments['description'] = 'dye your pubic hair'
 				gs 'shortgs', 'payments'
 			end
-		elseif pcs_pubes > 20  and (money < salon_rate and karta + bankDebtLimit  < salon_rate):
+		elseif pcs_pubes > 20  and (money < salon_rate and karta < salon_rate):
 			act 'Dye your pubic hair <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>':
 				msg'You don''t have enough money for this!'
 			end
@@ -238,7 +238,7 @@ if $ARGS[0] = 'services':
 	end
 
 	gs 'salon', 'discount', 1000
-	if money >= salon_rate or karta + bankDebtLimit >= salon_rate:
+	if money >= salon_rate or karta >= salon_rate:
 		act 'Professional makeup <<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b>':
 			gs 'salon', 'discount', 1000
 			if masseuse['jobtype'] > 0:
@@ -1133,7 +1133,7 @@ if $ARGS[0] = 'eyelashes':
 	'"I guess I could also manually remove your eyelash extensions if you ever needed me to," she muses, but seems to hesitate before saying, "but... I really wouldn''t recommend it. Better to let them grow out naturally."'
 
 	gs 'salon', 'discount', 5000
-	if ( money >= salon_rate or karta + bankDebtLimit >= salon_rate) and pcs_naturallashes < 2:
+	if ( money >= salon_rate or karta >= salon_rate) and pcs_naturallashes < 2:
 		act 'Eyelash growth treatment</a> - <<func(''agentned'', ''format_price_string'', salon_rate)>><b> ₽</b>':
 			gs 'salon', 'discount', 5000
 			if masseuse['jobtype'] > 0:
@@ -1145,14 +1145,14 @@ if $ARGS[0] = 'eyelashes':
 			$epayments['description'] = 'eyelash growth treatment'
 			gs 'shortgs', 'payments'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act 'Eyelash growth treatment <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t have enough money for this!'
 	else
 		act 'Eyelash growth treatment <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
 
 	gs 'salon', 'discount', 500
-	if ( money >= salon_rate or karta + bankDebtLimit >= salon_rate) and pcs_lashes < 3 and false_lashes <= 0:
+	if ( money >= salon_rate or karta >= salon_rate) and pcs_lashes < 3 and false_lashes <= 0:
 		act 'Simple false lashes':
 			gs 'salon', 'discount', 500
 			if masseuse['jobtype'] > 0:
@@ -1165,14 +1165,14 @@ if $ARGS[0] = 'eyelashes':
 			lashfalsiesstyle = 1
 			gs 'shortgs', 'payments'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act 'Simple false lashes <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t have enough money for this!'
 	else
 		act 'Simple false lashes <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
 
 	gs 'salon', 'discount', 1000
-	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and pcs_lashes < 4 and false_lashes <= 0:
+	if (money >= salon_rate or karta >= salon_rate) and pcs_lashes < 4 and false_lashes <= 0:
 		act 'Dramatic false lashes':
 			gs 'salon', 'discount', 1000
 			if masseuse['jobtype'] > 0:
@@ -1185,14 +1185,14 @@ if $ARGS[0] = 'eyelashes':
 			lashfalsiesstyle = 2
 			gs 'shortgs', 'payments'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act 'Dramatic false lashes<font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t have enough money for this!'
 	else
 		act 'Dramatic false lashes <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
 
 	gs 'salon', 'discount', 2000
-	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration <= 0:
+	if (money >= salon_rate or karta >= salon_rate) and lashextensionduration <= 0:
 		act '2D volume eyelash extensions':
 			gs 'salon', 'discount', 2000
 			if masseuse['jobtype'] > 0:
@@ -1207,14 +1207,14 @@ if $ARGS[0] = 'eyelashes':
 			gs 'shortgs', 'payments'
 			'<a href="exec:lashextensionstyle = 2 & lashextensionnew = 1 & gs ''shortgs'', ''payments''">2D volume eyelash extensions</a> -<<func(''agentned'', ''format_price_string'', salon_rate)>><b> ₽</b>'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act '2D volume eyelash extensions <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t have enough money for this!'
 	else
 		act '2D volume eyelash extensions <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
 
 	gs 'salon', 'discount', 5000
-	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration <= 0:
+	if (money >= salon_rate or karta >= salon_rate) and lashextensionduration <= 0:
 		act '4D volume eyelash extensions':
 			gs 'salon', 'discount', 5000
 			if masseuse['jobtype'] > 0:
@@ -1228,14 +1228,14 @@ if $ARGS[0] = 'eyelashes':
 			lashextensionnew = 1
 			gs 'shortgs', 'payments'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act '4D volume eyelash extensions <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t have enough money for this!'
 	else
 		act '4D volume eyelash extensions <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
 
 	gs 'salon', 'discount', 10000
-	if ( money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration <= 0:
+	if ( money >= salon_rate or karta >= salon_rate) and lashextensionduration <= 0:
 		act '6D volume eyelash extensions':
 			gs 'salon', 'discount', 10000
 			if masseuse['jobtype'] > 0:
@@ -1249,14 +1249,14 @@ if $ARGS[0] = 'eyelashes':
 			lashextensionnew = 1
 			gs 'shortgs', 'payments'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act '6D volume eyelash extensions <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t have enough money for this!'
 	else
 		act '6D volume eyelash extensions <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
 
 	gs 'salon', 'discount', 1000
-	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration >= 1 and lashextensionduration <= 4 and lashextensionstyle = 2:
+	if (money >= salon_rate or karta >= salon_rate) and lashextensionduration >= 1 and lashextensionduration <= 4 and lashextensionstyle = 2:
 		act 'Refill your 2D lash extension':
 			gs 'salon', 'discount', 1000
 			if masseuse['jobtype'] > 0:
@@ -1269,14 +1269,14 @@ if $ARGS[0] = 'eyelashes':
 			lashextensionnew = 0
 			gs 'shortgs', 'payments'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act 'Refill your 2D lash extension <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t have enough money for this!'
 	else
 		act 'Refill your 2D lash extension <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
 
 	gs 'salon', 'discount', 2500
-	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate)and lashextensionduration >= 1 and lashextensionduration <= 4 and lashextensionstyle = 4:
+	if (money >= salon_rate or karta >= salon_rate)and lashextensionduration >= 1 and lashextensionduration <= 4 and lashextensionstyle = 4:
 		act 'Refill your 4D lash extension':
 			gs 'salon', 'discount', 2500
 			if masseuse['jobtype'] > 0:
@@ -1289,14 +1289,14 @@ if $ARGS[0] = 'eyelashes':
 			gs 'shortgs', 'payments'
 			$epayments['description'] = 'refill your 4D lash extensions'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act 'Refill your 4D lash extension <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t have enough money for this!'
 	else
 		act 'Refill your 4D lash extension <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
 
 	gs 'salon', 'discount', 5000
-	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate)and lashextensionduration >= 1 and lashextensionduration <= 4 and lashextensionstyle = 6:
+	if (money >= salon_rate or karta >= salon_rate)and lashextensionduration >= 1 and lashextensionduration <= 4 and lashextensionstyle = 6:
 		act 'Refill your 6D lash extension':
 			gs 'salon', 'discount', 5000
 			if masseuse['jobtype'] > 0:
@@ -1309,13 +1309,13 @@ if $ARGS[0] = 'eyelashes':
 			lashextensionnew = 0
 			gs 'shortgs', 'payments'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act 'Refill your 6D lash extension <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t have enough money for this!'
 	else
 		act 'Refill your 6D lash extension <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
 	gs 'salon', 'discount', 500
-	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration > 0:
+	if (money >= salon_rate or karta >= salon_rate) and lashextensionduration > 0:
 		act 'Remove your eyelash extensions':
 			gs 'salon', 'discount', 500
 			if masseuse['jobtype'] > 0:
@@ -1328,7 +1328,7 @@ if $ARGS[0] = 'eyelashes':
 			lashextensionnew = -1
 			gs 'shortgs', 'payments'
 		end
-	elseif  money < salon_rate or karta + bankDebtLimit < salon_rate:
+	elseif  money < salon_rate or karta < salon_rate:
 		act 'Remove your eyelash extensions <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>':	msg 'You don''t have enough money for this!'
 	else
 		act 'Remove your eyelash extensions <font color="red"><<func(''agentned'', ''format_price_string'', salon_rate)>> <b>₽</b> </font>': msg 'You don''t need this service!'
@@ -2449,7 +2449,7 @@ if $ARGS[0] = 'cosmetic_tattoo_start':
 	cla & *clr
 
 	'<br>We currently offer five levels of cosmetic tattoos: light, vibrant, sultry, professional and celebrity.<br>Please keep in mind that these procedures are permanent.<br>Also, be aware that after procedure using regular cosmetics will be difficult.<br>Price is set at <<func(''agentned'', ''format_price_string'', salon_rate)>><b>₽</b>'
-	if money >= salon_rate or karta + bankDebtLimit >= salon_rate:
+	if money >= salon_rate or karta >= salon_rate:
 		gs 'salon', 'discount', 2000
 		if masseuse['jobtype'] > 0:
 			epayments['value'] = 1000

+ 1 - 1
locations/saveg.qsrc

@@ -16,6 +16,6 @@
 version_major = 0
 version_minor = 9
 version_revision = 3
-version_patch = 2
+version_patch = 3
 --- saveg ---------------------------------
 

+ 6 - 0
locations/saveupdater.qsrc

@@ -3630,6 +3630,12 @@ if temp_current_save_version < 00090303:
 	if $skin		! '':	$pc_descFull['skin']	= $skin			& killvar '$skin'
 	if $glaza		! '':	$pc_descFull['eyes']	= $glaza		& killvar '$glaza'
 	if $pcs_makeup	! '':	$pc_descFull['makeup']	= $pcs_makeup	& $pcs_makeup = ''
+
+
+	if bankDebtLimit > 0: karta += bankDebtLimit
+end
+
+if temp_current_save_version < 00090304:
 end
 
 

+ 23 - 24
locations/shoes.qsrc

@@ -330,32 +330,31 @@ if $ARGS[0] = 'view_shoe_item':
 			price = price / 50 * 50
 			'Price: <<price>> <b>₽</b>'
 			act 'Leave': gt $loc, $loc_arg
-			if money >= Price:
-				act 'Buy (cash)':
-					h = 0
-					if ShoBimbo = 1:h = 10
-					if ShoStyle = 5:h = 20
-					h += (3 * ShoQuality)
-					money -= price
-					dynamic '<<$ARGS[2]>>_shoe[<<ARGS[3]>>] = 1'
-					gt $loc, $loc_arg
-				end
+			if money < price and karta < price:
+				'You do not have enough money to buy these shoes.'
 			else
-				'You do not have enough cash to buy these shoes.'
-			end
-			if karta + bankDebtLimit >= price:
-				act 'Buy (card)':
-					h = 0
-					if ShoBimbo = 1:h = 10
-					if ShoStyle = 5:h = 20
-					h += (3 * ShoQuality)
-					karta -= price
-					dynamic '<<$ARGS[2]>>_shoe[<<ARGS[3]>>] = 1'
-					gt $loc, $loc_arg
+				if money >= price:
+					act 'Buy (cash)':
+						h = 0
+						if ShoBimbo = 1:h = 10
+						if ShoStyle = 5:h = 20
+						h += (3 * ShoQuality)
+						money -= price
+						dynamic '<<$ARGS[2]>>_shoe[<<ARGS[3]>>] = 1'
+						gt $loc, $loc_arg
+					end
+				end
+				if karta >= price:
+					act 'Buy (card)':
+						h = 0
+						if ShoBimbo = 1:h = 10
+						if ShoStyle = 5:h = 20
+						h += (3 * ShoQuality)
+						karta -= price
+						dynamic '<<$ARGS[2]>>_shoe[<<ARGS[3]>>] = 1'
+						gt $loc, $loc_arg
+					end
 				end
-			end
-			if karta + bankDebtLimit < Price and money < Price:
-				'You do not have enough money to buy these shoes.'
 			end
 		end
 	elseif $ARGS[1] = 'wardrobe':

+ 44 - 40
locations/shop.qsrc

@@ -160,41 +160,32 @@ if $shoplocation = 'ATM':
 	if bankAccount = 0:
 		'You don''t have a bank account yet!'
 	else
-		if karta >= 0:
-			'You have <<karta>> <b>₽</b> in your account.'
+		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"><<-1 * karta>> <b>₽</b></font>.'
-			'You have a remaining credit limit of <font color="blue"><<bankDebtLimit + karta>></font>!'
+			'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 atmDeposit ! 0:
-			'<br>★ Processing deposit of <<atmDeposit>> <b>₽</b> in <<atmDepositDate - daystart>> days.'
-		else
-			act 'Deposit money':
+		if bankAccount = 1 and money > 0:
+			act 'Deposit money into your bank account':
 				cla
+				menu_off = 1
 				minut += 5
+				gs 'stat'
 
-				kartaINATM = input ('How much money do you want to deposit into the account? Note: A service charge of 100 <b>₽</b> will be deducted from the amount deposited.')
-				if kartaINATM < 100 or kartaINATM > money:
-					'This is not a valid input.'
-				else
-					karta += kartaINATM - 100
-					atmDepositDate = daystart + 2
-					money -= kartaINATM
+				gs 'bank', 'deposit_cash'
 
-					'<br>You deposit <<kartaINATM>> <b>₽</b> into your account.'
-					'It will take 2 days for funds to be available. Your new balance will be <<karta+atmDeposit>> <b>₽</b>.'
-				end
+				'"Is there anything else I can do for you?"'
 
-				gs 'stat'
 				act 'Move away': gt 'shop', 'start'
 			end
 		end
 
-		if karta + bankDebtLimit < 0:
+		if karta <= 0:
 			'You have maxed out your overdraft.'
 		else
 			act 'Withdraw money from the ATM':
@@ -202,17 +193,17 @@ if $shoplocation = 'ATM':
 				minut += 5
 
 				kartaOUT = input ("How much money do you want to withdraw?")
-				if kartaOUT <= 0 or kartaOUT > karta + bankDebtLimit:
+				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>> <b>₽</b> left in your bank account.'
+					if karta > bankDebtLimit:
+						'<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>'
+						'<br>You withdraw <<kartaOUT>> <b>₽</b>. <font color="red">Your bank account is overdrawn by <b><<bankDebtLimit - karta>> ₽</b>.</font>'
 					end
 				end
 
@@ -585,7 +576,7 @@ if $shoplocation = 'megafon':
 
 		if bankAccount = 0:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-		elseif karta+bankDebtLimit >= price:
+		elseif karta >= price:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''buy_subscription'', ''<<$home[''current'']>>'', <<price>>, 0 & minut += 30 & karta -= <<price>> & gs ''stat'' & gt ''shop'' ">Pay with Card</a></td></tr>'
 		else
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
@@ -613,7 +604,7 @@ if $shoplocation = 'megafon':
 					$line += '<tr><td style="padding-left: 10px; padding-right: 10px; align: left; ">Monthly internet subscription for <<price>> <b>₽</b> at <<LCASE($property_name[i])>>. Automatically renews every month</td>'
 					if bankAccount = 0:
 						$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-					elseif karta+bankDebtLimit >= price:
+					elseif karta >= price:
 						$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''buy_subscription'', ''<<$property_code[i]>>'', <<price>>, 0 & minut += 30 & karta -= <<price>> & gs ''stat'' & gt ''shop'' ">Pay with card</a></td></tr>'
 					else
 						$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
@@ -649,9 +640,15 @@ if $shoplocation = 'megafon':
 		end
 		$line += '<tr><td style="padding-left: 10px; padding-right: 10px; align: left; ">Monthly mobile internet subscription for'+iif(discount > 0, ' <s><<price>></s><<price-discount>>', ' <<price>>')+'<b>₽</b>. Automatically renews every month</td>'
 
-		if bankAccount = 1 and karta + bankDebtLimit >= (price - discount): $line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''buy_subscription'', ''mobile'', <<price>>, <<discount_left>> & gs ''internet_mobile'', ''cancel_subscription'', ''metered_mobile'' & minut += 30 & karta -= <<price-discount>> & gs ''stat'' & gt ''shop'' ">Pay with card</a></td></tr>'
-		if bankAccount = 1 and karta + bankDebtLimit < (price - discount): $line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient funds</td></tr>'
-		if bankAccount = 0: $line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
+		if bankAccount = 0:
+			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
+		else
+			if karta < (price - discount):
+				$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient funds</td></tr>'
+			else
+				$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''buy_subscription'', ''mobile'', <<price>>, <<discount_left>> & gs ''internet_mobile'', ''cancel_subscription'', ''metered_mobile'' & minut += 30 & karta -= <<price-discount>> & gs ''stat'' & gt ''shop'' ">Pay with card</a></td></tr>'
+			end
+		end
 	end
 
 	'<<$title>><<$tables>><<$line>><<$tablec>>'
@@ -679,7 +676,7 @@ if $shoplocation = 'megafon':
 
 		if bankAccount = 0:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-		elseif karta+bankDebtLimit >= 80:
+		elseif karta >= 80:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''top_up_metered'', ''metered_mobile'', 300 & karta -= 80 & minut += 10 & gt ''shop'' ">Pay with card</a></td></tr>'
 		else
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
@@ -695,7 +692,7 @@ if $shoplocation = 'megafon':
 
 		if bankAccount = 0:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-		elseif karta+bankDebtLimit >= 155:
+		elseif karta >= 155:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''top_up_metered'', ''metered_mobile'', 600 & karta -= 155 & minut += 10 & gt ''shop'' ">Pay with card</a></td></tr>'
 		else
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
@@ -711,7 +708,7 @@ if $shoplocation = 'megafon':
 
 		if bankAccount = 0:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-		elseif karta+bankDebtLimit >= 295:
+		elseif karta >= 295:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''top_up_metered'', ''metered_mobile'', 1200 & karta -= 295 & minut += 10 & gt ''shop'' ">Pay with card</a></td></tr>'
 		else
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
@@ -727,7 +724,7 @@ if $shoplocation = 'megafon':
 
 		if bankAccount = 0:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-		elseif karta+bankDebtLimit >= 695:
+		elseif karta >= 695:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''top_up_metered'', ''metered_mobile'', 3000 & karta -= 695 & minut += 10 & gt ''shop'' ">Pay with card</a></td></tr>'
 		else
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
@@ -753,9 +750,16 @@ if $shoplocation = 'megafon':
 		end
 		$line += '<tr><td style="padding-left: 10px; padding-right: 10px; align: left;">Monthly mobile subscription that allows you to make calls and send text messages for'+iif(discount > 0, '<b><s><<price>></s></b> <span color="red"><b><<price-discount>></b></span>', ' <b><<price>></b>')+'<b>₽</b> Automatically renews every month</td>'
 
-		if bankAccount = 1 and karta + bankDebtLimit >= (price - discount): $line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''buy_subscription'', ''monthly_calls'', <<price>>, <<discount_left>> & gs ''internet_mobile'', ''cancel_subscription'', ''metered_calls'' & minut += 30 & karta -= <<price>> & gs ''stat'' & gt ''shop'' ">Pay with card</a></td></tr>'
-		if bankAccount = 1 and karta + bankDebtLimit < (price - discount): $line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient funds</td></tr>'
-		if bankAccount = 0: $line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
+
+		if bankAccount = 0:
+			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
+		else
+			if karta < (price - discount):
+				$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient funds</td></tr>'
+			else
+				$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''buy_subscription'', ''monthly_calls'', <<price>>, <<discount_left>> & gs ''internet_mobile'', ''cancel_subscription'', ''metered_calls'' & minut += 30 & karta -= <<price>> & gs ''stat'' & gt ''shop'' ">Pay with card</a></td></tr>'
+			end
+		end
 	end
 	'<<$title>><<$tables>><<$line>><<$tablec>>'
 	killvar 'title'
@@ -777,7 +781,7 @@ if $shoplocation = 'megafon':
 
 		if bankAccount = 0:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-		elseif bankAccount = 1 and karta+bankDebtLimit >= 60:
+		elseif bankAccount = 1 and karta >= 60:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''top_up_metered'', ''metered_calls'', 60, 120 & karta -= 60 & minut += 10 & gt ''shop'' ">Pay with card</a></td></tr>'
 		else
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
@@ -793,7 +797,7 @@ if $shoplocation = 'megafon':
 
 		if bankAccount = 0:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-		elseif bankAccount = 1 and karta + bankDebtLimit >= 115:
+		elseif bankAccount = 1 and karta >= 115:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''top_up_metered'', ''metered_calls'', 120, 240 & karta -= 115 & minut += 10 & gt ''shop'' ">Pay with card</a></td></tr>'
 		else
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
@@ -808,7 +812,7 @@ if $shoplocation = 'megafon':
 
 		if bankAccount = 0:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-		elseif bankAccount = 1 and karta + bankDebtLimit >= 170:
+		elseif bankAccount = 1 and karta >= 170:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''top_up_metered'', ''metered_calls'', 180, 360 & karta -= 170 & minut += 10 & gt ''shop'' ">Pay with card</a></td></tr>'
 		else
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
@@ -824,7 +828,7 @@ if $shoplocation = 'megafon':
 
 		if bankAccount = 0:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
-		elseif bankAccount = 1 and karta + bankDebtLimit >= 225:
+		elseif bankAccount = 1 and karta >= 225:
 			$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''top_up_metered'', ''metered_calls'', 240, 480 & karta -=225 & minut += 10 & gt ''shop'' ">Pay with card</a></td></tr>'
 		else
 			$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'

+ 32 - 32
locations/shopdacha.qsrc

@@ -13,11 +13,11 @@ act 'Leave': minut += 3 & gt 'city_mall'
 if hour < 8 or hour > 20:
 	'Shop closed.'
 else
-	if karta + bankDebtLimit >= 50000 and func('homes_properties', 'is_property_of_status', 'purchased', 'city_apartment'):
+	if karta >= 50000 and func('homes_properties', 'is_property_of_status', 'purchased', 'city_apartment'):
 		if rembedr = 0:
 			act 'Renovate city apartment bedroom (50,000 <b>₽</b>)':
 				cla
-				if karta + bankDebtLimit >= 50000:
+				if karta >= 50000:
 					rembedr = 1
 					karta -= 50000
 					gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'bedroom'
@@ -33,7 +33,7 @@ else
 		if remsitr = 0:
 			act 'Renovate city apartment living room (50,000 <b>₽</b>)':
 				cla
-				if karta + bankDebtLimit >= 50000:
+				if karta >= 50000:
 					remsitr = 1
 					karta -= 50000
 					gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'living room'
@@ -49,7 +49,7 @@ else
 		if remkorr = 0:
 			act 'Renovate city apartment hallway (50,000 <b>₽</b>)':
 				cla
-				if karta + bankDebtLimit >= 50000:
+				if karta >= 50000:
 					remkorr = 1
 					karta -= 50000
 					gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'hallway'
@@ -65,7 +65,7 @@ else
 		if remvanr = 0:
 			act 'Renovate city apartment bathroom (50,000 <b>₽</b>)':
 				cla
-				if karta + bankDebtLimit >= 50000:
+				if karta >= 50000:
 					remvanr = 1
 					karta -= 50000
 					gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'bathroom'
@@ -81,7 +81,7 @@ else
 		if remkuhr = 0:
 			act 'Renovate city apartment kitchen (50,000 <b>₽</b>)':
 				cla
-				if karta + bankDebtLimit >= 50000:
+				if karta >= 50000:
 					remkuhr = 1
 					karta -= 50000
 					gs 'homes_properties', 'renovate_property', 'city_apartment', 50000, 'kitchen'
@@ -94,7 +94,7 @@ else
 			end
 		end
 	end
-	if karta + bankDebtLimit >= 200000 and func('homes_properties', 'is_property_of_status', 'owned', 'village_cottage') and func('homes_properties', 'is_property_renovated', 'village_cottage') = 0:
+	if karta >= 200000 and func('homes_properties', 'is_property_of_status', 'owned', 'village_cottage') and func('homes_properties', 'is_property_renovated', 'village_cottage') = 0:
 		act 'Upgrade your cottage (200,000 <b>₽</b>)':
 			cls
 			karta -= 200000
@@ -107,7 +107,7 @@ else
 	end
 
 	if func('homes_properties', 'is_property_of_status', 'owned', 'matryona_mansion'):
-		if karta + bankDebtLimit >= 500000 and func('homes_properties', 'get_property_construction_status', 'matryona_mansion') = 0:
+		if karta >= 500000 and func('homes_properties', 'get_property_construction_status', 'matryona_mansion') = 0:
 			act 'Connect water, electricity (500,000 <b>₽</b>)':
 				cls
 				karta -= 500000
@@ -121,7 +121,7 @@ else
 		end
 
 
-		if karta + bankDebtLimit >= 1500000 and func('homes_properties', 'get_property_construction_status', 'matryona_mansion') = 1:
+		if karta >= 1500000 and func('homes_properties', 'get_property_construction_status', 'matryona_mansion') = 1:
 			act 'Build mansion''s shell for (1,500,000 <b>₽</b>)':
 				cls
 				karta -= 1500000
@@ -134,7 +134,7 @@ else
 			end
 		end
 
-		if karta + bankDebtLimit >= 500000 and func('homes_properties', 'get_property_construction_status', 'matryona_mansion') = 2 and ymanrem[3] = 0:
+		if karta >= 500000 and func('homes_properties', 'get_property_construction_status', 'matryona_mansion') = 2 and ymanrem[3] = 0:
 			act 'Build internal walls (500, 000 <b>₽</b>)':
 				cls
 				karta -= 500000
@@ -148,7 +148,7 @@ else
 		end
 
 		if func('homes_properties', 'get_property_construction_status', 'matryona_mansion') > 0:
-			if karta + bankDebtLimit >= 800000 and banaMansion = 0:
+			if karta >= 800000 and banaMansion = 0:
 				act 'Install electrics and plumbing (800,000 <b>₽</b>)':
 					cls
 					karta -= 800000
@@ -161,7 +161,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 500000 and bassMansion = 0:
+			if karta >= 500000 and bassMansion = 0:
 				act 'Build a pool (500,000 <b>₽</b>)':
 					cls
 					karta -= 500000
@@ -175,7 +175,7 @@ else
 			end
 		end
 		if func('homes_properties', 'get_property_construction_status', 'matryona_mansion') = 2:
-			if karta + bankDebtLimit >= 250000 and ymanrem[3] = 1:
+			if karta >= 250000 and ymanrem[3] = 1:
 				act 'Build hallways (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -186,7 +186,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 150000 and ymanrem[3] = 2:
+			elseif karta >= 150000 and ymanrem[3] = 2:
 				act 'Buy lounge furniture (150,000 <b>₽</b>)':
 					cls
 					karta -= 150000
@@ -199,7 +199,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[4] = 0:
+			if karta >= 250000 and ymanrem[4] = 0:
 				act 'Build main bedroom (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -210,7 +210,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 300000 and ymanrem[4] = 1:
+			elseif karta >= 300000 and ymanrem[4] = 1:
 				act 'Buy bedroom furniture (300,000 <b>₽</b>)':
 					cls
 					karta -= 300000
@@ -223,7 +223,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[5] = 0:
+			if karta >= 250000 and ymanrem[5] = 0:
 				act 'Pay for bathroom (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -234,7 +234,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[5] = 1:
+			elseif karta >= 250000 and ymanrem[5] = 1:
 				act 'Pay for bathroom fixtures and fittings (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -247,7 +247,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[6] = 0:
+			if karta >= 250000 and ymanrem[6] = 0:
 				act 'Pay for kitchen installation (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -258,7 +258,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 350000 and ymanrem[6] = 1:
+			elseif karta >= 350000 and ymanrem[6] = 1:
 				act 'Pay for kitchen units (350,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -271,7 +271,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[7] = 0:
+			if karta >= 250000 and ymanrem[7] = 0:
 				act 'Pay for the living room (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -282,7 +282,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[7] = 1:
+			elseif karta >= 250000 and ymanrem[7] = 1:
 				act 'Buy furniture for the living room (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -295,7 +295,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[8] = 0:
+			if karta >= 250000 and ymanrem[8] = 0:
 					act 'Pay for your lounge (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -306,7 +306,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[8] = 1:
+			elseif karta >= 250000 and ymanrem[8] = 1:
 				act 'Purchase furniture for the lounge (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -319,7 +319,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[9] = 0:
+			if karta >= 250000 and ymanrem[9] = 0:
 				act 'Build a children''s room (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -330,7 +330,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[9] = 1:
+			elseif karta >= 250000 and ymanrem[9] = 1:
 				act 'Buy furniture for the nursery (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -343,7 +343,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[10] = 0:
+			if karta >= 250000 and ymanrem[10] = 0:
 				act 'Pay for a library (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -354,7 +354,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[10] = 1:
+			elseif karta >= 250000 and ymanrem[10] = 1:
 				act 'Purchase furniture for your library (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -367,7 +367,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[11] = 0:
+			if karta >= 250000 and ymanrem[11] = 0:
 				act 'Buy a gym (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -378,7 +378,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[11] = 1:
+			elseif karta >= 250000 and ymanrem[11] = 1:
 				act 'Buy gym equipment (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -391,7 +391,7 @@ else
 				end
 			end
 
-			if karta + bankDebtLimit >= 250000 and ymanrem[12] = 0:
+			if karta >= 250000 and ymanrem[12] = 0:
 				act 'Buy an office (250,000 <b>₽</b>)':
 					cls
 					karta -= 250000
@@ -402,7 +402,7 @@ else
 
 					act 'Return': gt 'shopdacha'
 				end
-			elseif karta + bankDebtLimit >= 250000 and ymanrem[12] = 1:
+			elseif karta >= 250000 and ymanrem[12] = 1:
 				act 'Purchase furniture for the office (250,000)':
 					cls
 					karta -= 250000

+ 2 - 12
locations/shortgs.qsrc

@@ -843,11 +843,11 @@ if $ARGS[0] = 'payments':
 		'<center><img <<$set_imgh>> src="images/' + $epayments['banner'] +  '"></center>'
 	end
 
-	if ($epayments['method'] ! 'cash' and $epayments['method'] ! 'card') and (epayments['value'] <= money and epayments['value'] <= karta + bankDebtLimit):
+	if ($epayments['method'] ! 'cash' and $epayments['method'] ! 'card') and (epayments['value'] <= money and epayments['value'] <= karta):
 		'How do you want to pay for the <<$epayments[''description'']>>? <<$construct_cash>> or <<$construct_card>>'
 	elseif ($epayments['method'] = 'cash' or $epayments['method'] = '') and epayments['value'] <= money:
 		'Pay for the <<$epayments[''description'']>> with <<$construct_cash>>?'
-	elseif ($epayments['method'] = 'card' or $epayments['method'] = '') and epayments['value'] <= karta + bankDebtLimit:
+	elseif ($epayments['method'] = 'card' or $epayments['method'] = '') and epayments['value'] <= karta:
 		'Pay for the <<$epayments[''description'']>> with your <<$construct_card>>?'
 	else
 		'You don''t have enough money in your purse or bank account for this item.'
@@ -877,16 +877,6 @@ if $ARGS[0] = 'paymentcomplete':
 	end
 end
 
-if $ARGS[0] = 'simple_payment':
-	if money >= ARGS[1]:
-		money -= ARGS[1]
-		result = 1
-	elseif karta + bankDebtLimit >= ARGS[1]:
-		karta -= ARGS[1]
-		result = 2
-	end
-end
-
 
 if $ARGS[0] = 'calendar_display':
 	'<b><<$month>> <<day>></b>'

+ 1 - 1
locations/stat.qsrc

@@ -95,7 +95,7 @@ if lernSkill >= 8: gs 'exp_gain', 'intel', 1 & lernSkill = 0
 if lern >= 10: gs 'exp_gain', 'intel', 1 & lern = 0
 
 shameless = guy + stat['bj'] + stat['anal'] + stat['hj'] + ((slutty + gang) * 2)
-moneySUM = money + karta + stolmoney
+moneySUM = money + (karta - bankDebtLimit) + stolmoney
 cumSUM = cumsumbod/40
 
 if husbizvradd > 5:izvratH = 1

+ 3 - 3
locations/stat_display.qsrc

@@ -191,10 +191,10 @@ else
 	$stat_msg += '<br>'+iif(bag > 0, 'Purse', 'Pockets')+': <b><<func(''agentned'', ''format_price_string'', money)>> ₽</b>'
 	if stolmoney > 0: $stat_msg += ', Drawer <b><<func(''agentned'', ''format_price_string'', stolmoney)>>₽</b>'
 	if bankAccount = 1:
-		if karta >= 0:
-			$stat_msg += ', Bank: <b><<func(''agentned'', ''format_price_string'', karta)>> ₽</b>'
+		if karta >= bankDebtLimit:
+			$stat_msg += ', Bank: <b><<func(''agentned'', ''format_price_string'', karta - bankDebtLimit)>> ₽</b>'
 		else
-			$stat_msg += '<font color="red"> Your bank account is overdrawn by <b><<func(''agentned'', ''format_price_string'', karta)>> ₽</b>!!</font>'
+			$stat_msg += '<font color="red"> Your bank account is overdrawn by <b><<func(''agentned'', ''format_price_string'', bankDebtLimit - karta)>> ₽</b>!!</font>'
 		end
 	end
 end

+ 37 - 9
locations/street_event.qsrc

@@ -513,21 +513,49 @@ if $ARGS[1] = 'main':
 				exit
 			else
 				if money + stolmoney + karta >= workDolg:
-					money += stolmoney + karta
-					stolmoney = 0
-					karta = 0
-					money -= workDolg
+					temp_debt = workDolg
+					temp_amount = min(money, temp_debt)
+					money -= temp_amount
+					temp_debt = temp_amount
+					if temp_debt > 0 and stolmoney > 0:
+						temp_amount = min(stolmoney, temp_debt)
+						stolmoney -= temp_amount
+						temp_debt -= temp_amount
+					end
+					if temp_debt > 0:
+						karta -= temp_debt
+						temp_debt = 0
+					end
+					killvar 'temp_amount'
+					killvar 'temp_debt'
 					workDolg = 0
+
 					'"I have the money up in my apartment. Let me go get it," you say, moving towards the door. You quickly rush inside, take the money out of the drawer and go back to pay them. They take the money and count it, then look at each other, nod and leave.'
 					act 'Leave':gt $loc
 					exit
 				else
-					money += stolmoney + karta
-					stolmoney = 0
-					karta = 0
-					workDolg -= money
-					money = 0
+					temp_debt = workDolg
+					temp_amount = min(money, temp_debt)
+					money -= temp_amount
+					workDolg -= temp_amount
+					temp_debt = temp_amount
+					if temp_debt > 0 and stolmoney > 0:
+						temp_amount = min(stolmoney, temp_debt)
+						stolmoney -= temp_amount
+						workDolg -= temp_amount
+						temp_debt -= temp_amount
+					end
+					if temp_debt > 0 and karta > 0:
+						temp_amount = min(karta, temp_debt)
+						karta -= temp_amount
+						workDolg -= temp_amount
+						temp_debt -= temp_amount
+					end
+					killvar 'temp_amount'
+					killvar 'temp_debt'
+
 					workDolg += 10000
+
 					'You tell them that you don''t have enough money. They smack you, push you into your apartment, and follow you inside. Rummaging through your stuff, they find your stash and take it.'
 					'The brutes take everything that you have then explain your situation. In short, you have a debt of <<workDolg>>. Your debt has grown by 10k, and since you cannot pay it off as your job obviously doesn''t pay well enough, they decide they''ll help you out with that. The brutes drag you out of the apartment and down to the street and throw you into the back seat of their car. They get in, one of them sitting next to you and the other in the driver''s seat. He starts the car and drives away. They refuse to answer any of your questions. You have no choice but to sit quietly and see where they take you.'
 					act 'Out of the car':

+ 50 - 44
locations/transport_functions.qsrc

@@ -9,57 +9,61 @@
 
 if $ARGS[0] = 'buy_train_pass':
 	if transportVars['trainpass_day'] <= daystart:
-		if money >= 250 or karta + bankDebtLimit >= 250:
+		if max(money, karta) >= 250:
 			dynamic 'act ''Buy a daily pass (1 day - 250 <b>₽</b>)'':
 				cla
 				menu_off = 1
-				if func(''shortgs'', ''simple_payment'', 250) > 0:
-					transportVars[''trainpass_day''] = daystart + 1
+				if money >= 250:
+					money -= 250
 				else
-					''ERROR''
+					karta -= 250
 				end
+				transportVars[''trainpass_day''] = daystart + 1
 				gs ''stat''
 				act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
 			end'
 		end
 
-		if money >= 1500 or karta + bankDebtLimit >= 1500:
+		if max(money, karta) >= 1500:
 			dynamic 'act ''Buy a weekly pass (7 days - 1500 <b>₽</b>)'':
 				cla
 				menu_off = 1
-				if func(''shortgs'', ''simple_payment'', 1500) > 0:
-					transportVars[''trainpass_day''] = daystart + 7
+				if money >= 1500:
+					money -= 1500
 				else
-					''ERROR''
+					karta -= 1500
 				end
+				transportVars[''trainpass_day''] = daystart + 7
 				gs ''stat''
 				act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
 			end'
 		end
 
-		if money >= 5500 or karta + bankDebtLimit >= 5500:
+		if max(money, karta) >= 5500:
 			dynamic 'act ''Buy a monthly pass (30 days - 5500 <b>₽</b>)'':
 				cla
 				menu_off = 1
-				if func(''shortgs'', ''simple_payment'', 5500) > 0:
-					transportVars[''trainpass_day''] = daystart + 30
+				if money >= 5500:
+					money -= 5500
 				else
-					''ERROR''
+					karta -= 5500
 				end
+				transportVars[''trainpass_day''] = daystart + 30
 				gs ''stat''
 				act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
 			end'
 		end
 
-		if money >= 75000 or karta + bankDebtLimit >= 75000:
+		if max(money, karta) >= 75000:
 			dynamic 'act ''Buy a yearly pass (365 days - 75000 <b>₽</b>)'':
 				cla
 				menu_off = 1
-				if func(''shortgs'', ''simple_payment'', 75000) > 0:
-					transportVars[''trainpass_day''] = daystart + 365
+				if money >= 75000:
+					money -= 75000
 				else
-					''ERROR''
+					karta -= 75000
 				end
+				transportVars[''trainpass_day''] = daystart + 365
 				gs ''stat''
 				act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
 			end'
@@ -98,13 +102,12 @@ if $ARGS[0] = 'set_train_ticket':
 			dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<<$temp_time>> - <<temp_price>> <b>₽</b>)'':
 					cla
 					menu_off = 1
-					if func(''shortgs'', ''simple_payment'', <<temp_price>>) > 0:
-						gt ''train'', ''<<$ARGS[1]>>_<<$ARGS[2]>>''
+					if money >= <<temp_price>>:
+						money -= <<temp_price>>
+					else
+						karta -= <<temp_price>>
 					end
-
-					gs ''stat''
-					''ERROR''
-					act ''Return'': gt <<$loc>>, <<$loc_arg>>
+					gt ''train'', ''<<$ARGS[1]>>_<<$ARGS[2]>>''
 				end'
 		end
 	end
@@ -418,57 +421,61 @@ end
 
 if $ARGS[0] = 'buy_bus_pass':
 	if transportVars['buspass_day'] <= daystart:
-		if money >= 100 or karta + bankDebtLimit >= 100:
+		if max(money, karta) >= 100:
 			dynamic 'act ''Buy a daily bus pass (1 day - 100 <b>₽</b>)'':
 				cla
 				menu_off = 1
-				if func(''shortgs'', ''simple_payment'', 100) > 0:
-					transportVars[''buspass_day''] = daystart + 1
+				if money >= 100:
+					money -= 100
 				else
-					''ERROR''
+					karta -= 100
 				end
+				transportVars[''buspass_day''] = daystart + 1
 				gs ''stat''
 				act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
 			end'
 		end
 
-		if money >= 500 or karta + bankDebtLimit >= 500:
+		if max(money, karta) >= 500:
 			dynamic 'act ''Buy a weekly bus pass (7 days - 500 <b>₽</b>)'':
 				cla
 				menu_off = 1
-				if func(''shortgs'', ''simple_payment'', 500) > 0:
-					transportVars[''buspass_day''] = daystart + 7
+				if money >= 500:
+					money -= 500
 				else
-					''ERROR''
+					karta -= 500
 				end
+				transportVars[''buspass_day''] = daystart + 7
 				gs ''stat''
 				act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
 			end'
 		end
 
-		if money >= 1500 or karta + bankDebtLimit >= 1500:
+		if max(money, karta) >= 1500:
 			dynamic 'act ''Buy a monthly bus pass (30 days - 1500 <b>₽</b>)'':
 				cla
 				menu_off = 1
-				if func(''shortgs'', ''simple_payment'', 1500) > 0:
-					transportVars[''buspass_day''] = daystart + 30
+				if money >= 1500:
+					money -= 1500
 				else
-					''ERROR''
+					karta -= 1500
 				end
+				transportVars[''buspass_day''] = daystart + 30
 				gs ''stat''
 				act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
 			end'
 		end
 
-		if money >= 13000 or karta + bankDebtLimit >= 13000:
+		if max(money, karta) >= 13000:
 			dynamic 'act ''Buy a yearly bus pass (365 days - 13000 <b>₽</b>)'':
 				cla
 				menu_off = 1
-				if func(''shortgs'', ''simple_payment'', 13000) > 0:
-					transportVars[''buspass_day''] = daystart + 365
+				if money >= 13000:
+					money -= 13000
 				else
-					''ERROR''
+					karta -= 13000
 				end
+				transportVars[''buspass_day''] = daystart + 365
 				gs ''stat''
 				act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
 			end'
@@ -516,13 +523,12 @@ if $ARGS[0] = 'set_bus_ticket':
 		dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<<$temp_time>> - <<temp_price>> <b>₽</b>)'':
 				cla
 				menu_off = 1
-				if func(''shortgs'', ''simple_payment'', <<temp_price>>) > 0:
-					gt ''bus'', ''<<$ARGS[1]>>_<<$ARGS[2]>>''
+				if money >= <<temp_price>>:
+					money -= <<temp_price>>
+				else
+					karta -= <<temp_price>>
 				end
-
-				gs ''stat''
-				''ERROR''
-				act ''Return'': gt <<$loc>>, <<$loc_arg>>
+				gt ''bus'', ''<<$ARGS[1]>>_<<$ARGS[2]>>''
 			end'
 	end
 	killvar 'temp_price'

+ 1 - 1
locations/underwear_bodysuits.qsrc

@@ -190,7 +190,7 @@ if $ARGS[0] = 'view_bodysuit_item':
 			else
 				'You do not have enough cash to buy this bodysuit.'
 			end
-			if karta + bankDebtLimit >= price:
+			if karta >= price:
 				act 'Buy (card)':
 					karta -= price
 					dynamic $ARGS[2] + '_bodysuits[<<ARGS[3]>>] = 1'

+ 8 - 8
locations/uni_admin.qsrc

@@ -4,7 +4,7 @@
 !!It is important to include an option to enroll in university, and therefore set the variable regarding the choice of study.
 
 !!The following variables will be set in this file.
-!! university['prep_enrolled'] is set to 1 if the player enrolls in the university preparation program. 
+!! university['prep_enrolled'] is set to 1 if the player enrolls in the university preparation program.
 !! university['student'] is set to 1 if the player enrolls in a university program.
 !! $university['enrolled_in'] is set to the name of the university program the player enrolls in. There is the following programs: teaching_studies
 !! university['enrolled_in_semester'] is set to the semester the player enrolls in starting at 1 for the first semester and ending with 8 for the last.
@@ -36,7 +36,7 @@ if $ARGS[0] = 'start':
 		'You''ve been expelled from the university for reasons unrelated to your exam results.'
 	elseif university['student'] = 0:
 		if university['enrolled_in_semester'] = 0:
-			'The enrollment period for new students is from May to August. All new students will start their classes in the week that includes September 1st.' 
+			'The enrollment period for new students is from May to August. All new students will start their classes in the week that includes September 1st.'
 		end
 		if university['prep_enrolled'] = 1 and month = 8:
 			'You''ve enrolled in the preparatory classes.'
@@ -55,8 +55,8 @@ if $ARGS[0] = 'start':
 	if university['prep_enrolled'] = 1 and university['entrance_exam_passed'] = 0 and month = 8:
 		act 'Attend preparatory class (1:00)': gt 'uni_admin', 'take_prep'
 	end
-	!!if graduated school with good grade or 
-	if university['entrance_exam_passed'] = 0 and university['prep_enrolled'] = 1 and month = 8: 
+	!!if graduated school with good grade or
+	if university['entrance_exam_passed'] = 0 and university['prep_enrolled'] = 1 and month = 8:
 		act 'Take the entrance exam (1:00)': gt 'uni_admin', 'take_test'
 	end
 	if (university['entrance_exam_passed'] = 1 or university['prep_enrolled'] = 0) and university['student'] = 0 and university['diploma'] = 0 and age >= 17 and (mid($start_type,1,2) ! 'sg' or SchoolAtestat = 1) and month < 9 and month > 4 and university['exam_week'] = 0:
@@ -100,7 +100,7 @@ if $ARGS[0] = 'enrollment':
 					university['student'] = 1
 					$university['enrolled_in']= 'teaching_studies'
 					university['enrolled_in_semester'] = 1
-					
+
 					gs 'homes_properties', 'give_access', 'university_dorm'
 
 					!!This creates the classes for the first semester of the teaching program to be used by the grade system, and gives the player a starting grade value (which is a failing grade, the player has to study if they want to pass)
@@ -137,7 +137,7 @@ if $ARGS[0] = 'enrollment':
 					university['student'] = 1
 					$university['enrolled_in']= 'nursing'
 					university['enrolled_in_semester'] = 1
-					
+
 					gs 'homes_properties', 'give_access', 'university_dorm'
 
 					!!This creates the classes for the first semester of the nursing program to be used by the grade system, and gives the player a starting grade value (which is a failing grade, the player has to study if they want to pass)
@@ -236,7 +236,7 @@ if $ARGS[0] = 'enrollment_semester':
 				if university['enrolled_in_semester'] mod 2 = 1:
 					act 'Leave without taking any electives': gt 'uni_admin', 'start'
 				else
-					act 'Leave': gt 'uni_admin', 'start'				
+					act 'Leave': gt 'uni_admin', 'start'
 				end
 			end
 		end
@@ -281,7 +281,7 @@ if $ARGS[0] = 'enrollment_semester':
 				if university['enrolled_in_semester'] mod 2 = 1:
 					act 'Leave without taking any electives': gt 'uni_admin', 'start'
 				else
-					act 'Leave': gt 'uni_admin', 'start'				
+					act 'Leave': gt 'uni_admin', 'start'
 				end
 			end
 		end

+ 16 - 24
locations/uni_shop.qsrc

@@ -13,7 +13,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = '':
 	menu_off = 0
 	gs 'themes', 'indoors'
 	if sound = 0:PLAY 'sound/shop.mp3',30
-	gs 'stat' 
+	gs 'stat'
 	*clr & cla
 
 
@@ -26,7 +26,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = '':
 	'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
@@ -36,52 +36,44 @@ if $ARGS[0] = 'atm':
 	'<center><img <<$set_imgh>> src="images/locations/shared/store/atm.jpg"></center>'
 
 	if bankAccount = 1:
-		if karta >= 0:
-			'You have <<karta>> <b>₽</b> in your account.'
+		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"><<-1 * karta>> <b>₽</b></font>.'
-			'You have a remaining credit limit of <font color="blue"><<bankDebtLimit + karta>></font>!'
+			'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 atmDeposit = 0:
-			act 'Deposit money':
+		if bankAccount = 1 and money > 0:
+			act 'Deposit money into your bank account':
 				cla
+				menu_off = 1
 				minut += 5
+				gs 'stat'
 
-				kartaINATM = input ("How much money do you want to deposit into the account? Note: A service charge of 100 <b>₽</b> will be deducted from the amount deposited.")
-				if kartaINATM < 100 or kartaINATM > money:
-					'This is not a valid input.'
-				else
-					atmDeposit += kartaINATM - 100
-					atmDepositDate = daystart + 2
-					money -= kartaINATM
-					'<br>You deposit <<kartaINATM>> <b>₽</b> into your account.'
-					'It will take 2 days for funds to be available. Your new balance will be <<karta+atmDeposit>> <b>₽</b>.'
-				end
+				gs 'bank', 'deposit_cash'
+
+				'"Is there anything else I can do for you?"'
 
-				gs 'stat'
 				act 'Move away': gt 'uni_shop', 'start'
 			end
-		else
-			'<br>★ Processing deposit of <<atmDeposit>> <b>₽</b> in <<atmDepositDate - daystart>> days.'
 		end
 
-		if karta + bankDebtLimit > 0:
+		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 + bankDebtLimit:
+				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>> <b>₽</b> left in your bank account.'
+						'<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