# autosalonF
if $ARGS[0] = 'start':
	$loc_arg = $ARGS[0]
	$loc = 'autosalonF'
    $location_type = 'event'
	menu_off = 1
	cla
	*clr
	minut += 5
	gs 'stat'
	'<center><b>Car Dealership</b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/industrial/cardealer/manager.jpg"></center>'
	nl
	'<b><center>List of vehicles for sale</center></b>'
	nl
	'<center><table border=0><TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''6''">Kalina VAZ</a>.</TD><TD> - </TD><TD> New. Price: 400,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''7''">WHA PRIORA</a>.</TD><TD> - </TD><TD> New. Price: 450,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''8''">Chevrolet NIVA</a>.</TD><TD> - </TD><TD> New. Price: 500,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''9''">UAZ HUNTER</a>.</TD><TD> - </TD><TD> New. Price: 500,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''10''">UAZ Patriot</a>.</TD><TD> - </TD><TD> New. Price: 600,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''13''">Ford Focus 2</a>.</TD><TD> - </TD><TD> New. Price: 500,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''102''">Renault LOGAN</a>.</TD><TD> - </TD><TD> New. Price: 700,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''110''">Ford Mondeo</a>.</TD><TD> - </TD><TD> New. Price: 850,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''104''">Toyota Celica</a>.</TD><TD> - </TD><TD> New. Price: 1,000,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''95''">Mitsubishi l200</a>.</TD><TD> - </TD><TD> New. Price: 1,000,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''103''">Toyota Corolla</a>.</TD><TD> - </TD><TD> New. Price: 1,100,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''105''">Mazda 6</a>.</TD><TD> - </TD><TD> New. Price: 1,200,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''106''">Mercedes-Benz E 212</a>.</TD><TD> - </TD><TD> New. Price: 1,700,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''109''">Audi A6</a>.</TD><TD> - </TD><TD> New. Price: 1,900,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''97''">Cadillac Escalade</a>.</TD><TD> - </TD><TD> New. Price: 2,000,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''101''">BMW Z4</a>.</TD><TD> - </TD><TD> New. Price: 3,000,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''107''">BMW M5</a>.</TD><TD> - </TD><TD> New. Price: 4,500,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''99''">BMW X6</a>.</TD><TD> - </TD><TD> New. Price: 4,500,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''96''">Audi Q7</a>.</TD><TD> - </TD><TD> New. Price: 5,000,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''98''">Porsche Cayenne</a>.</TD><TD> - </TD><TD> New. Price: 5,000,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''108''">Jaguar XKR-S</a>.</TD><TD> - </TD><TD> New. Price: 7,000,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''100''">Mercedes-Benz S 600</a>.</TD><TD> - </TD><TD> New. Price: 8,000,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''111''">Bentley Continental gt</a>.</TD><TD> - </TD><TD> New. Price: 10,000,000 <b>₽</b></TD></TR>'
	'<TR><TD><a href="exec:GS ''carF1'',''112''">Ferrari 458 Italia</a>.</TD><TD> - </TD><TD> New. Price: 20,000,000 <b>₽</b></TD></TR>'
	'</TR></table>'

	act 'Talk to the manager': gt 'autosalonF', 'manager1'
	act 'Return': gt 'autotraidF', 'start'
end

if $ARGS[0] = 'manager1':
	$loc_arg = $ARGS[0]
	$loc = 'autosalonF'
	$menu_arg = 'manager1'
	$menu_loc = 'autosalonF'
	menu_off = 0
	cla
	*clr
	gs 'stat'
	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.' 
	'"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'

	if prava = 1:
		if karta + bankDebtLimit >= 400000:
			act 'Buy a Kalina VAZ (400,000 <b>₽</b>)':gt 'autosalonF', 'buy', 400000, 'Kalina VAZ', 6, 400
		end

		if karta + bankDebtLimit >= 450000:
			act 'Buy a VAZ Priora (450,000 <b>₽</b>)':gt 'autosalonF', 'buy', 450000, 'WHA PRIORA', 7, 450
		end

		if karta + bankDebtLimit >= 500000:
			act 'Buy a Chevrolet Niva (500,000 <b>₽</b>)':gt 'autosalonF', 'buy', 500000, 'Chevrolet NIVA', 8, 500
		end

		if karta + bankDebtLimit >= 500000:
			act 'Buy a UAZ Hunter (500,000 <b>₽</b>)':gt 'autosalonF', 'buy', 500000, 'UAZ HUNTER', 9, 300
		end

		if karta + bankDebtLimit >= 600000:
			act 'Buy a UAZ Patriot (600,000 <b>₽</b>)':gt 'autosalonF', 'buy', 600000, 'UAZ Patriot', 10, 400
		end

		if karta + bankDebtLimit >= 500000:
			act 'Buy a Ford Focus 2 (500,000 <b>₽</b>)':gt 'autosalonF', 'buy', 500000, 'Ford Focus 2', 13, 800
		end

		if karta + bankDebtLimit >= 700000:
			act 'Buy a Renault LOGAN (700,000 <b>₽</b>)':gt 'autosalonF', 'buy', 700000, 'Renault LOGAN', 102, 1000
		end

		if karta + bankDebtLimit >= 850000:
			act 'Buy a Ford Mondeo (850,000 <b>₽</b>)':gt 'autosalonF', 'buy', 850000, 'Ford Mondeo', 110, 2000
		end

		if karta + bankDebtLimit >= 1000000:
			act 'Buy a Toyota Celica (1,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1000000, 'Toyota Celica', 104, 3000
		end

		if karta + bankDebtLimit >= 1000000:
			act 'Buy a Mitsubishi l200 (1,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1000000, 'Mitsubishi l200', 95, 2000
		end

		if karta + bankDebtLimit >= 1100000:
			act 'Buy a Toyota Corolla (1,100,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1100000, 'Toyaboutta Corolla', 103, 3000
		end

		if karta + bankDebtLimit >= 1200000:
			act 'Buy a Mazda 6 (1,200,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1200000, 'Mazda 6', 105, 3000
		end

		if karta + bankDebtLimit >= 1700000:
			act 'Buy a Mercedes-Benz E 212 (1,700,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1700000, 'Mercedes-Benz E 212', 106, 5000
		end

		if karta + bankDebtLimit >= 1900000:
			act 'Buy an Audi A6 (1,900,000 <b>₽</b>)':gt 'autosalonF', 'buy', 1900000, 'Audi A6', 109, 5000
		end

		if karta + bankDebtLimit >= 2000000:
			act 'Buy a Cadillac Escalade (2,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 2000000, 'Cadillac Escalade', 97, 4000
		end

		if karta + bankDebtLimit >= 3000000:
			act 'Buy a BMW Z4 (3,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 3000000, 'BMW Z4', 101, 4000
		end

		if karta + bankDebtLimit >= 4500000:
			act 'Buy a BMW M5 (4,500,000 <b>₽</b>)':gt 'autosalonF', 'buy', 4500000, 'BMW M5', 107, 6000
		end

		if karta + bankDebtLimit >= 4500000:
			act 'Buy a BMW X6 (4,500,000 <b>₽</b>)':gt 'autosalonF', 'buy', 4500000, '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
		end

		if karta + bankDebtLimit >= 5000000:
			act 'Buy a Porsche Cayenne (5,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 5000000, 'Porsche Cayenne', 98, 3000
		end

		if karta + bankDebtLimit >= 7000000:
			act 'Buy a Jaguar XKR-S (7,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 7000000, 'Jaguar XKR-S', 108, 4000
		end

		if karta + bankDebtLimit >= 8000000:
			act 'Buy a Mercedes-Benz S 600 (8,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 8000000, 'Mercedes-Benz S 600', 100, 8000
		end

		if karta + bankDebtLimit >= 10000000:
			act 'Buy a Bentley Continental GT (10,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 10000000, 'Bentley Continental GT', 111, 8000
		end

		if karta + bankDebtLimit >= 20000000:
			act 'Buy a Ferrari 458 Italia (10,000,000 <b>₽</b>)':gt 'autosalonF', 'buy', 20000000, 'Ferrari 458 Italia', 112, 10000
		end
	end
end

if $ARGS[0] = 'buy':
	cla
	*clr
	menu_off = 1
	karta -= ARGS[1]
	$car = $ARGS[2]
	car = ARGS[3]
	benz = 3
	cardrive = 9
	teh = ARGS[4]
	tehcar = 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.' 
	'"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'
end

--- autosalonF ---------------------------------

