# Market
'<center><b>Market</b></center>'
'<center><img src="images/etogame/rinok2.jpg"></center>'
set h += 1
set horny += 1

if car = 0:set money -= 20 & 'You get on the shuttle bus and pay the fare of 20 rubles.'
if car > 0 and benzin > 0:set benzin -= 1 & 'You reached into your <<$marka>>.'
if car > 0 and benzin <= 0:set money -= 20 & 'You ran out of gas and you had to go on the bus, paying the fare of 20 rubles.'

'Bustling market, you can buy in the market place to buy clothes or for 30, 000 rubles and receive income from the outlet, but for the purchase and delivery of course need to have a car. You can trade yourself or hire a saleswoman.'
clr
gs 'stat'

act 'Buy':gt 'RynokP', 'choice'
act 'Go home':gt 'street'

if rinwork > 0 and час < 9:
	act 'Salesmen':
		cla
		*clr
		set h = 17
		set fat += 5
		set monrand = rand(500, 2000)
		set money += monrand
		clr
		gs 'stat'
		'You all day selling things in the market and earned <<monrand>> rubles'
		set rinrand = rand(1, 100)

		if rinrand < 70 and palevorin = 0 and rinhoz = 0:
			act 'Go home':gt 'street'
		end

		if rinrand >= 70 and palevorin = 0 and rinhoz = 0:
			'To you approached the owner of the tent and began to pester you, promising to write premium'

			act 'Refuse':
				cla
				set money -= 2000
				'The owner imposes on you a fine of 2, 000 rubles'

				act 'Go home':gt 'street'
			end

			act 'Ogle':gt 'RynokHoz', 'start'
		end

		if rinrand < 60 and palevorin = 0 and rinhoz = 1:
			act 'Go home':gt 'street'
		end

		if rinrand >= 60 and palevorin = 0 and rinhoz = 1:
			'To you approached the owner of the tent and began to pester you, promising to write premium'

			act 'Refuse':
				cla
				set money -= 2000
				'The owner imposes on you a fine of 2, 000 rubles'

				act 'Go home':gt 'street'
			end

			act 'Ogle':gt 'RynokHoz', 'start'
		end

		if rinrand < 60 and palevorin = 1:
			'On the market there is a rumor among the sellers that you fucks boss tray'

			act 'Go home':gt 'street'
		end

		if rinrand >= 60 and palevorin = 1:
			'To you approached the owner of the tent and began to pester you, promising to write premium'

			act 'Refuse':
				cla
				set money -= 2000
				'The owner imposes on you a fine of 2, 000 rubles'

				act 'Go home':gt 'street'
			end

			act 'Ogle':gt 'RynokHoz', 'start'
		end

		if rinrand < 40 and palevorin = 2:
			'On the market there is a rumor among the sellers that you fucks boss tray with buddies'
			set slutrand = rand(1, 100)

			if slutrand >= 70:
				'After work, you came to the Armenian and tried to persuade you a blowjob.'

				act 'Agree':gt 'RynokHoz', 'opusteha2'
			end

			act 'Go home':gt 'street'
		end

		if rinrand >= 40 and rinrand < 70 and palevorin = 2:
			'To you approached the owner of the tent and began to pester you, promising to write premium'

			act 'Refuse':
				cla
				set money -= 2000
				'The owner imposes on you a fine of 2, 000 rubles'

				act 'Go home':gt 'street'
			end

			act 'Ogle':gt 'RynokHoz', 'start'
		end

		if rinrand >= 70 and palevorin = 2:
			'To you approached the owner of the tent c already familiar to you guys and they began to entice you to perform oral sex, promising to write premium'

			act 'Refuse':
				cla
				set money -= 2000
				'The owner imposes on you a fine of 2, 000 rubles'

				act 'Go home':gt 'street'
			end

			act 'Ogle':gt 'RynokHoz', 'opusteha'
		end
	end

	act 'Resign':
		cla
		set work = 0
		set rinwork = 0
		'You are fired.'

		act 'Go home':gt 'street'
	end
end

if busRinok = 0 and money >= 30000 and car > 0:
	act 'Buy a place in the market for a month (30,000 rubles)':
		cla
		set busRinok = 30
		set money -= 30000
		'You bought a place in the market for 30, 000 rubles. You need the goods'

		act 'Go home':gt 'street'
	end
end

!!with 7 prior to 16, 9 hours
if busRinok > 0 and tovarR > 0 and rinhour ! number:
	act 'Trade independently':
		cla
		set fat -= 2
		set rinhour = number
		set torghour = 16 - rinhour
		set torgrand = rand(1, 50)

		if tovarR >= torgrand:set tovarR -= torgrand
		if tovarR < torgrand:set torgrand = tovarR & set tovarR = 0

		set torgmoney = torgrand * 200
		set money += torgmoney
		'You´ve earned a day <<torgmoney>> rubles, sold out <<torgrand>> pieces of the item, you have <<tovarR>> units of goods.'
		set h = 17
		set torgmoney = 0
		clr
		gs 'stat'

		act 'Go home':gt 'street'
	end

	if rinokTorg = 0 and rinhour ! number:
		act 'Hire a saleswoman':
			cla
			set rinokTorg = 1
			'You hired saleswoman 1000 rubles per day'

			act 'Go home':gt 'street'
		end
	end

	if rinokTorg = 1 and rinhour ! number and tovarR > 0:
		act 'Release the goods saleswoman.':
			cla
			set rinokTorgW = 1
			set rinhour = number
			set torghour = 16 - rinhour
			set torgrand = rand(1, 50)

			if tovarR >= torgrand:set tovarR -= torgrand
			if tovarR < torgrand:set torgrand = tovarR & set tovarR = 0

			set torgmoney = torgrand * 200
			'You have given goods saleswoman, she can trade on their own.'

			act 'Go home':gt 'street'
		end
	end
end

if rinokTorg = 1 and rinhour ! number:
	act 'Dismiss saleswoman':
		cla
		set rinokTorg = 0
		'You hired fired saleswoman'

		act 'Go home':gt 'street'
	end
end

--- Market ---------------------------------
