# rinok
if $ARGS[0] = 'start':
	$rinbuy1 = {
		cla
		*clr
		portion = input ("How much you want to buy?")

		if portion <= 0:portion = 1
		if portion * 50 > money:'You do not have enough money.'

		if portion * 50 <= money:
			fairy += portion
			money -= portion * 50
			'<center><img src="images/etogame/kassa2.jpg"></center>'
			'You bought dishwashing detergent and paid the money to the cashier.'
		end

		act 'Move away from the counter':gt 'rinok', 'start'
	}

	$rinbuy2 = {
		cla
		*clr
		portion = input ("How much you want to buy?")

		if portion <= 0:portion = 1
		if portion * 150 > money:'You do not have enough money.'

		if portion * 150 <= money:
			poroshok += portion
			money -= portion * 150
			'<center><img src="images/etogame/kassa2.jpg"></center>'
			'You bought detergent and paid the money to the cashier.'
		end

		act 'Move away from the counter':gt 'rinok', 'start'
	}

	$rinbuy3 = {
		cla
		*clr
		portion = input ("How much you want to buy?")

		if portion <= 0:portion = 1
		if portion * 150 > money:'You do not have enough money.'

		if portion * 150 <= money:
			cltarelka += portion * 3
			money -= portion * 150
			'<center><img src="images/etogame/kassa2.jpg"></center>'
			'You bought plates and paid the money to the cashier.'
		end

		act 'Move away from the counter':gt 'rinok', 'start'
	}

	$rinbuy4 = {
		cla
		*clr
		portion = input ("How much you want to buy?")

		if portion <= 0:portion = 1
		if portion * 500 > money:'You do not have enough money.'

		if portion * 500 <= money:
			kosmetica += portion * 25
			money -= portion * 500
			'<center><img src="images/etogame/kassa2.jpg"></center>'
			'You bought cosmetics and paid the money to the cashier.'
		end

		act 'Move away from the counter':gt 'rinok', 'start'
	}

	$rinbuy5 = {
		cla
		*clr
		portion = input ("How much you want to buy?")

		if portion <= 0:portion = 1
		if portion * 200 > money:'You do not have enough money.'

		if portion * 200 <= money:
			stanok += portion * 10
			money -= portion * 200
			'<center><img src="images/etogame/kassa2.jpg"></center>'
			'You bought razor and paid the money to the cashier.'
		end

		act 'Move away from the counter':gt 'rinok', 'start'
	}

	$rinbuy6 = {
		cla
		*clr
		portion = input ("How much you want to buy?")

		if portion <= 0:portion = 1
		if portion * 150 > money:'You do not have enough money.'

		if portion * 150 <= money:
			tampon += portion * 20
			money -= portion * 150
			'<center><img src="images/etogame/kassa2.jpg"></center>'
			'You bought tampons and paid the money to the cashier.'
		end

		act 'Move away from the counter':gt 'rinok', 'start'
	}

	$rinbuy7 = {
		cla
		*clr
		portion = input ("How much you want to buy?")

		if portion <= 0:portion = 1
		if portion * 200 > money:'You do not have enough money.'

		if portion * 200 <= money:
			clrbelo += portion
			money -= portion * 200
			'<center><img src="images/etogame/kassa2.jpg"></center>'
			'You pay the cashier and bought clothes.'
		end

		act 'Move away from the counter':gt 'rinok', 'start'
	}
	$rinbuy8 = {
		if money >= 1000 and bikini < 1:
			cla
			*clr
			money -= 1000
			bikini = 1
			'<center><img src="images/etogame/kassa2.jpg"></center>'
			'You pay the cashier and bought a swimsuit.'

			act 'Move away from the counter':gt 'rinok', 'start'
		else
			'You do not have enough money.'
		end
	}

	$rinbuy9 = {
		if money >= 1000 and umbrella < 1:
			cla
			*clr
			money -= 1000
			umbrella = 1
			'<center><img src="images/etogame/kassa2.jpg"></center>'
			'You pay the cashier and bought an umbrella.'

			act 'Move away from the counter':gt 'rinok', 'start'
		else
			'You do not have enough money.'
		end
	}

	cla
	*clr
	minut = minut + 5
	mag = 1
	$metka = $ARGS[0]
	$loc = $CURLOC
	$metkaM = $ARGS[0]
	$locM = $CURLOC
	'<center><b><font color="maroon">Trade</font></b></center>'
	'<center><img src="images/etogame/rinok.jpg"></center>'
	'<a href="exec:dynamic $rinbuy1">Dishwashing detergent - 50 rubles</a> <a href="exec:dynamic $rinbuy2">laundry detergent - 150 rubles</a> <a href="exec:dynamic $rinbuy3">a of 3 plates - 150 rubles</a> <a href="exec:dynamic $rinbuy4">Cosmetics - 500 rubles</a> <a href="exec:dynamic $rinbuy5">razor - 200 rubles</a> <a href="exec:dynamic $rinbuy6">tampons - 100 rubles</a> <a href="exec:dynamic $rinbuy7">Underwear - 200 rubles</a>'

	if bikini < 1:'<a href="exec:dynamic $rinbuy8">Swimsuit - 1,000 rubles</a>'
	if umbrella < 1:'<a href="exec:dynamic $rinbuy9">Umbrella - 1,000 rubles</a>'

	'On one of the tents hanging listing <a href="exec:gt ''clothing'', ''view_clothing_list'', ''sell''">"Accept the things to implement"</a>'

	if analplugIN = 1 and tanga = 0 and ski = 1 or analplugIN = 1 and tanga = 0 and glamur = 1:
		nurand = rand(0, 100)

		if nurand >= 80:
			manna -= 5
			SUB += 1
			horny += SUB
			nudity += 1
			'You feel that someone gently touched <a href="exec:gt ''etoexhib'', ''pos15''">your hand buttocks</a>'
		end
	end

	clr
	gs 'stat'
	gs 'time'
	
	act 'Leave':
		cla
		minut += 5
		gt 'street'
	end
	
	if workrin = 1:
		if week = 2 or week = 4 or week = 6:
			if hour < 9:
				'Arthur item is waiting for you.'
				act '<b>Accept goods</b>':
					cla
					*clr
					hour = 9
					minut = 0
					prodpayum = 1200
					'Arthur unloaded stuff from his ushatannoy Shokhi to the tray and gave you. You started to hang clothes on the tent.'
					'Before leaving Arthur gives you instructions. "Sell what you want, but that night I would have given to each item sold by 1000. And to gain by selling no less than <<arturplan>> rubles."'

					act 'To work.':gt 'rinwork', 'start'
				end
			end
		end
		act 'Retire from work':
			cla
			work = 0
			workrin = 0
			'You retired from work and took labor.'

			act 'Leave':gt 'rinok', 'start'
		end
	end

	if (work = 0 and workrin = 0 and cheatWork = 0) or (workrin = 0 and cheatWork = 1):
		nl
		'On one of the tents hanging ad "Need females saleswomen. Paychecks big."'

		act 'Approach the owner of the tents ad':
			cla
			*clr
			'Hi, my name is Arthur. I am the master of the tent, I need a saleswoman. I do not cope. Well? Will you?'
			'Paying a percentage of wages. Will operate on Tuesdays, Thursdays and Saturdays. With 8 to 14.'
			'Work on labor.'

			act 'Leave':gt 'rinok', 'start'

			act 'Find a job':
				cla
				work = 1
				workrin = 1
				arturplan = 5000
				'You got a job to Arthur and gave him a career.'

				act 'Leave':gt 'rinok', 'start'
			end
		end
	end

	if palto < 1:
		'On the market sell for winter jackets - 5,000 rubles'

		if money >= 5000:
			act 'Buy a down jacket (5,000 rubles)':
				cla
				money -= 5000
				palto = 1
				$palto = 'Chinese wear'
				'You bought a down jacket.'

				act 'Leave':gt 'rinok', 'start'
			end
		end
	end
	
	if money >= 1500:
		i = 1
		:loopjeans
			if jeans[i] = 0:dynamic 'act ''Look at jeans <<i>>'':gt ''clothing'', ''view_clothing_item'', ''shop'', ''jeans'', <<i>>, 1500'
			i += 1
		if i <= 5:jump 'loopjeans'
	end

end

--- rinok ---------------------------------
