# rinwork
if $ARGS[0] = 'start':

$answerrin = {
	if tipred = pokti:
		if pokvnirand = 0:
			pokpay = RAND(1000,1200)
		end

		if pokvnirand = 1:
			pokpay = RAND(1200,1500)
		end

		if pokvnirand = 2:
			pokpay = RAND(1500,2000)
		end
	else
		$rinitog = '<<$poktip>> puts the thing in place and leaves'
		pokupatel = 0
	end
}

$answerrin2 = {
	act 'Name the price':
		cla
		prodpay = input ("Enter the selling price")

		if prodpay < 1000: prodpay = prodpayum

		'You set a price in <<prodpay>> rubles'

		if prodpay <= pokpay:
			poknorand = RAND(1,100 + vnesh)
			if poknorand >= 10:
				rinmon += prodpay
				rinvesh += 1
				'Buyer collected and paid item <<prodpay>> rubles'
				act 'Trading on': gt 'rinwork','start'
			else
				'Buyer twirls thing in your hands <<prodpay>> RR is too expensive'
				dynamic $answerrin3
				act 'Less I can not (take the thing)': gt 'rinwork','start'
			end
		end

		if prodpay > pokpay and prodpay <= pokpay + 100:
			poknorand = RAND(1,100 + vnesh)
			if poknorand >= 10:
				'Buyer twirls thing in your hands <<prodpay>> RR is too expensive'
				dynamic $answerrin3
				act 'Less I can not (take the thing)': gt 'rinwork','start'
			else
				'Buyer puts thing into place and leaves'
				act 'Trading on': gt 'rinwork','start'
			end
		end

		if prodpay > pokpay+100:
			'Buyer puts thing into place and leaves'
			act 'Trading on': gt 'rinwork','start'
		end
	end
}

$answerrin3 = {
if prodpay >= 1100:
	act 'Reduce the price of 100 rubles':
	cla
	'You have reduced the price to 100 rubles.'
	poknorand = RAND(1,100 + vnesh)
		if poknorand >= 10:
		rinmon += prodpay - 100
		rinvesh += 1
		'Buyer collected and paid item <<prodpay-100>> rubles'
		act 'Trading on': gt 'rinwork','start'
		else
		'Buyer puts thing into place and leaves'
		act 'Trading on': gt 'rinwork','start'
		end
	end
end

if prodpay >= 1050:
	act 'Reduce the price of 50 rubles':
	cla
	'You have reduced the price to 50 rubles.'
	poknorand = RAND(1,100 + vnesh)
		if poknorand >= 30:
		rinmon += prodpay - 50
		rinvesh += 1
		'Buyer collected and paid item <<prodpay-50>> rubles'
		act 'Trading on': gt 'rinwork','start'
		else
		'Buyer puts thing into place and leaves'
		act 'Trading on': gt 'rinwork','start'
		end
	end
end
}

cla
*clr
gs 'stat'
'<center><B><font color = maroon>Trade</font></B></center>'
'<center><img src="images\etogame\rinok.jpg"></center>'
'You stand in the tray with the clothes in anticipation of buyers.'
'At the box office <<rinmon>> rubles, Sales <<rinvesh>> things.'
'The average price on the market <<prodpayum>>'

	if hour = 14:
	'Arthur came to you and you started to calculate how much you should give to Arthur.'
		act 'Giving money to Arthur':
		cla
		*clr
		rinart = rinvesh * 1000
		rinmon = rinmon - rinart
		money += rinmon
		'You gave Arthur <<rinart>> per sold <<rinvesh>> things.'
		'Today you have earned <<rinmon>> rubles'
		gs 'stat'
			if rinart < arturplan:
			arturnoo += 1
			'Uh, Svetka, bad work, not enough money. You´re so razorish me completely.'
			else
			arturyes += 1
			'Maladets Svetik, good job.'
			end
		if arturnoo > arturyes: arturnoo = arturnoo - arturyes & arturyes = 0
		if arturyes > arturnoo: arturyes = arturyes - arturnoo & arturnoo = 0
		if arturnoo = arturyes: arturnoo = 0 & arturyes = 0
		rinmon = 0
		rinvesh = 0
			if arturnoo > 10:
			arturnoo = 0
			work = 0
			workrin = 0
			'Uh, you´ve fucked savsem. Here´s your labor. Hit the road that I did not see you anymore!'
			act 'Leave': gt 'street'
			exit
			end
		Set rinrand = RAND(1,100)
			if rinrand < vnesh and palevorin = 0 and rinhoz = 0:
			'(Arthur) - Wai Svetik, you and I have not even met properly. Come into the container, ate barbecue, drink and get acquainted.'
				act 'Refuse':
				cla
				'You become otnekivatsya Arthur told you. Wai, why insult, you have here the tray is not cleaned, dust, dirt, I´m fine and I can take you.'
				act 'Okay, let´s go have a drink': gt 'RynokHoz','start'
					act 'No.':
					cla
					arturplan += 1000
					if money >= 1000:
					money -= 1000
					'Wai, you dirty things, to give a thousand rubles, which is fine. Arthur gave you money.'
					else
					'Okay, go already.'
					end
					act 'Leave.': gt 'street'
					end
				end
			act 'Come': gt 'RynokHoz','start'
			exit
			end

			if rinrand < vnesh and palevorin = 0 and rinhoz = 1:
			'(Arthur) - Wai Svetik. Come into the container, ate barbecue, drink, rest. He walked right up to you and slapped on the ass with his hand.'
				act 'Refuse':
				cla
				'You become otnekivatsya Arthur told you. Wai, why insult, you have here the tray is not cleaned, dust, dirt, I´m fine and I can take you.'
				act 'Okay, let´s go have a drink': gt 'RynokHoz','start'
					act 'No.':
					cla
					arturplan += 1000
					if money >= 1000:
					money -= 1000
					'Wai, you dirty things, to give a thousand rubles, which is fine. Arthur gave you money.'
					else
					'Okay, go already.'
					end
					act 'Leave.': gt 'street'
					end
				end
			act 'Come': gt 'RynokHoz','start'
			exit
			end



		act 'Leave work': gt 'street'
		end
	exit
	end

	if hour < 14:
	pokrand = RAND(0,1)
		if pokrand = 0:
		$pokup = 'Buyers can not see.'
		pokupatel = 0
		''
		'Market is Aunt Katya with trolley in which it carries cakes and coffee.'
		end

		if pokrand = 1:
		poktiprand = RAND(0,7)
		pokupatel = 1
		if poktiprand = 0:$pokup = 'To the tray approached middle-aged man.' & $poktip = 'Man'&pokti = 1
		if poktiprand = 1:$pokup = 'To the tray approached by a young man.' & $poktip = 'Guy'&pokti = 2
		if poktiprand = 2:$pokup = 'Guy came to the tray teenager.' & $poktip = 'Boy'&pokti = 3
		if poktiprand = 3:$pokup = 'A woman came up to the tray.' & $poktip = 'Woman'&pokti = 1
		if poktiprand = 4:$pokup = 'Girl came to the tray.' & $poktip = 'Girl'&pokti = 2
		if poktiprand = 5:$pokup = 'To the tray approached teen girl.' & $poktip = 'Girlfriend'&pokti = 3
		if poktiprand = 6:$pokup = 'Approached the old man to the tray.' & $poktip = 'Old man'&pokti = 0
		if poktiprand = 7:$pokup = 'Grandma went to the tray.' & $poktip = 'Granny'&pokti = 0
		end
		'<b><<$pokup>></B>'
			if pokupatel = 1:
				act 'What do you want?':
				cla
				minut += 15
				pokvnirand = RAND(0,2)
					if pokvnirand = 0:
						'<<$poktip>> without interest examines selling things.'
					end
					if pokvnirand = 1:
						'<<$poktip>> with interest examining selling things.'
					end
					if pokvnirand = 2:
						'<<$poktip>> picks up the item.'
					end

					!dynamic $answerrin

					act 'Now it is very fashionable':
					cla
					tipred = 3
					dynamic $answerrin
					'<<$rinitog>>'
						if pokupatel = 0: act 'Further': gt 'rinwork','start'
						if pokupatel = 1:
						'<<$poktip>> asks you for a price'
						dynamic $answerrin2
						end
					end

					act 'Thing is very high quality and reliable':
					cla
					tipred = 1
					dynamic $answerrin
					'<<$rinitog>>'
						if pokupatel = 0: act 'Further': gt 'rinwork','start'
						if pokupatel = 1:
						'<<$poktip>> asks you for a price'
						dynamic $answerrin2
						end
					end

					act 'Give not expensive':
					cla
					tipred = 0
					dynamic $answerrin
					'<<$rinitog>>'
						if pokupatel = 0: act 'Further': gt 'rinwork','start'
						if pokupatel = 1:
						'<<$poktip>> asks you for a price'
						dynamic $answerrin2
						end
					end

					act 'You are very':
					cla
					tipred = 2
					dynamic $answerrin
					'<<$rinitog>>'
						if pokupatel = 0: act 'Further': gt 'rinwork','start'
						if pokupatel = 1:
						'<<$poktip>> asks you for a price'
						dynamic $answerrin2
						end
					end
				end
			end

			act 'Laze around (0:15)':
			minut += 15
			gt 'rinwork','start'
			end

			if hour = 9:
			rintakrand = RAND(0,5)
				if rintakrand = 0:
				$rintak = 'The tray in front of Hassan unloads clothes saleswoman Nadia.'
					act 'See Hassan and Nadia':
					cla
					minut += 15
					talkrand = RAND(0,2)
						if talkrand = 0: 'Nadia Hassan utters. "Today you will sell more, and then the fine ladies, I need the money."'
						if talkrand = 1: 'Hassan opens trunks and puts clothes on the counter.'
						if talkrand = 2: 'Hassan drags trunks to his tray.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 1:
				$rintak = 'In the next tray Abdul talking loudly gives clothes saleswoman Anna.'
					act 'Look at Abdul and Anna':
					cla
					minut += 15
					talkrand = RAND(0,2)
						if talkrand = 0: 'Abdul swears. "You´re fucked, you can not sell anything!" Anna retorts, "you told me so rotten shit for sale give, take it nobody wants."'
						if talkrand = 1: 'Abdul slapped ass Anna, she pretended that nothing happened.'
						if talkrand = 2: 'Abdul drags trunks to his tray.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 2:
				$rintak = 'Abdul Hassan and stand beside your tray and about something guttural talking.'
					act 'View on Caucasians':
					cla
					minut += 15
					talkrand = RAND(0,2)
						if talkrand = 0: 'Abdul Hassan and continue to talk about something, you do not know the language, and what they say can not understand.'
						if talkrand = 1: 'Abdul Hassan pyalyatsya you and discussing what is yuk.'
						if talkrand = 2: 'Abdul looks at you and says Hassan, "Look what a girl, sponges persik, wah."'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 3:
				$rintak = 'Anna hanging clothes in the tray and shouting with Nadia.'
					act 'Chat with sex':
					cla
					annaQW += 1
					NadiaQW += 1
					minut += 15
					talkrand = RAND(0,2)
						if talkrand = 0:
						'Anya raskazyvaet that her skirt had to alter, so here is a Jew great tailor, he works in an office building.'
						if clener = 0: clener = 1
						end
						if talkrand = 1: 'Nadia tells her how the subway molested what that pervert ass rubbed against a member.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 4:
				$rintak = 'Arthur is talking about something with Abdullah.'
					act 'View on Caucasians':
					cla
					minut += 15
					talkrand = RAND(0,2)
						if talkrand = 0: 'Abdul and Arthur continue to talk about something, you do not know the language, and what they say can not understand.'
						if talkrand = 1: 'Abdul and Arthur pyalyatsya you and discussing what is yuk.'
						if talkrand = 2: 'Abdul looks at you and says Arthur, "Look what a girl, sponges persik, wah."'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 5:
				$rintak = 'Arthur, Abdul Hassan and neighing loudly and talk about something not on the plain language.'
					act 'View on Caucasians':
					cla
					minut += 15
					talkrand = RAND(0,2)
						if talkrand = 0: 'Caucasians continue to talk about something, you do not know the language, and what they say can not understand.'
						if talkrand = 1: 'Caucasians pyalyatsya you and discussing what is yuk.'
						if talkrand = 2: 'Abdul looks at you and says other Caucasians, "Look what a girl, sponges persik, wah."'
					act 'Further': gt 'rinwork','start'
					end
				end
			'<<$rintak>>'
			end
			if hour = 10:
			rintakrand = RAND(0,5)
				if rintakrand = 0:
				$rintak = 'Hassan sitting on a chair dejectedly cheburek chews and talks with his mouth full with a saleswoman Nadia.'
					act 'See Hasan':
					cla
					minut += 15
					'Hassan says Nadia "Nadia, zachem ti refuse? Encroach Shlyk, have some wine."'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 1:
				$rintak = 'The tray is sitting in front of Nadia and crossword puzzles.'
					act 'Chat with Nadia':
					cla
					!annaQW += 1
					NadiaQW += 1
					minut += 15
					'Nadia leaves the crossword and willingly support the conversation about any nonsense.'
						if clener = 0:
						clener = 1
						'Nadia tells about a Jew tailor working in an office building.'
						end
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 2:
				$rintak = 'The tray in front of buyers came to Nadia and she fusses before laying them goods.'
					act 'Chat with Nadia':
					cla
					!annaQW += 1
					NadiaQW -= 1
					minut += 15
					'Nadia is not happy, light, no distractions, I have buyers.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 3:
				$rintak = 'In the next tray Anna drinking coffee.'
					act 'Chat with Anna':
					cla
					annaQW += 1
					!NadiaQW -= 1
					minut += 15
					'Anya support chat with you and tells you what nonsense.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 4:
				$rintak = 'In the next tray Anna tries vtyuhat buyers stale goods.'
					act 'Chat with Anna':
					cla
					annaQW -= 1
					!NadiaQW -= 1
					minut += 15
					'Anya is not happy, light, no distractions, I have buyers.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 5:
				$rintak = 'Anna talks about trifles with Aunt Katya.'
					act 'Chat with Anna and Aunt Katya':
					cla
					annaQW += 1
					!NadiaQW += 1
					tetaKataQW += 1
					minut += 15
					'Aunt Katya praises pies and Anya complains that it currently has on these patties Naela ass twice more than it was ..'
					act 'Further': gt 'rinwork','start'
					end
				end
			'<<$rintak>>'
			end
			if hour = 11:
			rintakrand = RAND(0,5)
				if rintakrand = 0:
				$rintak = 'By Nadia approached by three Caucasian, Aslan, Camille and Mukhtar and began to molest her, and she swore at them and tried to dodge.'
					act 'Look at Nadia and Caucasians.':
					cla
					!annaQW += 1
					!NadiaQW += 1
					!tetaKataQW += 1
					minut += 15
					'Caucasians seem to be leaning toward sex Nadia.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 1:
				$rintak = 'The tray is sitting in front of Nadia and eating cake.'
					act 'Chat with Nadia':
					cla
					!annaQW += 1
					NadiaQW += 1
					minut += 15
					'Nadia leaves the crossword and willingly support the conversation about any nonsense.'
						if clener = 0:
						clener = 1
						'Nadia tells about a Jew tailor working in an office building.'
						end
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 2:
				$rintak = 'The tray in front of buyers came to Nadia and she fusses before laying them goods.'
					act 'Chat with Nadia':
					cla
					!annaQW += 1
					NadiaQW -= 1
					minut += 15
					'Nadia is not happy, light, no distractions, I have buyers.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 3:
				$rintak = 'In the next tray Anna reading the newspaper.'
					act 'Chat with Anna':
					cla
					annaQW += 1
					!NadiaQW -= 1
					minut += 15
					'Anya support chat with you and tells you what nonsense.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 4:
				$rintak = 'By Ana from a nearby tray approached buyers.'
					act 'Chat with Anna':
					cla
					annaQW -= 1
					!NadiaQW -= 1
					minut += 15
					'Anya is not happy, light, no distractions, I have buyers.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 5:
				$rintak = 'By Ana approached by three Caucasian, Aslan, Camille and Mukhtar and began to molest her, she excuses and mostly scared silent.'
					act 'Look at Anya and Caucasians.':
					cla
					!annaQW += 1
					!NadiaQW += 1
					!tetaKataQW += 1
					minut += 15
					'Caucasians seem to be leaning toward sex Anya.'
					act 'Further': gt 'rinwork','start'
					end
				end
			'<<$rintak>>'
			end
			if hour = 12:
			rintakrand = RAND(0,5)
				if rintakrand = 0:
				$rintak = 'Hasan bought cheburek and eating it while sitting behind Nadi in the tray.'
					act 'Chat with Nadia':
					cla
					!annaQW += 1
					NadiaQW -= 1
					minut += 15
					'Nadia shy to talk with Hassan.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 1:
				$rintak = 'Nadia Thorog with buyers.'
					act 'Chat with Nadia':
					cla
					!annaQW += 1
					NadiaQW -= 1
					minut += 15
					'Nadia is not happy, light, no distractions, I have buyers.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 2:
				$rintak = 'Nadia talks with Anna.'
					act 'Chat with sex':
					cla
					annaQW += 1
					NadiaQW += 1
					minut += 15
					talkrand = RAND(0,2)
						if talkrand = 0:
						'Anya raskazyvaet that her skirt had to alter, so here is a Jew great tailor, he works in an office building.'
						if clener = 0: clener = 1
						end
						if talkrand = 1: 'Nadia tells her how the subway molested what that pervert ass rubbed against a member.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 3:
				$rintak = 'Anya sells clothing buyers.'
					act 'Chat with Anna':
					cla
					annaQW -= 1
					!NadiaQW -= 1
					minut += 15
					'Anya is not happy, light, no distractions, I have buyers.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 4:
				$rintak = 'Anya drinking coffee sitting at his tray.'
					act 'Chat with Anna':
					cla
					annaQW += 1
					!NadiaQW -= 1
					minut += 15
					'Anya support chat with you and tells you what nonsense.'
					act 'Further': gt 'rinwork','start'
					end
				end
				if rintakrand = 5:
				$rintak = 'Nadia idleness catches flies.'
					act 'Chat with Nadia':
					cla
					!annaQW += 1
					NadiaQW += 2
					minut += 15
					'Nadia glad though what that entertainment and fun to chat with you.'
					act 'Further': gt 'rinwork','start'
					end
				end
			'<<$rintak>>'
			end
			if hour = 13:
			rintakrand = RAND(0,5)
				if rintakrand = 0:
				$rintak = 'Hassan began to slowly collect the goods from Nadi.'
				end
				if rintakrand = 1:
				$rintak = 'Anya sits and calculates profit per day.'
				end
				if rintakrand = 2:
				$rintak = 'Nadia calculates profit per day.'
				end
				if rintakrand = 3:
				$rintak = 'Abdul began to collect the goods from Ani.'
				end
				if rintakrand = 4:
				$rintak = 'Past your tray was Arthur.'
				end
				if rintakrand = 5:
				$rintak = 'Aunt Katya ends trade pies and seems to leave.'
				end
			'<<$rintak>>'
			end


			if money >= 200:
				act 'Buy snack for 200 rubles (0:15)':
				cla
				*clr
				gs 'stat'
				tetaKataQW += 1
				'<center><img src="images\pics\food.jpg"></center>'
				set minut += 15
				set health += 10
				set manna += 20
				money -= 200
					if energy >= 30:
					set fat += 5
					'You can no longer have.'
					end
					if energy >= 20 and energy < 30:
					set fat += 3
					set energy += 10
					'You pushed through the power of a meal.'
					end
					if energy < 20:
					set energy += 20
					!set fat += 1
					'You gladly ate cooked food.'
					end
					if water >= 20:
					'Coffee you no longer climbs.'
					end
					if water < 20:
					'You gladly drank a mug of coffee.'
					set water += 20
					end
				act 'Throw leftovers': gt 'rinwork','start'
			end
		end
	end


end
--- rinwork ---------------------------------

