# pav_market
!2021/05/12
$region = 'pav'
$loc = 'pav_market'
$loc_arg = ''
$menu_loc = 'pav_market'
$menu_arg = ''
menu_off = 0
$location_type = 'public_outdoors'
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/street2.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/street2.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><h2>Pavlovsk''s Market Square</h2></center>'
if month >= 11 or month <= 3:
	if hour >= 9 and hour <= 16:
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_day.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_night.jpg"></center>'
	end
else
	if hour >= 7 and hour <= 18:
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_day.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_night.jpg"></center>'
	end
end
*nl
'Pavlovsk''s modest train station, is near the Pavlovsk market Square. You can enter the central hall of the <a href="exec:minut += 3 & gt ''pav_train_hall''">train station</a>. Down the street from the train station is the <a href="exec:minut += 5 & gt ''gkafe''">Borislav''s cafe</a>' + iif(mid($start_type,1,2) = 'sg',' where your mother works','') + '. Next to the train station you can see the <a href="exec:minut += 5 & gt ''pav_station'', ''station_outside''">Pavlovsk police station</a> where you can find Pavlovsk''s finest.'
*nl
'The other side of the train station is a large square, where you can find a <a href="exec:minut += 1 & gt ''pav_train_market'', ''start''">market</a> on most days.'
*nl
'A rather run-down <a href="exec:minut += 1 & gt ''pav_hotel''">hotel</a> is just across the square, where travelers can spend the night. The manager is always looking for maids among the local young girls. Because of it''s frequent use by the local prostitutes, most people prefer to stay at the middle-class hotel by the main road.'

if mother['kickedout_timer'] ! 0 and mother['kickedout_timer'] + 3 <= daystart and hour > 6 and hour <= 15 and cumloc[11] = 0:
	gs 'mother_chats', 'reconciliation_talk'
exit
end

if prostitute['wl_block'] = 0 and prostitute['full_block'] = 0 and prostitute['gas_station'] = 1:
	*nl 
	if money >= 75:
		'Next to the train station you can find the bus terminal. Here you can catch the bus that will take you to <a href="exec:minut += 87 & money -= 75 & gt ''gas_station_gp_117'', ''outside''">the gas station on the M11</a>.'
	else
		'Next to the train station you can find the bus terminal. Here you can catch the bus that would take you to the gas station on the M111, unfortunately you don''t have enough money for the ticket.'
	end
end


if $home['current'] = 'pavlovsk_hotel':
	if vladimirday = daystart and vladimirQW = 30 and hour >= 16 and week = 6:'<a href="exec:gt ''qwmeet'',''2''">There''s an Audi parked in front of the hotel, and standing beside it, you notice Vladimir</a>.'
	if vladimirday = daystart and vladimirQW = 40 and hour >= 16 and week = 6:'<a href="exec:gt ''qwmeet'',''3''">There''s an Audi parked in front of the hotel, and standing beside it, you notice Vladimir</a>.'

	if hour = meethour[0]:
		if svidanie[0] = 1:'<b><a href="exec:lover_number = 0 & gt ''lover_meet'', ''start''"><<$loverdesc[0]>></a> is waiting in front of the hotel.</b>'
	end
	if hour = meethour[1]:
		if svidanie[1] = 1:'<b><a href="exec:lover_number = 1 & gt ''lover_meet'', ''start''"><<$loverdesc[1]>></a> is waiting in front of the hotel.</b>'
	end
	if hour = meethour[2]:
		if svidanie[2] = 1:'<b><a href="exec:lover_number = 2 & gt ''lover_meet'', ''start''"><<$loverdesc[2]>></a> is waiting in front of the hotel.</b>'
	end
end

if dimaRevChoice = 5 and dimaRevenge = 4 and dimaTrain = 0: gt 'dimaRevenge', dimaRevenge

if kidaloa = 0:
	podrand = rand(0, 5)

	if money >= 5000 and hour >= 8 and hour <= 20 and podrand = 0 and monthKidalo ! month:
		*clr & cla
		menu_off = 1
		monthKidalo = month
		gs 'stat'
		'<center><h4>Pavlovsk''s Market Square</h4></center>'
		if month >= 11 or month <= 3:
			if hour >= 9 and hour <= 16:
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_day.jpg"></center>'
			else
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_night.jpg"></center>'
			end
		else
			if hour >= 7 and hour <= 18:
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_day.jpg"></center>'
			else
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_night.jpg"></center>'
			end
		end
		'When you arrive at the Market Square, it''s impossible to not notice a girl holding a microphone and a man following her with a large camera. They''re coming straight towards you. The girl beckons you to come closer and glances over at towards the man holding the camera, who gives her a subtle nod.'
		'She turns back to you and happily exclaims: "Hello! We''re shooting a pilot for TV. It''s going to be a novel program: it is a show in which we hand out gifts to random strangers, and then film their response. It''s called "Happiness in Russia", we''re hoping it will catch on all over the world. We have chosen you to be part of our pilot, congratulations!"'
		'She grabs hold of a large box the camera man handed to her. It''s beautifully wrapped, with a nice bow to boot. She whispers to you: "This box contains a brand new laptop! Just act surprised when you open it!"'

		act 'Say you have no time':
			*clr & cla
			gs 'stat'
			kidaloa = 1
			'<center><h4>Pavlovsk''s Market Square</h4></center>'
			if month >= 11 or month <= 3:
				if hour >= 9 and hour <= 16:
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_day.jpg"></center>'
				else
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_night.jpg"></center>'
				end
			else
				if hour >= 7 and hour <= 18:
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_day.jpg"></center>'
				else
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_night.jpg"></center>'
				end
			end

			'Even though you definitely wouldn''t mind a new laptop, you simply don''t have time to talk to them right now. You politely decline and walk away before they can protest. A few minutes later you see the two of them hastily running across the square, while some poor guy opens the fancily packed box only to find a brick in it. By the time he realizes he got scammed, they are long gone. Looks like you dodged a bullet there!'
			
			act 'Return to the station' :minut += 15 & gt $curloc
		end	
		
		act 'Wow, this must be your lucky day!':
			*clr & cla
			gs 'stat'
			'<center><h4>Pavlovsk''s Market Square</h4></center>'
			if month >= 11 or month <= 3:
				if hour >= 9 and hour <= 16:
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_day.jpg"></center>'
				else
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_night.jpg"></center>'
				end
			else
				if hour >= 7 and hour <= 18:
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_day.jpg"></center>'
				else
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_night.jpg"></center>'
				end
			end

			'You happily take the box from the girl''s hands as the man starts filming. The girl holds the microphone closer to her mouth, and invites you to give some shout-outs to relatives and friends while you''re on TV. Then she points the microphone at you. You gladly accept the invitation and address your friends and family enthusiastically while looking at the camera, sincerely hoping you did not leave anyone out. Then the man turns the camera away for a second.'
			'The girl tells you: "Unfortunately, the government doesn''t just let us give away items for nothing. We''re legally obligated to have our winners pay VAT over the amount of money their gift is worth. In your case, this comes down to 5000 <b>₽</b>."'

			act 'Pay the VAT and check out your new laptop':
				*clr & cla
				money -= 5000
				kidaloa = 1
				if pcs_mood > 5: pcs_mood = 5
				gs 'stat'
				'<center><h4>Pavlovsk''s Market Square</h4></center>'
				if month >= 11 or month <= 3:
					if hour >= 9 and hour <= 16:
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_day.jpg"></center>'
					else
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_night.jpg"></center>'
					end
				else
					if hour >= 7 and hour <= 18:
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_day.jpg"></center>'
					else
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_night.jpg"></center>'
					end
				end

				'You quickly give them the money and enthusiastically begin to pull at the bow. When you finally manage to tear the wrapping paper off and open the box, you only find a brick wrapped in newspaper. You look up trying to find the man and girl to get your money back, but they are nowhere to be found. You feel terrible for being scammed out of your money, and angrily stuff the box in a garbage can before you move on.'
				
				act 'Return to the train station':minut += 15 & gt $curloc
			end
			act 'Say you can''t afford it right now':
				*clr & cla
				gs 'stat'
				'<center><h4>Pavlovsk''s Market Square</h4></center>'
				if month >= 11 or month <= 3:
					if hour >= 9 and hour <= 16:
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_day.jpg"></center>'
					else
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_night.jpg"></center>'
					end
				else
					if hour >= 7 and hour <= 18:
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_day.jpg"></center>'
					else
						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_night.jpg"></center>'
					end
				end

				'With some regret in your voice, you apologize to the man and girl and explain that you can''t afford to pay the VAT right now. They try to explain to you that this could very well be a one-time opportunity and that you are missing out on a free laptop, but you have to decline. You simply cannot afford to spend the money you have right now on a frivolous purchase like a laptop, even if it comes really cheap.'
				'Sympathizing with you, they promise to look for you if they ever come back to Pavlovsk for another episode of the show.'
				
				act 'Thank them and leave': minut +=15 & gt $curloc
			end
		end
		exit
	end
end
	
if kidalob = 0:
	podrand = rand(0, 5)	
	if money >= 1000 and hour >= 8 and hour <= 20 and podrand = 5 and ($clothingworntype = 'moncheri_dress' or $clothingworntype = 'moncheri_gown' or $clothingworntype = 'fashionista_dress') and monthKidalo ! month:
		*clr & cla
		menu_off = 1
		monthKidalo = month
		minut += 5
		gs 'stat'
		'<center><h4>Pavlovsk''s Market Square</h4></center>'
		if month >= 11 or month <= 3:
			if hour >= 9 and hour <= 16:
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_day.jpg"></center>'
			else
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_winter_night.jpg"></center>'
			end
		else
			if hour >= 7 and hour <= 18:
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_day.jpg"></center>'
			else
				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pav_market_night.jpg"></center>'
			end
		end
		'As you walk across the square towards the station, you notice two well dressed men staring at you. After some brief consideration they come towards you, and you can just about hear what they''re saying: "Wow, she''s just the model we need. She has this... Claudia Schiffer feel to her, don''t you agree?"'
		'You can see the other man nod just as they get close to you, and one of the men stops you: "Excuse me, miss. We are opening a new fashion store in the city and are looking for a model to feature in our advertisements. We have been looking for just the right girl all day and... I think we just found her!"'
		'The second man nods enthusiastically as the first man continues: "We would be able to offer you 10.000 <b>₽</b> for an extensive photo shoot, featuring our clothing line."'
		gs 'willpower', 'misc', 'resist', 'medium'
		if will_cost <= pcs_willpwr:
			act 'You''re not interested (<<will_cost>> Willpower)':
				*clr & cla
				gs 'willpower', 'pay', 'resist'
				gs 'stat'
				gt $curloc
			end
		else
			act 'You''re not interested (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
		end	
		act 'Agree to do the photo shoot':
			*clr & cla
			minut += 2
			gs 'stat'
			!!need image
			'Wow, this offer sounds amazing! There is no way you can decline. The guys take you to the back of the railway station, and the guy who hasn''t said anything to you pulls out an expensive looking camera, mounting it on a tripod near some trees.'
			'The first guy approaches you and says: "The shoot will be against a natural background. We''ve done market research, and have determined that the picturesque background of the outdoors is by far the most desirable option for our campaign. There is only one problem... your dress is not what we are looking for at all. You''ll have to change."'
			'The guy opens the trunk of his car and gives you a rather cheap looking sundress. "You can change your clothes inside the car, no one will notice", he says.'
			gs 'willpower', 'exhib', 'resist', 'medium'
			if will_cost <= pcs_willpwr:
				act 'Refuse and leave, you''re not taking off your clothes! (<<will_cost>> Willpower)':
					*clr & cla
					gs 'willpower', 'pay', 'resist'
					gs 'stat'
					gt $curloc
				end
			else
				act 'Refuse and leave, you''re not taking off your clothes!(<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
			end	
			act 'Change into the sundress':
				*clr & cla
				!! ths will either add the sundress or simply set it to a certain damage level
				dynamic '<<$clothingworntype>>[<<clothingwornnumber>>] = 0'
				dynamic '<<$clothingworntype>>_h[<<clothingwornnumber>>] = 0'
				dynamic '<<$clothingworntype>>_s[<<clothingwornnumber>>] = 0'
				gm_dress[52] = 1
				gm_dress_h[52] = 20
				gm_dress_b[52] = pcs_hips
				gm_dress_s[52] = 0
				minut += 10
				gs 'clothing', 'wear', 'gm_dress', 52
				KILLVAR '$lastwornclothingtype'
				KILLVAR 'lastwornclothingnumber'
				
				gs 'stat'
				!!need image
				'You quickly get into the car and take off your dress, and put on the dress the man gave you. You give your <<$titsize>> breasts a squeeze through the fabric, adjusting the dress a bit so it fits well around them for the photo shoot.'
				
				act 'Pose for the camera':
					*clr & cla
					kidalob = 1
					minut += 5
					gs 'stat'
					!!need image
					'You get out of the car leaving your possessions in there, figuring it''s easier to just collect them when you change back to your regular clothes. You get out and walk to the tree the camera is aimed at. The guy who hasn''t said a word mans the camera, while the first guy instructs you how to stand in several poses. "Very nice, very nice... now turn your back to the camera!" The camera clicks several times. "Excellent. Now tilt your head backwards and close your eyes." You do as instructed, waiting for the now familiar click of the camera. It never comes.'
					
					act 'Ask what''s taking so long':
						*clr & cla
						money = 0
						minut += 5
						if pcs_mood > 50: pcs_mood = 50
						gs 'stat'
						!!need image
						'After a while you turn around and open your eyes, wanting to ask the guys what''s taking so long. You open your eyes right on time to see the car, with the guys in it, speed off and zip around a corner. Then you realize: all your stuff is still on the back seat of the car! Slowly realizing you have just been scammed out of your good dress and all of your money, you sit down on a tree stump and hold your head in your hands for a minute or two, pondering how you could''ve been so stupid as to believe them.'
						
						act 'Return to the train station':gt $curloc
					end
				end
			end
		end
	exit
		
	end
end

if maidqw >= 1 and hour >= 16 and hour < 17:
    act 'Start your maid job':gt 'pav_hotel'
end

act 'Walk to the train station (0:03)': minut += 3 & gt 'pav_train_hall'
if transportVars['trainpass_day'] > daystart:
		func('transport_functions', 'display_trainpass_time')
	act 'Go direct to train station platforms': gt 'pav_train_hall', 'platform'
end
act 'Walk to the Commercial area (0:10)':minut += 10 & gt 'pav_commercial'
act 'Walk to the Residential area (0:15)':minut += 15 & gt 'pav_residential'
act 'Walk to the Industrial region (0:15)':minut += 15 & gt 'pav_industrial'
act 'Walk to the Five Eight estate (0:15)':minut += 15 & gt 'pav_complex', 'start'
act 'Walk to the highway (0:15)':minut += 15 & nroad = 20 & gt 'road'
act 'Walk to Pushkin (0:20)':minut += 20 & nroad = 19 & gt 'pushkin'

gs 'camera', 'check_location'

!-- Random prostitution solicitation check ------------------------ 
gs 'prostitution_functions', 'check_solicitation_event'

--- pav_market ---------------------------------

