# Grinok

!{change log
March 31, 2016
Added rice wine quest
April 20, 2016
Fixed Rice wine event
}
$location_type = 'public_outdoors'
if $ARGS[0] = 'start':
	$metka = $ARGS[0]
	$loc = $CURLOC
	CLOSE ALL
	if sound = 0:
		if month >=11 and month <= 12 or month >=1 and month <=3:
			if hour >= 8 and hour <= 23: PLAY 'sound/rynok.mp3',30 & PLAY 'sound/zima.mp3',30
			if hour >= 0 and hour <= 7: PLAY 'sound/street_night.mp3',30 & PLAY 'sound/zima.mp3',30
		else
			if hour >= 8 and hour <= 23: PLAY 'sound/rynok.mp3',30 & PLAY 'sound/street_leto.mp3',30
			if hour >= 0 and hour <= 7:PLAY 'sound/street_night.mp3',30
		end
	end

	clr
	gs 'stat'
	'<center><h4>Market</h4></center>'
	if month >= 11 or month <= 3:
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/grinokw.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/grinok.jpg"></center>'
	end
	'This small open air market is located near the train station.'
	if arturQW = 1 and (week = 6 or week = 7) and hour < 12:
		act 'Wait for Aurel to arrive':hour = 12 & gt 'Grinok', 'start'
	end

	if hour >= 8 and hour <= 18:
		'In the market the sellers of goods are beckoning shoppers.'
		if pav_slut >= 50 and rand(0,9) = 0:
			'An Armenian man comes up to you and in broken Russian says, "You girl who like men, no? Come meet real men have good time."'
			act 'Go with him':gt 'gevent', '3'
			act 'Reject him':
				cla
				'You pretend not to understand what he is saying.'
				act 'Return':gt 'Grinok', 'start'
			end
			
			exit
		end
		
		act 'Wander through the market': gt 'Grinok','events'
		act 'Go back to the station': minut += 3 & gt 'vokzalG'
		
		!expand market events from 1.2.4

		if arturKnow = 1 and arturQW = 0:
			act 'Look for Aurel':gt 'arturRinok', 'start'
		elseif arturQW = 1 and (week = 6 or week = 7):
			if hour = 12 or hour = 13:
				act 'Look for Aurel':gt 'arturRinok', 'work_1'
			end
		elseif arturQW = 2:
			if hour = 16 and minut <= 30:
				act 'Look for Aurel':gt 'arturRinok', 'work_2'
			elseif hour < 16:
				act 'Wait for Aurel to arrive':hour = 16 & minut = 0 & gt 'Grinok', 'start'
			end
		end

		if gobelen > 0 and gobQW = 0:
			act'Sell ​​tapestry':
				cls
				gobQW = 1
				minut += 15
				gs'stat'
				'You stand quietly by the entrance to the market, waiting for customers and displaying your tapestries. Shortly buyers start to gather, but a large, muscular man approaches you and says, "It is illegal to trade in the market without a trader''s license, but I may be interesting in buying your tapestries, 1000 <b>₽</b> apiece. Come and see me at my stall."'
				'Not wanting to get into trouble, you pack your stuff away. The man was already gone, but you saw which direction he went and he should be easy to find.'
				act 'Leave':gt 'Grinok', 'start'
			end
		end

		if gobelen > 0 and gobQW >= 1:
			act'Sell ​​tapestry':
				cls
				minut += 15
				gs'stat'
				'You go to the man who offered to buy your tapestries for 1000 <b>₽</b>. You find him by his stall, smiling.'
				if gobQW = 2:
					'Roman welcomes you. He is interested and businesslike as he asks what you have for sale.'
				end
				if gobQW = 1:
					gobQW = 2
					minute + 5
					'The man greets you and introduces himself as Roman, you tell him that your name is <<$pcs_nickname>>. After a brief chat Roman says that he is interested in seeing what you have for sale.'
				end
				act'Show your tapestry':
					cls
					gobelen -= 1
					money += 1000
					gs'stat'
					'You show your tapestry to Roman and he gives you five hundred for it. You take the money and give him the tapestry.'
					act 'Leave':gt 'Grinok', 'start'
				end
				if gobelen > 1:
					act'Sell all of your tapestries':
						cls
						kolgob = gobelen
						gobelen = 0
						moneyGob = kolgob*1000
						money += moneyGob
						gs'stat'
						'You show Roman your tapestries and he gives you <<moneyGob>> <b>₽</b> for them. You take the money and give him the tapestries.'
						act 'Leave':gt 'Grinok', 'start'
					end
				end
				act 'Leave':gt 'Grinok', 'start'
			end
		end
		if ShowerIvan = 5 and porndeal = 0 and rand(1,10) <= 4 and lookwine ! daystart:
			*clr
			cla
			gs 'stat'
			minut += 20
			lookwine = daystart
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/chinese_stall01.jpg"></center>'
			'You were looking through the market when you came upon a stall selling Chinese foods. On a shelf behind the old woman minding the stall there are a number of bottles.'
			act 'Ask about huangjiu':
				cla
				'You asked the old woman if she has any rice wine to sell. She smiles at you and points to a basket filled with rice.'
				'"Onry 2 kopec, hundred glam." she said in badly accented Russian, "You buy?"'
				'"No," you replied, "I need rice wine, rice wine."'
				'She looked at you in confusion for a moment then suddenly brightened, "Ah!" she exclaimed, "Come, come!"'
				'The old woman hurried to the other side of the stall and you followed her to where a number of smoked piglets hung in a row.'
				'"Here," the old woman crowed handing you one of r the pigs, "Nice swine, vely nice swine."'
				'"No, not nice swine," you cried in dispair, "Rice. Wine."'
				'"Yes, yes," the woman countered, "Nice swine, only 5 lubles."'
				'Just as you were about to give up, a young Chinese boy about your brother''s age arrived.'
				'"I am sorry, my grandmother does not speak much Russian." he said as he stepped up beside the old woman who started to speak rapidly to him in what you assumed was Chinese.'
				'"My grandmother asks why you don''t like the piglets." he translated as the old woman stopped speaking.'
				'"I don''t want a pig," you replied in relief as his Russian is quite good, "I am looking for rice wine, wang-goo."'
				'"Ah, huangjiu!" he said in understanding then spoke to his grandmother in Chinese.'
				'The old woman glared at you then hung the smoked pig back on its hook. She shuffled over to the shelf with the bottles and peered short-sightedly at the labels. She finally picked up one of them and brought it over to you.'
				'"Why you not say wanted lice wine." she asked in aggrieved tones, "500 lubles."'
				if money >= 500:
					act 'Buy the wine':
						cla
						money -= 500
						ricewine = 1
						'You hand the woman the money and she gives you the wine.'
						act 'Leave': gt 'Grinok', 'start'
					end
				else
					'You are astonished by the price and realize that you cannot afford the wine. You apologize and turn away.'
					act 'Leave the market': gt 'Grinok', 'start'
					act 'Continue browsing the market':
						cls
						cla
						gs 'stat'
						minut += 15
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/market_boy01.jpg"></center>'
						'You continued to wander through the market for another 15 minutes when the boy from the Chinese stall came up to you.'
						'"Hey, you really want that rice wine?" he asked after checking to make sure no one was watching.'
						'"Yes," you answered him, "But it costs too much. I can''t afford it."'
						'"I''ll make a deal with you." he said, "Go to the porn dealer and buy me a porn magazine and I''ll get you the wine."'
						if pornmarkonce = 0: pornmarkonce = 1 & '"Where is the porn dealer?" you asked and he gives you directions.'
						act 'Agree': porndeal = 1 & gt 'Grinok', 4
						act 'Refuse':
							'You declined his offer and he shrugged and walked away.'
							act 'Leave': gt 'Grinok', 'start'
						end
					end
				end
			end
		elseif ShowerIvan = 5 and lookwine ! daystart:
			cla
			cls
			gs 'stat'
			lookwine = daystart
			if month >= 11 or month <= 3:
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/grinokw.jpg"></center>'
			else
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/grinok.jpg"></center>'
			end
			'You look around the market, but the Chinese vendors don''t seem to be here today.'
			act 'Leave': gt 'Grinok', 'start'
		end
		if porndeal = 1 and porndealday ! daystart:
			cls 
			cla
			gs 'stat'
			porndealday = daystart
			lookboy = 0
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/market_boy01.jpg"></center>'
			'The boy from the Chinese stall comes up to you as you entered the market.'
			'"Do you have it?" he asked eagerly.'
			if haveporn = 1: 
				porndeal = 2 & ! to close the ricewine event
				ricewine = 1
				'"Do you have the wine?" you countered.'
				'He pulls the bottle out of his backpack and you trade items.'
				act 'Leave': gt 'Grinok', 'start'
			else
				'You told him you didn''t have his magazine yet but you were working on it.'
				act 'Leave': gt 'Grinok', 'start'
			end 
		end
		if porndeal = 1 and porndealday = daystart and lookboy = 0:
			cls
			cla
			gs 'stat'
			lookboy = 1
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/chinese_stall01.jpg"></center>'
			'You look around the market for the boy from the Chinese stall, but you can''t find him. You decide to look for him another day.'
			act 'Leave': gt 'Grinok', 'start'
		end
	else
		act 'Wander through the market': gt 'Grinok','events'
		act 'Go back to the station': minut += 3 & gt 'vokzalG'
	end
end

if $ARGS[0] = 'events':
	cls
	cla
	'<center><h4>Market</h4></center>'
	minut += 10
	gs 'stat'
	rinevrand = rand(1,19)

	act 'Wander around the market': gt 'Grinok','events'
	act 'Stop wandering': gt 'Grinok', 'start'
	if rand(0,3) ! 0: 
		gs 'Grinok', rinevrand
	else
		$grinok_text[3]='you pass a stall, it is selling children''s clothes.'
		$grinok_text[4]='you see a woman looking for underwear.'
		$grinok_text[5]='you notice a half-naked girl trying on clothes.'
		$grinok_text[6]='you look away as a woman tries on a bra'
		$grinok_text[7]='you don''t see anything unusual, just the usual vegetables and tasteless clothes.'
		$grinok_text[8]='you just see old women in dressing gowns and slippers. Stupid crappy market.'
		$grinok_text[9]='you don''t find anything interesting'
		$grinok_text[10]='you just see cheap Chinese goods and nothing more.'
		$grinok_text[11]='you see all the usual stuff. People with bags scurrying back and forth, children begging for toys from their parents and vociferous traders.'
		$grinok_text[12]='you have to be careful as its so busy. The hustle and bustle makes it hard to find anything worthwhile.'	
	
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/brodit'+rand(1,8)+'.jpg"></center>'
		'As you are strolling through the market, ' + $grinok_text[rand(3,12)]
		killvar '$grinok_text'
	end
end

if ARGS[0] = 1:
	cla
	*clr
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/poproshaika1.jpg"></center>'
	'You are strolling through the market when a beggar asks you for some change.'
	act 'Don''t give money': 
		cla
		*clr
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/poproshaika2.jpg"></center>'
		'You ignore the begger and pretend not to hear him.'
		act 'Wander around the market': gt 'Grinok','events'
	end
	act 'Give some money': 
		cla
		*clr
		money -= rand(3,20)
		pcs_willpwr += 5
		pcs_mood += 5
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/podaet.jpg"></center>'
		'You give the beggar a few rubles'
		act 'Wander around the market': gt 'Grinok','events'
	end
end

if ARGS[0] = 2:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/dedgitara.jpg"></center>'
	'You see an old man playing the guitar.'
end

if ARGS[0] = 3:
	cls
	gs 'stat'
	if month >= 11 or month <= 3:
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/bookw.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/book.jpg"></center>'
	end
	'You find a stall selling various books, there are fantasy books, science fiction and romance novels, all of which costs only 350 <b>₽</b> each.'
	act 'Leave':gt 'Grinok', 'start'
	if money >= 350:
		act 'Buy a fantasy book (350 <b>₽</b>)':
			cls
			minut += 15
			money -= 350
			f_book += 1
			gs 'stat'
			'You bought a fantasy book for 350 <b>₽</b>.'
			act 'Leave':gt 'Grinok', 'start'
		end
	end
	if money >= 350:
		act 'Buy a science fiction book (350 <b>₽</b>)':
			cls
			minut += 15
			money -= 350
			f_book += 1
			gs 'stat'
			'You bought a science ficiton book for 350 <b>₽</b>.'
			act 'Leave':gt 'Grinok', 'start'
		end
	end
	if money >= 350:
		act 'Buy a romance novel (350 <b>₽</b>)':
			cls
			minut += 15
			money -= 350
			w_book += 1
			gs 'stat'
			'You bought a romance novel for 350 <b>₽</b>.'
			act 'Leave':gt 'Grinok', 'start'
		end
	end
end

if ARGS[0] = 4:
	cla
	*clr
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pornmag.jpg"></center>'
	'You find a small stall that has many shelves with a large variety of porn magazines, a pack of brand new porn playing cards, and you can see several sex toys just behind the counter. The salesman watches over his stall with shifty eyes.'
	act 'Leave':gt 'Grinok', 'start'
	if money >= 699 and card < 2:
		act 'Buy cards (699 <b>₽</b>)':
			cls
			minut += 5
			money -= 699
			card = 2
			TimesBuyPorno += 1
			delact 'Buy cards'
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pornmag.jpg"></center>'
			'You tried not to look into the eyes of the porn dealer as you counted out the money. You took the cards and quickly put them in your purse.'
			act 'Leave':gt 'Grinok', 'start'
			act 'Buy something else':gt 'Grinok', 4
		end
	end
	if porndeal = 1:
		if money >= 400:
			act 'Buy a porn magazine for the Chinese boy (400 <b>₽</b>)':
				cls
				minut += 5
				money -= 400
				haveporn = 1
				gs 'stat'
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pornmag.jpg"></center>'
				'You tried not to look into the eyes of the porn dealer as you counted out the money. You took the magazine and quickly hid it.'
				act 'Leave':gt 'Grinok', 'start'
				act 'Buy something else':gt 'Grinok', 4
			end
		end
	else
		act 'Browse the porn magazines':
			cls
			pcs_horny += 10
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pornmag.jpg"></center>'
			act 'Leave':gt 'Grinok', 'start'
			act 'Look for something else':gt 'Grinok', 4
			if TimesBuyPorno = 0:
				'You look over the covers of the magazines, covered in images of half-naked girls on them. Many of them appear to be near your own age. The porn dealer noticed your interest and looks at you expectantly.'
				act 'Look through a magazine':
					cla
					'You pick up one of the magazines and flip through the pages. Inside the magazines, you see men with large erect penis engaging in sexual acts with women who are either half-naked or fully naked, most of them look close to your own age. You feel yourself getting aroused looking at the images.'
					act 'Leave':gt 'Grinok', 'start'
					act 'Look for something else':gt 'Grinok', 4
					act 'Ask for the price':
						cls
						minut += 5
						gs 'stat'
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pornmag.jpg"></center>'
						'Blushing profusely right down to your roots, you approach the porn dealer and stammeringly ask him the price on the magazines. The porn dealer smiles at you and says, "All magazines are 400 <b>₽</b> each."'
						act 'Leave':gt 'Grinok', 'start'
						act 'Look for something else':gt 'Grinok', 4
						if money >= 400:
							act 'Buy magazine (400 <b>₽</b>)':
								cls
								minut += 5
								money -= 400
								pornMagazine = 40
								TimesBuyPorno += 1
								gs 'stat'
								'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pornmag.jpg"></center>'
								'You try not to look into the porn dealers eyes as you hand him the money. You take the magazine and quickly hide it under your shirt.'
								act 'Leave':gt 'Grinok', 'start'
								act 'Buy something else':gt 'Grinok', 4
							end
						end
					end
				end
			elseif TimesBuyPorno > 0 and TimesBuyPorno < 5:
				'The porn dealer notices you coming over and asks, "Looking to buy a magazine? They''re only 400 <b>₽</b> each."'
				act 'Look through a magazine':
					cla
					'You pick up one of the magazines and flip through the pages. Inside the magazines, you see men with large erect penis engaging in sexual acts with women who are either half-naked or fully naked, most of them look close to your own age. You feel yourself getting aroused looking at the images.'
					act 'Leave':gt 'Grinok', 'start'
					act 'Look for something else':gt 'Grinok', 4
					if money >= 400:
						act 'Buy magazine':
							cls
							minut += 5
							money -= 400
							pornMagazine = 40
							TimesBuyPorno += 1
							gs 'stat'
							'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pornmag.jpg"></center>'
							'You try not to look into the porn dealers eyes as you hand him the money. You take the magazine and quickly hide it under your shirt.'
							act 'Leave':gt 'Grinok', 'start'
							act 'Buy something else':gt 'Grinok', 4
						end
					end
				end
			elseif TimesBuyPorno >= 5:
				'The porn dealer see you approaching. "Ah, my best customer!"'
				act 'Look through a magazine':
					cla
					'You pick up one of the magazines and flip through the pages. Inside the magazines, you see men with large erect penis engaging in sexual acts with women who are either half-naked or fully naked, most of them look close to your own age. You feel yourself getting aroused looking at the images.'
					act 'Leave':gt 'Grinok', 'start'
					act 'Look for something else':gt 'Grinok', 4
					if money >= 400:
						act 'Buy magazine':
							cls
							minut += 5
							money -= 400
							pornMagazine = 40
							TimesBuyPorno += 1
							gs 'stat'
							'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pornmag.jpg"></center>'
							'You try not to look into the porn dealers eyes as you hand him the money. You take the magazine and quickly hide it under your shirt.'
							act 'Leave':gt 'Grinok', 'start'
							act 'Buy something else':gt 'Grinok', 4
						end
					end
				end
			end
		end
	end
	act 'Ask to see the sex toys':
		cls
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/sextoys.jpg"></center>'
		'He lets you step behind the counter so you can get a better look, as you do he says. "Take a look and let me know what you would like." You see several 15cm dildos. Each with a tag, "Only 700 <b>₽</b> each." You also see a small selection of vibrators in various colors, mostly pink. "Only 700 <b>₽</b> each." To one side you see many butt plugs, rubber and metal. "Only 700 <b>₽</b>each." Near the bottom is several strapon harnesses. "Only 1000 <b>₽</b>each."'
		act 'Leave':gt 'Grinok', 'start'
		act 'Look for something else':gt 'Grinok', 4
		act 'Buy dildo (700 <b>₽</b>)':
			cla
			if money >= 700 and dildo = 0:
				minut += 5
				dildo = 1
				money -= 700
				pcs_horny += 10
				TimesBuyPorno += 1
				if pcs_horny >= 50 and pav_slut < 75:
					'You buy a dildo and hastily hid it, while your face blushes your embarrassment.'
				else
					'You buy a dildo and calmly hide it.'
				end
			end
			act 'Leave':gt 'Grinok', 'start'
			act 'Buy something else':gt 'Grinok', 4
		end
		act 'Buy vibrator (700 <b>₽</b>)':
			cla
			if money >= 700 and vibrator = 0:
				minut += 5
				vibrator = 1
				money -= 700
				pcs_horny += 10
				TimesBuyPorno += 1
				if pcs_horny >= 50 and pav_slut < 75:
					'You buy a vibrator and hastily hid it, while your face blushes your embarrassment.'
				else
					'You buy a vibrator and calmly hide it.'
				end
			end
			act 'Leave':gt 'Grinok', 'start'
			act 'Buy something else':gt 'Grinok', 4
		end
		act 'Buy butt plug (700 <b>₽</b>)':
			cla
			if money >= 700 and analplug = 0:
				minut += 5
				money -= 700
				analplug = 1
				pcs_horny += 10
				TimesBuyPorno += 1
				if pcs_horny >= 50 and pav_slut < 75:
					'You buy a butt plug and hastily hid it, while your face blushesd your embarrassment.'
				else
					'You buy a butt plug and calmly hide it.'
				end
			end
			act 'Leave':gt 'Grinok', 'start'
			act 'Buy something else':gt 'Grinok', 4
		end
		act 'Buy strapon harness (1000 <b>₽</b>)':
			cla
			if money >= 1000 and strapon = 0:
				minut += 5
				strapon = 1
				money -= 1000
				pcs_horny += 10
				TimesBuyPorno += 1
				if pcs_horny >= 50 and pav_slut < 75:
					'You buy a strapon harness and hastily hid it, while your face blushes your embarrassment.'
				else
					'You buy a strapon harness and calmly hide it.'
				end
			end
			act 'Leave':gt 'Grinok', 'start'
			act 'Buy something else':gt 'Grinok', 4
		end
	end
end

if ARGS[0] = 5:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/dedgitara.jpg"></center>'
	'You see an old man playing the guitar.'
end

if ARGS[0] = 6:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/nenavizublyadcigan.jpg"></center>'
	'You meet a Gypsy woman. She offers to tell your fortune.'
	act 'Agree':
		cla
		*clr
		minut += 5
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/gadaet'+rand(1,2)+'.jpg"></center>'
		'You agree and Gypsy takes your hand before she predicts you will have great happiness and lots of money. Afterwards, she promptly walks away.'
		act 'Something''s wrong':
			cla
			*clr
			money = 0
			pcs_mood -= 50
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pusto.jpg"></center>'
			'With a sneaking suspicion you start looking through your stuff. Your wallet is nowhere to be found!'
			act 'Find the Gypsy':
				cla
				*clr
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/okliknut.jpg"></center>'
				'You search the area hoping to find the thief, but she has already disappeared into the crowd.'
				act 'Back': gt 'Grinok', 'start'
			end
		end
	end
end

if ARGS[0] = 7:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/kosmetic.jpg"></center>'
	tovpay = 800
	'You see some cosmetics on sale for <<tovpay>> <b>₽</b>.'
	if money >= tovpay:
		act 'Buy':
			cls
			minut += 15
			money -= tovpay
			kosmetica += 50
			gs 'stat'
			gt 'Grinok', 'start'
		end
	end
end

if ARGS[0] = 8:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/vitaminki.jpg"></center>'
	tovpay = 105
	'You see some vitamins on sale for <<tovpay>> <b>₽</b>.'
	if money >= tovpay:
		act 'Buy':
			cls
			minut += 15
			vitamin += 20
			money -= tovpay
			gt 'Grinok', 'start'
		end
	end
end

if ARGS[0] = 9:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/condoms.jpg"></center>'
	tovpay = 80
	'You see a booth selling condoms for <<tovpay>> <b>₽</b>.'
	if money >= tovpay:
		act 'Buy':
			cls
			minut += 15
			prezik += 5
			i = 5
			:cndmlp
				if rand(0,49)-6*(8-tovpay/10) <= 0:badprezik += 1
			if i > 0: i-= 1 & jump 'cndmlp'
			killvar 'i'
			money -= tovpay
			gt 'Grinok', 'start'
		end
	end
end

if ARGS[0] = 10:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/balzam.jpg"></center>'
	tovpay = 100
	'There is lip balm on sale for <<tovpay>> <b>₽</b>.'
	if money >= tovpay:
		act 'Buy':
			cls
			minut += 15
			lipbalm += 30
			money -= tovpay
			gt 'Grinok', 'start'
		end
	end
end

if ARGS[0] = 11:
	if arturKnow = 0:
		'Someone suddenly calls out to you, "Hey pretty girl, do you want a fresh, juicy tangerine?"'
		act 'Look': gt 'arturRinok','start'
	else
		'Someone suddenly calls out to you, "Hey <<$pcs_nickname>>, do you want a fresh, juicy tangerine?"'
		act 'Go and see Aurel': gt 'arturRinok','start'
	end
end

if ARGS[0] = 12:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/cheburek.jpg"></center>'
	'Walking through the market, you came across a old woman selling pies.'
	if pcs_energy <= 80:
		act 'Buy a pie for 20 <b>₽</b>':
			cla
			*clr
			fat+=3
			frost = 0
			pcs_health += 5
			pcs_mood += 5
			pcs_hydra -= 5
			pcs_energy+=5
			money-=20
			minut+=10
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/eat.jpg"></center>'
			'You ate a delicious pie with pleasure.'
			act 'Continue walking through the market': gt 'Grinok','events'
		end
	else
		*p ', But you are not hungry right now.'
	end
end

if ARGS[0] = 13:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/dropwallet.jpg"></center>'
	'You see woman ahead of you drop her purse.'
	cla
	act 'Tell her':
		cla
		*clr
		minut += 2
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/vernutwallet.jpg"></center>'
		'You call to the woman and hold out her wallet. She looks at you and releasing she gratefully takes her wallet back and walks away.'
		act 'Continue walking through the market': gt 'Grinok','events'
	end
	act 'Look through the purse':
		cla
		*clr
		minut += 5
		i = rand(40,200)
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/zaglanut.jpg"></center>'
		'In the purse is <<i>> <b>₽</b>'
		act 'Take the money and throw away the wallet':
			cla
			*clr
			money += i
			pcs_mood += 10
			gt 'Grinok', 'start'
		end
		act 'Catch up with the woman and return her purse':
			cla
			*clr
			pcs_mood += 5
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/proverka.jpg"></center>'
			'You catch up with the woman and telling her she dropped something you hand her the purse. The woman checks her money is still there and seeing that everything is in place, she thanks you and walked away.'
			act 'Continue walking through the market': gt 'Grinok','events'
		end
	end
end

if ARGS[0] = 14:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/rebenok.jpg"></center>'
	'You see a young mother and her crying baby.'
end

if ARGS[0] = 15:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/rezba.jpg"></center>'
	'You find a stall with beautiful things carved out of wood and metal.'
end

if ARGS[0] = 16:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/gruzchik.jpg"></center>'
	'Looking around, you almost collided with a man pulling a small cart.'
end

if ARGS[0] = 17:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/meatlavka.jpg"></center>'
	'You wandered past a the meet seller and see a butcher working with an axe.'
end

if ARGS[0] = 18:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/dirka.jpg"></center>'
	'As you walk past a stall you notice a small hole torn in the canvas.'
	act 'Look through the hole':
		cla
		*clr
		if girl > 1: pcs_horny += 5
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/pereodev'+rand(1,15)+'.jpg"></center>'
		'You look inside the tent and see ' + $grinokrandtext[rand(3,7)]
		act 'Leave': gt 'Grinok', 'start'
	end
end

if ARGS[0] = 19:
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/market/birthcontrolpills.jpg"></center>'
	tovpay = 1500
	'You see a booth selling birth control pills for <<tovpay>> <b>₽</b>.'
	if money >= tovpay:
		act 'Buy':
			cls
			minut += 15
			tabletki += 1
			if rand(0,49) - (6*(8-tovpay/50)) <= 0: 
				temp = rand(0,3)
				if temp = 0: 
					tabletkiold += 1 & !Pills are expired and less effective
				elseif temp = 1:
					tabletkifake += 1 & !Pills are counterfeit and useless
				elseif temp = 2: 
					tabletkirej += 1 & !Pills are factory rejects with variable strength
				else
					!Pills were tampered with
					if rand(0,100) = 0:
						tabletkifert += 1 & ! pills were replaced with fertility hormones
					else
						tabletkisug += 1 & ! pills were all replaced with sugar pills
					end
				end
			end
			money -= tovpay
			gt 'Grinok', 'start'
		end
	end
end	


--- Grinok ---------------------------------

