Переглянути джерело

Merge branch 'master' of https://git.catrenelle.com/Kevin_Smarts/glife

Gwen 4 роки тому
батько
коміт
b17a8bc5f4

+ 2 - 0
glife-notepad++

@@ -746,6 +746,8 @@
 			<File name="locations\ugel" />
 			<File name="locations\ugol" />
 			<File name="locations\ugol1" />
+			<File name="locations\unicoursework" />
+			<File name="locations\uniutil" />
 			<File name="locations\univer" />
 			<File name="locations\univer_din" />
 			<File name="locations\vann" />

+ 2 - 0
glife.qproj

@@ -913,6 +913,8 @@
 		<Location name="obroom"/>
 		<Location name="Vika"/>
 		<Location name="univer_din"/>
+		<Location name="unicoursework"/>
+		<Location name="uniutil"/>
 	</Folder>
 	<Folder name="Game 1">
 		<Location name="KGstart"/>

+ 5 - 2
locations/Cheatmenu_din.qsrc

@@ -1443,8 +1443,11 @@ $cheatmenu['documents'] = {
 	if SchoolAtestat = 0: '<a href="exec:SchoolAtestat = 1 & dynamic $cheatmenu[''documents'']">Get School Certificate</a>'
 	if storyline = 1 and SchoolAtestat = 0: '<font color="red"><b>WARNING!</b></font>: This will end your school year!' & *nl
 	if SchoolAtestat = 1:'Already have a School Certificate'
-	if diplom = 0:'<a href="exec:diplom = 1 & dynamic $cheatmenu[''documents'']">Get Diploma</a>'
-	if diplom = 1:'You already have a Diploma'
+	if func('uniutil', 'diploma', 'obtained'):
+		'You already have a Diploma'
+	else:
+		'<a href="exec:gs ''uniutil'', ''diploma'', ''set_obtained'' & dynamic $cheatmenu[''documents'']">Get Diploma</a>'
+	end
 	if secrdiplom = 0:'<a href="exec:secrdiplom = 1 & dynamic $cheatmenu[''documents'']">Get Secretarial Diploma</a>'
 	if secrdiplom = 1:'You already have a Secretarial Diploma'
 	if masseuse['certification'] < 10:'<a href="exec:masseuse[''certification''] = 10 & dynamic $cheatmenu[''documents'']">Get Masseuse Certificate</a>'

+ 3 - 18
locations/Komp.qsrc

@@ -15,7 +15,7 @@ if $ARGS[0] = 'start':
 
 	!!act 'SunReview of the Dead':gt 'KGZstart'
 
-	if student > 0 and kursovik < 100:'You should probably do some of your <a href="exec:gt ''komp'',''kursak''">coursework</a>.'
+	gs 'unicoursework', 'start', 'komp', 'brows'
 
 	if $loc = 'shulga_room' or $loc = 'anushapt' or $loc = 'artemhome':
 		internet_store = internet
@@ -37,6 +37,7 @@ end
 if $ARGS[0] = 'brows':
 	*clr & cla
 	gs 'stat'
+	menu_off = 0
 	
 	act 'Close the browser':
 		if $loc = 'shulga_room' or $loc = 'anushapt' or $loc = 'artemhome' or $loc = 'dachain':
@@ -81,7 +82,7 @@ if $ARGS[0] = 'brows':
 		if shantfoto > 0:act 'Find the girl you took photos of in the park on "Assbook"':gt 'komp', 'foto'
 		if gor_dorm = 7:act 'Read letter from Eugene':gt 'etoexhib', 'pos91'
 		if camwhore = 1 and $loc ! 'shulga_room' and $loc ! 'anushapt':act 'Go to MyFreeCams.org':gt 'komp', 'mfc'
-		if (storyline = 1 and SchoolAtestat = 0) or student > 0:act 'Spend time studying':gt 'komp', 'study'
+		if (storyline = 1 and SchoolAtestat = 0) or func('uniutil', 'student', 'enrolled'):act 'Spend time studying':gt 'komp', 'study'
 		if sucpcinfo = 0 and succubxp > 0: act 'Research the strange feelings you''ve been having': gt 'succubus', 'kompresearch'
 	end
 end
@@ -511,22 +512,6 @@ if $ARGS[0] = 'study':
 	act 'Leave this website':gt'komp','brows'
 end
 
-if $ARGS[0] = 'kursak':
-	*clr & cla
-	minut += 60
-	elektro += 3
-	internet -= 1
-	pcs_mood -= 10
-	compskl_exp += 1
-	kursovik = kursovik + rand(pcs_intel/20,pcs_intel/10)
-	if kursovik > 100:kursovik = 100
-	'<center><b>Coursework</b></center>'
-	'<center><img <<$set_imgh>> src="images/shared/accessories/computer/kursak.jpg"></center>'
-	'It may be boring, but it still needs doing! You spend an hour doing coursework, and <<kursovik>>% of it is now finished.'
-
-	act 'Leave this website':gt 'komp','brows'
-end
-
 if $ARGS[0] = 'agent':
 	*clr & cla
 	minut += 60

+ 2 - 2
locations/MartinTalk.qsrc

@@ -539,7 +539,7 @@ if $ARGS[0] = '':
 			end
 		end
 		
-		if student > 0: 
+		if func('uniutil', 'student', 'enrolled'): 
 			act '"I''m a university student"':
 				cla
 				'"I''m going to university," you say, your voice somewhere between pride and shame: Pride over the privilege of receiving a higher education, and shame in the face of thinking of yourself as ''privileged'' while talking to Martin, who you think didn''t have that option... or did he?'
@@ -927,7 +927,7 @@ if $ARGS[0] = 'MartinTalkApartment':
 		'Martin laughs. "Well, you definitely make it sound complicated. Good for you. But," he turns serious once more, "nothing like that is ever truly ''free'', so... be careful."'
 		$OpenInnerThought+'He wouldn''t be Martin if he didn''t tell me to "watch out" at least once a day,'+$CloseInnerThought+' you think and roll your eyes, but still nod yes at him before he has to get back to work.'
 	
-	elseif student > 0:
+	elseif func('uniutil', 'student', 'enrolled'):
 		'"I have a room in one of the university dormitories, actually. I wouldn''t call it ''living'', though."'
 		*nl
 		'"Oh, so you''re a student, too?"'

+ 1 - 16
locations/bedrPar.qsrc

@@ -174,22 +174,7 @@ act 'Exit the room':
 	gt'korrPar'
 end
 
-if student > 0 and kursovik < 100:
-	act 'Do coursework (1:00)':
-		*clr & cla
-		menu_off = 1
-		minut += 60
-		kursovik += rand(pcs_intel / 20, pcs_intel / 10)
-
-		if kursovik > 100:kursovik = 100
-
-		pcs_mood -= 10
-		'<center><img <<$set_imgh>> src="images/pc/activities/study.jpg"></center>'
-		'You sit down at the desk and do your coursework. You''ve finished <<kursovik>> percent of it.'
-
-		act 'Leave your desk':gt $curloc
-	end
-end
+gs 'unicoursework', 'start', $curloc
 
 if pornMagazine > 0:'You have hidden your porn magazines under the mattress of your bed.'
 !!Masturbation, allowed after sister threesome (when sis_watch is used for a message) or sister not here.

+ 6 - 2
locations/cikl.qsrc

@@ -1196,7 +1196,11 @@ if day = 25:
 		'<b><font color="green">Your husband has paid <<huspay>> <b>₽</b> into your bank account.</font></b>'
 	end
 
-	if stipuha = 1 and stipuhaday = 0:stipuhaday = 1 & karta += 1200 & '<b><font color="green">You have received 1,200 <b>₽</b> scholarship.</font></b>'
+	if func('uniutil', 'scholarship' , 'is_active') and scholarshipday = 0:
+		scholarshipday = 1
+		karta += func('uniutil', 'scholarship', 'get')
+		'<b><font color="green">You have received '+func('uniutil', 'scholarship', 'get')+' <b>₽</b> from your scholarship.</font></b>'
+	end
 
 	! Utilities for all apartments.
 	if (home_owned[1] = 1 or home_owned[1] = 2 or home_owned[4] > 0 or home_owned[5] = 2) and electroday = 0:
@@ -1255,7 +1259,7 @@ if day ! 25:
 	if (home_owned[1] = 1 or home_owned[4] > 0) and haday = 1:haday = 0
 	if (home_owned[1] > 0 or home_owned[4] > 0 or home_owned[5] = 2) and electroday = 1:electroday = 0
 	if (home_owned[1] > 0 or home_owned[4] > 0 or home_owned[5] = 3) and kabel > 0 and kabelday = 1:kabelday = 0
-	if stipuhaday = 1:stipuhaday = 0
+	if scholarshipday = 1:scholarshipday = 0
 	if nopaytanwork = 1:nopaytanwork = 0
 	if nopaypoly = 1:nopaypoly = 0
 	if nopaysalon = 1:nopaysalon = 0

+ 3 - 1
locations/city_industrial_train.qsrc

@@ -57,7 +57,9 @@ if $ARGS[0] = 'outside':
 	if rand(1,100) > 70:
 		'You see a <a href="exec:gt ''etoexhib'',''pos54''">suspicious character</a>.'
 		!fakes use 2 for aware of need for, 1 for have, otherwise 0
-		if fakepassport = 2 or fakediplom = 2: 'When you pass by the suspicious character, he whispers to you: "I have what you want, miss"'
+		if fakepassport = 2 or func('uniutil', 'fake_diploma', 'aware_needed'):
+			'When you pass by the suspicious character, he whispers to you: "I have what you want, miss"'
+		end
 	end
 
 	act 'Go to the city industrial region': minut += 15 & gt'city_industrial'

+ 2 - 2
locations/city_island.qsrc

@@ -38,7 +38,7 @@ end
 
 !call random events from [street_events], and display them before show location.
 gs'street_event','city_island' & if streetrand = -1:exit
-if student > 0:act '<b>GO HOME</b> (University dorm)':gt 'dorm', 'start'
+if func('uniutil', 'student', 'enrolled'):act '<b>GO HOME</b> (University dorm)':gt 'dorm', 'start'
 
 if car > 0 and cardrive = 25:'In the parking stands your <a href="exec:GS ''carF'', ''start''"><<$car>></a>.'
 
@@ -67,7 +67,7 @@ if week < 6 and hour >= 7:
 else
 	'The University is closed. It''s open during the week from 07:00.'
 end
-if student > 0 or hour >= 6:'The <a href="exec:gt ''dorm'', ''start''">University dorms</a> offers small, but cheap, living space, for university students.'
+if func('uniutil', 'student', 'enrolled') or hour >= 6:'The <a href="exec:gt ''dorm'', ''start''">University dorms</a> offers small, but cheap, living space, for university students.'
 
 
 

+ 62 - 62
locations/city_park.qsrc

@@ -28,26 +28,26 @@ if $ARGS[0] = 'start':
 	gs 'stat'
 	'<center><b><font color="maroon">Park</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/centralpark/park.jpg"></center>'
-	'The central park is huge, sandy paths spread out in every direction and every so often you''ll find a bench to sit on. In the summer you''ll see a lot people playing ball, relaxing or have a picnic in the more open areas, while in the winter you''ll meet families with their children sledding down the grass banks.'
+	'The central park is huge. Sandy paths spread out in every direction, and every so often you''ll find a bench to sit on. In the summer, you''ll see a lot people playing ball, relaxing, or have a picnic in the more open areas, while in the winter you''ll meet families with their children sledding down the grass banks.'
 	'Despite its almost paradise-like appearance, the park can be very dangerous once the sun goes down.'
 	*nl
-	'There is a sign that points into general direction of the city center. You estimate the walk to the city center would take 35 minutes.'
-	'The second sign points into the direction of the residential area. If you have to guess, the walk to the residential are should take 20 minutes.'
-	'The third sign says city industrial district on it. You know the city industrial District is rather far away from here, you estimate that the walk would take an hour.'
+	'There is a sign that points in the general direction of the city center. You estimate the walk to the city center would take 35 minutes.'
+	'The second sign points in the direction of the residential area. If you had to guess, the walk to the residential are should take 20 minutes.'
+	'The third sign says city industrial district on it. You know the city industrial District is rather far away from here. You estimate that the walk would take an hour.'
 	*nl
-	if hour >= 10 and hour <= 22:'The small café in the park is open, you could sit there and have some food.'
+	if hour >= 10 and hour <= 22:'The small café in the park is open. You could sit there and have some food.'
 
-	if SNarkPriton = 0:'Near the cafe the <a href="exec: gt ''city_park'', ''junkies''">junkies</a> hang out.'
+	if SNarkPriton = 0:'Near the cafe, the <a href="exec: gt ''city_park'', ''junkies''">junkies</a> hang out.'
 
 	if hour >= 9 or hour <= 20:
-		'There is an all year <a href="exec:gt ''city_park'', ''luna''">fair</a> at the park which you can visit.'
+		'There is an all year <a href="exec:gt ''city_park'', ''luna''">fair</a> at the park, which you can visit.'
 	else
-		'There is an all year fair at the park but it is closed. Opening hours from 9:00 to 21:00.'
+		'There is an all year fair at the park, but it is closed. Opening hours from 9:00 to 21:00.'
 	end
 
 	if car > 0 and cardrive = 5:
 		cardrive = 5
-		'Stands near the park <a href="exec:GS ''carF'', ''start''">your <<$car>></a>.'
+		'<a href="exec:GS ''carF'', ''start''">Your <<$car>></a> is parked nearby.'
 	end
 
 	if $pantyworntype = 'none' and PCloSkirt > 2 and hour > 6 and hour <= 20 and rand(0, 100) >= 80:
@@ -57,13 +57,13 @@ if $ARGS[0] = 'start':
 		if pcs_inhib >= 35:
 			gs 'exhibitionism', 2
 			pcs_mood += 5
-			'"Nope!" you call back. "Just remembered not to!" You flip up the back of your skirt, flashing your ass at him and keep walking, a bit of a spring in your step.'
+			'"Nope!" you call back. "Just remembered not to!" You flip up the back of your skirt, flashing your ass at him, and keep walking, a bit of a spring in your step.'
 		elseif pcs_inhib > 30:
 			inhib_exp += 1
-			'"Nah, just didn''t feel like it," you shrug and continue on your way.'
+			'"Nah, just didn''t feel like it" you shrug and continue on your way.'
 		else
 			pcs_mood -= 5
-			'You blush with shame and you try to walk out of his sight as fast as possible.'
+			'You blush with shame and try to walk out of his sight as fast as possible.'
 		end
 	end
 
@@ -74,15 +74,15 @@ if $ARGS[0] = 'start':
 	gs 'treeCircEntry', 'CentralPark'
 
 	if hour >= 10 and hour <= 22:
-		act 'Have some food in the cafe': minut += 5 & gt 'ParkKafe', 'start'
+		act 'Have some food in the café': minut += 5 & gt 'ParkKafe', 'start'
 	end
 
 	if hour >= 20 or hour < 6 :
-		if home_owned[1] = 0 and tanwork = 0 and student = 0:
+		if home_owned[1] = 0 and tanwork = 0 and func('uniutil', 'student', 'not_enrolled'):
 			!nowhere to live in city
-			'It''s quite dark now, and you have no where to stay nearby. Maybe you should try to sleep on a bench?'
+			'It''s quite dark now, and you have nowhere to stay nearby. Maybe you should try to sleep on a bench?'
 		else
-			'It''s quite dark now, and you don''t feel like walking. Maybe you Should try to sleep on a bench?'
+			'It''s quite dark now, and you don''t feel like walking. Maybe you should try to sleep on a bench?'
 		end
 		act 'Sleep on a bench': gt'placer_sex','sleeping_park_bench'
 	end
@@ -106,7 +106,7 @@ if $ARGS[0] = 'start':
 				else
 					money -= palelady * 360
 					dur += palelady
-					'You get out your purse and pay him quickly, hoping nobody else saw you giving him money. Then he passes you the doses you''ve paid for and you can savely sniff the stuff at home.'
+					'You get out your purse and pay him quickly, hoping nobody else saw you giving him money. He passes you the doses you''ve paid for. You can safely sniff the stuff at home.'
 				end
 
 				act 'Casually walk away':gt 'city_park', 'start'
@@ -126,13 +126,13 @@ if $ARGS[0] = 'start':
 			gs 'sweat', 'add', 5
 			'<center><b><font color="maroon">Park</font></b></center>'
 			'<center><img <<$set_imgh>> src="images/locations/shared/park/parkbeg.jpg"></center>'
-			'You randomly take the paths, you run them up and down and about an hour later, you are out of breath and heavily sweating.'
+			'You choose paths randomly, running them up and down, and about an hour later, you are out of breath and heavily sweating.'
 
 			if hour >= 20:
 				parkrand = rand(0, 10)
 
 				if parkrand >= 8:
-					'A shade steps out of the shadow from a tree and runs up to you. Before you can react, he hits you and drags you into the bushes. "Relax and enjoy this", he says.'
+					'A man steps out of the shadow of a tree and runs up to you. Before you can react, he grabs you and starts dragging you into the bushes. "Relax and enjoy this", he says.'
 					gs 'npcgeneratec', 0, 'Rapist', rand(18,40)
 					gs 'boyStat', $npclastgenerated
 					act 'Fight':
@@ -158,7 +158,7 @@ if $ARGS[0] = 'start':
 
 			act 'Finish your run':
 				cla & *nl
-				'You feel great after your run. A bit sweaty, but also that you''ve managed to improve your stamina as you even feel a bit slimmer.'
+				'You feel great after your run. You''re a bit sweaty, but you''ve managed to improve your stamina, and you even feel a bit slimmer.'
 				act 'Continue': gt 'city_park', 'start'
 			end
 			
@@ -221,7 +221,7 @@ if $ARGS[0] = 'start':
 					minut += 30
 					pcs_mood -= 5
 					*nl
-					'No luck! After searching for half an hour, you find no one. For such a large city you would have thought there would be suitable prey around, your needs remain so maybe another search will be required?'
+					'No luck! After searching for half an hour, you find no one. For such a large city, you would have thought there would be more suitable prey around. Your needs remain, so maybe another search will be required?'
 					act 'Continue': gt 'city_park', 'start'
 				else
 					suchunt = 1 & gt 'park_walkevents', '1'
@@ -290,7 +290,7 @@ if $ARGS[0] = 'luna':
 	gs 'stat'
 	'<center><b><font color="maroon">The Fun Fair</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/centralpark/luna.jpg"></center>'
-	'The fun fair sits in the hearts of the park and attracts families, people on a vacation and loving couples from all over the town. It''s a popular gathering spot and a place to forget your worries for a few hours.'
+	'The fun fair sits in the heart of the park and attracts families, people on vacation, and loving couples from all over the town. It''s a popular gathering spot and a place to forget your worries for a few hours.'
 	*nl
 	'Opening hours are 9:00 to 21:00'
 
@@ -306,7 +306,7 @@ if $ARGS[0] = 'luna':
 			money += 50
 			pcs_mood -= 5
 			'<center><img <<$set_imgh>> src="images/locations/shared/park/flaer.jpg"></center>'
-			'For an hour straight, you walked through the park and the fun fair, chatting up random visitors and trying to give them one of your flyers. After that you are being paid 50 <b>₽</b> for your effort.'
+			'For an hour straight, you walk through the park and the fun fair, chatting up random visitors and trying to give them one of your flyers. After that, you are paid 50 <b>₽</b> for your effort.'
 
 			act 'Move away':gt 'city_park', 'luna'
 		end
@@ -358,7 +358,7 @@ if $ARGS[0] = 'luna':
 
 				pcs_mood += 10
 				'<center><img <<$set_imgh>> src="images/locations/city/centralpark/karusel.jpg"></center>'
-				'You paid 50 <b>₽</b> and sat in the carousel.'
+				'You pay 50 <b>₽</b> and sit in the carousel.'
 				'You have a great ride, already dazzled.'
 
 				act 'Move away':gt 'city_park','luna'
@@ -372,7 +372,7 @@ if $ARGS[0] = 'luna':
 				minut += 30
 				money -= 100
 				'<center><img <<$set_imgh>> src="images/locations/city/centralpark/tir.jpg"></center>'
-				'You paid 100 <b>₽</b> for ten bullets. If you are able to hit all targets, you can win a teddy bear.'
+				'You pay 100 <b>₽</b> for ten bullets. If you are able to hit all ten targets, you win a teddy bear.'
 
 				act 'Shoot':
 					cla
@@ -383,27 +383,27 @@ if $ARGS[0] = 'luna':
 					if tirand >= 80:
 						mishka += 1
 						pcs_mood += 5
-						'You hit all targets and didn''t even miss once. Congratulations! You''ve won a Teddy Bear.'
-					elseif tirand < 80 and tirand >= 70:
-						'Oh, you''ve only missed once.'
-					elseif tirand < 70 and tirand >= 60:
-						'You were able to hit the target eight times, but you''ve missed twice.'
-					elseif tirand < 60 and tirand >= 50:
-						'You were able to hit the target seven times, but you''ve missed three times.'
-					elseif tirand < 50 and tirand >= 40:
-						'Six times you were able to hit the target, but you''ve missed four times.'
-					elseif tirand < 40 and tirand >= 30:
-						'Five times you were able to hit the target, but you''ve missed five times too.'
-					elseif tirand < 30 and tirand >= 25:
-						'Four times you were able to hit the target, but you''ve missed six times.'
-					elseif tirand < 25 and tirand >= 20:
-						'Three times you were able to hit the target, but you''ve missed seven times.'
-					elseif tirand < 20 and tirand >= 15:
-						'You were able to hit the target twice, but you''ve missed it eight times.'
-					elseif tirand < 15 and tirand >= 10:
-						'You were only able to hit the target once and missed it nine times.'
-					elseif tirand < 10:
-						'You couldn''t even hit the target once.'
+						'You hit all targets and don''t even miss once. Congratulations! You''ve won a Teddy Bear.'
+					elseif tirand >= 70:
+						'Oh, you only miss once.'
+					elseif tirand >= 60:
+						'You are able to hit eight targets, but you miss twice.'
+					elseif tirand >= 50:
+						'You are able to hit seven targets, but you miss three times.'
+					elseif tirand >= 40:
+						'You are able to hit six targets, but you miss four times.'
+					elseif tirand >= 30:
+						'You are able to hit five targets, but you miss five times too.'
+					elseif tirand >= 25:
+						'You are able to hit four targets, but you miss six times.'
+					elseif tirand >= 20:
+						'You are able to hit three targets, but you miss seven times.'
+					elseif tirand >= 15:
+						'You are able to hit the target twice, but you miss eight times.'
+					elseif tirand >= 10:
+						'You are only able to hit one target and miss nine times.'
+					else:
+						'You can''t even hit one target.'
 					end
 
 					shoot_lvl += 1
@@ -418,7 +418,7 @@ if $ARGS[0] = 'luna':
 				*clr & cla
 				menu_off = 1
 				'<center><img <<$set_imgh>> src="images/locations/city/centralpark/silomer.jpg"></center>'
-				'You''ve paid 20 <b>₽</b> to play Ring-The-Bell.'
+				'You pay 20 <b>₽</b> to play Ring-The-Bell.'
 
 				act 'Bump':
 					cla
@@ -453,7 +453,7 @@ if $ARGS[0] = 'avtomat':
 	menu_off = 1
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/centralpark/avtomat.jpg"></center>'
-	'The rules of the game are very simple, throw 5 <b>₽</b> into the slot, pull the lever and with a bit of luck you can win the jackpot of 1.000 <b>₽</b>.'
+	'The rules of the game are very simple: throw 5 <b>₽</b> into the slot and pull the lever. With a bit of luck, you can win the jackpot of 1,000 <b>₽</b>.'
 
 	if money >= 5 and hour <= 20:
 		act 'Throw in 5 <b>₽</b> and pull the lever':gt 'city_park', 'avtomat2'
@@ -474,17 +474,17 @@ if $ARGS[0] = 'avtomat2':
 	if avtrand = 100:
 		money += 1000
 		'Jackpot! You win 1,000 <b>₽</b>.'
-	elseif avtrand < 100 and avtrand >= 95:
+	elseif avtrand >= 95:
 		money += 100
 		'You win 100 <b>₽</b>.'
-	elseif avtrand < 95 and avtrand >= 85:
+	elseif avtrand >= 85:
 		money += 10
 		'You win 10 <b>₽</b>.'
-	elseif avtrand < 85 and avtrand >= 75:
+	elseif avtrand >= 75:
 		money += 5
 		'You win 5 <b>₽</b>.'
-	elseif avtrand < 75:
-		'Unfortunately, you weren''t able to win anything this time.'
+	else:
+		'Unfortunately, you didn''t win anything this time.'
 	end
 
 	act 'Try your luck once more':gt 'city_park', 'avtomat'
@@ -504,10 +504,10 @@ if $ARGS[0] = 'whore':
 		'Along the roadside <a href="exec:gt ''prostitute'', ''start''">Prostitutes</a> are walking and sometimes picked up by a car.'
 	elseif hour >= 4 and hour < 16:
 		'<center><img <<$set_imgh>> src="images/locations/city/centralpark/glpark.jpg"></center>'
-		'Cars passing on the road past the park and there is not seen nothing interesting.'
+		'Cars pass by, but there is nothing interesting to see at this time of day.'
 	else
 		'<center><img <<$set_imgh>> src="images/locations/city/centralpark/park1.jpg"></center>'
-		'Cars drive on the road past the park and then not see anything interesting.'
+		'Cars pass by, but there is nothing interesting to see at this time of day.'
 	end
 
 	temp = rand(1, 10)
@@ -541,7 +541,7 @@ if $ARGS[0] = 'prost':
 		act 'Talk':
 			cla
 			whoreQW = 2
-			'You went to a prostitute and asked her how things are done here at all. She began to explain. "We are free, do not work on anyone, but because of this many problems. Svimi Stella with her friends sometimes beat us and rob and sometimes come petty thugs and rob us of the money. If you want to work here, you have to pay and Stella and Bandyuk . course you cool, you can try to besiege Stella and her friends, but the bandits do not advise contact. And yet, you do not peck on customers, if you nebudesh dressed like a slut, you can buy some clothes in a sex shop. "'
+			'You walk up to a prostitute and ask her how things are done here. She begins to explain. "We are free, do not work on anyone, but because of this many problems. Svimi Stella with her friends sometimes beat us and rob and sometimes come petty thugs and rob us of the money. If you want to work here, you have to pay Stella and Bandyuk. Course you cool, you can try to besiege Stella and her friends, but the bandits do not advise contact. And yet, you do not peck on customers, if you nebudesh dressed like a slut, you can buy some clothes in a sex shop. "'
 
 			act 'Move away':gt 'city_park', 'prost'
 		end
@@ -664,14 +664,14 @@ if $ARGS[0] = 'rape1':
 	SUB += 3
 	money = 0
 	'<center><img <<$set_imgh>> src="images/locations/city/centralpark/sex/rape.jpg"></center>'
-	'Suddenly, you are hit on the head. You wake up sometime later in a bush. Somehow you''re not able to move your arms, they must be tied up. As you look down at yourself, you realize that you''re not wearing anything and before you can even react some dude is ramming his dick into your cunt. "Shit", you think yourself, "I''m being raped."'
+	'Suddenly, you are hit on the head. You wake up sometime later in a bush with some guy holding you firmly in place. As you look down at yourself, you realize that you''re not wearing anything, but before you can even react to that, the man rams his dick into your cunt. "Shit", you think to yourself, "I''m being raped."'
 	gs 'arousal', 5, 'vaginal', 'rape'
 
 	act 'Try to resist':
 		cla
 		spafinloc = 0
 		gs 'cum_manage'
-		'You try everything that''s possible in your situation right now to resist him, but he just tightens his grips and doesn''t stop fucking you. Some time later he begins to groan and you can feel his hot cum flowing inside your pussy. You just hope to yourself, that he didn''t impregnate you. He then zips up his pants, takes your money and leaves.'
+		'You try everything that''s possible in your situation to resist him, but he just tightens his grip and doesn''t stop fucking you. Some time later, he begins to groan and you feel his hot cum flowing inside your pussy. You just hope to yourself that he didn''t impregnate you. He then zips up his pants, takes your money, and leaves.'
 		gs 'arousal', 15, 'vaginal', 'rape', 'rough'
 		gs 'arousal', 'end'
 
@@ -684,7 +684,7 @@ if $ARGS[0] = 'rape1':
 		stat['anal'] += 1
 		SUB += 5
 		'<center><img <<$set_imgh>> src="images/locations/city/centralpark/sex/rapean.jpg"></center>'
-		'It doesn''t take long for the rapist to realize you''re not resisting. "Good girl!", he says to you. He pushes you onto your knees, seems he intends to take you doggy-style. He spreads your buttocks and pushes his cock into your ass. You cry out in pain, but he holds your mouth shut and doesn''t stop fucking your asshole.'
+		'It doesn''t take long for the rapist to realize you''re not resisting. "Good girl!", he says to you. He pushes you onto all fours so that he can take you doggy-style. He spreads your buttocks and pushes his cock into your ass. You cry out in pain, but he holds your mouth shut and doesn''t stop fucking your asshole.'
 		gs 'arousal', 15, 'anal', 'rape'
 
 		act 'Go on':
@@ -696,9 +696,9 @@ if $ARGS[0] = 'rape1':
 			gs 'cum_manage'
 			SUB += 5
 			'<center><img <<$set_imgh>> src="images/locations/city/centralpark/sex/cum.jpg"></center>'
-			'"Give me a blowjob and you''ll get your reward for not resisting, girl.", he tells you. You nod obidiently and move on your knees and begin to give him head.'
+			'"Give me a blowjob and you''ll get your reward for not resisting, girl.", he tells you. You nod obediently, pull yourself up onto your knees, and begin to give him head.'
 			gs 'arousal', 15, 'bj', 'rape'
-			'It doesn''t take long for him to groan out in pleasure, "You better swallow it all, slut!" Shortly after that you can taste his hot cum inside your mouth and you swallow every drip of it, somehow enjoying the taste. Then he stand up, buttons up his pants and takes your money. While you were still liking your fingers clean from any drips of cum, he smiles and says to you, "Have a nice day slut."'
+			'It doesn''t take long for him to groan out in pleasure, "you better swallow it all, slut!" Shortly after that, you taste his hot cum inside your mouth. You swallow every drop of it, somehow enjoying the taste. While you are doing this, he stands up, buttons up his pants, takes your money, and begins to leave. Turning to you one last time, he smiles and says "have a nice day slut."'
 			gs 'arousal', 'end'
 
 			act 'Stand up and leave':gt 'city_park', 'start'
@@ -710,7 +710,7 @@ if $ARGS[0] = 'junkies':
 	*clr & cla
 	gs 'stat'
 	SNarkPriton = 1
-	'The junkies look at you with a daunted gaze. They probably thought you are a police officer. Then one of them said, "We don''t sell no drugs. Go to the Drug House, ye can get zome there."'
+	'The junkies look at you with an apprehensive gaze. They probably think you are a police officer. Then one of them says, "we don''t sell no drugs. Go to the Drug House, ye can get zome there."'
 
 	act 'Walk away from them':gt 'city_park', 'start'
 end

+ 3 - 3
locations/dorm.qsrc

@@ -18,7 +18,7 @@ if $ARGS[0] = 'start':
 		gt 'city_island'
 	end
 	
-	if student = 0:
+	if func('uniutil', 'student', 'not_enrolled'):
 		menu_off = 1
 		'Since you''re not attending the University, you''re not allowed to enter unless you''re visiting someone you know.'
 		act 'Leave': minut += 5 & gt 'city_island'
@@ -32,7 +32,7 @@ if $ARGS[0] = 'start':
 		if gosh > 0 and hour >= 8 and hour < 22:
 			act 'I''m here to visit Gosha':
 				*clr & cla
-				'You say that you''re here to visit Gosha. The janitor chuckles and says "Gosha''s new bitch? What you sluts see in that scrawny bastard, I''ll never understand. He''s already been through half of the dorm already. Heh, go to your stud, bitch."'
+				'You say that you''re here to visit Gosha. The janitor chuckles and says "Gosha''s new bitch? What you sluts see in that scrawny bastard, I''ll never understand. He''s been through half of the dorm already. Heh, go to your stud, bitch."'
 				reccoldorm = 1
 				goshiflag = 1
 				act 'Enter':gt 'dorm', 'korr'
@@ -79,7 +79,7 @@ if $ARGS[0] = 'korr':
 		gt 'vann', 'start'
 	end
 
-	if student > 0:
+	if func('uniutil', 'student', 'enrolled'):
 		if courtletter_date <= daystart and courtletter_date ! 0:
 			gt 'sentence', 'letter'
 		end

+ 17 - 18
locations/etoexhib.qsrc

@@ -767,12 +767,9 @@ if $ARGS[0] = 'pos19' or $ARGS[0] = '':
 				gs 'stat'
 				'<center><b><font color="maroon">Personnel department</font></b></center>'
 				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/altschool/ptu_cadr.jpg"></center>'
-				'"Hello!" Welcomes the Human Relations employee. She tells you that they need a certified teacher. Working days are Monday to Saturday from 14.00 to 16.00. The pay is 300 <b>₽</b> per day, plus a room in a hostel. The terms of the contract say that, because of a full salary, at the moment, there is no free meals. There is a strict dress code, it must be business atire. Also it is not recommended for women to have bright makeup or a strong perfume.'
+				'"Hello!" Welcomes the Human Relations employee. She tells you that they need a certified teacher. Working days are Monday to Saturday from 14:00 to 16:00. The pay is 300 <b>₽</b> per day, plus a room in a hostel. The terms of the contract say that, because they pay a full salary, at the moment there are no free meals. There is a strict dress code: business attire is required. Also, it is not recommended for women to have bright makeup or strong perfume.'
 
-				if diplom = 0 and fakediplom < 0:
-					'You are told that you can not take the job without a diploma of higher pedagogical education.'
-					fakediplom = 2
-				elseif diplom = 1 or fakediplom = 1:
+				if func('uniutil', 'appear_to_have_graduated'):
 					act 'Pass an interview for a job':
 						cla
 						*clr
@@ -780,7 +777,7 @@ if $ARGS[0] = 'pos19' or $ARGS[0] = '':
 						gs 'stat'
 						'<center><b><font color="maroon">Human Resource Department</font></b></center>'
 						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/altschool/ptu_cadr.jpg"></center>'
-						'You have passed the oral interview, left a copy of your diploma and other documents to the personnel department, where you are told that you can start working.'
+						'After passing the oral interview, you leave a copy of your '+iif(func('uniutil', 'diploma', 'obtained'), '', 'forged ')+'diploma and other documents with the personnel department, who tell you that you can start working.'
 
 						act 'Become a teacher':
 							cla
@@ -791,6 +788,9 @@ if $ARGS[0] = 'pos19' or $ARGS[0] = '':
 							act 'Exit to Hall':gt 'etoexhib', 'pos19'
 						end
 					end
+				else:
+					'You are told that you cannot take the job without a diploma from an institute of higher education.'
+					gs 'uniutil', 'fake_diploma', 'set_aware_needed'
 				end
 
 				act 'Exit to Hall':gt 'etoexhib', 'pos19'
@@ -1681,19 +1681,18 @@ if $ARGS[0] = 'pos54':
 	gs 'stat'
 
 	'<center><img <<$set_imgh>> src="images/locations/shared/train/spy.jpg"></center>'
-	'A suspicious man. He constantly looks around. Occasionally, some people approach him and leave with papers. After looking carefully, you understand, he sells gas station checks and forged documents. It''s possible and you could find something useful.'
+	'A suspicious man. He constantly looks around. Occasionally, some people approach him and leave with papers. After looking carefully, you understand: he sells gas station checks and forged documents. It''s possible you could find something useful.'
 
-	if fakepassport = 2 or fakediplom = 2:
+	if fakepassport = 2:
 		!only notify player 1 time after events triggered
-		if fakepassport = 2:
-			fakepassport = 0
-			'He tells you "A passport with a fake age will cost you 30,000 <b>₽</b>"'
-		end
+		fakepassport = 0
+		'He tells you "A passport with a fake age will cost you 30,000 <b>₽</b>"'
+	end
 
-		if fakediplom = 2:
-			fakediplom = 0
-			'He tells you "A diploma of bachelor degree will cost you 100,000 <b>₽</b>"'
-		end
+	if func('uniutil', 'fake_diploma', 'aware_needed'):
+		!only notify player 1 time after events triggered
+		gs 'uniutil', 'fake_diploma', 'reset'
+		'He tells you "A diploma for a bachelor''s degree will cost you 100,000 <b>₽</b>"'
 	end
 
 	act 'Leave': gt 'city_industrial_train', 'outside'
@@ -1716,13 +1715,13 @@ if $ARGS[0] = 'pos54':
 		end
 	end
 
-	if diplom = 0 and fakediplom ! 1:
+	if func('uniutil', 'appear_to_have_graduated') = 0:
 		if money => 100000:
 			act 'Buy fake diploma (100,000 <b>₽</b>)':
 				*clr & cla
 				minut += 10
 				money -= 100000
-				fakediplom = 1
+				gs 'uniutil', 'fake_diploma', 'set_obtained'
 
 				'<center><img <<$set_imgh>> src="images/locations/shared/train/spy.jpg"></center>'
 				'You bought a fake diploma.'

+ 1 - 7
locations/korr.qsrc

@@ -166,15 +166,9 @@ if BurgerQW['IvanQW']  = 3 and hour >= 9 and hour <= 20:
 			worksalon =0
 			tanwork =0
 			workSec =0
-			stipuha =0
 			preg = 0
 			young_shop_work = 0
-			student = 0
-			kurs = 0
-			semestr = 0
-			abiturient = 0
-			stipuha = 0
-			lektor = 0
+			gs 'uniutil', 'student', 'unenroll'
 			gs 'stat'
 
 			'Time drags on slowly. Your life and work are tedious and monotonous. You''ve been sewing for five years, having meals in the dining room and going to sleep in the barracks surrounded by other female inmates. 1,000 <b>₽</b> of your 2,000 <b>₽</b> per month salary goes towards your debt repayment. As slow as it seems, time does not stand still and your torment finally comes to an end. You are released and given 2,000 <b>₽</b>. You board the train and come back to the city.'

+ 1 - 7
locations/korr2x.qsrc

@@ -135,15 +135,9 @@ if BurgerQW['IvanQW']  = 3 and hour >= 9 and hour <= 20:
 			worksalon = 0
 			tanwork = 0
 			workSec = 0
-			stipuha = 0
 			preg = 0
 			young_shop_work = 0
-			student = 0
-			kurs = 0
-			semestr = 0
-			abiturient = 0
-			stipuha = 0
-			lektor = 0
+			gs 'uniutil', 'student', 'unenroll'
 			gs'stat'
 			'Time dragged on for a long time. Your life and work in prison was tedious and monotonous. You sewed quilted jackets, had dinner in the cafeteria and went to sleep in the barracks surrounded by other women inmates. With your salary 2000 <b>₽</b> a month listed 1000 debt repayment. Eventually you payed off your debt and your torment came to an end. With your time served you were released with 2000 <b>₽</b>. You were taken to the train station and given a ticket back to the city.'
 			act 'Exit the train': gt 'city_industrial_train', 'outside'

+ 2 - 2
locations/love.qsrc

@@ -30,8 +30,8 @@ if $ARGS[0] = 'mother':
 	'<<$loverdesc[lover_number]>> pulls out a chair for you and you sit down. His mother places herself in front of the two of you. She looks at you with disgust in her eyes, looking like an overgrown insect, clearly thinking you are not a girl for her son. "So, darling, what do you do for a living?"'
 
 	if (work = 1 or cheatWork = 1) and workKafe = 1:'"I am a waitress in a cafe."'
-	if student > 0 and diplom = 0:'"I study at the university."'
-	if diplom = 1:'"I graduated from university."'
+	if func('uniutil', 'student', 'enrolled'):'"I study at the university."'
+	if func('uniutil', 'diploma', 'obtained'):'"I graduated from university."'
 	if work = 0 and cheatWork = 0 and workKafe ! 1:'"I''m unemployed."'
 
 	if modelfoto_nude > 30:

+ 68 - 83
locations/nichBedroomServant.qsrc

@@ -40,7 +40,7 @@ if $ARGS[0] = '' or $ARGS[0] = 'start' or $ARGS[0] = 'return':
 	if skak > 0:'Your jump rope is sitting on a shelf. '
 	if bookYog > 0:'A yoga mat is rolled up in a corner next to the wardrobe. '
 
-	if mishka > 0:'On one of the shelves, you''ve placed your <<mishka>> teddy bear.'
+	if mishka > 0:'On one of the shelves, you''ve placed your <<mishka>> teddy bear'+iif(mishka = 1, '', 's')+'.'
 	*nl
 	'You can access your <a href="exec: quick_dress = 1 & gt ''wardrobe'', ''default''">default clothing</a> options directly.'
 
@@ -48,7 +48,7 @@ if $ARGS[0] = '' or $ARGS[0] = 'start' or $ARGS[0] = 'return':
 
 	if nichSalaryOutstanding > 0:
 		*nl
-		'On top of your desk lies your paycheck over <<nichSalaryOutstanding>> <b>₽</b>(<a href="exec:gt ''nichBedroomServant'', ''redeemSalary''">redeem</a>).'
+		'On top of your desk lies your paycheck of <<nichSalaryOutstanding>> <b>₽</b> (<a href="exec:gt ''nichBedroomServant'', ''redeemSalary''">redeem</a>).'
 	end
 	
 	act 'Go to the hallway':
@@ -82,22 +82,7 @@ if $ARGS[0] = '' or $ARGS[0] = 'start' or $ARGS[0] = 'return':
 		act 'Finish':gt $loc
 	end
 
-	if student > 0 and kursovik < 100:
-		act 'Write course work (1:00)':
-			*clr & cla
-			menu_off = 1
-			minut += 60
-			kursovik += rand(pcs_intel / 20, pcs_intel / 10)
-
-			if kursovik > 100:kursovik = 100
-
-			pcs_mood -= 10
-			'<center><img <<$set_imgh>> src="images/pc/activities/study.jpg"></center>'
-			'You work on your course work and have now completed <<kursovik>> percent.'
-
-			act 'Finish':gt $loc
-		end
-	end
+	gs 'unicoursework', 'start', $loc
 
 	gs 'events', 'read'
 
@@ -117,7 +102,7 @@ if $ARGS[0] = '' or $ARGS[0] = 'start' or $ARGS[0] = 'return':
 			'You lie in bed, coughing, sneezing, blowing your nose... and, as if that wasn''t enough, you also think you might be getting a headache.'
 			'Drifting in and out of sleep, you spend about 4 hours tossing and turning, trying to sweat out the illness, and you actually feel better when you decide to stretch your legs.'
 
-			act 'Get up': gt 'bedr'
+			act 'Get up': gt $loc
 		end
 	end
 
@@ -156,7 +141,7 @@ if $ARGS[0] = '' or $ARGS[0] = 'start' or $ARGS[0] = 'return':
 	
 	if (thinkpreg > 0 or knowpreg > 0) and nichPregnancy = 0:
 		''
-		'<b>You are pregnant but Nicholas didn''t realize it yet. He wouldn''t allow you to continue working for him once he figures it out, that''s for sure. Maybe you should wear baggy clothes to hide your condition?</b>'
+		'<b>You are pregnant but Nicholas hasn''t realized it yet. He won''t allow you to continue working for him if he figures it out, that''s for sure. Maybe you should wear baggy clothes to hide your condition?</b>'
 	end
 	
 	if nichWork = 2:
@@ -168,9 +153,9 @@ if $ARGS[0] = '' or $ARGS[0] = 'start' or $ARGS[0] = 'return':
 elseif $ARGS[0] = 'evtBodyguardIntim1':
 	*clr & cla
 	'<center><img <<$set_imgh>> src="images/characters/city/taras/encounter1.jpg"></center>'
-	'Before you have the chance to leave your room you get pushed back inside by a man you don''t know yet.'
-	'Taken by surpise you can only gasp as he painfully turns your right arm around, forcing you into a bent over position.'
-	'He obviously knows what he is doing. He has expertly fixated you with just one hand, leaving you next to no room to move.'
+	'Before you have the chance to leave your room, you get pushed back inside by a man you don''t know.'
+	'Taken by surprise, you can only gasp as he painfully turns your right arm around, forcing you into a bent over position.'
+	'He obviously knows what he is doing. He has expertly subdued you with just one hand, leaving you next to no room to move.'
 	'"Let me introduce myself. My name is Taras, but you will call me Sir. I am the bodyguard of Mistress Gala. I am responsible for protecting not only her life and health, but also the good reputation of her family."'
 	'"She told me that her husband hired a little skank as his new maid."'
 	'You gasp in surprise as he pulls up your skirt leaving your butt exposed.'
@@ -187,7 +172,7 @@ elseif $ARGS[0] = 'evtBodyguardIntim1':
 	'"Yes what?"'
 	'"Yes sir, I understand."'
 	'He waits for another few seconds before gently stroking your hair and then releasing you.'
-	'"Good girl. I would hate to actually hurt you." with this obvious lie he leaves your room.'
+	'"Good girl. I would hate to actually hurt you." With this obvious lie, he leaves your room.'
 	gs 'pain', 3, 'asscheeks', 'spank'
 	nichGalaOpinion = 2
 	act 'Return':
@@ -196,7 +181,7 @@ elseif $ARGS[0] = 'evtBodyguardIntim1':
 elseif $ARGS[0] = 'desk':
 	if nichGalaOpponent = 21:
 		'<center><img <<$set_imgh>> src="images/characters/city/gala/necklace.jpg"></center>'
-		'You open your desk. Something doesn''t seem to be right. After closer investigation you find Galas missing necklace hidden under some of your items.'
+		'You open your desk. Something doesn''t seem to be right. After closer inspection, you find Gala''s missing necklace hidden under some of your items.'
 		act 'Leave it there':
 			gt 'stol','start'
 		end
@@ -235,19 +220,19 @@ elseif $ARGS[0] = 'sleepEvents':
 		
 		if nichTarSaunaPay >= 20000:
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/chat.jpg"></center>'
-			'You wake up by the feeling of something heavy resting on you. A little bit sleepy you open your eyes and see the face of Taras directly in front of yours.'
+			'You wake up to the feeling of something heavy resting on you. A little bit sleepy you open your eyes and see the face of Taras directly in front of yours.'
 			'"Slut, you did your job well. You earned all the money I needed and I was able to, well... , start my preparations."'
 			'He hesitates for a second.'
 			'"I guess I can as well introduce you to my plan. As you might have guessed by now I have strong feelings for Mistress Gala. Sadly she didn''t realize that she would be better off with me than with her husband. That''s why I need to spend some quality time with her to convince her."'
-			'"Of course she wouldn''t agree to it if I just asked her. That''s why I needed to create a little ruse. I needed you money so I was able to prepare our travel without anybody realizing that I was doing it."'
+			'"Of course she wouldn''t agree to it if I just asked her. That''s why I needed to create a little ruse. I needed your money so I was able to prepare our travel without anybody realizing that I was doing it."'
 			'"And now I need your help again. I need a trigger for Mistress Gala to ask me to get her out of city, so the rest of the staff and the family don''t get suspicious. And this trigger is you."'
 			'"Lets just say that Mistress Gala has some secrets. And lets also say that she doesn''t want to be around when they get revealed."'
-			'"There is some problem I helped her with some time ago. And it is perfect for this situation."'
+			'"There is some problem I helped her with some time ago, and it is perfect for this situation."'
 			'"Just tell her that somebody from the police called and that it''s about a girl named Katinka. Leave everything else to me."'
 			'"You will probably see neither of us ever again. But you can be assured that you helped true love to find its way."'
 			'He stands up and leaves your room.'
 			''
-			'<b>You should talk to Gala about this. You can either follow Taras plan or expose it.</b>'
+			'<b>You should talk to Gala about this. You can either follow Taras''s plan or expose it.</b>'
 			nichGalaTarasPlan = 1
 			killvar 'nichTarSauna'
 			killvar 'nichTarSaunaPay'
@@ -255,7 +240,7 @@ elseif $ARGS[0] = 'sleepEvents':
 			act 'Back to sleep': gt 'bed2','dream'
 		elseif nichTarSaunaPay > 10000:
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/chat.jpg"></center>'
-			'You wake up by the feeling of something heavy resting on you. A little bit sleepy you open your eyes and see the face of Taras directly in front of yours.'
+			'You wake up to the feeling of something heavy resting on you. A little bit sleepy you open your eyes and see the face of Taras directly in front of yours.'
 			'"Slut, I heard that you are doing a fine job in the sauna. I knew you would perform this job with enthusiasm."'
 			'"Don''t slack off now! I need 20000 <b>₽</b> in total from you. I am sure you can easily earn them for me. You are already more than half-way there."'
 			'He gives you a light smack on your face, then he stands up and leaves your room.'
@@ -263,14 +248,14 @@ elseif $ARGS[0] = 'sleepEvents':
 			act 'Back to sleep': gt 'bed2','dream'
 		elseif nichGalaContractTarasCount = 10:
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/chat.jpg"></center>'
-			'You wake up by the feeling of something heavy resting on you. A little bit sleepy you open your eyes and see the face of Taras directly in front of yours.'
+			'You wake up to the feeling of something heavy resting on you. A little bit sleepy you open your eyes and see the face of Taras directly in front of yours.'
 			'"Oh, good. You are awake."'
 			'He softly runs his hand down your cheek. You didn''t even know this soft side of his existed.'
 			'"I have the feeling that the both of us are getting along quite well."'
 			'You look at him in disbelief. Is he serious?'
-			'"As a matter of fact there is something you can do for me. I need to get some money outside of the books. Lets just say it''s for a personal hobby of mine."'
+			'"As a matter of fact, there is something you can do for me. I need to get some money off the books. Lets just say it''s for a personal hobby of mine."'
 			'You feel him touching your pussy.'
-			'"And since you are such an obedient little slut I thought I could involve you in this. It is actually pretty simple. I have a friend working at the sauna in the residential area. You go there and service customers. I get the money, you get your wholes filled. Everybody wins. Of course I whitelisted the sauna for this little implant you are wearing."'
+			'"And since you are such an obedient little slut, I thought I could involve you in this. It is actually pretty simple. I have a friend working at the sauna in the residential area. You go there and service customers. I get the money, you get your holes filled. Everybody wins. Of course I whitelisted the sauna for this little implant you are wearing."'
 			'"Oh, and Mistress Gala doesn''t need to know about this. Lets just say it''s a surprise for her."'
 			'He stands up and leaves your room.'
 			''
@@ -285,9 +270,9 @@ elseif $ARGS[0] = 'sleepEvents':
 			
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed7.jpg"></center>'
 			'There is a sudden pain in your ass cheek and you are instantly awake. Somebody has smacked your ass.'
-			'Clearing your senses you realize that not only your mouth is shut by some sort of sticking plaster. Also your wrists and ankles are chained to each other with short chains.'
+			'As you come to, you realize that your mouth is shut by some sort of sticking plaster and your wrists and ankles are chained to each other with short chains.'
 			'In front of your bed you see Taras.'
-			'"Sorry, slut. I don''t have time for you. So you have to enjoy this substitute."'
+			'"Sorry, slut. I don''t have time for you, so you have to enjoy this substitute."'
 			'He pushes a vibrator into your vagina and sets it to the max setting.'
 			gs 'arousal','vaginal',30,'bound'
 			gs 'arousal','end'
@@ -300,12 +285,12 @@ elseif $ARGS[0] = 'sleepEvents':
 		elseif nichGalaContractTarasCount = 1 or nichRand = 1:	
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed9.jpg"></center>'
 			'You have an erotic dream of being tied up tightly.'
-			'Suddenly you are wide awake as your nostiles are blocked. You open your mouth to gasp for air and feel a dick being pushed into it.'
-			'It takes a few seconds for you to realize what is happening. You are on your back, your hands being tied behind you. It wasn''t a dream after all.'
-			'The man who slowly fucks your skull upside down must be Taras. But you can only guess, since you see nothing of him but his balls directly in front of your face.'
-			'It doesn''t take long before Taras comes into your mouth. But he doesn''t pull his dick out.'
+			'Suddenly you are wide awake as your nostrils are blocked. You open your mouth to gasp for air and feel a dick being pushed into it.'
+			'It takes a few seconds for you to realize what is happening. You are on your back, your hands tied behind you. It wasn''t a dream after all.'
+			'The man who slowly fucks your skull upside down must be Taras, but you can only guess since you see nothing of him but his balls directly in front of your face.'
+			'It doesn''t take long before Taras cums into your mouth, but he doesn''t pull his dick out.'
 			'"Swallow, slut!"'
-			'Having no choice you do as ordered.'
+			'Having no choice, you do as ordered.'
 			'"I knew you were a dirty cum-eater. At least you are good for something."'
 			'He unties one of your hands so you are able to remove the other ropes. Then he leaves your room without saying another word.'
 			gs 'arousal','bj',5,'bound','rough','rape'
@@ -316,16 +301,16 @@ elseif $ARGS[0] = 'sleepEvents':
 			act 'Back to sleep': gt 'bed2','dream'
 		elseif nichGalaContractTarasCount = 2 or nichRand = 2:	
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed3.jpg"></center>'
-			'Just when you fell aslepp you feel being lifted out of bed. You are immediately wide awake.'
-			'Realizing you are awake Taras places you on your feet and twists your arm behind your back while pushing you forward. There is no way you to fight back.'
+			'Just as you are falling asleep, you feel yourself being lifted out of bed. You are immediately wide awake.'
+			'Realizing you are awake, Taras places you on your feet and twists your arm behind your back while pushing you forward. There is no way for you to fight back.'
 			'"Lets go, slut!"'
-			'He leads you up to the attic. There he chains you up on your stomach and places a belt around your neck.'
-			'He then probes your ass with his index finger befor he begins to fuck it mercilessly.'
-			'At the same time he pulls at the belt around your neck and you begin to choke. You begin to panic as you get less and less air. Taras obviously enjoys you struggling in panic and only releases the belt when you are close to blacking out.'
-			'You didn''t even regain your breath when he repeats his vile game. It goes on several times before he finally is about to cum.'
+			'He leads you up to the attic. There, he chains you up on your stomach and places a belt around your neck.'
+			'He then probes your ass with his index finger before he begins to fuck it mercilessly.'
+			'At the same time, he pulls at the belt around your neck, and you begin to choke. You begin to panic as you get less and less air. Taras obviously enjoys you struggling in panic and only releases the belt when you are close to blacking out.'
+			'You haven''t even caught your breath when he repeats his vile game. It goes on several times before he finally is about to cum.'
 			'Only this time he doesn''t release the belt. The last thing you feel before everything goes black is him cumming inside of your ass.'
 			'...'
-			'You wake up back in your bed. Apparently Taras has carried you down here after he was done with you.'
+			'You wake up back in your bed. Apparently Taras carried you down here after he was done with you.'
 			gs 'arousal','anal',5,'bound','rough','rape'
 			gs 'arousal','end'
 			gs 'cum_call', 'anus', 'A513', 1
@@ -334,43 +319,43 @@ elseif $ARGS[0] = 'sleepEvents':
 			act 'Back to sleep': gt 'bed2','dream'
 		elseif nichGalaContractTarasCount = 3 or nichRand = 3:	
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed6.jpg"></center>'
-			'You wake up to a painful hit on your butt. Instintively you try to reach down there, but your wrists and ankles are tied to the opposite corners of your bed. There is nothing you can do than lie on your stomach.'
+			'You wake up to a painful hit on your butt. Instinctively you try to reach down there, but your wrists and ankles are tied to the opposite corners of your bed. There is nothing you can do besides lie on your stomach.'
 			'"Good, you are awake."'
 			'Apparently Taras is standing right behind you.'
 			'"Sadly I don''t have time to play with you. But I brought a little something so you don''t forget me."'
-			'He pushes a vibrator into your exposed pussy and turns it on. At first you don''t feel anything but then a powerful vibration starts. Taras watches you struggle for a few minutes, then he leaves the room.'
+			'He pushes a vibrator into your exposed pussy and turns it on. At first you don''t feel anything, but then a powerful vibration starts. Taras watches you struggle for a few minutes, then he leaves the room.'
 			'Suddenly the vibration is off again only to kick back on about 5 minutes later. Apparently the vibrator is set to a random program.'
 			gs 'arousal','vaginal_vibe',30,'bound'
 			gs 'arousal','end'
 			gs 'stat'
-			'You are just to exhausted to stay awake for much longer. During another pause of the vibrator you fall asleep. You have some erotic dreams about being fucked by various guys and girls with the ongoing vibrations of the vibrator being a part of it.'
-			'You don''t know how long Taras left the vibrator inside of you, but when you wake up next you are untied and the vibrator is gone.'
+			'You are just too exhausted to stay awake for much longer. During another pause of the vibrator you fall asleep. You have some erotic dreams about being fucked by various guys and girls with the ongoing vibrations of the vibrator being a part of it.'
+			'You don''t know how long Taras left the vibrator inside of you, but when you wake up next, you are untied and the vibrator is gone.'
 			nichGalaContractTarasCount += 1
 			act 'Back to sleep': gt 'bed2','dream'
 			!! TODO: CONT
 		elseif nichGalaContractTarasCount = 4 or nichRand = 4:	
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed4x1.jpg"></center>'
-			'You get pulled out of your sleep abruptly as your legs get pulled upwards. You want to scream in surprise but your mouth is taped shut, as are your eyes.'
-			'You try to get away, but your hands are tied up as well. The person who restrained you also ties your ankles with a rope connected to the head end of the bed, leaving you completely exposed.'
+			'You get pulled out of your sleep abruptly as your legs get pulled upwards. You want to scream in surprise, but your mouth is taped shut, as are your eyes.'
+			'You try to get away, but your hands are tied up as well. The person who restrained you also tied your ankles with a rope connected to the head end of the bed, leaving you completely exposed.'
 			'"Very nice. We just have to add a final touch."'
 			'It''s the voice of Taras.'
 			'You feel your breasts being squeezed as Taras ties them up as well.'
-			'After he is done is wastes no time and begins to fuck you.'
+			'After he is done, he wastes no time and begins to fuck you.'
 			gs 'arousal','vaginal',10,'bound'
 			gs 'arousal','end'
-			'After about 10 minutes you feel him cumming inside of you.'
+			'After about 10 minutes, you feel him cumming inside of you.'
 			gs 'cum_call', '', 'A513', 1
 			gs 'stat'
-			'Without saying another word he stands up and leaves the room.'
+			'Without saying another word, he stands up and leaves the room.'
 			'He can''t leave you tied up like this, can he?'
 			act 'Wait':
 				cla & *clr
 				'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed4x2.jpg"></center>'
-				'You don''t know how long Taras was gone. But you must have fallen asleep at some point.'
+				'You don''t know how long Taras was gone, but you must have fallen asleep at some point.'
 				'You get woken up by Taras fucking you again. At first you thought this was a dream, but then you realize that this is reality.'
 				gs 'arousal','vaginal',20,'bound'
 				gs 'arousal','end'
-				'This time it takes a little longer before Taras cums. When he does he pulls out of you and sends his load right into your face.'
+				'This time it takes a little longer before Taras cums. When he does, he pulls out of you and sends his load right onto your face.'
 				gs 'cum_call', 'face', 'A513', 1
 				gs 'stat'
 				'"I am sure you will enjoy this."'
@@ -388,7 +373,7 @@ elseif $ARGS[0] = 'sleepEvents':
 			'Finally you feel that your tormentor is cumming inside of you.'
 			gs 'cum_call', 'anus', 'A513', 1
 			'He drops the rope and pets your head.'
-			'"Well done, slut. If you haven''t struggled that much I wouldn''t have had so much fun."'
+			'"Well done, slut. If you haven''t struggled that much, I wouldn''t have had so much fun."'
 			'It was Taras all along. He picks up his rope and leaves your room.'
 			nichGalaContractTarasCount += 1
 			act 'Back to sleep': gt 'bed2','dream'
@@ -407,13 +392,13 @@ elseif $ARGS[0] = 'sleepEvents':
 			act 'Back to sleep': gt 'bed2','dream'
 		elseif nichGalaContractTarasCount = 7 or nichRand = 7:	
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed1x1.jpg"></center>'
-			'You get woken up by a slap to your breast. You want to shriek up, but once again you are tied to your bed. A ballgag in your mouth prevents you from making any sound.'
+			'You get woken up by a slap to your breast. You want to shriek, but once again you are tied to your bed. A ball gag in your mouth prevents you from making any sound.'
 			'Opening your eyes you see Taras standing above you.'
-			'"Oh, good, you are awake. I think you were a good slut lately, that''s why I wanted to reward you."'
+			'"Oh, good, you are awake. I think you have been a good slut lately, that''s why I wanted to reward you."'
 			act 'Wait':
 				cla & *clr
 				'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed1x2.jpg"></center>'
-				'He takes out a vibrator and pushes inside your vagina. Then he turns it on. You feel the strong vibrations everywhere in your body.'
+				'He takes out a vibrator and pushes it inside your vagina. Then he turns it on. You feel the strong vibrations everywhere in your body.'
 				'"I bet you will enjoy this. It will feel like being fucked by dozens of guys all night long."'
 				'He leaves your room, leaving you tied up and being tormented by the vibrator.'
 				gs 'arousal','vaginal_vibe',30,'bound'
@@ -428,8 +413,8 @@ elseif $ARGS[0] = 'sleepEvents':
 					gs 'arousal','vaginal_vibe',30,'bound'
 					gs 'arousal','end'
 					gs 'stat'
-					'Finally Taras returns and unties you. You waste no time and remove the vibrator, starring at him angrily.'
-					'"I knew you would enjoy it. While normal people like me sleep at night sluts like you want to get fucked all night long. And I am nothing but supportive in this regard."'
+					'Finally Taras returns and unties you. You waste no time and remove the vibrator, staring at him angrily.'
+					'"I knew you would enjoy it. While normal people like me sleep at night, sluts like you want to get fucked all night long, and I am nothing but supportive in this regard."'
 					'He leaves you with a grin on his face.'
 					nichGalaContractTarasCount += 1
 					act 'Back to sleep': gt 'bed2','dream'
@@ -439,38 +424,38 @@ elseif $ARGS[0] = 'sleepEvents':
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed11.jpg"></center>'
 			'Suffocation... '
 			'You open your eyes in panic. A rope around your neck makes it impossible for you to breath. You try to struggle, but you are completely tied up.'
-			'Just before you black out the rope gets loosened and you can grasp for air.'
+			'Just before you black out the rope gets loosened and you can gasp for air.'
 			'"Take a deep breath, slut. We are only beginning todays fun."'
-			'He tightenes the rope again and once again you feel like suffocating.'
-			'Then you hear the sound of his handy. He loosens the rope and takes a look at it.'
-			'"Damn. My service are required. I am sorry, but I am afraid we have to continue our little fun another time."'
+			'He tightens the rope again, and once again you feel yourself suffocating.'
+			'Then you hear the sound of his cell phone. He loosens the rope and takes a look at it.'
+			'"Damn. My services are required. I am sorry, but I am afraid we will have to continue our little fun another time."'
 			'He unties you and leaves your room without saying another word.'
 			nichGalaContractTarasCount += 1
 			act 'Back to sleep': gt 'bed2','dream'
 		elseif nichGalaContractTarasCount = 9 or nichRand = 9:	
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed5.jpg"></center>'
 			'No air...'
-			'You open your eyes in panic. There is a plastic bag over your head. You desperatley try to remove it, but your hands are tied behind your back.'
-			'You try to get up. But you are already to weak and the darkness comes quickly. The last thing you see is Taras who is filming you with a small camcorder. He is grinning.'
+			'You open your eyes in panic. There is a plastic bag over your head. You desperately try to remove it, but your hands are tied behind your back.'
+			'You try to get up, but you are already too weak and the darkness comes quickly. The last thing you see is Taras who is filming you with a small camcorder. He is grinning.'
 			act 'The end?':
 				cla & *clr
 				'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed5.jpg"></center>'
-				'As you wake up you see Taras standing right in front of you. You are still tied up in your bed and a gag in your mouth prevents you from making any intelligible sounds.'
-				'"You liked that, did you? So did I. I''m recording the fun we have together so I have something to watch in my spare time. And maybe I can even make some money selling the material."'
+				'As you wake up, you see Taras standing right in front of you. You are still tied up in your bed, and a gag in your mouth prevents you from making any intelligible sounds.'
+				'"You liked that, did you? So did I. I''m recording the fun we have together so I have something to watch in my spare time. Maybe I can even make some money selling the material."'
 				'He holds the plastic bag in front of your face.'
 				'"And you will be happy to provide me some additional material, won''t you?"'
-				'You desperately shake your head no but he pulls the bag over your head nevertheless.'
-				'It doesn''t take long before the panic sets back in. You struggle wildly, but there is no use. You pass out again.'
+				'You desperately shake your head no, but he pulls the bag over your head nevertheless.'
+				'It doesn''t take long before the panic sets back in. You struggle wildly, but it''s no use. You pass out again.'
 				act 'Suffocate?':
 					cla & *clr
 					'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed5.jpg"></center>'
-					'You wake up once more. Your head spins like crazy. Taras is still in your room and nothing about your situation has changed.'
+					'You wake up once more. Your head spins like crazy. Taras is still in your room, and nothing about your situation has changed.'
 					'"That was fun, don''t you agree. How about another round?"'
-					'You do everything you can. But pleading with your eyes, shaking your head and making muffled sounds doesn''t help.'
+					'You do everything you can, but pleading with your eyes, shaking your head, and making muffled sounds doesn''t help.'
 					'Soon you have the bag back over your head. Once again you panic as the suffocation sets in.'
 					act 'Black out':
 						cla & *clr
-						'As you wake up this time Taras is gone and you are untied.'
+						'As you wake up this time, Taras is gone and you are untied.'
 						'One horrific thought comes to your mind and makes you shiver: this man shows utter neglect for your safety. What if one day he kills you by accident?'
 						nichGalaContractTarasCount += 1
 						act 'Back to sleep': gt 'bed2','dream'
@@ -479,9 +464,9 @@ elseif $ARGS[0] = 'sleepEvents':
 			end
 		else
 			'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed8x1.jpg"></center>'
-			'You awaken by the feeling of something being pushed inside your mouth.'
-			'You try to push it away, only to find out that your arms are tied up behind your back.'
-			'Opening your eyes you only see the crotch of a man.'
+			'You awaken to the feeling of something being pushed inside your mouth.'
+			'You try to push it away, only to find out that your arms are tied behind your back.'
+			'Opening your eyes, you only see the crotch of a man.'
 			'"Good, you are finally awake."'
 			'Of course it''s Taras who is fucking your mouth.'
 			gs 'arousal','bj',5,'bound','rough','rape' & gs 'stat'
@@ -490,7 +475,7 @@ elseif $ARGS[0] = 'sleepEvents':
 				cla & *clr
 				'<center><img <<$set_imgh>> src="images/characters/city/gala/slave/taras/bed8x2.jpg"></center>'
 				'Taras pushes himself as far into your mouth as he can. You feel his dick deep in you throat.'
-				'As he grabs your skull and pulls it to his crotch it gets even harder for you to breath.'
+				'As he grabs your skull and pulls it to his crotch, it gets even harder for you to breath.'
 				gs 'arousal','bj',5,'bound','rough','rape' & gs 'stat'
 				
 				act 'Continue':
@@ -520,7 +505,7 @@ elseif $ARGS[0] = 'sleepEvents':
 	elseif ARGS[1] = 1000:
 		hour = 23
 		minut += 180
-		'In the middle of the night you wake up from your sleep. You have the feeling as if somebody is in your room watching you. You look around but there is nobody to be seen.'
+		'In the middle of the night, you wake up from your sleep. You sense somebody is in your room watching you. You look around, but there is nobody to be seen.'
 		*nl
 		'Maybe you are just paranoid?'
 		*nl
@@ -528,7 +513,7 @@ elseif $ARGS[0] = 'sleepEvents':
 		*nl
 		'Suddenly you feel a strong hand grabbing your face, sealing your mouth and nose shut while another hand pins you down by your hip.'
 		*nl
-		'You try to scream put you can''t get a single sound out. The last thing you notice before you lose consciousness is a sweetish smell.'
+		'You try to scream, but you can''t get a single sound out. The last thing you notice before you lose consciousness is a sweetish smell.'
 		!!WIP Notice
 		*nl
 		'<font color = red><b>Warning: This part of the story is currently not finished and most likely ends in a dead end. Click ignore to pass it.</b></font>'

+ 1 - 1
locations/nichTanya.qsrc

@@ -1226,7 +1226,7 @@ elseif $ARGS[0] = 'chat':
 							end
 						end
 					end
-					if student > 0:
+					if  func('uniutil', 'student', 'enrolled'):
 						act 'I know what I am talking about (student)':
 							'"I know what I am talking about. I am a student myself."'
 							'She bites down on her lip and hesitates for a few seconds.'

+ 3 - 3
locations/obj_din.qsrc

@@ -631,16 +631,16 @@ if $ARGS[0] = 'stats':
 	if stripdancesum > 0 and hidden_stripdancesum = 0:
 		'You have danced <<stripdancesum>> times in the stripclub'
 	elseif stripdancesum = 0 and hidden_stripdancesum > 0:
-		'You have danced <<hidden_stripdancesum>> times in the stripclub, but you do nor remember it'
+		'You have danced <<hidden_stripdancesum>> times in the stripclub, but you do not remember it'
 	elseif stripdancesum > 0 and hidden_stripdancesum > 0:
 		'You have danced <<stripdancesum+hidden_stripdancesum>> times in the stripclub, but you only remember <<stripdancesum>> times'
 	end
 	if profiDanceTime > 0: 'You danced <<profiDanceTime>> times professionally.'
 	if SchoolAtestat = 1: 'You have finished school.'
-	if diplom = 1: 'You graduated.'
+	if func('uniutil', 'diploma', 'obtained'): 'You graduated.'
 	if teachlevel > 0: 'Your credibility as a teacher is <<teachlevel>>'
 	!WD:FORMATING
-	if (maxdamage + stripdancesum + profiDanceTime + SchoolAtestat + diplom + teachlevel) > 0:*nl
+	if maxdamage > 0 or stripdancesum > 0 or profiDanceTime > 0 or SchoolAtestat > 0 or func('uniutil', 'diploma', 'obtained') or teachlevel > 0:*nl
 
 	'</td><td width="35%" cellspacing="0" cellpadding="0" valign="top">'
 	'<center><b>Sex Statistics</b></center>'

+ 1 - 18
locations/obroom.qsrc

@@ -64,24 +64,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = '':
 		act 'Finish':gt 'obroom', 'start'
 	end
 
-	if student > 0 and kursovik < 100:
-		act 'Do some coursework (1:00)':
-			cla
-			*clr
-			menu_off = 1
-			minut += 60
-			pcs_mood -= 10
-			kursovik += rand(pcs_intel / 20, pcs_intel / 10)
-
-			if kursovik > 100:kursovik = 100
-			gs 'stat'
-
-			'<center><img <<$set_imgh>> src="images/pc/activities/study.jpg"></center>'
-			'You sit for an hour and prepare your work for the class. You''ve finish <<kursovik>> percent of the work.'
-
-			act 'Finish':gt 'obroom', 'start'
-		end
-	end
+	gs 'unicoursework', 'start', $loc, $loc_arg
 
 dynamic $wearpan
 dynamic $removepan

+ 1 - 1
locations/park_walkevents.qsrc

@@ -474,7 +474,7 @@ if $ARGS[0] = '5':
 
 	act 'Finish your walk':gt 'city_park', 'start'
 
-	if yaq = 0 and student > 0:
+	if yaq = 0 and func('uniutil', 'student', 'enrolled'):
 		*clr & cla
 		minut += 20
 		gs 'stat'

+ 1 - 16
locations/pav_shared_apt.qsrc

@@ -724,22 +724,7 @@ if $ARGS[0] = 'pcsRoom':
 
 	if komp = 1:'Your <a href="exec:gorodokKomp = 1 & gt ''Komp'',''start''">laptop</a> is sitting on small table.'
 
-	if student > 0 and kursovik < 100:
-		act 'Do coursework (1:00)':
-			cla
-			*clr
-			minut += 60
-			kursovik += rand(pcs_intel / 20, pcs_intel / 10)
-
-			if kursovik > 100:kursovik = 100
-
-			pcs_mood -= 10
-			'<center><img <<$set_imgh>> src="images/pc/activities/study.jpg"></center>'
-			'You sit down on the sofa bed and do your coursework, you''ve finished <<kursovik>> percent of it.'
-
-			act 'Stand up':gt 'pav_shared_apt', 'pcsRoom'
-		end
-	end
+	gs 'unicoursework', 'start', $loc, $loc_arg
 
 	if vcard > 0: act 'View your vintage porn cards':card_deck = 0 & gt 'card'
 	if card > 0: act 'View your new porn cards':card_deck = 1 & gt 'card'

+ 7 - 0
locations/shop.qsrc

@@ -337,6 +337,13 @@ if $shoplocation = 'hardware':
 	act 'Leave the hardware department':gt 'shop', 'start'
 
 	'On the counter you can see fabric suitable for sewing. It''s sold in large squares costing 50 <b>₽</b> each. You have <<tkan>> squares of fabric.'
+	if pod_whore_countQW > 15 and paint_blue = 0 and money >= 200:
+		act 'Buy paint to cover graffiti 200 <b>₽</b>.':
+			money -= 200
+			paint_blue = 1
+			gt 'shop', '<font color="green">You bought a tin of paint.</font>'
+		end
+	end		
 end
 
 if $shoplocation = 'clothing':

+ 42 - 38
locations/sister_party.qsrc

@@ -52,7 +52,7 @@ if $ARGS[0] = 'talk':
 			'"Why? I know he loves me and he knows that I love him, but while we are young, we have fun."'
 		elseif sisterQW['partytalk'] = 8:
 			'"I still say it''s crazy how you can be in a loving relationship and still fuck anyone."'
-			'"<<$pcs_nickname>>, I am a not complete fool. Why ''anyone''? Look around, there are other nice guys here too, such as Rex.'
+			'"<<$pcs_nickname>>, I am not a complete fool. Why ''anyone''? Look around, there are other nice guys here too, such as Rex.'
 		elseif sisterQW['partytalk'] = 9 and Rex_Love = 1:
 			'"Do you want me to kill you? You know that I''m dating Rex!"'
 			'"Calm down <<$pcs_nickname>>, I was joking! I know that you two are dating. Although... I did let you fuck my boyfriend, so why can''t I fuck yours?"'
@@ -72,7 +72,7 @@ if $ARGS[0] = 'talk':
 	else
 		i = rand(1,9)
 		if i = 1:'"<<$pcs_nickname>>, you still don''t have a man?"'
-		if i = 2:'"Sometimes I can''t decide what is more important. The size of their wallet or the size of their dick. What do you think <<$pcs_nickname>>?"'
+		if i = 2:'"Sometimes I can''t decide what is more important: the size of their wallet or the size of their dick. What do you think <<$pcs_nickname>>?"'
 		if i = 3:'"If you have a reputation as the town whore, the guys won''t let you come to the parties anymore."'
 		if i = 4:'"It''s not good to come here when you''re in a bad mood. Rex hates having miserable bastards in his house."'
 		if i = 5:'"Still going to that crap school? Idiot, find yourself a rich man and all your problems are solved!"'
@@ -94,12 +94,16 @@ if $ARGS[0] = 'sister_drink':
 	'<center><b><font color = maroon>Anya</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/party_sister_2.jpg"></center>'
 	'Anya hands you a bottle. You take a swig and hand it back. "Keep the bottle, little sis. I won''t tell <<$npc_nickname[''A29'']>>." she says with a wink.'
-	'You gladly drink more, sharing it with your sister.'
-	'Feeling buzzed, you are ready to plunge into the wild debauchery of the party.'
-	if alko >= 7: 'Sudden severe head spinning and you are ready at any time...'
-	if alko >= 7: act 'Pass out': gt 'dinParty', 'sleep'
-	if alko < 7: act 'Dance topless': gt 'sister_party', 'fun'
-	if alko < 7: act 'Move away': gt $loc, $loc_arg
+	if alko >= 7:
+		'With her encouragement, you end up drinking more than you should.'
+		'Suddenly your head is severely spinning...'
+		act 'Pass out': gt 'dinParty', 'sleep'
+	else:
+		'You gladly drink more, sharing it with your sister.'
+		'Feeling buzzed, you are ready to plunge into the wild debauchery of the party.'
+		act 'Dance topless': gt 'sister_party', 'fun'
+		act 'Move away': gt $loc, $loc_arg
+	end
 end
 
 if $ARGS[0] = 'fun':
@@ -125,7 +129,7 @@ if $ARGS[0] = 'fun':
 		gs 'arousal', 'kiss', 5, 'lesbian', 'incest'
 		gs 'stat'
 		
-		act 'Go to the Rex''s room':
+		act 'Go to Rex''s room':
 			*clr & cla
 			'<center><b><font color = maroon>Anya</font></b></center>'
 			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/party_sister_3_<<rand(5,10)>>.jpg"></center>'
@@ -142,7 +146,7 @@ if $ARGS[0] = 'fun':
 				'<center><video autoplay loop src="images/locations/pavlovsk/resident/rekshome/party/party_sister_4_<<rand(1,3)>>.mp4"></video></center>'
 				'You kiss her breasts and stomach right down to her panties. You pull her panties down, exposing her already soaking wet pussy, which you begin to lick.'
 				'Both of you moan in pleasure. You feel hot with desire, but can''t help but think that, despite all your sister''s protests that she isn''t a lesbian, she is just kidding herself. She loves having lesbian sex way too much.'
-				'Kissing, licking and sucking her clit, your face is wet with her juices. Her body twitches and she moans loudly from your actions.' 
+				'Kissing, licking and sucking her clit, your face is wet with her juices. Her body twitches, and she moans loudly from your actions.' 
 				'After her moaning starts getting louder, you plunge your tongue inside of her, eliciting a cry of pleasure as you tongue fuck her pussy, slipping your tongue in and out of her.'
 				
 				gs 'arousal', 'cuni_give', 5, 'lesbian', 'incest'
@@ -156,10 +160,10 @@ if $ARGS[0] = 'fun':
 				sister_party_dom = 2
 				'<center><b><font color = maroon>Anya</font></b></center>'
 				'<center><video autoplay loop src="images/locations/pavlovsk/resident/rekshome/party/party_sister_4_<<rand(1,3)>>.mp4"></video></center>'
-				'You roll over as Anya climbs on top of you. Kissing her way down to your nipples, your body arches in pleasure as you feel your pussy getting wet already.'
-				'Kissing and licking her way down your body, she pulls your panties off and gently kisses your clit. Her tongue gently flicking your clit elicites deep moans of pleasure from you. You feel a full tremor run through your body as her tongue slips inside of you.'
+				'You roll over as Anya climbs on top of you. As she kisses her way down to your nipples, your body arches in pleasure as you feel your pussy getting wet already.'
+				'Kissing and licking her way down your body, she pulls your panties off and gently kisses your clit. Her tongue gently flicking your clit elicits deep moans of pleasure from you. You feel a full tremor run through your body as her tongue slips inside of you.'
 				'"Mmm <<$pcs_nickname>>, you taste so sweet." Anya murmurs. You can''t help but smile at the skill of her tongue and again silently question her claims that she isn''t into girls.'
-				'Anya''s tongue works wonders, filling you with mounting pleasure as it strokes inside of you, penetrating you as deeply as it can will go. She starts to tongue fuck your pussy.' 
+				'Anya''s tongue works wonders, filling you with mounting pleasure as it strokes inside of you, penetrating you as deeply as it can go. She starts to tongue fuck your pussy.' 
 				
 				gs 'arousal', 'cuni', 5, 'lesbian', 'incest'
 				gs 'stat'
@@ -177,14 +181,14 @@ if $ARGS[0] = 'hand':
 	if sister_party_dom = 1:
 		'After licking your sister''s pussy for some time, you pull your head away from her and start rubbing her clit with your fingers.'
 		'She moans and bucks her hips against your hand. You then slip several of your fingers inside of her pussy and start rapidly finger blasting her wet hole.'
-		'Her moans get louder and she starts to fuck your fingers, pleading with you not to stop.'
+		'Her moans get louder, and she starts to fuck your fingers, pleading with you not to stop.'
 		
 		gs 'arousal', 'vaginal_finger_give', 5, 'lesbian', 'incest'
 		gs 'stat'
 				
 	elseif sister_party_dom = 2:
-		'After recieving plenty of oral attention from Anya, she withdraws and starts rubbing your wet pussy with her fingers.'
-		'She slips a finger into wet hole, then a second and finally a third. She then starts finger fucking you in earnest.'
+		'After receiving plenty of oral attention from Anya, she withdraws and starts rubbing your wet pussy with her fingers.'
+		'She slips a finger into your wet hole, then a second and finally a third. She then starts finger fucking you in earnest.'
 		'You start trying to hump her hand as you wither in pleasure, begging her not to stop.'
 		
 		gs 'arousal', 'vaginal_finger', 5, 'lesbian', 'incest'
@@ -196,8 +200,8 @@ if $ARGS[0] = 'hand':
 		'<center><b><font color = maroon>Anya</font></b></center>'
 		if rand(1,2) = 1:
 			'<center><video autoplay loop src="images/locations/pavlovsk/resident/rekshome/party/party_sister_6_<<rand(1,3)>>.mp4"></video></center>'
-			'Stopping a moment so you can both catch your breath, neither of you want it to end, but you are both also desperate for release.'
-			'Anya smiles wickely at you. "Well little sis, let''s see who eats pussy better and brings the other to orgasm first."'
+			'Stopping a moment so you can both catch your breath, neither of you wants it to end, but you are both also desperate for release.'
+			'Anya smiles wickedly at you. "Well little sis, let''s see who eats pussy better and brings the other to orgasm first."'
 			'With those words, you simultaneously seek out each other''s crotch and start licking, sucking and using your fingers and tongue to fuck the other. You both start moaning and panting, close to your sweet releases.'
 			''
 			
@@ -216,7 +220,7 @@ if $ARGS[0] = 'hand':
 			end
 			if sister_party_dom = 2:'You also wanted to caress her pussy with your fingers.'
 			if sister_party_dom = 1:'Anya also wanted to caress your pussy with her fingers.'
-			'With delicate and skillful hands you masturbate each others pussies, stroking thighs, clits and plunging your fingers into each other, at times pulling them out to lick and suck your wet fingers. Both of you moaning and panting, close to both close to your sweet release.'
+			'With delicate and skillful hands you plunge your fingers into each other, at times pulling them out to lick and suck your wet fingers. Both of you moan and pant, close to your sweet releases.'
 			''
 			
 			gs 'arousal', 'vaginal_finger_give', 5, 'lesbian', 'incest'
@@ -247,9 +251,9 @@ if $ARGS[0] = 'cum':
 	*clr & cla
 	'<center><b><font color = maroon>Anya</font></b></center>'
 	'<center><video autoplay loop src="images/locations/pavlovsk/resident/rekshome/party/party_sister_9_<<rand(1,2)>>.mp4"></video></center>'
-	'Your bodies convulse and spasm at the same time as a pure wave of pleasure overwhelms you both. In time, both of you will claim the other came first but for now, you are lost in the ecstasy of the moment.'
-	'"Oh <<$pcs_nickname>>, if you weren''t my sister, I would marry you." your sister mumbles.'
-	'Your warm, wet and limp bodies lay entangled in a moment of pure bliss before you fall asleep in each other arms.'    
+	'Your bodies convulse and spasm at the same time as a pure wave of pleasure overwhelms you both. In time, both of you will claim the other came first, but for now, you are lost in the ecstasy of the moment.'
+	'"Oh <<$pcs_nickname>>, if you weren''t my sister, I would marry you" your sister mumbles.'
+	'Your warm, wet and limp bodies lay entangled in a moment of pure bliss before you fall asleep in each other''s arms.'    
 
 	$orgasm_or = 'yes'
 	gs 'arousal', 'vaginal_finger', 5
@@ -271,9 +275,9 @@ if $ARGS[0] = 'sisboyQW_party':
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_8.jpg"></center>'
 	*nl
 	'Once you burst into Rex''s house, the loud music immediately drowns out just about any other noise.'
-	'You help the guys lay out the table. They carried the drinks and you the snacks, but there was so much booze that it covered the table, leaving nowhere to put the snacks.'
+	'You help the guys lay out the table. They carry the drinks and you the snacks, but there is so much booze that it covers the table, leaving nowhere to put the snacks.'
 	'Everyone starts to thump in unison, dealing, laughing and telling funny stories.'
-	'You cheerfully ask Anya. "You won''t leave me alone at the party will you?"'
+	'You cheerfully ask Anya "you won''t leave me alone at the party will you?"'
 	'Anya smiles and hands you a bottle of vodka. "Of course not <<$pcs_nickname>>."'
 	act 'Decline the drink':
 		*clr & cla
@@ -281,7 +285,7 @@ if $ARGS[0] = 'sisboyQW_party':
 		gs 'stat'
 		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_9.jpg"></center>'
 		*nl
-		'You politely try and refuse the drink, but everyone watching has gathered round and started chanting. "Drink! Drink! Drink! Drink! Drink! Drink!"'
+		'You politely try to refuse the drink, but everyone watching has gathered round and started chanting. "Drink! Drink! Drink! Drink! Drink! Drink!"'
 		'Giving into peer pressure, you take the bottle from Anya''s hand and gulp down a huge swig of vodka.'
 		act 'Go dance': gt 'sister_party', 'dance'
 		act 'Drink': gt 'sister_party', 'drink'
@@ -294,7 +298,7 @@ if $ARGS[0] = 'sisboyQW_party':
 		gs 'stat'
 		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_9.jpg"></center>'
 		*nl
-		'You took the bottle from her hand."Well, let''s party!" you say and gulp down a huge swig of vodka.'
+		'You take the bottle from her hand."Well, let''s party!" you say and gulp down a huge swig of vodka.'
 		'Roma looks at Anya and smirks. "Look, <<$pcs_nickname>> is drinking more than you!" Everyone then begins to drink heavily.'
 		act 'Go dance': gt 'sister_party', 'dance'
 		act 'Drink': gt 'sister_party', 'drink'
@@ -308,11 +312,11 @@ if $ARGS[0] = 'sisboyQW_party':
 		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_9.jpg"></center>'
 		*nl
 		'Standing, you try to get out from behind the table to go dancing, but no one is actually dancing. They are all just sitting and drinking.'
-		'Seeing you get up and wanting to leave the table, Rex pulls you over: "Where are you going? It''s only the beginning! Hold the bottle and let''s drink, otherwise I will be offended."'
+		'Seeing what you''re doing, Rex pulls you over: "Where are you going? It''s only the beginning! Hold the bottle and let''s drink, otherwise I will be offended."'
 		if sisterQW['rexbday'] = 2:
-			'You can''t deny the birthday boy, so take the bottle from his hand and gulp down a huge shot, feeling it burn down your throat. You hear others shouting in encouragement.'
+			'You can''t deny the birthday boy, so you take the bottle from his hand and gulp down a huge shot, feeling it burn down your throat. You hear others shouting in encouragement.'
 		else
-			'You can''t deny the host of the party, so take the bottle from his hand and gulp down a huge shot, feeling it burn down your throat. You hear others shouting in encouragement.'
+			'You can''t deny the host of the party, so you take the bottle from his hand and gulp down a huge shot, feeling it burn down your throat. You hear others shouting in encouragement.'
 		end
 		act 'Go dance': gt 'sister_party', 'dance'
 		act 'Drink': gt 'sister_party', 'drink'
@@ -338,9 +342,9 @@ if $ARGS[0] = 'dance':
 		gs 'stat'
 		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_13.jpg"></center>'
 		*nl
-		'You want to drink again and again. The boys quickly give you two bottles of whiskey and without any hesitation, you start to pour both of them into your mouth. The whiskey spills out of your mouth as you are unable to drink it all fast enough. It pours all down your body.'
-		'Your clothes are soaked in alcohol and everyone can see your nipples poking through your wet bra.'
-		'Two guys around you, mad with energy, begin to dance around you, persistently lapping at the booze on your body.'
+		'You want to drink again and again. The boys quickly give you two bottles of whiskey, and without any hesitation, you start to pour both of them into your mouth. The whiskey spills out of your mouth as you are unable to drink it all fast enough. It pours all down your body.'
+		'Your clothes are soaked in alcohol, and everyone can see your nipples poking through your wet bra.'
+		'Two guys, mad with energy, begin to dance around you, persistently lapping at the booze on your body.'
 		act 'Dance with them': gt 'sister_party', 'two_boy'
 	end
 	act 'Keep dancing':
@@ -365,7 +369,7 @@ if $ARGS[0] = 'anya_find':
 	*clr & cla
 	minut += 5
 	gs 'stat'
-	'You are looking for your sister, but can''t find her. "Where the hell did she go?" You look everywhere in desperation.'
+	'You look for your sister, but can''t find her. "Where the hell did she go?" You look everywhere in desperation.'
 	act 'Look in the bathroom': gt 'sister_party', 'anya_toilet'
 	act 'Look in the kitchen': gt 'sister_party', 'anya_kit'
 	act 'Look in the bedroom': gt 'sister_party', 'anya_bed'
@@ -393,7 +397,7 @@ if $ARGS[0] = 'anya_kit':
 			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_26.jpg"></center>'
 			*nl
 			'It takes you a while to find Anya again, but you eventually find her on her knees in front of two unfamiliar guys. "What are you doing? Stop and think about this!" you plead to your sister.'
-			'Anya keeps drunkenly sucking the guys off and they turn to look at you. "Come and join us or get the fuck out."'
+			'Anya keeps drunkenly sucking the guys off, and they turn to look at you. "Come and join us or get the fuck out."'
 			gs 'arousal', 'voyeur_sex', 5
 			gs 'stat'
 			act 'Wait':
@@ -427,7 +431,7 @@ if $ARGS[0] = 'anya_kit':
 					'You frown upon seeing your sister being used like this, but maybe it would be better for her if you let them use you too so she wouldn''t be the sole object of their lust? "OK, who wants to fuck me first?" you say as you walk over and take your clothes off.'
 					'The one that had been talking to you and fucking your sister''s mouth pulls away from her and shoves you down on your hands and knees. Without waiting, he shoves his cock in your ass and begins to furiously fuck you.'
 					'Your hands tighten as you grimace in pain, trying to think about anything but the pain of having your ass torn up.'
-					'This goes on for some time and the boys eventually switch places, taking turns fucking you and Anya in the ass. Finally, and mercifully, they cum inside of both of you. After they are finished, they laugh and leave the room.'
+					'This goes on for some time, though the boys do switch places from time to time, taking turns fucking you and Anya in the ass. Finally, and mercifully, they cum inside of both of you. After they are finished, they laugh and leave the room.'
 					'You gather your clothes up and get dressed. You then help Anya get dressed and help her home.'
 					gs 'arousal', 'anal', 10, 'rough', 'sub', 'group', 'unknown'
 					gs 'stat'
@@ -463,7 +467,7 @@ if $ARGS[0] = 'anya_bed':
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_23.jpg"></center>'
 	*nl
-	'In the bedroom, you see two guys jerking off onto the face of some poor unconscious girl as one of them says to the other "Let''s get the fuck out of here before she wakes up. I don''t want to deal with her ex-boyfriend, he''s one of the boxers."'
+	'In the bedroom, you see two guys jerking off onto the face of some poor unconscious girl as one of them says to the other "let''s get the fuck out of here before she wakes up. I don''t want to deal with her ex-boyfriend. He''s one of the boxers."'
 	'Anya isn''t here, so you keep searching.'
 	act 'Look in the bathroom': gt 'sister_party', 'anya_toilet'
 	act 'Look in the kitchen': gt 'sister_party', 'anya_kit'
@@ -514,7 +518,7 @@ if $ARGS[0] = 'two_boy':
 	gs 'stat'
 	'<center><video autoplay loop src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_14.mp4"></video></center>'
 	*nl
-	'They rub your body, grab your boobs and squeeze your ass. Under the influence of alcohol, you really like it and just enjoy the moment'
+	'They rub your body, grab your boobs and squeeze your ass. Under the influence of alcohol, you really like it and just enjoy the moment.'
 	'Seeing that you aren''t resisting, they pull you into the next room.'
 	gs 'arousal', 'foreplay', 5, 'sub', 'group', 'unknown'
 	gs 'stat'
@@ -524,7 +528,7 @@ if $ARGS[0] = 'two_boy':
 		*nl
 		'As you enter the room, they push you down on the bed and pull out their cocks.'
 		'In a drunken fog, you try to grab one, then the other, but you are so drunk that the room is spinning.'
-		'One of the guys starts licking your pussy and you can hear yourself moaning in passion.'
+		'One of the guys starts licking your pussy, and you can hear yourself moaning in passion.'
 		gs 'arousal', 'cuni', 5, 'sub', 'group', 'unknown'
 		gs 'stat'
 		act 'Doggystyle':

+ 1 - 16
locations/sitr.qsrc

@@ -72,22 +72,7 @@ if husband > 0 and husbandrink ! 10 and husbandrinkday ! daystart:
 	end
 end
 
-if student > 0 and kursovik < 100:
-	act 'Do some coursework (1:00)':
-		cla
-		*clr
-		minut += 60
-		kursovik += rand(pcs_intel / 20, pcs_intel / 10)
-
-		if kursovik > 100:kursovik = 100
-
-		pcs_mood -= 10
-		'<center><img <<$set_imgh>> src="images/pc/activities/study.jpg"></center>'
-		'You work on your courses homework and are about <<kursovik>> percent done.'
-
-		act 'Exit':gt 'sitr'
-	end
-end
+gs 'unicoursework', 'start', $loc
 
 if ml_guitar['carried'] = 1:
 	act 'Place the guitar next to your desk': 

+ 1 - 15
locations/sitr2x.qsrc

@@ -61,21 +61,7 @@ end
 
 gs'subkid'
 
-if student > 0 and kursovik < 100:
-	act 'Write kursovik 1 h':
-		cla
-		*clr
-		minut = minut + 60
-		kursovik = kursovik + rand(pcs_intel/20,pcs_intel/10)
-		if kursovik > 100:kursovik = 100
-		pcs_mood -= 10
-
-		'<center><img <<$set_imgh>> src="images/pc/activities/study.jpg"></center>'
-		'You sat and studied, you managed to complete more of your coursework. You are now <<kursovik>> percent done.'
-
-		act 'Logout':gt'sitr2x'
-	end
-end
+gs 'unicoursework', 'start', $loc
 
 act 'Go out on the balcony': gt 'balkon','start'
 

+ 1 - 1
locations/stat_display.qsrc

@@ -1652,7 +1652,7 @@ if home_owned[1] > 0:
 	$streetev_home = 'your apartment'
 elseif tanwork = 1:
 	$streetev_home = 'Tanya''s apartment'
-elseif student > 0:
+elseif func('uniutil', 'student', 'enrolled'):
 	$streetev_home = 'your dorm'
 elseif home_owned[2] = 1:
 	$streetev_home = 'outside your apartment block'

+ 4 - 4
locations/street_event.qsrc

@@ -11,7 +11,7 @@
 		shantpopala: 100% if shantpopala>0
 2. home-related events: check if player live here (workDolgDay, vladimirday, pcs_magik >= 1 and mainQW = 0, hour = meethour).
 [street]: home_owned[1] > 0 for korr
-[down]:tanwork = 1 for house, student > 0 for dorm
+[down]:tanwork = 1 for house, func('uniutil', 'student', 'enrolled') for dorm
 [city_industrial]:none for now. use (train station) as position, if no home in city.
 Known issue: boyfriend/vladimir may wait you in both place, if you rent house in [street] and study in university/work in Tanya
 
@@ -49,7 +49,7 @@ elseif $ARGS[0] = 'city_industrial':
 	streetev_hijack = 0
 	streetev_bf = 30
 	streetev_mistmeet = 5
-	if home_owned[1] = 0 and tanwork = 0 and student = 0:
+	if home_owned[1] = 0 and tanwork = 0 and func('uniutil', 'student', 'not_enrolled'):
 		streetev_home = 0
 		$streetev_home = 'by the train station'
 	end
@@ -69,7 +69,7 @@ elseif $ARGS[0] = 'pav_commercial':
 	streetev_hijack = 2
 	streetev_bf = 90
 	streetev_mistmeet = 20
-	if home_owned[1] = 0 and tanwork = 0 and student = 0:
+	if home_owned[1] = 0 and tanwork = 0 and func('uniutil', 'student', 'not_enrolled'):
 		streetev_home = 0
 		$streetev_home = 'on the high street'
 	end
@@ -85,7 +85,7 @@ elseif $ARGS[0] = 'city_island':
 	streetev_hijack = 2
 	streetev_bf = 90
 	streetev_mistmeet = 20
-	if student > 0:
+	if func('uniutil', 'student', 'enrolled'):
 		streetev_home = 1
 		$streetev_home = 'near the entrance to your dorm'
 	end

+ 68 - 0
locations/unicoursework.qsrc

@@ -0,0 +1,68 @@
+# unicoursework
+
+$unicourseworkloc[0] = $ARGS[1]
+$unicourseworkloc[1] = $ARGS[2]
+
+if $ARGS[0] = 'start':
+	if func('uniutil', 'student', 'enrolled') and func('uniutil', 'assignment_progress', 'is_not_finished'):
+		if $unicourseworkloc[0] = 'komp':
+			'You should probably do some of your <a href="exec:gt ''unicoursework'', ''do_coursework'', $unicourseworkloc[0], $unicourseworkloc[1]">coursework</a>.'
+		else:
+			act 'Do some coursework (1:00)':
+				gt 'unicoursework', 'do_coursework', $unicourseworkloc[0], $unicourseworkloc[1]
+			end
+		end
+	end
+end
+
+if $ARGS[0] = 'do_coursework':
+    *clr & cla
+    menu_off = 1
+    minut += 60
+
+    if $ARGS[1] = 'komp':
+    	elektro += 3
+    	internet -= 1
+    	compskl_exp += 1
+    end
+
+    gs 'uniutil', 'assignment_progress', 'update'
+
+    pcs_mood -= 10
+    gs 'stat'
+
+    if $ARGS[1] = 'komp':
+    	'<center><b>Coursework</b></center>'
+    	'<center><img <<$set_imgh>> src="images/shared/accessories/computer/kursak.jpg"></center>'
+    else:
+    	'<center><img <<$set_imgh>> src="images/pc/activities/study.jpg"></center>'
+    end
+
+    if $ARGS[1] = 'komp':
+    	'It may be boring, but it still needs doing! You spend an hour doing coursework, and '+func('uniutil', 'assignment_progress', 'get')+'% of it is now finished.'
+    elseif $ARGS[1] = 'sitr2x':
+    	'You sat and studied, and you managed to complete some of your coursework. You are now '+func('uniutil', 'assignment_progress', 'get')+' percent done.'
+    elseif $ARGS[1] = 'sitr':
+    	'You work on your course''s homework and are about '+func('uniutil', 'assignment_progress', 'get')+' percent done.'
+    elseif $ARGS[1] = 'pav_shared_apt':
+    	'You sit down on the sofa bed and do some of your coursework. You''ve finished '+func('uniutil', 'assignment_progress', 'get')+' percent of it.'
+    elseif $ARGS[1] = 'nichBedroomServant':
+    	'You work on your coursework and have now completed '+func('uniutil', 'assignment_progress', 'get')+' percent.'
+    elseif $ARGS[1] = 'bedrPar':
+    	'You sit down at your desk and do some of your coursework. You''ve finished '+func('uniutil', 'assignment_progress', 'get')+' percent of it.'
+    else:
+    	'You sit for an hour and do some of your work for class. You''ve finished '+func('uniutil', 'assignment_progress', 'get')+' percent of the work.'
+    end
+
+    if func('uniutil', 'assignment_progress', 'is_not_finished'):
+    	act 'Do some more coursework (1:00)':
+    		gt 'unicoursework', 'do_coursework', $unicourseworkloc[0], $unicourseworkloc[1]
+    	end
+    end
+
+    act 'Stop':
+    	gt $unicourseworkloc[0], $unicourseworkloc[1]
+    end
+end
+
+--- unicoursework ---------------------------------

+ 644 - 0
locations/uniutil.qsrc

@@ -0,0 +1,644 @@
+# uniutil
+
+if $ARGS[0] = 'eligible_for_university':
+	RESULT = func('uniutil', 'student', 'status') = 0 and func('uniutil', 'diploma', 'obtained') = 0 and (age >= 17 or fakepassport = 1)
+end
+
+if $ARGS[0] = 'prepclass':
+	if $ARGS[1] = 'cost':
+		RESULT = 15000
+	end
+
+	if $ARGS[1] = 'closing_hour':
+		RESULT = 21
+	end
+
+	if $ARGS[1] = 'is_enrolled':
+		RESULT = prepclassstats['enrolled'] = 1
+	end
+
+	if $ARGS[1] = 'set_enrolled':
+		prepclassstats['enrolled'] = ARGS[2]
+	end
+
+	if $ARGS[1] = 'count':
+		RESULT = prepclassstats['count']
+	end
+
+	if $ARGS[1] = 'set_count':
+		prepclassstats['count'] = ARGS[2]
+	end
+
+	if $ARGS[1] = 'update_count':
+		gs 'uniutil', 'prepclass', 'set_count', func('uniutil', 'prepclass', 'count') + 1
+	end
+
+	if $ARGS[1] = 'enroll':
+		money -= func('uniutil', 'prepclass', 'cost')
+		gs 'uniutil', 'prepclass', 'set_enrolled', 1
+		gs 'uniutil', 'prepclass', 'set_count', 0
+	end
+
+	if $ARGS[1] = 'unenroll':
+		killvar 'prepclassstats'
+	end
+
+	if $ARGS[1] = 'offered_this_month':
+		RESULT = month <= func('uniutil', 'entrance_exam', 'month')
+	end
+
+	if $ARGS[1] = 'offered_today':
+		RESULT = func('uniutil', 'entrance_exam', 'offered_this_month') and week < 6
+	end
+
+	if $ARGS[1] = 'in_session':
+		RESULT = func('uniutil', 'prepclass', 'offered_today') and hour < func('uniutil', 'prepclass', 'closing_hour')
+	end
+end
+
+if $ARGS[0] = 'entrance_exam':
+	if $ARGS[1] = 'month':
+		RESULT = 8
+	end
+
+	if $ARGS[1] = 'offered_today':
+		RESULT = month = func('uniutil', 'entrance_exam', 'month')
+	end
+
+	if $ARGS[1] = 'is_passed':
+		RESULT = pcs_intel + func('uniutil', 'prepclass', 'count') >= 60
+	end
+
+	if $ARGS[1] = 'print_month':
+		$RESULT = $monthName[func('uniutil', 'entrance_exam', 'month')]
+	end
+end
+
+!! The legacy vars are the vars used by the university before the vars were largely consolidated into
+!! arrays with string indices. This function exists to avoid breaking old save files with this change,
+!! which was made in September 2020. It can be removed whenever it is felt enough time has passed.
+if $ARGS[0] = 'transfer_legacy_vars':
+	if abiturient > 0:
+		gs 'uniutil', 'prepclass', 'set_enrolled', 1
+		gs 'uniutil', 'prepclass', 'set_count', abiturient - 1
+	end
+
+	killvar 'abiturient'
+
+	if kurs > 0:
+		if (semestr = 1 and month < func('uniutil', 'entrance_exam', 'month')) or (semestr = 2 and month > func('uniutil', 'exam', 'month', 2)):
+			!! under the old system, the semestr variable was advanced when the exam was passed, so if the
+			!! variable is set to a value that does not match the current month, the player skipped the exam
+			!! and is expelled
+			gs 'uniutil', 'student', 'set_status', -2
+			killvar 'unisemestrstats'
+		elseif semestr = 2 and month = func('uniutil', 'exam', 'month', 1):
+			!! semestr = 2 in first semester exam month in the old system indicates that its still the first
+			!! semester (time-wise) but the exam has been passed, so we set the new variables accordingly.
+			gs 'uniutil', 'semester', 'set', 1
+			gs 'uniutil', 'attendance', 'reset'
+			gs 'uniutil', 'assignment_progress', 'reset'
+			gs 'uniutil', 'assignments_done', 'reset'
+			gs 'uniutil', 'semester_result', 'set_passed'
+			gs 'uniutil', 'passed_semesters', 'set', 0
+		else:
+			gs 'uniutil', 'semester', 'set', semestr
+			gs 'uniutil', 'attendance', 'set', lektor
+			gs 'uniutil', 'assignment_progress', 'set', kursovik
+			gs 'uniutil', 'assignments_done', 'set', kursovikD
+			gs 'uniutil', 'semester_result', 'reset'
+			gs 'uniutil', 'passed_semesters', 'set', iif(semestr = 2, 1, 0)
+		end
+
+		gs 'uniutil', 'semester', 'update_year'
+		gs 'uniutil', 'scholarship', 'set', iif(stipuha = 1, func('uniutil', 'scholarship', 'honors_value'), 0)
+	end
+
+	killvar 'kurs'
+	killvar 'semestr'
+	killvar 'stipuha'
+	killvar 'lektor'
+	killvar 'kursovik'
+	killvar 'kursovikD'
+	killvar 'examen'
+end
+
+if $ARGS[0] = 'check_semester_vs_date':
+	if year > func('uniutil', 'semester', 'get_year') + 1:
+		!! if year has advanced by more than one since a semester was finished, semesters were skipped.
+		RESULT = -1
+		exit
+	end
+
+	unilect_sm = func('uniutil', 'lecture', 'start_month', func('uniutil', 'semester', 'get'))
+	uniexam_m = func('uniutil', 'exam', 'month', func('uniutil', 'semester', 'get'))
+	uniexam_mns = func('uniutil', 'exam', 'month', func('uniutil','semester', 'next'))
+
+	if year = func('uniutil', 'semester', 'get_year') + 1:
+		if month > uniexam_m mod 12 and func('uniutil', 'semester_passed') and month <= uniexam_mns:
+			!! the semester was passed and the next one is not over
+			RESULT = 1
+		elseif month <= uniexam_m:
+			!! the semester is still in progress
+			RESULT = 0
+		else:
+			!! expelled
+			RESULT = -1
+		end
+	else:
+		if unilect_sm > uniexam_m or month <= uniexam_m:
+			!! The semester is still in progress
+			RESULT = 0
+		elseif func('uniutil', 'semester_result', 'is_passed') and (uniexam_m > uniexam_mns or month <= uniexam_mns):
+			!! the semester was passed and the next one is not over
+			RESULT = 1
+		else:
+			!! expelled
+			RESULT = -1
+		end
+	end
+
+	killvar 'unilect_sm'
+	killvar 'uniexam_m'
+	killvar 'uniexam_mns'
+end
+
+if $ARGS[0] = 'student':
+	if $ARGS[1] = 'status':
+		if student >= 0:
+			gs 'uniutil', 'transfer_legacy_vars'
+		end
+
+		if student > 0:
+			uni_semvdateres = func('uniutil', 'check_semester_vs_date')
+
+			if uni_semvdateres < 0:
+				!! date indicates semester exam skipped
+				gs 'uniutil', 'student', 'expel'
+			elseif uni_semvdateres > 0:
+				!! date indicates semester exam passed and next semester started
+				gs 'uniutil', 'semester', 'update'
+				gs 'uniutil', 'semester', 'update_year'
+				gs 'uniutil', 'semester_result', 'reset'
+				gs 'uniutil', 'passed_semesters', 'update'
+			else:
+				!! date indicates semester is still in progress
+				gs 'uniutil', 'semester', 'update_year'
+			end
+
+			killvar 'uni_semvdateres'
+		end
+
+		RESULT = student
+	end
+
+	if $ARGS[1] = 'set_status':
+		student = ARGS[2]
+	end
+
+	if $ARGS[1] = 'enroll':
+		gs 'uniutil', 'prepclass', 'unenroll'
+		gs 'uniutil', 'student', 'set_status', 1
+		gs 'uniutil', 'semester', 'set' 1
+		gs 'uniutil', 'semester', 'update_year'
+		gs 'uniutil', 'scholarship', 'reset'
+		gs 'uniutil', 'attendance', 'reset'
+		gs 'uniutil', 'assignment_progress', 'reset'
+		gs 'uniutil', 'assignments_done', 'reset'
+		gs 'uniutil', 'semester_result', 'reset'
+	end
+
+	if $ARGS[1] = 'unenroll':
+		gs 'uniutil', 'prepclass', 'unenroll'
+		if student > 0:
+			killvar 'student'
+			killvar 'unisemestrstats'
+		end
+	end
+
+	if $ARGS[1] = 'expel':
+		if func('uniutil', 'semester_result', 'is_failed'):
+			gs 'uniutil', 'student', 'unenroll'
+			gs 'uniutil', 'student', 'set_status', -1
+		elseif func('uniutil', 'check_semester_vs_date') < 0:
+			gs 'uniutil', 'student', 'unenroll'
+			gs 'uniutil', 'student', 'set_status', -2
+		else:
+			gs 'uniutil', 'student', 'unenroll'
+			gs 'uniutil', 'student', 'set_status', -3
+		end
+	end
+
+	if $ARGS[1] = 'graduate':
+		gs 'uniutil', 'student', 'unenroll'
+		gs 'uniutil', 'diploma', 'set_obtained'
+	end
+
+	if $ARGS[1] = 'expelled_for_failing':
+		RESULT = func('uniutil', 'student', 'status') = -1
+	end
+
+	if $ARGS[1] = 'expelled_for_skipping':
+		RESULT = func('uniutil', 'student', 'status') = -2
+	end
+
+	if $ARGS[1] = 'expelled_for_other_reason':
+		RESULT = func('uniutil', 'student', 'status') = -3
+	end
+
+	if $ARGS[1] = 'enrolled':
+		RESULT = func('uniutil', 'student', 'status') > 0
+	end
+
+	if $ARGS[1] = 'not_enrolled':
+		RESULT = func('uniutil', 'student', 'enrolled') = 0
+	end
+
+	if $ARGS[1] = 'semesters_to_graduate':
+		RESULT = 2
+	end
+end
+
+if $ARGS[0] = 'diploma':
+	if $ARGS[1] = 'get':
+		RESULT = diplom
+	end
+
+	if $ARGS[1] = 'set':
+		diplom = ARGS[2]
+	end
+
+	if $ARGS[1] = 'set_obtained':
+		gs 'uniutil', 'diploma', 'set', 1
+		if func('uniutil', 'fake_diploma', 'aware_needed'):
+			gs 'uniutil', 'fake_diploma', 'reset'
+		end
+	end
+
+	if $ARGS[1] = 'obtained':
+		RESULT = func('uniutil', 'diploma', 'get') > 0
+	end
+end
+
+if $ARGS[0] = 'fake_diploma':
+	if $ARGS[1] = 'get':
+		RESULT = fakediplom
+	end
+
+	if $ARGS[1] = 'set':
+		fakediplom = ARGS[2]
+	end
+
+	if $ARGS[1] = 'set_aware_needed':
+		gs 'uniutil', 'fake_diploma', 'set', 2
+	end
+
+	if $ARGS[1] = 'set_obtained':
+		gs 'uniutil', 'fake_diploma', 'set', 1
+	end
+
+	if $ARGS[1] = 'reset':
+		gs 'uniutil', 'fake_diploma', 'set', 0
+	end
+
+	if $ARGS[1] = 'aware_needed':
+		RESULT = func('uniutil', 'fake_diploma', 'get') = 2
+	end
+
+	if $ARGS[1] = 'obtained':
+		RESULT = func('uniutil', 'fake_diploma', 'get') = 1
+	end
+end
+
+if $ARGS[0] = 'appear_to_have_graduated':
+	RESULT = func('uniutil', 'diploma', 'obtained') or func('uniutil', 'fake_diploma', 'obtained')
+end
+
+if $ARGS[0] = 'attendance':
+	if $ARGS[1] = 'get':
+		RESULT = unisemestrstats['lectures_attendad']
+	end
+
+	if $ARGS[1] = 'set':
+		unisemestrstats['lectures_attendad'] = ARGS[2]
+	end
+
+	if $ARGS[1] = 'update':
+		gs 'uniutil', 'attendance', 'set', func('uniutil', 'attendance', 'get') + 1
+	end
+
+	if $ARGS[1] = 'reset':
+		gs 'uniutil', 'attendance', 'set', 0
+	end
+
+	if $ARGS[1] = 'is_great':
+		RESULT = func('uniutil', 'attendance', 'get') > 55
+	end
+
+	if $ARGS[1] = 'is_ok':
+		RESULT = func('uniutil', 'attendance', 'get') > 40
+	end
+
+	if $ARGS[1] = 'is_bad':
+		RESULT = func('uniutil', 'attendance', 'is_ok') = 0
+	end
+end
+
+if $ARGS[0] = 'assignment_progress':
+	if $ARGS[1] = 'get':
+		RESULT = unisemestrstats['assignment_progress']
+	end
+
+	if $ARGS[1] = 'set':
+		unisemestrstats['assignment_progress'] = iif(ARGS[2] <= 100, ARGS[2], 100)
+	end
+
+	if $ARGS[1] = 'update':
+		gs 'uniutil', 'assignment_progress', 'set', func('uniutil', 'assignment_progress', 'get') + rand(pcs_intel / 20, pcs_intel / 10)
+	end
+
+	if $ARGS[1] = 'reset':
+		gs 'uniutil', 'assignment_progress', 'set', 0
+	end
+
+	if $ARGS[1] = 'is_finished':
+		RESULT = func('uniutil', 'assignment_progress', 'get') >= 100
+	end
+
+	if $ARGS[1] = 'is_not_finished':
+		RESULT = func('uniutil', 'assignment_progress', 'is_finished') = 0
+	end
+end
+
+if $ARGS[0] = 'assignments_done':
+	if $ARGS[1] = 'get':
+		RESULT = unisemestrstats['assignments_done']
+	end
+
+	if $ARGS[1] = 'set':
+		unisemestrstats['assignments_done'] = ARGS[2]
+	end
+
+	if $ARGS[1] = 'update':
+		gs 'uniutil', 'assignment_progress', 'reset'
+		gs 'uniutil', 'assignments_done', 'set', func('uniutil', 'assignments_done', 'get') + 1
+	end
+
+	if $ARGS[1] = 'reset':
+		gs 'uniutil', 'assignments_done', 'set', 0
+	end
+
+	if $ARGS[1] = 'great_num':
+		RESULT = 11
+	end
+
+	if $ARGS[1] = 'min_num':
+		RESULT = 1
+	end
+
+	if $ARGS[1] = 'did_great_num':
+		RESULT = func('uniutil', 'assignments_done', 'get') >= func('uniutil', 'assignments_done', 'great_num')
+	end
+
+	if $ARGS[1] = 'did_min_num':
+		RESULT = func('uniutil', 'assignments_done', 'get') >= func('uniutil', 'assignments_done', 'min_num')
+	end
+end
+
+if $ARGS[0] = 'scholarship':
+	if $ARGS[1] = 'get':
+		RESULT = unisemestrstats['scholarship']
+	end
+
+	if $ARGS[1] = 'set':
+		unisemestrstats['scholarship'] = ARGS[2]
+	end
+
+	if $ARGS[1] = 'reset':
+		gs 'uniutil', 'scholarship', 'set', 0
+	end
+
+	if $ARGS[1] = 'is_active':
+		RESULT = unisemestrstats['scholarship'] > 0 and func('uniutil', 'semester', 'is_active')
+	end
+
+	if $ARGS[1] = 'honors_value':
+		RESULT = 1200
+	end
+end
+
+if $ARGS[0] = 'lecture':
+	if $ARGS[1] = 'start_hour':
+		RESULT = 8
+	end
+
+	if $ARGS[1] = 'length':
+		RESULT = 6
+	end
+
+	if $ARGS[1] = 'start_month':
+		if ARGS[2] = 1:
+			RESULT = 9
+		elseif ARGS[2] = 2:
+			RESULT = 2
+		else:
+			!! Set to impossible month if it is not semester 1 or 2
+			RESULT = 13
+		end
+	end
+
+	if $ARGS[1] = 'end_month':
+		if ARGS[2] = 1:
+			RESULT = 11
+		elseif ARGS[2] = 2:
+			RESULT = 4
+		else:
+			!! Set to impossible month if it is not semester 1 or 2
+			RESULT = 0
+		end
+	end
+
+	if $ARGS[1] = 'offered_this_month':
+		unilect_sm = func('uniutil', 'lecture', 'start_month', func('uniutil', 'semester', 'get'))
+		unilect_em = func('uniutil', 'lecture', 'end_month', func('uniutil', 'semester', 'get'))
+		if unilect_sm <= unilect_em:
+			!! if semester is in one calendar year
+			RESULT = month >= unilect_sm and month <= unilect_em
+		else:
+			!! if semester continues through New Years
+			RESULT = month >= unilect_sm or month <= unilect_em
+		end
+		killvar 'unilect_sm'
+		killvar 'unilect_em'
+	end
+
+	if $ARGS[1] = 'offered_today':
+		RESULT = func('uniutil', 'lecture', 'offered_this_month') and week < 6
+	end
+
+	if $ARGS[1] = 'in_session':
+		RESULT = func('uniutil', 'lecture', 'offered_today') and hour < func('uniutil', 'lecture', 'start_hour')
+	end
+
+	if $ARGS[1] = 'print_start_month':
+		$RESULT = $monthName[func('uniutil', 'lecture', 'start_month', ARGS[2])]
+	end
+
+	if $ARGS[1] = 'print_months':
+		unilect_idx = func('uniutil', 'lecture', 'start_month', ARGS[2])
+		unilect_end = func('uniutil', 'lecture', 'end_month', ARGS[2])
+
+		:lectureprintmonthsloop
+		$RESULT += $monthname[unilect_idx]
+		if unilect_idx ! unilect_end:
+			$RESULT += ', '
+			unilect_idx = (unilect_idx mod 12) + 1
+			jump 'lectureprintmonthsloop'
+		end
+
+		killvar 'unilect_idx'
+		killvar 'unilect_end'
+	end
+end
+
+if $ARGS[0] = 'exam':
+	if $ARGS[1] = 'month':
+		if ARGS[2] = 1:
+			RESULT = 12
+		elseif ARGS[2] = 2:
+			RESULT = 5
+		else:
+			!! Set to impossible month if it is not semester 1 or 2
+			RESULT = 0
+		end
+	end
+
+	if $ARGS[1] = 'offered_this_month':
+		RESULT = month = func('uniutil', 'exam', 'month', func('uniutil', 'semester', 'get'))
+	end
+
+	if $ARGS[1] = 'offered_today':
+		RESULT = func('uniutil', 'exam', 'offered_this_month') and week < 6
+	end
+
+	if $ARGS[1] = 'print_month':
+		$RESULT = $monthname[func('uniutil', 'exam', 'month', ARGS[2])]
+	end
+end
+
+if $ARGS[0] = 'semester':
+	if $ARGS[1] = 'get':
+		RESULT = unisemestrstats['num']
+	end
+
+	if $ARGS[1] = 'set':
+		unisemestrstats['num'] = ARGS[2]
+	end
+
+	if $ARGS[1] = 'next':
+		RESULT = (func('uniutil', 'semester', 'get') mod func('uniutil', 'semester', 'total')) + 1
+	end
+
+	if $ARGS[1] = 'total':
+		RESULT = 2
+	end
+
+	if $ARGS[1] = 'update':
+		gs 'uniutil', 'semester', 'set', func('uniutil', 'semester', 'next')
+	end
+
+	if $ARGS[1] = 'get_year':
+		RESULT = unisemestrstats['year']
+	end
+
+	if $ARGS[1] = 'update_year':
+		unisemestrstats['year'] = year
+	end
+
+	if $ARGS[1] = 'is_active':
+		RESULT = func('uniutil', 'lecture', 'offered_this_month') or func('uniutil', 'exam', 'offered_this_month')
+	end
+
+	if $ARGS[1] = 'print_months':
+		$RESULT = 'Semester ' + ARGS[2] + ' lectures: ' + func('uniutil', 'lecture', 'print_months', ARGS[2]) + '.
+'
+		$RESULT += 'Semester ' + ARGS[2] + ' exams: ' + func('uniutil', 'exam', 'print_month', ARGS[2]) + '.
+'
+	end
+
+	if $ARGS[1] = 'print_all_months':
+		unisemester_idx = 1
+
+		:semesterprintmonthsloop
+		$RESULT += func('uniutil', 'semester', 'print_months', unisemester_idx)
+		if unisemester_idx < func('uniutil', 'semester', 'total'):
+			unisemester_idx += 1
+			jump 'semesterprintmonthsloop'
+		end
+
+		killvar 'unisemester_idx'
+	end
+end
+
+if $ARGS[0] = 'semester_result':
+	if $ARGS[1] = 'get':
+	RESULT = unisemestrstats['is_passed']
+end
+
+	if $ARGS[1] = 'set':
+		unisemestrstats['is_passed'] = ARGS[2]
+	end
+
+	if $ARGS[1] = 'set_passed':
+		gs 'uniutil', 'semester_result', 'set', 1
+	end
+
+	if $ARGS[1] = 'set_failed':
+		gs 'uniutil', 'semester_result', 'set', -1
+	end
+
+	if $ARGS[1] = 'reset':
+		gs 'uniutil', 'semester_result', 'set', 0
+	end
+
+	if $ARGS[1] = 'is_passed':
+		RESULT = func('uniutil', 'semester_result', 'get') > 0
+	end
+
+	if $ARGS[1] = 'is_failed':
+		RESULT = func('uniutil', 'semester_result', 'get') < 0
+	end
+end
+
+if $ARGS[0] =  'exam_outcome':
+	gs 'uniutil', 'assignment_progress', 'reset'
+	gs 'uniutil', 'assignments_done', 'reset'
+	gs 'uniutil', 'attendance', 'reset'
+
+	if $ARGS[1] = 'passed_honors':
+		gs 'uniutil', 'semester_result', 'set_passed'
+		gs 'uniutil', 'scholarship', 'set', func('uniutil', 'scholarship', 'honors_value')
+	elseif $ARGS[1] = 'passed'
+		gs 'uniutil', 'semester_result', 'set_passed'
+		gs 'uniutil', 'scholarship', 'reset'
+	else:
+		gs 'uniutil', 'semester_result', 'set_failed'
+		gs 'uniutil', 'scholarship', 'reset'
+	end
+end
+
+if $ARGS[0] = 'passed_semesters':
+	if $ARGS[1] = 'get':
+		RESULT = unisemestrstats['prev_passed_count'] + iif(func('uniutil', 'semester_result', 'is_passed'), 1, 0)
+	end
+
+	if $ARGS[1] = 'set':
+		unisemestrstats['prev_passed_count'] = ARGS[2]
+	end
+
+	if $ARGS[1] = 'update':
+		gs 'uniutil', 'passed_semesters', 'set', func('uniutil', 'passed_semesters', 'get')
+	end
+end
+
+--- uniutil ---------------------------------

+ 148 - 177
locations/univer.qsrc

@@ -12,16 +12,36 @@ if $ARGS[0] = 'start':
 	'<center><b><font color="maroon">The University</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/island/university/univer.jpg"></center>'
 
-	if student = 0 and abiturient = 0:'You can take preparatory classes at the University for 15,000 <b>₽</b>.'
-
-	'Admission examinations for the University are held in <b>August</b>.'
-	'The lectures begin at <b>08:00</b>. You won''t be allowed to attend if late.'
-	'First semester: September, October, November.'
-	'Second semester: February, March, April.'
-
-	if student > 0:'You have completed <<kurs>> assignments for <<semestr>>.'
-
-	if abiturient = 1:'You''ve enrolled in the preparatory classes.'
+	'University lectures begin at <b>'+func('uniutil', 'lecture', 'start_hour')+':00</b>. Students aren''t allowed to attend if late.'
+	
+	func('uniutil', 'semester', 'print_all_months')
+
+	if func('uniutil', 'diploma', 'obtained'):
+		'You have graduated from the University.'
+	elseif func('uniutil', 'student', 'expelled_for_failing'):
+		'You have been expelled from the University for failing your exams.'
+	elseif func('uniutil', 'student', 'expelled_for_skipping'):
+		'You have been expelled from the University for skipping your exams.'
+	elseif func('uniutil', 'student', 'expelled_for_other_reason'):
+		'You have been expelled from the University for reasons unrelated to your exam results.'
+	elseif func('uniutil', 'student', 'enrolled'):
+		if func('uniutil', 'passed_semesters', 'get') = func('uniutil', 'student', 'semesters_to_graduate'):
+			gs 'uniutil', 'student', 'graduate'
+			'Congratulations, you''ve earned your degree!'
+		elseif func('uniutil', 'semester_result', 'is_failed'):
+			gs 'uniutil', 'student', 'expel'
+			'You got expelled from the University.'
+		else:
+			'You are enrolled at the University.'
+		end
+	else:
+		if func('uniutil', 'prepclass', 'is_enrolled'):
+			'You''ve enrolled in the preparatory classes.'
+		else:
+			'You can take preparatory classes at the University on weekdays for '+func('uniutil', 'prepclass', 'cost')' <b>₽</b>.'
+		end
+		'Admission examinations for the University are held in <b>'+func('uniutil', 'entrance_exam', 'print_month')+'</b>.'
+	end
 
 	act 'Leave':
 		cla
@@ -29,136 +49,98 @@ if $ARGS[0] = 'start':
 		gt 'city_island'
 	end
 
-	if student = 0 and abiturient = 0 and money >= 15000 and month < 9 and diplom = 0 and (age >= 17 or fakepassport = 1):
-		''
+	if func('uniutil', 'eligible_for_university'):
+		if func('uniutil', 'prepclass', 'offered_this_month'):
+			if func('uniutil', 'prepclass', 'is_enrolled'):
+				if func('uniutil', 'prepclass', 'in_session'):
+					act 'Attend preparatory class (1:00)':
+						cla
+						*clr
+						minut += 60
+						gs 'uniutil', 'prepclass', 'update_count'
+						intel_exp += 1 + (mentats_dose - rand(0,mentats_dose))
+						'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom.jpg"></center>'
+						'You attend the preparatory class for an hour. You pay close attention to what is being said and take notes for the entrance examination later on.'
 
-		act 'Pay for the preparatory classes (15,000 <b>₽</b>)':
-			cla
-			minut += 5
-			money -= 15000
-			abiturient = 1
-			menu_off = 1
-			'You paid 15,000 <b>₽</b> for the preparatory classes. They are held every weekday at <b>21:00</b>.'
+						act 'Leave class':gt 'univer', 'start'
+					end
+				end
+			else:
+				if money >= func('uniutil', 'prepclass', 'cost'):
+					act 'Pay for the preparatory classes ('+func('uniutil', 'prepclass', 'cost')+' <b>₽</b>)':
+						cla
+						minut += 5
+						menu_off = 1
+						gs 'uniutil', 'prepclass', 'enroll'
+						'You paid '+func('uniutil', 'prepclass', 'cost')+' <b>₽</b> for the preparatory classes. They are held every weekday until <b>'+func('uniutil', 'prepclass', 'closing_hour')+':00</b>.'
 
-			act 'Move away':gt 'univer', 'start'
+						act 'Move away':gt 'univer', 'start'
+					end
+				end
+			end
 		end
-	elseif abiturient >= 1 and month < 9 and hour < 21 and week < 6:
-		act 'Attend preparatory class (1:00)':
-			cla
-			*clr
-			minut += 60
-			abiturient += 1
-			intel_exp += 1 + (mentats_dose - rand(0,mentats_dose))
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom.jpg"></center>'
-			'You attend the preparatory class for an hour, you pay close attention to what is being said and make notes for the entrance examination later on.'
 
-			act 'Leave class':gt 'univer', 'start'
-		end
-	end
+		if func('uniutil', 'entrance_exam', 'offered_today'):
+			'You can try to take an entrance exam.'
 
-	if month = 8 and student = 0 and diplom = 0 and (age >= 17 or fakepassport = 1):
-		'You can try to take an entrance exam.'
+			act 'Take the entrance exam (1:00)':
+				cla
+				*clr
+				minut += 60
+				'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom.jpg"></center>'
 
-		act 'Take the entrance exam (1:00)':
-			cla
-			*clr
-			minut += 60
-			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom.jpg"></center>'
+				if func('uniutil', 'entrance_exam', 'is_passed'):
+					gs 'uniutil', 'student', 'enroll'
+					'You have successfully passed the entrance exam and can attend the University in '+func('uniutil', 'lecture', 'print_start_month', func('uniutil', 'semester', 'get'))+'.'
+				else
+					'You have failed the entrance exam. You need to study harder...'
+				end
 
-			if pcs_intel + abiturient >= 60:
-				student = 1
-				kurs = 1
-				semestr = 1
-				abiturient = 0
-				'You have successfully passed the entrance exam and can attend the University in September.'
-			else
-				'You have failed the entrance exam. You need to study harder...'
+				act 'Leave class':gt 'univer', 'start'
 			end
-
-			act 'Leave class':gt 'univer', 'start'
 		end
 	end
 
-	if week < 6 and student > 0 and month > 8 and month < 12:
-		!! 1st semester
-		act 'Visit the Dean':
-			cla
-
-			if semestr = 2 and examen = 0:examen = 2
-
-			gt 'univer', 'dekanat'
-		end
-	elseif week < 6 and student > 0 and month > 1 and month < 5:
-		!! 2nd semester
-		act 'Visit the Dean':
-			cla
-
-			if semestr = 1 and examen = 0:examen = 2
-
-			gt 'univer', 'dekanat'
+	if func('uniutil', 'student', 'enrolled'):
+		if func('uniutil', 'lecture', 'offered_today'):
+			act 'Visit the Dean':
+				cla
+				gt 'univer', 'deans_office'
+			end
+		elseif func('uniutil', 'exam', 'offered_today'):
+			act 'Take the exam':gt 'univer', 'exam_room'
 		end
-	elseif week < 6 and student > 0 and month = 12 and examen = 0 and semestr = 1:
-		!! 1st semester exams
-		act 'Do the exam':gt 'univer', 'examen'
-	elseif week < 6 and student > 0 and month = 5 and examen = 0 and semestr = 2:
-		!! 2nd semester exams
-		act 'Do the exam':gt 'univer', 'examen'
 	end
 end
 
-if $ARGS[0] = 'dekanat':
+if $ARGS[0] = 'deans_office':
 	$sexloc = 'univer'
 	cla & *clr
 	minut += 5
 
-	if examen = 1:
-		examen = 0
-
-		if semestr = 2:
-			semestr = 1
-			kurs += 1
-		elseif semestr = 1:
-			semestr = 2
-		end
-	elseif examen = 2:
-		student = 0
-		kurs = 0
-		semestr = 0
-		abiturient = 0
-		stipuha = 0
-		lektor = 0
-
-		'You got expelled from the University.'
-	end
-
-	if kurs = 2:
-		diplom = 1
-		student = 0
-		kurs = 0
-		semestr = 0
-		abiturient = 0
-		stipuha = 0
-		'Congratulations, you''ve earned your degree!'
-	end
-
 	gs 'stat'
 	'<center><b><font color="maroon">Dean</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/island/university/dekanat.jpg"></center>'
-	'You have completed <<kurs>> assignments for <<semestr>>.'
-	'Before the semester ends you must at least complete <<kurs>> of classes. It is positively looked upon if you manage to complete more.'
-
-	if kursovikD > 0:'You''ve passed <<kursovikD>> assignments.'
+	'You are enrolled at the University for semester '+func('uniutil', 'semester', 'get')+'.'
+	'At the end of your semester, you must pass your exams. Attending lectures will help you prepare.'
+	'You must also complete at least '+func('uniutil', 'assignments_done', 'min_num')+' assignment'+iif(func('uniutil', 'assignments_done', 'min_num') = 1, '', 's')+', though it is positively looked upon if you manage to complete more.'
+	'You''ve complete '+func('uniutil', 'assignments_done', 'get')+' assignment'+iif(func('uniutil', 'assignments_done', 'get') = 1, '', 's')+' so far.'
+
+	if func('uniutil', 'scholarship', 'is_active'):
+		'You are receiving a scholarship of '+func('uniutil', 'scholarship', 'get')+' <b>₽</b> per month from the University this semester because of how you did in the previous one.'
+	else:
+		'The University is known to award scholarships to students with exceptional performance.'
+	end
 
 	act 'Leave the Dean''s office':gt 'univer', 'start'
 
-	if hour < 8 and student > 0:
-		act 'Attend the lecture (6:00)':
+	if func('uniutil', 'lecture', 'in_session') and func('uniutil', 'student', 'enrolled'):
+		act 'Attend the lecture ('+func('uniutil', 'lecture', 'length')+':00)':
 			cla 
 			*clr
-			minut += 360
-			hour = 14
+			hour = func('uniutil', 'lecture', 'start_hour') + func('uniutil', 'lecture', 'length')
 			minut = 0
-			lektor += 1
+			gs 'uniutil', 'attendance', 'update'
 			intel_exp += 1 + (mentats_dose - rand(0,mentats_dose))
 			menu_off = 1
 			gs 'stat'
@@ -168,17 +150,16 @@ if $ARGS[0] = 'dekanat':
 
 			if zanrand = 0:
 				minut += 60
-				'During the lecture the professor asks you a question that you do not have the answer for, he asks that you stay behind after the class.'
-				'As the class finishes, you stay behind.'
+				'During the lecture, professor Krupin asks you a question that you do not have the answer for. You let him know, and he asks that you stay behind after class so he can help you.'
 !!expanded this scene a lot, check code.
-				act 'Remain in the classroom':
+				act 'Stay after class':
 					cla 
 					*clr
 					gs 'stat'
 					'<center><img <<$set_imgh>> src="images/locations/city/island/university/krupin.jpg"></center>'
-					'The professor patiently explains some of the material he went through in the class, in an effort to help you better understand, so you don''t fall too far behind.'
+					'The professor patiently explains some of the material he went through in class in an effort to help you better understand so you don''t fall too far behind.'
 					
-					act 'Leave':gt 'univer', 'dekanat'
+					act 'Leave':gt 'univer', 'deans_office'
 					
 					act 'Seduce':
 						cla
@@ -188,9 +169,9 @@ if $ARGS[0] = 'dekanat':
 						$dick_girth = 'well proportioned'
 						gs 'boyStat', $npclastgenerated
 						'<center><img <<$set_imgh>> src="images/locations/city/island/university/sex/gradepay.jpg"></center>'
-						'Feeling pressured, you move over to his desk and take a seat on it, making sure he has a good view of your legs and short skirt. You grab his scarf and slide it back and forth across his neck as you open your legs, giving him a glimpse up your skirt, "This is all so "hard" to understand, but maybe if I do you a favor, you can repay me by giving me a passing grade." You don''t have a lot of time to be subtle, as you need to make sure you''re going to pass the class before you leave.'
-						'For a moment he seems insecure, as he looks around the room, "Well what do you have in mind?"'
-						'You bite your lower lip seductively and you know you have him trapped. You pull him by his scarf till he is standing, while you get on all fours. You look up at him, "Let me show you, professor Krupin."'
+						'Feeling pressured, you move over to his desk and take a seat on it, making sure he has a good view of your legs and short skirt. You grab his scarf and slide it back and forth across his neck as you open your legs, giving him a glimpse up your skirt. "This is all so "hard" to understand" you say, "but maybe if I do you a favor, you can repay me by giving me a passing grade." You don''t have a lot of time to be subtle as you need to make sure you''re going to pass the class before you leave.'
+						'For a moment, he seems unsure. "Well what do you have in mind?" he asks as he looks around the classroom.'
+						'You bite your lower lip seductively, knowing you have him trapped. You pull him by his scarf till he is standing, while you get on all fours. You look up at him, "let me show you, professor Krupin."'
 						gs 'arousal', 'foreplay', 5
 						gs 'stat'
 
@@ -198,8 +179,8 @@ if $ARGS[0] = 'dekanat':
 							cla
 							*clr
 						    '<center><img <<$set_imgh>> src="images/locations/city/island/university/sex/gradepay1.jpg"></center>'
-							'You undo his belt and pants, letting them drop down to his knees. You start stroking his cock and it doesn''t take long until it''s grown hard in your hand. You lick up and down along the shaft until you wrap your lips around his cock and you start bobbing your head up and down the shaft while stroking it with your hand as well.'
-							'He reaches over you and pulls up your skirt, pulling aside your panties. He rubs your pussy till he gets it wet and then he slips is fingers inside of you and starts finger fucking your pussy while you suck on his cock, causing you to moan in pleasure.'
+							'You undo his belt and pants, letting them drop down to his knees. You start stroking his cock, and it doesn''t take long before it''s grown hard in your hand. You lick up and down along the shaft, then wrap your lips around his cock and start bobbing your head up and down while stroking it with your hand.'
+							'He reaches over you and pulls up your skirt, pulling aside your panties. He rubs your pussy till he gets it wet, and then he slips his fingers inside and starts finger fucking you, causing you to moan in pleasure.'
 							gs 'arousal', 'vaginal_finger', 10
 							gs 'arousal', 'bj', 10
 							minut -= 10
@@ -212,16 +193,16 @@ if $ARGS[0] = 'dekanat':
 								gs 'cum_call', 'breasts', $boy, 1, '', '', 20
 								gs 'arousal', 'end'
 							    '<center><img <<$set_imgh>> src="images/locations/city/island/university/sex/gradepay2.jpg"></center>'
-								'He begins pulling off your clothes, and you present no resistance as he gets you completely naked. Either your mouth or hand is constantly pleasuring his cock, often using both ways at once. Once you are completely naked and back in place he goes back to fingering your pussy.'
-								'You know he is yearning to fuck you, but you want to save that in case you start doing even worse in class and need to raise your grades again. So you intensify your efforts on sucking him off and start to deep throating him, all while fondling his balls.'
-								'He starts groaning, as he''s edging but trying to hold back. Suddenly he says, "I''m about to cum, I want to cum all over your face." At those words you let go of his cock and instead start stroking him with your hand. Soon he is spurting loads of sperm all over your face and some of it splattering on your perky breasts, once the last spurt has splattered on your body, you sit up to give him a perfect view of your naked body, covered in his cum. You grin at him. "So about my grades..."'
-								'He collapses back in his chair and nods his head, "Yes yes, don’’t worry you did well this time, you little minx." With a final smile and wink you gather you stuff and get dressed and head out of classroom.'
+								'Either your mouth or hand is constantly pleasuring his cock, often both at once. He begins pulling off your clothes, and you offer no resistance. Once you are completely naked and back in place he goes back to fingering your pussy.'
+								'You know he is yearning to fuck you, but you want to save that in case you start doing even worse in class and need to raise your grades again, so you intensify your efforts sucking him off and start deep throating him while fondling his balls.'
+								'He starts groaning, as he''s on the edge but trying to hold back. Suddenly he says, "I''m about to cum. I want to cum all over your face." At those words, you let go of his cock and start stroking him with your hand. Soon he is spurting loads of sperm all over you, splattering your face and perky breasts. Once he finishes, you sit up to give him a perfect view of your naked body covered in his cum. You grin at him. "So about my grades..."'
+								'He collapses back in his chair and nods his head, "yes yes, don’’t worry you did well this time, you little minx." With a final smile and wink, you gather your stuff and get dressed and head out of classroom.'
 								gs 'arousal', 'hj', 5
 								gs 'arousal', 'bj', 5, 'deepthroat'
 								gs 'stat'
 								minut -= 5
 								
-								act 'Leave':gt 'univer', 'dekanat'
+								act 'Leave':gt 'univer', 'deans_office'
 							end
 						end
 					end
@@ -229,17 +210,16 @@ if $ARGS[0] = 'dekanat':
 !!end of first scene expansion
 			elseif zanrand = 1:
 				minut += 60
-				'During the lecture the professor asks you a question that you do not have the answer for, you don''t know the answer but you hear someone smirking behind. Without any hesitation the professor calls the person out and tells the two of you to stay behind after the class.'
-				'As the class finishes, the two of you stay behind.'
+				'During the lecture, professor Krupin asks you a question that you do not have the answer for. You let him know, and you hear a girl smirk behind you. Without any hesitation, the professor calls her out and tells her to speak with him after class. He also asks you to stay behind so he can help you.'
 
-				act 'Remain in the classroom':
+				act 'Stay after class':
 					cla
 					*clr
 					gs 'stat'
 					'<center><img <<$set_imgh>> src="images/locations/city/island/university/krupin.jpg"></center>'
-					'The professor patiently explains some of the material they went through in the class, in an effort to help you better understand, so you don''t fall too far behind. While he tells the other girl that it''s not polite to do that in class and she needs to properly behave.'
+					'The professor patiently explains some of the material he went through in class to you in an effort to help you better understand so you don''t fall too far behind. He tells the other girl that it''s not polite to do what she did in class and she needs to properly behave.'
 					
-					act 'Leave':gt 'univer', 'dekanat'
+					act 'Leave':gt 'univer', 'deans_office'
 !!expanding scene two. check code.
 					act 'Seduce':
 						cla
@@ -249,10 +229,10 @@ if $ARGS[0] = 'dekanat':
 						$dick_girth = 'well proportioned'
 						gs 'boyStat', $npclastgenerated
 						'<center><img <<$set_imgh>> src="images/locations/city/island/university/sex/gradepay.jpg"></center>'
-						'Feeling pressured, you move over to his desk and take a seat on it, making sure he has a good view of your legs and short skirt. You grab his scarf and slide it back and forth across his neck as you open your legs, giving him a glimpse up your skirt, "This is all so "hard" to understand, but maybe if I do you a favor, you can repay me by giving me a passing grade." You don''t have a lot of time to be subtle, as you need to make sure you''re going to pass the class before you leave.'
-						'For a moment he seems insecure, as he looks around the class, glancing at the other girl, "You should stop that..."'
-						'You bite your lower lip seductively and you know you have him trapped. You pull him by his scarf till he is standing, while you get on all fours. You look up at him, "Let me show you, professor Krupin."'
-						'The other girl''s eyes almost pop out as she realize what you are about to do, she looks at the professor and then the exit and seems unsure what to do.'
+						'Feeling pressured, you move over to his desk and take a seat on it, making sure he has a good view of your legs and short skirt. You grab his scarf and slide it back and forth across his neck as you open your legs, giving him a glimpse up your skirt. "This is all so "hard" to understand" you say, "but maybe if I do you a favor, you can repay me by giving me a passing grade." You don''t have a lot of time to be subtle as you need to make sure you''re going to pass the class before you leave.'
+						'For a moment he seems unsure. "You should stop that..." he says, glancing at the other girl, but you can tell he doesn''t mean it.'
+						'You bite your lower lip seductively, knowing you have him trapped. You pull him by his scarf till he is standing, while you get on all fours. You look up at him, "let me show you what I mean, professor Krupin."'
+						'The other girl''s eyes almost pop out as she realizes what you are trying to do. She looks at the professor and then the exit, unsure how to respond.'
 						gs 'arousal', 'foreplay', 5
 						gs 'stat'
 						
@@ -262,14 +242,14 @@ if $ARGS[0] = 'dekanat':
 							gs 'arousal', 'bj', 10
 							gs 'stat'
 						    '<center><img <<$set_imgh>> src="images/locations/city/island/university/sex/2forone.jpg"></center>'
-							'You undo his belt and pants, letting them drop down to his knees. You start stroking his cock and it doesn''t take long until it''s grown hard in your hand. You lick up and down along the shaft until you wrap your lips around his cock and you start bobbing your head up and down the shaft while stroking it with your hand as well.'
-							'The other girl is standing with her mouth open, seeing he is going along with it. Turned on, she kneels down beside you, giving you a little smile and joins in on the action.'
+							'You undo his belt and pants, letting them drop down to his knees. You start stroking his cock, and it doesn''t take long before it''s grown hard in your hand. You lick up and down along the shaft, then wrap your lips around his cock and start bobbing your head up and down while stroking it with your hand.'
+							'The other girl stands off to the side with her mouth open while you do this, her face showing a combination of shock and arousal. The arousal wins out in the end however. Turned on, she kneels down beside you, giving you a little smile, and joins in on the action.'
 							
 							act 'Share':
 								cla
 								*clr
 							    '<center><img <<$set_imgh>> src="images/locations/city/island/university/sex/2forone1.jpg"></center>'
-								'With her kneeling besides you, you suck on his cock for a bit, and pass it over to her as she eagerly locks her lips around it and slowly starts bobbing her head up and down. Perhaps she is trying to convince him to give her a free pass, well you can''t have that and you start sucking his balls as she continues sucking his cock.'
+								'With her kneeling beside you, you continue to suck on the professors cock for a bit and then pass it over to her. She eagerly locks her lips around it and slowly starts bobbing her head up and down. She seems really good at this, and it dawns on you that if you don''t match her, she might be the only one professor Krupin gives a free pass! Well you can''t have that, so you start sucking his balls as she continues sucking his cock.'
 								gs 'arousal', 'bj', 5, 'group'
 								gs 'stat'
 								
@@ -278,45 +258,44 @@ if $ARGS[0] = 'dekanat':
 									*clr
 									gs 'cum_call', 'mouth', $boy, 1, '', '', 20
 									'<center><img <<$set_imgh>> src="images/locations/city/island/university/sex/2forone2.jpg"></center>'
-									'The two of you trade back and forth, taking turns sucking it, each trying to outdo the other. Under this relentless tag team competition, he''s unable to outlast for long.'
-									'He starts groaning, as he''s edging but trying to hold back. Suddenly he says, "I''m about to cum, I''m going to cum in your mouth and then the two of you share it as you please." He says as the other girl happens to have him in her mouth, she dutifully sucks his cock until he cums in her mouth. Once he''s finished, she unlocks her mouth, as you lick his cock clean.'
-									'You then turn to her and french kiss her, the two of you cum swap cum in eachother mouths. As he collapses back into his chair, you stop kissing and you both swallow the remains of the sperm you ended up with. You turn to him, grinning, "So about my grades..."'
-									'He peacefully observes the two of you and waves his hand absently at the question, "Yes yes, I will make sure you get a passing grade, while you''re let off the hook, missy." The two of you smile at eachother, the two of you straighten your clothes up and give the professor a last little smile, as you leave the classroom.'
+									'The two of you trade back and forth, taking turns sucking your professor''s cock, each trying to outdo the other. Under this relentless tag team competition, he''s unable to last for long.'
+									'He starts groaning, as he''s on the edge but trying to hold back. Suddenly he says, "I''m about to cum. I''m going to cum in your mouth and then the two of you share it as you please." The other girl happens to have him in her mouth, and she dutifully sucks his cock until he finishes. Once he''s done, she removes her mouth, and you lick his cock clean.'
+									'You then turn to her and french kiss her, the two of you swapping cum in each other''s mouths. As professor Krupin collapses back into his chair, you stop kissing and swallow the remains of the sperm you ended up with. You turn to him, grinning, "so about my grades..." "And my behavior..." the other girl chimes in.'
+									'He peacefully observes the two of you and waves his hand absently at the question, "yes yes, I will make sure you get a passing grade, while you''re let off the hook, missy." The two of you smile at each other, then straighten your clothes up and give the professor a last little smile as you leave the classroom.'
 									gs 'arousal', 'bj', 10, 'group'
 									gs 'arousal', 'kiss', 10, 'lesbian'
 									minut -= 10
 									gs 'arousal', 'end'
 									gs 'stat'
 									
-									act 'Leave':gt 'univer', 'dekanat'
+									act 'Leave':gt 'univer', 'deans_office'
 								end
 							end
 						end
 					end
 				end
 			else
-				act 'Leave':gt 'univer', 'dekanat'
+				act 'Leave':gt 'univer', 'deans_office'
 			end
 		end
 	end
-!!end of secent scene expansion.
+!!end of second scene expansion.
 
-	if kursovik >= 100:
+	if func('uniutil', 'assignment_progress', 'is_finished'):
 		act 'Hand in your assignment':
 			cla
 			*clr
 			intel_exp += 1 + (mentats_dose - rand(0,mentats_dose))
-			kursovik = 0
-			kursovikD += 1
+			gs 'uniutil', 'assignments_done', 'update'
 			'<center><img <<$set_imgh>> src="images/locations/city/island/university/classroom1.jpg"></center>'
 			'You hand in your completed assignment.'
 
-			act 'Leave the lecture hall':gt 'univer', 'dekanat'
+			act 'Leave the lecture hall':gt 'univer', 'deans_office'
 		end
 	end
 end
 
-if $ARGS[0] = 'examen':
+if $ARGS[0] = 'exam_room':
 	cla
 	clr
 	*clr
@@ -325,40 +304,32 @@ if $ARGS[0] = 'examen':
 	'<center><b><font color="maroon">Exam</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/island/university/examen.jpg"></center>'
 
-	if lektor > 55 and kursovikD >= kurs:
-		examen = 1
-		kursovikD = 0
-		stipuha = 1
-		lektor = 0
-		!!1200
-		'You completed all your examinations, passing them with honors, and on top of that you had outstanding attendance.'
+	if func('uniutil', 'attendance', 'is_great') and func('uniutil', 'assignments_done', 'did_min_num'):
+		gs 'uniutil', 'exam_outcome', 'passed_honors'
+		'You completed all your examinations, passing them with honors, and on top of that, you had outstanding attendance.'
 
-	elseif ((pcs_intel >= 80) or (lektor > 40 and lektor <= 55)) and kursovikD >= kurs:
-		examen = 1
-		kursovikD = 0
-		stipuha = 0
-		lektor = 0
-		'You completed all your assignments and passed the exam.'
+	elseif pcs_intel >= 100 and func('uniutil', 'attendance', 'is_bad') and func('uniutil', 'assignments_done', 'did_great_num'):
+		gs 'uniutil', 'exam_outcome', 'passed_honors'
+		'Despite missing a lot of classes, you still managed to complete all the assignments and somehow still managed to pass with honors.'
 
-	elseif (pcs_intel >= 100) and kursovikD >= kurs + 10:
-		examen = 1
-		kursovikD = 0
-		stipuha = 1
-		lektor = 0
-		'Despite missing a lot of classes you still managed to complete all the assignments and somehow still managed to pass with honors.'
+	else if pcs_intel >= 100 and func('uniutil', 'attendance', 'is_ok') and func('uniutil', 'assignments_done', 'did_min_num'):
+		gs 'uniutil', 'exam_outcome', 'passed_honors'
+		'You completed all your examinations, passing them with honors.'
 
-	elseif (pcs_intel < 70 and lektor <= 40) or kursovikD < kurs:
-		examen = 2
-		stipuha = 0
-		'You failed to pass the exam.'
+	elseif (pcs_intel >= 80 or func('uniutil', 'attendance', 'is_ok')) and func('uniutil', 'assignments_done', 'did_min_num'):
+		gs 'uniutil', 'exam_outcome', 'passed'
+		'You completed all your assignments and passed the exam.'
 
 	else
-		examen = 2
-		stipuha = 0
+		gs 'uniutil', 'exam_outcome', 'failed'
 		'You failed to pass the exam.'
 	end
 
-	act 'Leave the exam room':gt 'univer', 'dekanat'
+	if func('uniutil', 'scholarship', 'is_active'):
+		'Based on your results, you will receive a scholarship of '+func('uniutil', 'scholarship', 'get')+' <b>₽</b> per month next semester.'
+	end
+
+	act 'Leave the exam room':gt 'univer', 'start'
 end
 
 --- univer ---------------------------------