Browse Source

[fixed] Some car repair code was screwy and renamed a couple of variables to help others when working on this stuff

Kevin_Smarts 1 year ago
parent
commit
603e3c5eeb

+ 3 - 3
locations/autosalonF.qsrc

@@ -107,7 +107,7 @@ if $ARGS[0] = 'manager1':
 		end
 		end
 
 
 		if karta + bankDebtLimit >= 1097000:
 		if karta + bankDebtLimit >= 1097000:
-			act 'Buy a Toyota Corolla (1,097,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1097000, 'Toyaboutta Corolla', 103, 3000
+			act 'Buy a Toyota Corolla (1,097,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1097000, 'Toyota Corolla', 103, 3000
 		end
 		end
 
 
 		if karta + bankDebtLimit >= 1299700:
 		if karta + bankDebtLimit >= 1299700:
@@ -173,8 +173,8 @@ if $ARGS[0] = 'buy':
 	car = ARGS[3]
 	car = ARGS[3]
 	benz = 3
 	benz = 3
 	cardrive = 9
 	cardrive = 9
-	teh = ARGS[4]
-	tehcar = ARGS[4]
+	car['new_condition'] = ARGS[4]
+	car['current_condition'] = ARGS[4]
 	wrek = 0
 	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.' 

+ 5 - 5
locations/autoservisF.qsrc

@@ -18,12 +18,12 @@ if $ARGS[0] = 'start':
 	if cardrive = 7:
 	if cardrive = 7:
 		menu_off = 1
 		menu_off = 1
 		if wrek = 0:
 		if wrek = 0:
-			if teh >= tehcar * 75 / 100:
+			if car['current_condition'] >= car['new_condition'] * 75 / 100:
 				'The foreman inspects your car quickly but thoroughly.' 
 				'The foreman inspects your car quickly but thoroughly.' 
 				'After only a few minutes, he returns to you and announces that your car doesn''t need any repairs or maintenance.'
 				'After only a few minutes, he returns to you and announces that your car doesn''t need any repairs or maintenance.'
 			end
 			end
 
 
-			if teh < tehcar * 75 / 100:
+			if car['current_condition'] < car['new_condition'] * 75 / 100:
 				'The foreman inspects your car quickly but thoroughly.' 
 				'The foreman inspects your car quickly but thoroughly.' 
 				'Here and there, he seems to be murmuring to himself, maybe assessing a defect. After only a few minutes, he returns to you and points out what needs to be fixed.' 
 				'Here and there, he seems to be murmuring to himself, maybe assessing a defect. After only a few minutes, he returns to you and points out what needs to be fixed.' 
 				'It would cost you <<normrem>> <b>₽</b>.'
 				'It would cost you <<normrem>> <b>₽</b>.'
@@ -34,7 +34,7 @@ if $ARGS[0] = 'start':
 						*clr
 						*clr
 						money -= normrem
 						money -= normrem
 						minut += 60
 						minut += 60
-						teh = tehcar
+						car['current_condition'] = car['new_condition']
 						wrek = 0
 						wrek = 0
 						'<center><img <<$set_imgh>> src="images/locations/city/industrial/CarServiceSta/autoservis2.jpg"></center>'
 						'<center><img <<$set_imgh>> src="images/locations/city/industrial/CarServiceSta/autoservis2.jpg"></center>'
 						'Since he tells you that it''s not gonna take long, you go into a waiting room with couches and a TV. After about an hour of flipping through channels, the car is ready, and you pay <<normrem>> <b>₽</b>.'
 						'Since he tells you that it''s not gonna take long, you go into a waiting room with couches and a TV. After about an hour of flipping through channels, the car is ready, and you pay <<normrem>> <b>₽</b>.'
@@ -53,8 +53,8 @@ if $ARGS[0] = 'start':
 					*clr
 					*clr
 					money -= normrem
 					money -= normrem
 					minut += 60
 					minut += 60
-					tehcar = tehcar / 2
-					teh = tehcar
+					car['new_condition'] = car['new_condition'] / 2
+					car['current_condition'] = car['new_condition']
 					wrek = 0
 					wrek = 0
 					'<center><img <<$set_imgh>> src="images/locations/city/industrial/CarServiceSta/autoservis2.jpg"></center>'
 					'<center><img <<$set_imgh>> src="images/locations/city/industrial/CarServiceSta/autoservis2.jpg"></center>'
 					'Since he tells you that it''s not gonna take long - at first you think he is being sarcastic but then realize that his no-nonsense attitude doesn''t leave much room for humour - you go into a waiting room with couches and a TV. After about an hour of flipping through channels, you are called back to the garage and can hardly believe your eyes.'
 					'Since he tells you that it''s not gonna take long - at first you think he is being sarcastic but then realize that his no-nonsense attitude doesn''t leave much room for humour - you go into a waiting room with couches and a TV. After about an hour of flipping through channels, you are called back to the garage and can hardly believe your eyes.'

+ 9 - 12
locations/autotraidF.qsrc

@@ -121,8 +121,8 @@ if $ARGS[0] = 'car':
 					car = 1
 					car = 1
 					benz = 3
 					benz = 3
 					cardrive = 9
 					cardrive = 9
-					tehcar = 200
-					teh = rand(10, tehcar)
+					car['new_condition'] = 200
+					car['current_condition'] = rand(10, car['new_condition'])
 					wrek = 1
 					wrek = 1
 					'You agree and before you know it, the car salesman and you have signed all the necessary documents. You hand over the <<bupay>> <b>₽</b> in cash, and the car is yours.' 
 					'You agree and before you know it, the car salesman and you have signed all the necessary documents. You hand over the <<bupay>> <b>₽</b> in cash, and the car is yours.' 
 					'Since it''s crammed in between about a million other vehicles, the car salesman moves it outside near the yard''s entrance for you... and that''s it.' 
 					'Since it''s crammed in between about a million other vehicles, the car salesman moves it outside near the yard''s entrance for you... and that''s it.' 
@@ -138,7 +138,7 @@ if $ARGS[0] = 'car':
 		act 'Inspect a VAZ 2114':gt 'autotraidF', 'inspect', 'VAZ 2114', 4, 300, 1, 3
 		act 'Inspect a VAZ 2114':gt 'autotraidF', 'inspect', 'VAZ 2114', 4, 300, 1, 3
 		act 'Inspect a VAZ 2110':gt 'autotraidF', 'inspect', 'VAZ 2110', 5, 350, 1, 3
 		act 'Inspect a VAZ 2110':gt 'autotraidF', 'inspect', 'VAZ 2110', 5, 350, 1, 3
 		act 'Inspect a GAZ 3102':gt 'autotraidF', 'inspect', '3102 GAS', 11, 1000, 2, 5
 		act 'Inspect a GAZ 3102':gt 'autotraidF', 'inspect', '3102 GAS', 11, 1000, 2, 5
-		act 'Inspect a 3110':gt 'autotraidF', 'inspect', '3110', 12, 800, 2, 5
+		act 'Inspect a 3110':gt 'autotraidF', 'inspect', '3110', 13, 800, 2, 5
 	end
 	end
 end
 end
 
 
@@ -148,20 +148,18 @@ if $ARGS[0] = 'inspect':
 	menu_off = 1
 	menu_off = 1
 	$autotraidF_carname = $ARGS[1]
 	$autotraidF_carname = $ARGS[1]
 	autotraidF_carnum = ARGS[2]
 	autotraidF_carnum = ARGS[2]
-	tehNT = ARGS[3]
+	car['potential_new_condition'] = ARGS[3]
 	carT = ARGS[4]
 	carT = ARGS[4]
 	autotraidF_benz = ARGS[5]
 	autotraidF_benz = ARGS[5]
 
 
 	'<center><b><<$autotraidF_carname>></b></center>'
 	'<center><b><<$autotraidF_carname>></b></center>'
-	'<center><img <<$set_imgh>> src="images/pc/items/accessories/car/car<<iif(autotraidF_carnum = 1, '''', autotraidF_carnum)>>.jpg"></center>'
+	'<center><img <<$set_imgh>> src="images/pc/items/accessories/car/car<<autotraidF_carnum>>.jpg"></center>'
 
 
 	gs 'avt'
 	gs 'avt'
-	'<<$tehT>> The car salesman wants <<bupay>> <b>₽</b> for it.'
+	'<<$car[''potential_current_condition'']>> The car salesman wants <<bupay>> <b>₽</b> for it.'
 
 
 	act 'Look around some more':
 	act 'Look around some more':
 		killvar 'bupay'
 		killvar 'bupay'
-		killvar 'tehT'
-		killvar 'tehNT'
 		killvar '$autotraidF_carname'
 		killvar '$autotraidF_carname'
 		killvar 'autotraidF_carnum'
 		killvar 'autotraidF_carnum'
 		killvar 'autotraidF_benz'
 		killvar 'autotraidF_benz'
@@ -174,16 +172,15 @@ if $ARGS[0] = 'inspect':
 			money -= bupay
 			money -= bupay
 			$car = $autotraidF_carname
 			$car = $autotraidF_carname
 			car = autotraidF_carnum
 			car = autotraidF_carnum
+			!!benz = fuel
 			benz = autotraidF_benz
 			benz = autotraidF_benz
 			cardrive = 9
 			cardrive = 9
-			teh = tehT
-			tehcar = tehNT
+			car['current_condition'] = car['potential_current_condition']
+			car['new_condition'] = car['potential_new_condition']
 			wrek = 0
 			wrek = 0
 			'You agree and before you know it, the car salesman and you have signed all the necessary documents. You hand over the <<bupay>> <b>₽</b> in cash, and the car is yours.' 
 			'You agree and before you know it, the car salesman and you have signed all the necessary documents. You hand over the <<bupay>> <b>₽</b> in cash, and the car is yours.' 
 			'Since it''s crammed in between about a million other vehicles, the car salesman moves it outside near the yard''s entrance for you and warns you that there is very little gas in the tank.'
 			'Since it''s crammed in between about a million other vehicles, the car salesman moves it outside near the yard''s entrance for you and warns you that there is very little gas in the tank.'
 			killvar 'bupay'
 			killvar 'bupay'
-			killvar 'tehT'
-			killvar 'tehNT'
 			killvar '$autotraidF_carname'
 			killvar '$autotraidF_carname'
 			killvar 'autotraidF_carnum'
 			killvar 'autotraidF_carnum'
 			killvar 'autotraidF_benz'
 			killvar 'autotraidF_benz'

+ 110 - 110
locations/avb.qsrc

@@ -1,189 +1,189 @@
 # avb
 # avb
 if car = 1:
 if car = 1:
-	if wrek = 1 or teh <= 0:bupay = rand(10000, 20000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(10000, 20000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(50000, 100000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(40000, 60000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(20000, 40000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(10000, 20000)
+		if car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:bupay = rand(50000, 100000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(40000, 60000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(20000, 40000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(10000, 20000)
 	end
 	end
 elseif car > 1 and car < 6:
 elseif car > 1 and car < 6:
-	if wrek = 1 or teh <= 0:bupay = rand(10000, 20000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(10000, 20000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(100000, 200000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(80000, 120000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(60000, 90000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 70000)
+		if car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:bupay = rand(100000, 200000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(80000, 120000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(60000, 90000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(50000, 70000)
 	end
 	end
 elseif car >= 6 and car < 11:
 elseif car >= 6 and car < 11:
-	if wrek = 1 or teh <= 0:bupay = rand(10000, 20000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(10000, 20000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(150000, 220000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(100000, 160000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(80000, 120000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 90000)
+		if car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:bupay = rand(150000, 220000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(100000, 160000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(80000, 120000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(50000, 90000)
 	end
 	end
 elseif car >= 11 and car <= 13:
 elseif car >= 11 and car <= 13:
-	if wrek = 1 or teh <= 0:bupay = rand(10000, 20000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(10000, 20000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75/100 and wrek = 0:bupay = rand(70000, 100000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(40000, 80000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(20000, 60000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(10000, 30000)
+		if car['current_condition'] >= car['new_condition'] * 75/100 and wrek = 0:bupay = rand(70000, 100000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(40000, 80000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(20000, 60000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(10000, 30000)
 	end
 	end
 elseif car = 95:
 elseif car = 95:
-	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(20000, 60000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(500000, 900000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(400000, 600000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(300000, 500000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 300000)
+		if car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:bupay = rand(500000, 900000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(400000, 600000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(300000, 500000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(50000, 300000)
 	end
 	end
 elseif car = 96:
 elseif car = 96:
-	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(20000, 60000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(3000000, 4800000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(2540000, 3200000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(1150000, 2550000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 1160000)
+		if car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:bupay = rand(3000000, 4800000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(2540000, 3200000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(1150000, 2550000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(50000, 1160000)
 	end
 	end
 elseif car = 97:
 elseif car = 97:
-	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(20000, 60000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(1000000, 1800000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(540000, 1200000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(150000, 550000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 160000)
+		if car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:bupay = rand(1000000, 1800000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(540000, 1200000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(150000, 550000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(50000, 160000)
 	end
 	end
 elseif car = 98:
 elseif car = 98:
-	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(20000, 60000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(3000000, 4800000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(2540000, 3200000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(1150000, 2550000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 1160000)
+		if car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:bupay = rand(3000000, 4800000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(2540000, 3200000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(1150000, 2550000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(50000, 1160000)
 	end
 	end
 elseif car = 99:
 elseif car = 99:
-	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(20000, 60000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(2000000, 3800000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(1540000, 2200000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(550000, 1550000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 560000)
+		if car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:bupay = rand(2000000, 3800000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(1540000, 2200000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(550000, 1550000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(50000, 560000)
 	end
 	end
 elseif car = 100:
 elseif car = 100:
-	if wrek = 1 or teh <= 0:bupay = rand(20000, 60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = rand(20000, 60000)
 
 
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar * 75 / 100 and wrek = 0:bupay = rand(3000000, 5800000)
-		if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:bupay = rand(2540000, 3200000)
-		if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:bupay = rand(1550000, 2550000)
-		if teh < tehcar * 25 / 100 and wrek = 0:bupay = rand(50000, 1560000)
+		if car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:bupay = rand(3000000, 5800000)
+		if car['current_condition'] < car['new_condition'] * 75 / 100 and car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:bupay = rand(2540000, 3200000)
+		if car['current_condition'] < car['new_condition'] * 50 / 100 and car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(1550000, 2550000)
+		if car['current_condition'] < car['new_condition'] * 25 / 100 and wrek = 0:bupay = rand(50000, 1560000)
 	end
 	end
 elseif car = 101:
 elseif car = 101:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(1500000,2700000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(810000,1800000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(225000,825000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,240000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(1500000,2700000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(810000,1800000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(225000,825000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,240000)
 	end
 	end
 elseif car = 102:
 elseif car = 102:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(350000,630000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(280000,420000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(210000,350000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,210000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(350000,630000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(280000,420000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(210000,350000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,210000)
 	end
 	end
 elseif car = 103:
 elseif car = 103:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(550000,990000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(440000,660000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(330000,550000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,330000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(550000,990000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(440000,660000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(330000,550000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,330000)
 	end
 	end
 elseif car = 104:
 elseif car = 104:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(500000,900000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(400000,600000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(300000,500000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,300000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(500000,900000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(400000,600000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(300000,500000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,300000)
 	end
 	end
 elseif car = 105:
 elseif car = 105:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(600000,1080000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(480000,720000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(360000,600000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,360000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(600000,1080000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(480000,720000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(360000,600000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,360000)
 	end
 	end
 elseif car = 106:
 elseif car = 106:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(900000,1600000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(700000,1100000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(550000,900000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,550000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(900000,1600000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(700000,1100000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(550000,900000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,550000)
 	end
 	end
 elseif car = 107:
 elseif car = 107:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(2000000,3800000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(1540000,2200000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(550000,1550000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,560000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(2000000,3800000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(1540000,2200000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(550000,1550000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,560000)
 	end
 	end
 elseif car = 108:
 elseif car = 108:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(3500000,6300000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(2800000,4200000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(2100000,3500000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,2100000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(3500000,6300000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(2800000,4200000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(2100000,3500000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,2100000)
 	end
 	end
 elseif car = 109:
 elseif car = 109:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(900000,1600000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(700000,1100000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(550000,900000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,550000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(900000,1600000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(700000,1100000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(550000,900000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,550000)
 	end
 	end
 elseif car = 110:
 elseif car = 110:
-	if wrek = 1 or teh <= 0:bupay = RAND(20000,60000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(20000,60000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(425000,765000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(340000,510000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(255000,425000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(50000,255000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(425000,765000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(340000,510000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(255000,425000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(50000,255000)
 	end
 	end
 elseif car = 111:
 elseif car = 111:
-	if wrek = 1 or teh <= 0:bupay = RAND(50000,200000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(50000,200000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(6000000,9600000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(5000000,6400000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(2300000,5500000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(150000,2300000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(6000000,9600000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(5000000,6400000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(2300000,5500000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(150000,2300000)
 	end
 	end
 elseif car = 112:
 elseif car = 112:
-	if wrek = 1 or teh <= 0:bupay = RAND(100000,400000)
+	if wrek = 1 or car['current_condition'] <= 0:bupay = RAND(100000,400000)
 	if wrek = 0:
 	if wrek = 0:
-		if teh >= tehcar*75/100 and wrek = 0:bupay = RAND(12000000,19000000)
-		if teh < tehcar*75/100 and teh >= tehcar*50/100 and wrek = 0:bupay = RAND(10000000,12800000)
-		if teh < tehcar*50/100 and teh >= tehcar*25/100 and wrek = 0:bupay = RAND(4600000,11000000)
-		if teh < tehcar*25/100 and wrek = 0:bupay = RAND(300000,4600000)
+		if car['current_condition'] >= car['new_condition']*75/100 and wrek = 0:bupay = RAND(12000000,19000000)
+		if car['current_condition'] < car['new_condition']*75/100 and car['current_condition'] >= car['new_condition']*50/100 and wrek = 0:bupay = RAND(10000000,12800000)
+		if car['current_condition'] < car['new_condition']*50/100 and car['current_condition'] >= car['new_condition']*25/100 and wrek = 0:bupay = RAND(4600000,11000000)
+		if car['current_condition'] < car['new_condition']*25/100 and wrek = 0:bupay = RAND(300000,4600000)
 	end
 	end
 end
 end
 
 

+ 3 - 4
locations/avtonorm.qsrc

@@ -14,12 +14,11 @@ if car = 13:normhour = 15
 if car >= 95:normhour = 50
 if car >= 95:normhour = 50
 
 
 if wrek = 0:
 if wrek = 0:
-	normneed = tehcar - teh
+	normneed = 0 - (car['current_condition'] - car['new_condition'])
 	normrem = normneed * normhour
 	normrem = normneed * normhour
 elseif wrek = 1:
 elseif wrek = 1:
-	normneed = tehcar - teh
-	normremK = (normneed * normhour) * 70
-	normrem = (normneed * normhour) + normremK
+	normneed = 0 - (car['current_condition'] - car['new_condition'])
+	normremK = (normneed * normhour) * 8
 end
 end
 
 
 --- avtonorm ---------------------------------
 --- avtonorm ---------------------------------

+ 26 - 21
locations/carF.qsrc

@@ -75,14 +75,19 @@ if $ARGS[0] = 'salon':
 	'<center><img <<$set_imgh>> src="images/pc/items/accessories/car/salon<<car>>.jpg"></center>'
 	'<center><img <<$set_imgh>> src="images/pc/items/accessories/car/salon<<car>>.jpg"></center>'
 	'Gasoline - <<benz>> ' + iif(benz = 1, 'liter', 'liters') + ', the fuel tank has a capacity of 40 liters.'
 	'Gasoline - <<benz>> ' + iif(benz = 1, 'liter', 'liters') + ', the fuel tank has a capacity of 40 liters.'
 
 
-	if teh <= 0:teh = 0 & wrek = 1
-	if teh <= 0 or wrek = 1:$teh = 'The car is in need of repairs and won''t start.'
-	if teh >= tehcar * 75 / 100 and wrek = 0:$teh = 'The car is in excellent condition.'
-	if teh < tehcar * 75 / 100 and teh >= tehcar * 50 / 100 and wrek = 0:$teh = 'While driving, you occasionally hear some troubling noises.'
-	if teh < tehcar * 50 / 100 and teh >= tehcar * 25 / 100 and wrek = 0:$teh = 'The car seems broken and barely drives.'
-	if teh < tehcar * 25 / 100 and wrek = 0:$teh = 'How this car still runs is a mystery, even to its designers.'
+	if car['current_condition'] <= 0:car['current_condition'] = 0 & wrek = 1
+	if car['current_condition'] <= 0 or wrek = 1:
+		'The car is in need of repairs and won''t start.'
+	elseif car['current_condition'] >= car['new_condition'] * 75 / 100 and wrek = 0:
+		'The car is in excellent condition.'
+	elseif car['current_condition'] >= car['new_condition'] * 50 / 100 and wrek = 0:
+		'While driving, you occasionally hear some troubling noises.'
+	elseif car['current_condition'] >= car['new_condition'] * 25 / 100 and wrek = 0:
+		'The car seems broken and barely drives.'
+	else
+		'How this car still runs is a mystery, even to its designers.'
+	end
 
 
-	'<<$teh>>'
 
 
 	if cardrive = 1:'Through the windshield, you see St. Petersburg''s residential area.'
 	if cardrive = 1:'Through the windshield, you see St. Petersburg''s residential area.'
 	if cardrive = 2:'Through the windshield, you see St. Petersburg''s city center.'
 	if cardrive = 2:'Through the windshield, you see St. Petersburg''s city center.'
@@ -116,11 +121,11 @@ if $ARGS[0] = 'salon':
 	act 'Get out of the car':dynamic $enddrive
 	act 'Get out of the car':dynamic $enddrive
 
 
 	if benz > 0 and wrek = 0 and prava > 0:
 	if benz > 0 and wrek = 0 and prava > 0:
-		if teh >= tehcar * 75 / 100:
+		if car['current_condition'] >= car['new_condition'] * 75 / 100:
 			if rand(0, 1000) = 1000:wrek = 1
 			if rand(0, 1000) = 1000:wrek = 1
-		elseif teh >= tehcar * 50 / 100:
+		elseif car['current_condition'] >= car['new_condition'] * 50 / 100:
 			if rand(0, 100) = 100:wrek = 1
 			if rand(0, 100) = 100:wrek = 1
-		elseif teh >= tehcar * 25 / 100:
+		elseif car['current_condition'] >= car['new_condition'] * 25 / 100:
 			if rand(0, 100) >= 80:wrek = 1
 			if rand(0, 100) >= 80:wrek = 1
 		else
 		else
 			if rand(0, 100) >= 40:wrek = 1
 			if rand(0, 100) >= 40:wrek = 1
@@ -154,7 +159,7 @@ if $ARGS[0] = 'salon':
 					act 'In the salon':gt 'carF', 'salon'
 					act 'In the salon':gt 'carF', 'salon'
 				end
 				end
 			elseif alko >= 10 and rand(0, 100) >= 50:
 			elseif alko >= 10 and rand(0, 100) >= 50:
-				teh = teh/2
+				car['current_condition'] = car['current_condition']/2
 				wrek = 1
 				wrek = 1
 				'Driving drunk, you crash into a tree and wreck your car.'
 				'Driving drunk, you crash into a tree and wreck your car.'
 
 
@@ -223,12 +228,12 @@ if $ARGS[0] = 'other':
 			elseif car_town ! 1:
 			elseif car_town ! 1:
 				minut += 60
 				minut += 60
 				benz -= 1
 				benz -= 1
-				teh -= rand(1, 3)
+				car['current_condition'] -= rand(1, 3)
 				cardrive = 18
 				cardrive = 18
 			else
 			else
 				minut += 10
 				minut += 10
 				benz -= 1
 				benz -= 1
-				teh -= rand(1, 3)
+				car['current_condition'] -= rand(1, 3)
 				cardrive = 18
 				cardrive = 18
 			end
 			end
 
 
@@ -247,12 +252,12 @@ if $ARGS[0] = 'other':
 			elseif car_town ! 1:
 			elseif car_town ! 1:
 				minut += 60
 				minut += 60
 				benz -= 1
 				benz -= 1
-				teh -= rand(1, 3)
+				car['current_condition'] -= rand(1, 3)
 				cardrive = 28
 				cardrive = 28
 			else
 			else
 				minut += 10
 				minut += 10
 				benz -= 1
 				benz -= 1
-				teh -= rand(1, 3)
+				car['current_condition'] -= rand(1, 3)
 				cardrive = 28
 				cardrive = 28
 			end
 			end
 
 
@@ -272,7 +277,7 @@ if $ARGS[0] = 'other':
 				'15 minutes later, you arrive at your destination.'
 				'15 minutes later, you arrive at your destination.'
 			end
 			end
 			benz -= 1
 			benz -= 1
-			teh -= rand(2, 5)
+			car['current_condition'] -= rand(2, 5)
 			cardrive = 12
 			cardrive = 12
 
 
 			dynamic $enddrive
 			dynamic $enddrive
@@ -290,7 +295,7 @@ if $ARGS[0] = 'other':
 				'25 minutes later, you arrive at your destination.'
 				'25 minutes later, you arrive at your destination.'
 			end
 			end
 			benz -= 1
 			benz -= 1
-			teh -= rand(2, 5)
+			car['current_condition'] -= rand(2, 5)
 			cardrive = 13
 			cardrive = 13
 
 
 			dynamic $enddrive
 			dynamic $enddrive
@@ -301,7 +306,7 @@ if $ARGS[0] = 'other':
 		act 'Go to the village of Gadukino':
 		act 'Go to the village of Gadukino':
 			cla
 			cla
 			benz = benz - 1
 			benz = benz - 1
-			teh = teh - RAND(3,6)
+			car['current_condition'] = car['current_condition'] - RAND(3,6)
 			cardrive = 23
 			cardrive = 23
 
 
 			if car_town ! 0:
 			if car_town ! 0:
@@ -320,7 +325,7 @@ if $ARGS[0] = 'other':
 		act 'Go to the gas station on M11':
 		act 'Go to the gas station on M11':
 			cla
 			cla
 			benz -= 1
 			benz -= 1
-			teh -= rand(1,3)
+			car['current_condition'] -= rand(1,3)
 			minut += rand(25-50)
 			minut += rand(25-50)
 			if cardrive = 1 or cardrive = 2 or cardrive = 8 or cardrive = 11 or cardrive =4 or cardrive = 5  or cardrive = 10 or cardrive = 28 or cardrive = 18:
 			if cardrive = 1 or cardrive = 2 or cardrive = 8 or cardrive = 11 or cardrive =4 or cardrive = 5  or cardrive = 10 or cardrive = 28 or cardrive = 18:
 				minut += 10
 				minut += 10
@@ -334,7 +339,7 @@ if $ARGS[0] = 'other':
 		cla
 		cla
 		minut += 60
 		minut += 60
 		benz -= 4
 		benz -= 4
-		teh -= rand(2, 6)
+		car['current_condition'] -= rand(2, 6)
 		pcs_mood += 20
 		pcs_mood += 20
 		'You go to the track and have fun driving around before leaving.'
 		'You go to the track and have fun driving around before leaving.'
 
 
@@ -371,7 +376,7 @@ if $ARGS[0] = 'nearby':
 	cla
 	cla
 	minut += 5
 	minut += 5
 	benz -= 1
 	benz -= 1
-	teh -= rand(1, 3)
+	car['current_condition'] -= rand(1, 3)
 	cardrive = ARGS[1]
 	cardrive = ARGS[1]
 	if cardrive = 8: minut += 5
 	if cardrive = 8: minut += 5
 	'5 minutes later, you arrive at your destination.'
 	'5 minutes later, you arrive at your destination.'

+ 6 - 0
locations/saveupdater.qsrc

@@ -1652,6 +1652,12 @@ if ((100*version_major +version_minor)*100+version_revision)*100+version_patch <
 		gs 'homes_properties', 'give_access', 'parents_home'
 		gs 'homes_properties', 'give_access', 'parents_home'
 		SchoolAtestat = 1
 		SchoolAtestat = 1
 	end
 	end
+	if teh > 0:
+		car['new_condition'] = tehcar
+		car['current_condition'] = teh
+		killvar 'teh'
+		killvar 'tehcar'
+	end
 end
 end
 
 
 if traits > 0 or trait > 0:
 if traits > 0 or trait > 0: