# autosalonF
if $ARGS[0] = 'start':
	$metka = $ARGS[0]
	$loc = $CURLOC
	cla
	*clr

	gs 'stat'
	set minut += 5
	set cartraid = 1
	'<center><b>Auto Show</b></center>'
	'<center><img src="images/etogame/manager.jpg"></center>'
	'List of vehicles for sale'
	'<a href="exec:GS ''carF1'', ''car''">2107</a>. - New price 200,000 rubles'
	'<a href="exec:GS ''carF1'', ''car2''">2115</a>. - New price 310,000 rubles'
	'<a href="exec:GS ''carF1'', ''car3''">2113</a>. - New price 290,000 rubles'
	'<a href="exec:GS ''carF1'', ''car4''">2114</a>. - New price 300,000 rubles'
	'<a href="exec:GS ''carF1'', ''car5''">VAZ 2110</a>. - New price 350,000 rubles'
	'<a href="exec:GS ''carF1'', ''car6''">VAZ Kalina</a>. - New price 400,000 rubles'
	'<a href="exec:GS ''carF1'', ''car7''">WHA Pryor</a>. - New price 450,000 rubles'
	'<a href="exec:GS ''carF1'', ''car8''">Chevrolet Niva</a>. - New price 500,000 rubles'
	'<a href="exec:GS ''carF1'', ''car9''">UAZ HUNTER</a>. - New price 500,000 rubles'
	'<a href="exec:GS ''carF1'', ''car10''">UAZ Patriot</a>. - New price 600,000 rubles'
	'<a href="exec:GS ''carF1'', ''car95''">Mitsubishi l200</a>. - New price 1,000,000 rubles'
	'<a href="exec:GS ''carF1'', ''car96''">Audi Q7</a>. - New price 5,000,000 rubles'
	'<a href="exec:GS ''carF1'', ''car97''">Cadillac Escalade</a>. - New price 2,000,000 rubles'
	'<a href="exec:GS ''carF1'', ''car98''">Porsche Cayenne</a>. - New price 5,000,000 rubles'
	'<a href="exec:GS ''carF1'', ''car99''">BMW X6</a>. - New price 4,500,000 rubles'
	'<a href="exec:GS ''carF1'', ''car100''">Mercedes-Benz S 600</a>. - New price 8,000,000 rubles'

	act 'Talk to the manager':gt 'autosalonF', 'manager1'
	act 'Leave':gt 'Nord'
end

if $ARGS[0] = 'manager1':
	$metka = $ARGS[0]
	$loc = $CURLOC
	cla
	*clr
	gs 'stat'
	set minut += 5
	'<center><b>Auto Show</b></center>'
	'<center><img src="images/etogame/manager.jpg"></center>'
	'In the bank <<karta>> rubles'
	*nl
	'The manager smiled and said affably. To purchase, you must have the right and enough cash in the bank, we do not work for cash. As it is impossible to have two cars, I am sorry, but this new law antiprobkovy City Hall.'

	act 'Leave':gt 'Nord'
		if prava = 1 and car = 0:
			if karta >= 200000:
				act 'Buy VAZ 2107 (200,000 rubles)':
					cla
					*clr
					set karta -= 200000
					set $car = '2107'
					set car = 1
					set benz = 3
					set cardrive = 8
					set teh = 200
					set tehcar = 200
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 310000:
				act 'Buy VAZ 2115 (310,000 rubles)':
					cla
					*clr
					set karta -= 310000
					set $car = '2115'
					set car = 2
					set benz = 3
					set cardrive = 8
					set teh = 300
					set tehcar = 300
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end

			end

			if karta >= 290000:
				act 'Buy VAZ 2113 (290,000 rubles)':
					cla
					*clr
					set karta -= 290000
					set $car = '2113'
					set car = 3
					set benz = 3
					set cardrive = 8
					set teh = 290
					set tehcar = 290
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 300000:
				act 'Buy VAZ 2114 (300,000 rubles)':
					cla
					*clr
					set karta -= 300000
					set $car = '2114'
					set car = 4
					set benz = 3
					set cardrive = 8
					set teh = 300
					set tehcar = 300
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 350000:
				act 'Buy VAZ 2110 (350,000 rubles)':
					cla
					*clr
					set karta -= 350000
					set $car = 'VAZ 2110'
					set car = 5
					set benz = 3
					set cardrive = 8
					set teh = 350
					set tehcar = 350
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 400000:
				act 'Buy VAZ Kalina (400,000 rubles)':
					cla
					*clr
					set karta -= 400000
					set $car = 'VAZ Kalina'
					set car = 6
					set benz = 3
					set cardrive = 8
					set teh = 400
					set tehcar = 400
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 450000:
				act 'Buy VAZ Priora (450,000 rubles)':
					cla
					*clr
					set karta -= 450000
					set $car = 'VAZ PRIORA'
					set car = 7
					set benz = 3
					set cardrive = 8
					set teh = 450
					set tehcar = 450
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 500000:
				act 'Buy Chevrolet Niva (500,000 rubles)':
					cla
					*clr
					set karta -= 500000
					set $car = 'Chevrolet Niva'
					set car = 8
					set benz = 3
					set cardrive = 8
					set teh = 500
					set tehcar = 500
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 500000:
				act 'Buy UAZ Hunter (500,000 rubles)':
					cla
					*clr
					set karta -= 500000
					set $car = 'UAZ HUNTER'
					set car = 9
					set benz = 3
					set cardrive = 8
					set teh = 300
					set tehcar = 300
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 600000:
				act 'Buy UAZ Patriot (600,000 rubles)':
					cla
					*clr
					set karta -= 600000
					set $car = 'UAZ PATRIOT'
					set car = 10
					set benz = 3
					set cardrive = 8
					set teh = 400
					set tehcar = 400
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 1000000:
				act 'Buy Mitsubishi l200 (1,000,000 rubles)':
					cla
					*clr
					set karta -= 1000000
					set $car = 'Mitsubishi l200'
					set car = 95
					set benz = 3
					set cardrive = 8
					set teh = 2000
					set tehcar = 2000
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 5000000:
				act 'Buy Audi Q7 (5,000,000 rubles)':
					cla
					*clr
					set karta -= 5000000
					set $car = 'Audi Q7'
					set car = 96
					set benz = 3
					set cardrive = 8
					set teh = 5000
					set tehcar = 5000
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 2000000:
				act 'Buy Cadillac Escalade (2,000,000 rubles)':
					cla
					*clr
					set karta -= 2000000
					set $car = 'Cadillac Escalade'
					set car = 97
					set benz = 3
					set cardrive = 8
					set teh = 4000
					set tehcar = 4000
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'autosalonF', 'manager'
				end
			end

			if karta >= 5000000:
				act 'Buy Porsche Cayenne (5,000,000 rubles)':
					cla
					*clr
					set karta -= 5000000
					set $car = 'Porsche Cayenne'
					set car = 98
					set benz = 3
					set cardrive = 8
					set teh = 3000
					set tehcar = 3000
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 4500000:
				act 'Buy BMW X6 (4,500,000 rubles)':
					cla
					*clr
					set karta -= 4500000
					set $car = 'BMW X6'
					set car = 99
					set benz = 3
					set cardrive = 8
					set teh = 4000
					set tehcar = 4000
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end

			if karta >= 8000000:
				act 'Buy Mercedes-Benz S 600 (8,000,000 rubles)':
					cla
					*clr
					set karta -= 8000000
					set $car = 'Mercedes-Benz S 600'
					set car = 100
					set benz = 3
					set cardrive = 8
					set teh = 8000
					set tehcar = 8000
					set wrek = 0
					'You transferred money manager and you receive a key. She said that your car is already on the street. Gasoline little and she recommends that you refuel.'

					act 'Leave':gt 'Nord'
				end
			end
		end
end

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