# cityTrain

if $ARGS[0] = 'start':
	$metka = 'start'
	$loc = 'cityTrain'
	$location_type = 'public_outdoors'
	cls
	gs'stat'
	'<center><B>City center railway station</B></center>'
	if hour < 9 or hour > 19:
		'<center><img src="images/locations/city/trainstation/central_station_night.jpg"></center>'
	else
		'<center><img src="images/locations/city/trainstation/central_station_day.jpg"></center>'
	end
	'The main station for the city, it is always busy offering services to many destinations and the best place to park your car or hire a taxi.'

	if car > 0 and cardrive = 2:
		'In the parking lot is <a href="exec:GS ''carF'',''start''">your <<$car>></a>.'
	end

	act 'Enter the station building': gt 'cityTrain', 'inside'
	act 'Go to the city center':minut += 5 & gt 'down'
end

if $ARGS[0] = 'inside':
	$metka = 'inside'
	$loc = 'cityTrain'
	$location_type = 'public_indoors'
	cls
	gs'stat'
	'<center><B>City center railway station</B></center>'
	'<center><img src="images/locations/city/trainstation/central_station_inside.jpg"></center>'
	'The grand old station is even more impressive on the inside and has a number of shops and bars as well as all the platforms and trains. '

	act 'Buy a ticket': gt 'cityTrain', 'tickets'
	act 'Leave the station': gt 'cityTrain', 'start'
end

if $ARGS[0] = 'tickets':
	cls
!! This is a lie, but a useful one don''t change the $loc and $metka
	$loc = 'cityTrain'
	$metka = 'industrial'
	gs 'stat'
	'<center><h4>Ticket office</h4></center>'
	'<center><img src="images/qwest/alter/kassa.jpg"></center>'

	if money >= 50:
		act 'Buy a ticket to the city industrial area (50 <b>₽</b>)':
			train_event = 0
			money -= 50
			train_dir = 2
			train_dest = 2
			gt 'cityTrain', 'industrial'
		end
	end

	if money >= 75:
		act 'Buy a ticket to the old platform by the communal village (75 <b>₽</b>)':
			train_event = 0
			money -= 75
			train_dir = 2
			train_dest = 3
			gt 'cityTrain', 'industrial'
		end
	end

	if money >= 100:
		act 'Buy a ticket to the village of Gadyukino (100 <b>₽</b>)':
			train_event = 0
			money -= 100
			train_dir = 2
			train_dest = 4
			gt 'cityTrain', 'industrial'
		end
	end

	if money >= 125:
		act 'Buy a ticket to the old town (125 <b>₽</b>)':
			train_event = 0
			money -= 125
			train_dir = 2
			train_dest = 5
			if rand(1, 100) < 15: gt 'train', 'private'
			gt 'cityTrain', 'industrial'
		end
	end

	if money >= 150:
		act 'Buy a ticket to Pavlovsk (150 <b>₽</b>)':
			train_event = 0
			money -= 150
			train_dir = 2
			train_dest = 6
			if rand(1, 100) < 15: gt 'train', 'private'
			gt 'cityTrain', 'industrial'
		end
	end

	act 'Leave the ticket office':minut += 1 & gt 'cityTrain', 'inside'
end

if $ARGS[0] = 'industrial':
	cls
	gs 'stat'
	'<center><img src="images/etogame/electri.jpg"></center>'
	'You pay for the ticket and board the next train going to Pavlovsk.'
	'After 5 minutes, you see the commercial buildings and warehouses of the industrial area. The train stops at the city industrial area station.'

	act 'Get off the train at this station':minut += 5 & gt 'vokzal'
	if train_dest > 2:
		act 'Continue your journey':
			gt 'train', 'industrialS'
		end
	end
end


--- cityTrain ---------------------------------

