# pav_residential

music_loop = 0
CLOSE ALL
$loc_arg = ''
$loc = 'pav_residential'
$menu_loc = 'pav_residential'
$menu_arg = ''
menu_off = 0
$location_type = 'public_outdoors'
killvar '$locclass'

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 & cla
litltown = 1
alkoblock = 0
boynumBlock = 0
gs 'stat'

!call random events from [street_events], and display them before show location.
if streetevent_hour + 2 < hour:gt'street_event','pav_residential', 'main'

'<center><h2>Pavlovsk</h2></center>'
if month >= 11 or month <= 3:
	if hour >= 8 and hour <= 21:
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pavreswinter.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pavreswintern.jpg"></center>'
	end
else
	if hour >= 8 and hour <= 21:
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pavres.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pavresn_'+ rand(1,2) +'.jpg"></center>' 
	end
end

'<br>The residential area of a provincial town in Russia that has a population of roughly 15,000 people. This area is suburban with more modern houses, dusty roads and pockets of overgrown vegetation stretching out far and wide, but some would say that just adds to the town''s rustic charm. Apart from the old <a href="exec:view''images/locations/pavlovsk/palace/pav_palace.jpg''">Imperial palace</a> built by Catherine the Great, with its surrounding gardens and forest, and the recently remodeled <a href="exec:view''images/locations/pavlovsk/fortress/bip_hotel.png''">Bip fortress</a> which is now a luxury hotel and restaurant.'
'<br>Even from here you can spot the <a href="exec:minut += 5 & gt ''ParChurch'',''start''">Church of St Nikolas</a>, the tallest building in town.'

gs'street_event','pav_residential', 'extras'

if flag_rape_1 = 1:
	flag_rape_1 = 0
	rape_count = rape
	'You stop under the dim light of a streetlight. Breathing heavy, you occasionally stop to wince from the pain coming from your pussy. You convince yourself not to tell anyone, and to just get home, clean up and go to bed as soon as possible. The sooner you do that, the sooner you can forget this ever happened.'
elseif flag_rape_1 = 2:
	flag_rape_1 = 0
	rape_count = rape
	'Coming out of your daze, you find yourself having walked into the center of town without even realizing it. You feel a bit strange as you stop to think about why you aren''t upset about having been raped. Replaying the encounter in your head, you realize you actually enjoyed it a bit. All in all, you''re not too worried about what happened.'
elseif rape > rape_count:
	!for normal rape. differ display with bimbolevel
	rape_count = rape
	if bimbolevel > 2:
		'You feel great after having sex, and don''t understand why they didn''t just ask. Silly man.'
	elseif bimbolevel > 0:
		'Coming out of your daze, you find yourself having walked into the center of town without even realizing it. You feel a bit strange as you stop to think about why you aren''t upset about having been raped. Replaying the encounter in your head, you realize you actually had fun and enjoyed it. All in all, you''re not too worried about what happened. '
	else
		'You stop under the dim light of a streetlight. Breathing heavy, you occasionally stop to wince from the pain coming from your pussy. You convince yourself not to tell anyone, and to just get home, clean up and go to bed as soon as possible. The sooner you do that, the sooner you can forget this ever happened.'
	end
end

if pav_slut >= 250 and rand(1, 10) = 10 and pav_residential_prost_day ! daystart:
	pav_residential_prost_day = daystart
	'A guy approaches you, and asks if you want to earn some money. He''s offering you 100 <b>₽</b> for a quick fuck in the bushes.'

	gs 'willpower', 'prostitution', 'resist'
	if will_cost <= pcs_willpwr:
		act 'Decline (<<will_cost>> Willpower)':
			gs 'willpower', 'pay', 'resist'
			gt 'pav_residential'
		end
	else
		act 'Decline (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
	end
	act 'Go with him': gs 'npcgeneratec', 0, 'Stranger at the Park', rand(18,45) & gs 'boyStat', $npclastgenerated & gt 'gevent', '5'
	exit
end

if AlbinaQW['AlbFatherQW']  >= 1 and AlbinaQW['ParkRally'] > 0:
	if AlbinaQW['ElectionCampaignTime'] = 0:AlbinaQW['ElectionCampaignTime'] = totminut + 2880
	'<br>You can see election posters on the walls all over town. They say: "Vote for Boris Barlovsky!" Wait a minute... isn''t that Albina''s father?</br>'
end

if AlbinaQW['ElectionCampaignTime'] > 0 and AlbinaQW['ElectionCampaignTime'] <= totminut and hour >= 14 and AlbinaQW['AlbFatherQW']  = 1:gt 'AlbFatherQW'

if rand(1, 5) >= 4 and pav_slut >= 150:
	if pav_slut < 200:
		'<br>You catch people staring at you intently, as if they''re supposed to know who you are but can''t quite remember why. You sincerely hope they don''t realize your promiscuous adventures are the reason why. The occasional person chuckling and pointing at you crushes those hopes, and you quickly keep walking before they get a chance to say anything.'
	elseif pav_slut < 250:
		'<br>People look at you with lewd grins on their faces, some of them even making vulgar gestures. Looks like they know what you''ve been up to.'
	else
		'<br>Everywhere you go, people recognize you as a whore. Some even come over and slap you on the ass, claiming they know you like it when they do, or claiming they want to sample your goods. An elderly woman sitting on a bench calls out to you, loudly calling you a slut and a whore. You hide your face and run away as fast as you can, before she can draw too much attention to you.'
	end
end

gs 'stat'

if car > 0 and cardrive = 20: 'Your <a href="exec:gs ''carF'', ''start''"><<$car>></a> is parked in the street.'

if fedorKozlovQW >= 20 and FedorKozHome = 1 or fedorKozlovQW = -15 and FedorKozHome = 1: '<br><a href="exec: minut += 5 & gt ''FedorEv4'', ''Home Entrance''">Fedor</a> lives in a house nearby.'

if hour >= 8 and hour <= 22:'<br>At the end of the street, there''s a small <a href="exec:$loc = ''pav_residential'' & gt ''kiosk'', ''start''">kiosk</a> selling a variety of items such as cigarettes, magazines, snacks, drinks and even themes for your phone.'

if StoryLine > 0:
	$schoolname = 'the <a href="exec: minut += 2 & gt ''gschool_grounds'', ''main''">local school</a>.'
else
	$schoolname = 'the local school.'
end	

'<br>In the center of Pavlovsk is the town square, which features the popular <a href="exec: minut += 2 & gt ''pav_commcenter''">community center</a>, a hotspot for the local teenagers to hangout at after a long day at <<$schoolname>></b> Connected to the town center is the old palace grounds which have now been turned into a large <a href="exec:minut += 5 & gt ''pav_park'', ''start''">public park</a>. With the <a href="exec: minut += 5 & gt ''glake''">lake</a> nearby, the area can get quite busy, especially during the summer and winter when people can swim or skate at the lake.'

*nl
!!made changes here, to remove direct links to the kids in the apartment complex, make sure this will work with the code left.
if Enable_tablemap = 0:
	if DimaBeHomeOnce = 1 and DimaRudeBlock = 0:'<a href="exec:minut += 10 & gt ''dimaHome'', ''home''">Dimka Nosov</a>, one of your classmates, lives in one of the fancier houses in town.'
	if IgorLoverQW > 0 and IdorBlock = 0:'<a href="exec:minut += 10 & gt ''IgorHome'', ''home''">Igor Kruglov</a>, one of your classmates, lives in one of the fancier houses in town.'
	if katjaFirstKiss >= 1 or mey_vika['mey_vika_qw'] >= 27 or mey_vika['key'] = 1: 'Large private house where the <a href="exec:minut += 10 & gt''mey_home'', ''door''">Meynold twins</a> live.'
	if LariskaHomeIn > 0: '<a href="exec:minut += 10 & gt ''LariskaHome'', ''front_door''">Lariska Gruzdev</a>, one of your classmates, lives about 10 minutes away from your parents.'
	if AlbinaQW['KnowsHouse'] > 0 or AlbinaQW['StarletsJoined'] = 1:'<a href="exec:minut += 10 & gt ''albinaporog''">Albina Barlovskaya</a>, one of your classmates, lives in one of the few luxurious mansions Pavlovsk has to offer.'
else
	st_count=0 & $show_table=''
	if DimaBeHomeOnce = 1 and DimaRudeBlock = 0:gs'show_table','Fancier house of <a href="exec:minut += 10 & gt ''dimaHome'', ''home''">Dimka Nosov</a>','3'
	if IgorLoverQW > 0 and IdorBlock = 0:gs'show_table','Fancier house of <a href="exec:minut += 10 & gt ''IgorHome'', ''home''">Igor Kruglov</a>', '3'
	if katjaFirstKiss >= 1 or mey_vika['mey_vika_qw'] >= 27 or mey_vika['key'] = 1: gs'show_table','House of the <a href="exec:minut += 10 & gt''mey_home'', ''door''">Meynold twins</a>','3'
	if LariskaHomeIn > 0:gs'show_table','House of <a href="exec:minut += 10 & gt ''LariskaHome'', ''front_door''" >Lariska Gruzdev</a> in the richer part of town','3'
	if AlbinaQW['KnowsHouse'] > 0 or AlbinaQW['StarletsJoined'] = 1:gs'show_table','Luxurious mansion of <a href="exec:minut += 10 & gt ''albinaporog''">Albina Barlovskaya</a>','3'
	if st_count > 0 :'<TABLE BORDER=1><<$show_table>></TR></TABLE>'
end
!!end of code changes.

if kanikuli = 0 and StoryLine > 0 and SchoolAtestat = 0 and SchoolBlock = 0 and week < 6 and hour >= 7 and hour < 9: act '<b>Go to school</b>': minut += 2 & gt 'gschool_grounds', 'main'

if InvitationToDimkaNYparty = 1 and month = 12 and day = 31 and hour > 14 and hour <= 18:
	act '<b>Go to the New Year''s party at Dimka''s house</b>': killvar 'InvitationToDimkaNYparty' & minut += 30 & gt 'sny', '3'
elseif InvitationToDimkaNYparty = 1 and month ! 12:
	killvar 'InvitationToDimkaNYparty'
end

act 'Walk to the Five Eight estate (0:02)':minut += 2 & gt 'pav_complex', 'start'
act 'Walk to the Commercial area (0:05)':minut += 5 & gt 'pav_commercial'
act 'Walk to the Industrial region (0:05)':minut += 5 & gt 'pav_industrial'

act 'Wait':gs 'obj_din', 'wait'

if (hour > 20 or hour < 4) and succubusQW = 5 and suchuntday ! daystart:
	act 'Go hunting near the community center (this can take a lot of time)':
		scrand = rand(0,4)
		minut += 60 - (5 * (succublvl + scrand))
		menu_off = 1
		gs 'stat'
		if rand(0,7) - succublvl < 2:
			gt 'succubus', 'pavResfeed'
		else
			cls
			gs 'stat'
			'<center><h2>Pavlovsk</h2></center>'
			if month >= 11 or month <= 3:
				if hour >= 8 and hour <= 21:
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pavreswinter.jpg"></center>'
				else
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pavreswintern.jpg"></center>'
				end
			else
				if hour >= 8 and hour <= 21:
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pavres.jpg"></center>'
				else
					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pavresn.jpg"></center>'
				end
			end
			'The disco is in full swing, which means a lot of adolescents going to and from the community center. You find a spot down the street from the community center to lie in wait for your prey.'
			'You hide for a few minutes watching groups of students pass you by as you wait for a lone victim to pounce on. You lie in wait for almost thirty minutes, thinking about the meal ahead, your hand finding its way between your legs a few times.'
			'This time you are unsuccessful and fail to find a suitable meal.'

			act 'Return': gt 'pav_residential'
		end
	end
end

if StoryLine ! 0 and (hour >= 8 or hour < 23) and cumloc[11] = 1 and rand(0, 3) = 0 and sosedday ! daystart:
	menu_off = 1
	*clr & cla
	sosedday = daystart
	gs 'stat'

	if sosedknow = 0:
		sosedknow = 1
		'As you walk through Pavlovsk, someone calls out to you "<<$pcs_nickname>>!" You turn around and see uncle Misha, your neighbor. He looks at your face in amazement, "Your face looks like a mess! What is that?"'
		'You blush and hesitate, trying to inconspicuously wipe the sperm off your face. It''s obviously not working; he already noticed. You see his eyes widen when he realizes what it is. "I see. Looks like you had fun", he grins as he continues on his way.'
	else
		'Once again you run into uncle Misha, your neighbor. He notices the sperm on your face: "Again? Looks like you''ve been busy, girl. Nice look, it suits you."'
	end
	act 'Continue':gt 'pav_residential'
	exit
end

if pcs_magik >= 1 and mainQW = 0 and altQS = 1:
	menu_off = 1
	*clr & cla
	mainQW = 1
	gs 'stat'
	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/lab/event/main.jpg"></center>'
	'At the entrance to the apartment building you see Tatiana and Juugo. Tatiana adjusts her glasses and looks around, while Juugo seems to have his head in the clouds not really paying attention to his surroundings. His tattoos are not visible.'
	'Tatiana closely looks around you: "I felt a burst of energy. Were you attacked by a magician?"'
	act 'No?':gt 'mainQW'

	exit
end

if storyline ! 0 and AndRev = 1 and (hour >=22 or hour <=2) and rand(1,100) >= 90 and AndRevstart ! daystart:
	menu_off = 1
	*clr & cla
	gs 'stat'
	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/lab/event/main.jpg"></center>'
	'It was late and you were hurrying to get home when you are suddenly grabbed from behind. A large hand covered your mouth and you cannot scream. A powerful arm wrapped around your arms and chest and lifted you from your feet. You are dragged into an alleyway between two buildings and the arm around you loosened for just a moment.'
	act 'Continue':
		*clr & cla
		'<center><img <<$set_imgh>> src="images/locations/city/citycenter/lab/event/main.jpg"></center>'
		'Before you could try to escape, you felt something sting your arm and you felt your body relax against your will. Just before your eyes closed and you lost consciousness, you heard a familiar voice rasp in your ear. "Now you''ll pay for breaking my nose, you little slut."'
		act 'Continue': gt 'boilerroom', 'start'
	end
end

!!if rand (0,2) ! 0:gs 'din_bad' & dynamic $mobile_check

if npc_QW['A113'] = 1 and daybelisex ! daystart and hour >= 9 and hour <= 23 and week = 7:
	menu_off = 1
	cla & *clr
	daybelisex = daystart
	minut += 5
	gs 'stat'
	
	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/vadim/belyjeep.jpg"></center>'
	'As you walk through Pavlovsk, Vadim Belys Mitsubishi Pajero stops near you.'

	act 'Go to the jeep': gt 'belgang', 'payday' 	
elseif npc_QW['A113'] = 1 and daybelisex ! daystart and hour >= 9 and hour <= 23 and week ! 7 and belgangPayWeek >= 300 and belgangProstitute = 1 and rand (0,2) = 0:
	menu_off = 1
	cla & *clr
	daybelisex = daystart
	minut += 5
	gs 'stat'
	
	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/vadim/belyjeep.jpg"></center>'
	'You see the by now familiar old Mitsubishi Pajero driving through the streets with Vadim Bely and his gang. Your heart skips a beat as you notice one of them pointing at you, and soon they pull over.'
		
	act 'Go to the jeep': gt 'belgang', 'workofdebt' 	
end


--- pav_residential ---------------------------------

