Ver código fonte

Merge remote-tracking branch 'keving-upstream/master'

netuttki 2 semanas atrás
pai
commit
8d2a15f7c6
50 arquivos alterados com 403 adições e 508 exclusões
  1. 5 8
      locations/MeynoldHome.qsrc
  2. 4 7
      locations/NikoDates.qsrc
  3. 1 1
      locations/NikoDreams.qsrc
  4. 2 4
      locations/NikoEv2.qsrc
  5. 1 3
      locations/Palatka.qsrc
  6. 1 7
      locations/Serge_Shulgin.qsrc
  7. 1 3
      locations/abduction.qsrc
  8. 5 5
      locations/abductionCustomer.qsrc
  9. 0 1
      locations/balkon2.qsrc
  10. 2 1
      locations/bed2.qsrc
  11. 2 3
      locations/bedr.qsrc
  12. 1 1
      locations/body.qsrc
  13. 44 15
      locations/body_desc.qsrc
  14. 9 7
      locations/booty_call_sms.qsrc
  15. 2 19
      locations/brothel.qsrc
  16. 1 1
      locations/clothing.qsrc
  17. 4 15
      locations/dom_gor.qsrc
  18. 8 16
      locations/etoexhib.qsrc
  19. 5 11
      locations/gadfield.qsrc
  20. 30 35
      locations/gadforestlost.qsrc
  21. 2 2
      locations/gschool_chats.qsrc
  22. 5 1
      locations/hourly_events.qsrc
  23. 5 15
      locations/hunter_interactions.qsrc
  24. 2 6
      locations/huntersex.qsrc
  25. 3 3
      locations/kathouse0.qsrc
  26. 9 9
      locations/lact_lib.qsrc
  27. 3 9
      locations/mey_tamara_events.qsrc
  28. 9 38
      locations/nichTaras.qsrc
  29. 1 1
      locations/obj_din.qsrc
  30. 0 2
      locations/pav_church.qsrc
  31. 5 25
      locations/pav_park.qsrc
  32. 3 15
      locations/pav_shared_apt.qsrc
  33. 47 4
      locations/pcs_has_attr.qsrc
  34. 4 10
      locations/post_events.qsrc
  35. 4 4
      locations/rape_events.qsrc
  36. 3 2
      locations/rex_party_smallEvents.qsrc
  37. 0 1
      locations/salon.qsrc
  38. 3 0
      locations/saveupdater.qsrc
  39. 3 5
      locations/sex_ev_after.qsrc
  40. 21 1
      locations/sister_chat.qsrc
  41. 3 19
      locations/sitrPar.qsrc
  42. 2 1
      locations/sleep.qsrc
  43. 75 23
      locations/sleep_simple.qsrc
  44. 36 49
      locations/swamphouse.qsrc
  45. 6 30
      locations/therapist_hotel.qsrc
  46. 6 14
      locations/vasily_home_sex.qsrc
  47. 10 45
      locations/vasilyhome.qsrc
  48. 1 2
      locations/wakeup.qsrc
  49. 2 7
      locations/zaprFWash.qsrc
  50. 2 2
      locations/zsoft_gopskverGorSlut.qsrc

+ 5 - 8
locations/MeynoldHome.qsrc

@@ -14,17 +14,16 @@ if $ARGS[0] = 'Aftermath':
 	if npc_rel['A240'] < 90:npc_rel['A240'] = 90	
 	pcs_hairbsh = 0
 	pcs_makeup = 1
-	pcs_sleep += 45
 	cumspclnt = 1
 	gs 'cum_cleanup'
-	pcs_sweat += 5	
-	minut += 270
+	pcs_sweat += 5
 	NikoAftermath = 1
-	gs'stat'
+	gs 'sleep_simple', 'forced', 270
+
 	'<center><b><h4><font color=#ffae00><<"Viktoriya [Vicky] Meynold">></font></h4></b></center>'
 	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/niko/nikomisc/meynold/vicky/vickySmile.jpg"></center>'
 	'You slowly open your eyes, and see <<$VK_VikName>> playfully shaking your shoulder. "Hey there sleepy head! Did you sleep well?" You give <<$VK_VikName>> a warm smile. "I guess but... where am I?" <<$VK_VikName>> replies, "After what happened at school, we couldn''t just leave you alone, to be abused by the boys, so we brought you back to our place." You scratch your head. "We?" <<$VK_VikName>> smiles then turns to her left.' 
-		
+
 	act 'Turn with her':	
 		*clr & cla		
 		minut += 5
@@ -94,10 +93,8 @@ if $ARGS[0] = 'Aftermath 2':
 	*clr & cla
 	music_loop = 0
 	close all
-	pcs_sleep += 10
 	pcs_sweat += 10
-	minut += 60
-	gs'stat'
+	gs 'sleep_simple', 'forced', 60
 	'<center><b><h4><font color=#ff0090><<"Katja [Kat] Meynold">></font></h4></b></center>'
 	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/niko/nikomisc/meynold/bedroom/katja.jpg"></center>'
 	'You quickly jump up, and see Katja with a concerned look on her face. "It''s okay <<$pcs_firstname>>. You were just having a bad dream." You look around the room, trying to get your bearings then turn to Katja, "Thank you Katja, I hope these nightmare don''t become a habit." Katja rubs your forehead, as she responds, "Everything will be alright. You don''t worry need to worry about anything right now. You are among friends. Remember that." As she lightly rubs your forehead. You give her a smile and an approving nod. Katja returns the smile before saying, "Now that''s what I like to see, a fresh smile."' 

+ 4 - 7
locations/NikoDates.qsrc

@@ -580,13 +580,10 @@ if $ARGS[0] = 'date_rape':
 					act '...':
 						*clr & cla
 						gs 'clothing', 'wear_last_worn'
-						if NikoEv < 4:NikoEv = 4
-						if hour > 6:gs 'cikl'
-						hour = 6
-						minut = 0
-						pcs_sleep = 100
+						if NikoEv < 4: NikoEv = 4
 						NikoDate = 0
-						gs 'stat'
+						gs 'sleep_simple', 'sleep_until', 6, 0
+
 						'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/niko/nikoev/dates/2/Home/wake.jpg"></center>'
 						'You awaken to birds chirping and roll around in the bed before a splitting headache suddenly hits you as Niko walks into the room with a bowl of cereal in his hand and lays down next to you. "Hey you''re up. You were way too tipsy yesterday, so I took you to my place to catch some shut eye." He takes a spoonful of cereal and puts it in his mouth, chomping down on his breakfast before continuing. "I hope you slept well."'
 						'"I feel awful!" you reply. "My head is killing me."'
@@ -595,7 +592,7 @@ if $ARGS[0] = 'date_rape':
 						
 						act 'Continue':
 							*clr & cla
-							gs 'stat'						
+							gs 'stat'
 							'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/niko/nikoev/smile1.jpg"></center>'							
 							'Niko kisses your leg. "You were a bit wild. It was a side of you that I haven''t seen before and I liked it."' 
 							'"Really?" you reply. "Well, I guess I could try cutting loose a bit more often."'

+ 1 - 1
locations/NikoDreams.qsrc

@@ -469,7 +469,7 @@ if $ARGS[0] =  'friends':
 										gs 'stat'							
 										'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/niko/nikomisc/nightmares/friends/darkness.jpg"></center>'
 										'You fall to the ground and stare at your stomach, watching as an almost endless stream of cum pours out of you. You suddenly hear someone whisper in your ear. "Hey, are you alright?" You look around to see who it was, but see nothing at all. You''re surrounded by darkness. '+$OpenInnerThought+'Where did everyone go? Where am I? It''s so dark.'+$CloseInnerThought+' You hear the voice whisper again. "<<$pcs_firstname>>, wake up..."'
-										act '...':minut += 120 & gt 'NikoEv2', 'niko_wake'
+										act '...': gt 'NikoEv2', 'niko_wake'
 									end	
 								end	
 							end	

+ 2 - 4
locations/NikoEv2.qsrc

@@ -219,8 +219,7 @@ if $ARGS[0] = 'Reward':
 												
 												act 'Enter Niko''s room':	
 													*clr & cla
-													minut += 10
-													gs 'stat'
+													gs 'sleep_simple', 'forced', 130
 													'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/niko/nikomisc/home/bedroom/laying.jpg"></center>'
 													'As you enter the room, Niko lays you down and climbs into the bed next to you, running his fingers through your hair while staring into your eyes. You feel incredibly lightheaded as your nerves have drained you of any focused thoughts. You close your eyes as you feel your energy slowly fading away...'
 													
@@ -241,11 +240,10 @@ end
 
 if $ARGS[0] = 'niko_wake':
 	*clr & cla
-	pcs_sleep += 20
 	NikoVolkovQW = 10
 	NikoEv = 12
-	minut += 5
 	gs 'stat'
+
 	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/boy/niko/nikoev/charmer2.jpg"></center>'
 	'You open your eyes and see Niko with a concerned look on his face, his hand on your shoulder shaking you. "<<$pcs_firstname>>, are you alright? You looked like you were having an intense dream."' 
 	'You quickly look around the room and take several deep breaths as Niko gives you a kiss on the forehead. "I''m so worried about you. Are you alright?"'

+ 1 - 3
locations/Palatka.qsrc

@@ -22,9 +22,7 @@ if $ARGS[0] = 'start':
 	act 'Leave': gt 'Military', 'start'
 
 	act 'Sleep':
-		minut += 480
-		gs 'stat'
-		pcs_sleep = 100
+		gs 'sleep_simple', 'forced', 480
 		gt 'palatka', 'start'
 	end
 end

+ 1 - 7
locations/Serge_Shulgin.qsrc

@@ -100,13 +100,7 @@ if $ARGS[0] = 'sleep':
 				cla
 				'You get comfortable in Sergey''s bed, and sleep for a few hours.'
 				npc_rel['A112'] += 1
-				minut += 240
-				if pcs_sleep >= 60: 
-					pcs_sleep = 100
-				else
-					pcs_sleep += 40
-				end
-				gs 'stat'
+				gs 'sleep_simple', 'forced', 240
 				act 'Get out of bed': gt 'vasilyhome', 'sergey_room'
 			end
 			if pcs_horny > 30 and mesec <= 0: act 'Try to seduce Sergey': gt 'Serge_Shulgin','hide','sleep_prstsex'

+ 1 - 3
locations/abduction.qsrc

@@ -470,9 +470,7 @@ end
 if $ARGS[0] = 'abdSleep':
 	*clr & cla
 	menu_off = 1
-	minut += 240
-	pcs_sleep += 50
-	gs 'stat'
+	gs 'sleep_simple', 'forced', 240
 	'<center><img <<$set_imgh>> src="images/locations/shared/abduction/bed1.jpg"></center>'
 	'You''ve slept for several hours, but nightmares have awakened you.'
 	act 'Continue':gt 'abduction', 'abdRoom'

+ 5 - 5
locations/abductionCustomer.qsrc

@@ -391,12 +391,12 @@ if $ARGS[0] = 'abdCustomer-virgin8':
 	act 'Lie down':gt 'abductionCustomer', 'abdCustomer-virgin9'
 end
 if $ARGS[0] = 'abdCustomer-virgin9':
-	minut += 480
-	pcs_sleep += 70
+	gs 'sleep_simple', 'forced', 480
+
 	'<center><img <<$set_imgh>> src="images/locations/shared/abduction/sex/slavewhorevirgin9.jpg"></center>'
 	'Your hands still bound, you are thrown on your bed and are once again chained to the wall.'
 	'Your master leaves and you are left lying on the bed, your pussy still plugged by the <<dick>> cm long <<$dick_girth>> dildo.'
-	gs 'stat'
+
 	act 'Try to rest':gt 'abductionCustomer', 'abdCustomer-virgin10'
 end
 if $ARGS[0] = 'abdCustomer-virgin10':
@@ -404,7 +404,7 @@ if $ARGS[0] = 'abdCustomer-virgin10':
 	pcs_mood = 5
 	'<center><video autoplay loop src="images/locations/shared/abduction/sex/slavewhorevirgin10.mp4"></video></center>'
 	'The sound of your master coming downstairs wakes you up. You must have fallen asleep from the exhaustion.'
-    '"Kneel and get that ass in the air, slut."'
+	'"Kneel and get that ass in the air, slut."'
 	*nl
 	'You''re so desperate that you don''t even think about not doing what he orders you. You just stick your ass as high as possible.'
 	'It points so he has good access to both your ass and your ruthlessly plugged, deflowered pussy.'
@@ -776,7 +776,7 @@ if $ARGS[0] = 'abdCustomer-fuckAnalDeep':
 		*nl
 	end
 	'With every thrust of his dick deep inside your intestines, you feel as if it''s your very stomach being poked by it.'
-    *nl
+	*nl
 	if buyout = 1:
 		'After about a half an hour of deep anal banging, <<$bName>> is about to cum.'
 	else

+ 0 - 1
locations/balkon2.qsrc

@@ -6,7 +6,6 @@ if $ARGS[0] = 'kurit':
 	*clr & cla
 	minut += 10
 	gs 'drugs', 'smoke'
-	pcs_sleep += 1
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/city/residential/apartment/kurit.jpg"></center>'
 	'You put the cigarette in your mouth and tightly squeeze it with your lips as you light it. You inhale the smoke and hold it in for for a second before continuing and enjoying your smoke.'

+ 2 - 1
locations/bed2.qsrc

@@ -66,7 +66,8 @@ if $ARGS[0] = 'main':
 	end
 
 	act 'Get out of bed': gt 'bed_get_out', 'start'
-	gs 'sleep_simple', 'nap_bed'
+	act 'Take a nap (1:00)': gs 'sleep_simple', 'nap_bed'
+
 	gs 'events', 'read'
 
 	if $loc ! 'bedrPar' or locat['Anya_inroom'] = 0 or locat['Anya'] = 1 or locat['Anya'] = 26:

+ 2 - 3
locations/bedr.qsrc

@@ -186,10 +186,9 @@ if sick >= 1:
 	act 'Go to sleep (Sick)':
 		*clr & cla
 		menu_off = 1
-		minut += 240
-		pcs_sleep += 40
+		gs 'sleep_simple', 'forced', 240
 		sick -= 1
-		if sick < 0:sick = 0
+		if sick < 0: sick = 0
 		gs 'stat'
 		'<center><img <<$set_imgh>> src="images/locations/shared/apartment/event/sick/sick<<rand(11, 17)>>.jpg"></center>'
 		'You''re lying in bed coughing, sneezing and blowing your nose.'

+ 1 - 1
locations/body.qsrc

@@ -65,7 +65,7 @@ if $ARGS[0] = 'UpdateBodyMeasurement':
 	pcs_hips  = (pcs_hgt   * bodyVars['hratio']) / 100 + bodyVars['vhips']
 	pcs_waist = (pcs_hips  * bodyVars['wratio']) / 100 + bodyVars['vofat']
 	pcs_band  = (pcs_waist * bodyVars['bratio']) / 100 + bodyVars['vofat']
-	pcs_bust  = (pcs_waist * bodyVars['bratio']) / 100 + pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone'] + max(-10, min(bodyVars['bust_other'], 10)) + pcs_mass['preg'] / 5
+	pcs_bust  = (pcs_waist * bodyVars['bratio']) / 100 + pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone'] + max(-10, min(bodyVars['bust_other'], 10)) + pcs_mass['preg'] / 5 + bodyVars['bust_lact']
 	pcs_butt  = min(pcs_mass['butt'], 50) + bodyVars['butt_bonus'] + bodyVars['butt_silicone'] + bodyVars['butt_cheat'] + pcs_butt_tr + max(-10, min(bodyVars['butt_other'], 10))
 
 	!! pcs_cupsize = pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone'] - bodyVars['vofat']

+ 44 - 15
locations/body_desc.qsrc

@@ -388,23 +388,52 @@ if $ARGS[0] = 'breasts':
 end
 
 if $ARGS[0] = 'butt':
-	!natural butt
-	if pcs_butt <= 14:
-		$pcs_butt = 'Your <a href="exec:view''images/pc/body/ass/1.jpg''">ass</a> is square and as flat as a plank.'
-	elseif pcs_butt <= 25:
-		$pcs_butt = 'You have an average, feminine looking <a href="exec:view''images/pc/body/ass/2.jpg''">ass</a>.'
-	elseif pcs_butt <= 40:
-		$pcs_butt = 'Your <a href="exec:view''images/pc/body/ass/3.jpg''">ass</a> is bigger, rounder and firmer than average.'
-	elseif pcs_butt <= 59:
-		$pcs_butt = 'You have a large heart-shaped <a href="exec:view''images/pc/body/ass/4.jpg''">butt</a> that jiggles and sways as you walk.'
+	if 1:
+		!natural butt
+		if pcs_butt <= 14:
+			$pcs_butt = 'Your <a href="exec:view''images/pc/body/ass/1.jpg''">ass</a> is square and as flat as a plank.'
+		elseif pcs_butt <= 29:
+			$pcs_butt = 'You have an average, feminine looking <a href="exec:view''images/pc/body/ass/2.jpg''">ass</a>.'
+		elseif pcs_butt <= 44:
+			$pcs_butt = 'Your <a href="exec:view''images/pc/body/ass/3.jpg''">ass</a> is bigger, rounder and firmer than average.'
+		elseif pcs_butt <= 59:
+			$pcs_butt = 'You have a large heart-shaped <a href="exec:view''images/pc/body/ass/4.jpg''">butt</a> that jiggles and sways as you walk.'
+		else
+			$pcs_butt = 'You have a large bubble <a href="exec:view''images/pc/body/ass/4.jpg''">butt</a> that jiggles and sways as you walk.'
+		end
+
+		!have butt implant
+		if bodyVars['butt_silicone'] > 0:
+			buttpic = 4
+			$pcs_butt = 'Through the use of implants, you have given yourself a jiggly bubble <a href="exec:view''images/pc/body/ass/4.jpg''">butt</a>.'
+		end
 	else
-		$pcs_butt = 'You have a large bubble <a href="exec:view''images/pc/body/ass/4.jpg''">butt</a> that jiggles and sways as you walk.'
-	end
+		!natural butt
+		if pcs_butt <= 7:
+			$pcs_butt = 'Your <a href="exec:view''images/pc/body/ass/1.jpg''">ass</a> is square and as flat as a plank.'
+		elseif pcs_butt <= 14:
+			$pcs_butt = 'Your <a href="exec:view''images/pc/body/ass/2.jpg''">ass</a> is square but not completely flat.'
+		elseif pcs_butt <= 21:
+			$pcs_butt = 'You have an average, feminine looking <a href="exec:view''images/pc/body/ass/3.jpg''">ass</a>.'
+		elseif pcs_butt <= 29:
+			$pcs_butt = 'You have an above-average, feminine looking <a href="exec:view''images/pc/body/ass/4.jpg''">ass</a>.'
+		elseif pcs_butt <= 36:
+			$pcs_butt = 'Your <a href="exec:view''images/pc/body/ass/5.jpg''">ass</a> is bigger, rounder and firmer than average.'
+		elseif pcs_butt <= 44:
+			$pcs_butt = 'Your ample <a href="exec:view''images/pc/body/ass/6.jpg''">ass</a> is bigger, rounder and firmer than most.'
+		elseif pcs_butt <= 51:
+			$pcs_butt = 'You have a heart-shaped <a href="exec:view''images/pc/body/ass/7.jpg''">butt</a> that jiggles as you walk.'
+		elseif pcs_butt <= 59:
+			$pcs_butt = 'You have a large heart-shaped <a href="exec:view''images/pc/body/ass/8.jpg''">butt</a> that jiggles and sways as you walk.'
+		else
+			$pcs_butt = 'You have a large bubble <a href="exec:view''images/pc/body/ass/9.jpg''">butt</a> that jiggles and sways as you walk.'
+		end
 
-	!have butt implant
-	if bodyVars['butt_silicone'] > 0:
-		buttpic = 4
-		$pcs_butt = 'Through the use of implants, you have given yourself a jiggly bubble <a href="exec:view''images/pc/body/ass/4.jpg''">butt</a>.'
+		!have butt implant
+		if bodyVars['butt_silicone'] > 0:
+			buttpic = 4
+			$pcs_butt = 'Through the use of implants, you have given yourself a jiggly bubble <a href="exec:view''images/pc/body/ass/9s.jpg''">butt</a>.'
+		end
 	end
 end
 

+ 9 - 7
locations/booty_call_sms.qsrc

@@ -760,13 +760,15 @@ if $ARGS[0] = 'new_delayed':
 	gs 'SMStext_builder', 'start'
 		if $ARGS[1] = '1':
 			gs 'SMStext_builder', 'send', $SMSTree['f2']
-			gs 'SMStext_builder', 'add_reply', $SMSTree['f3'], 'booty_call_sms', 'new_delayed', '2', $ARGS[2], $ARGS[3]
-		elseif $ARGS[2] = '2':
-			gs 'SMStext_builder', 'send', $SMSTree['f3']
-			gs 'SMStext_builder', 'add_reply', $SMSTree['fa4'], 'booty_call_sms', 'new_routing2', $ARGS[2], $ARGS[3], 'fa4', ''
-			gs 'SMStext_builder', 'add_reply', $SMSTree['fb4'], 'booty_call_sms', 'new_routing2', $ARGS[2], $ARGS[3], 'fb4', ''
-			gs 'SMStext_builder', 'add_reply', $SMSTree['fc4'], 'booty_call_sms', 'new_routing2', $ARGS[2], $ARGS[3], 'fc4', ''
-			gs 'SMStext_builder', 'add_reply', $SMSTree['fd4'], 'booty_call_sms', 'new_routing2', $ARGS[2], $ARGS[3], 'fd4', ''
+			gs 'SMStext_builder', 'add_reply', $SMSTree['fa3'], 'booty_call_sms', 'new_delayed', 'a', $ARGS[2], $ARGS[3]
+			gs 'SMStext_builder', 'add_reply', $SMSTree['fb3'], 'booty_call_sms', 'new_delayed', 'b', $ARGS[2], $ARGS[3]
+			gs 'SMStext_builder', 'add_reply', $SMSTree['fc3'], 'booty_call_sms', 'new_delayed', 'c', $ARGS[2], $ARGS[3]
+			if (schoolAtestat = 0 or university['student'] = 1) and kanikuli = 0:
+				gs 'SMStext_builder', 'add_reply', $SMSTree['fd3'], 'booty_call_sms', 'new_delayed', 'd', $ARGS[2], $ARGS[3]
+			end
+		else
+			gs 'SMStext_builder', 'send', $SMSTree['f' + $ARGS[1] + '3']
+			gs 'SMStext_builder', 'add_reply', $SMSTree['f' + $ARGS[1] + '4'], 'booty_call_sms', 'new_routing2', $ARGS[2], $ARGS[3], 'f'+$ARGS[1]+'4', ''
 		end
 		gs 'SMStext_builder', 'show_sms', ARGS[4]
 	gs 'SMStext_builder', 'end'

+ 2 - 19
locations/brothel.qsrc

@@ -279,27 +279,10 @@ end
 if $ARGS[0] = 'abducted4':
 	analplugIN = 1
 	pcs_hairbsh = -1
-	InSleep = 1
 	pain['killer'] = 0
-	if mid($start_type,1,2) = 'sg' and SchoolAtestat = 0:
-		sleepQW['notathomesleep'] += 1
-	else
-		sleepQW['notathomesleep'] = 0
-	end
-	:loopson
-	minut += 1
-	stime += 1
-	pcs_health += 5
+	if mid($start_type,1,2) = 'sg' and SchoolAtestat = 0: sleepVars['notathomesleep'] += 1
+	gs 'sleep_simple', 'sleep_until', 10, 0
 
-	if stime >= 60:
-		stime = 0
-		pcs_sleep += 15
-		gs 'stat'
-	end
-	if hour ! 10:jump 'loopson'
-
-	InSleep = 0
-	gs 'stat'
 	*nl
 	'<center><img <<$set_imgh>> src="images/locations/shared/brothel/wakeupboundonbedanalplug.jpg"></center>'
 	*nl

+ 1 - 1
locations/clothing.qsrc

@@ -1722,7 +1722,7 @@ if $args[0] = 'school_check':
 			'<font color="blue">This uniform slightly breaches the school regulations on skirt length. The gopnik would approve of you wearing it and they will respect you for beating the school rules.</font>'
 		end
 	else
-		if PCloSkirt > 5:
+		if CloSkirt > 5:
 			'<font color="red">This uniform is so short that it makes a mockery of the school uniform regulations. Everybody in school apart from the gopniks will think that you''re a slut.</font>'
 		else
 			'<font color="red">This uniform is too thin and that can expose underwear making a mockery of the school uniform regulations. Everybody in school apart from the gopniks will think that you''re a slut.</font>'

+ 4 - 15
locations/dom_gor.qsrc

@@ -2,10 +2,10 @@
 
 menu_off = 1
 
-$locM_arg = $ARGS[0]
-$locM = 'dom_gor'
-$loc_arg = $ARGS[0]
 $loc = 'dom_gor'
+$loc_arg = $ARGS[0]
+$locM = 'dom_gor'
+$locM_arg = $ARGS[0]
 $location_type = 'private'
 clr
 gs 'stat'
@@ -79,18 +79,7 @@ elseif teachlevel > 20 and parkrunday ! daystart and hour < 21 and hour > 6:
 end
 
 if hour < 23:
-	act 'Lie on the couch (1:00)':
-		cla
-		minut += 60
-		if pcs_sleep < 90:
-			pcs_sleep += 10
-		else
-			pcs_sleep = 100
-		end
-		'You relax lying on the couch.'
-
-		act 'Stretch':gt 'dom_gor'
-	end
+	act 'Lie on the couch (1:00)': gs 'sleep_simple', 'nap'
 end
 
 if mc_inventory['food_basic'] > 0:'In the refrigerator food is stored that''s good for <b><<mc_inventory[''food_basic'']>></b> servings.'

+ 8 - 16
locations/etoexhib.qsrc

@@ -917,34 +917,26 @@ if $ARGS[0] = 'pos24':
 end
 
 if $ARGS[0] = 'pos24tk':
-	$locM_arg = 'pos24tk'
+	*clr & cla
+
+	$loc_arg = 'pos24tk'
 	$locM = 'etoexhib'
+	$locM_arg = 'pos24tk'
 	$menu_loc = 'etoexhib'
 	$menu_arg = 'pos24tk'
 	menu_off = 0
 	$location_type = 'public_indoors'
-	*clr & cla
-	gs'stat'
+
 	minut +=10
+	gs'stat'
+
 	'<center><b><font color = maroon>Teacher</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/altschool/ptu_tk.jpg"></center>'
 	'A place for the teachers to relax.'
 	'On the wall near the front door hanging <a href="exec:gt ''mirror'',''start''">mirror</a>.'
 	'In one corner there is a small old sofa.'
 
-	act 'Lie down on the couch':
-		cla
-		minut += 30
-
-		if pcs_sleep < 90:
-			pcs_sleep += 10
-		else
-			pcs_sleep = 100
-		end
-		'You relax on the couch.'
-
-		act 'Stand up':gt'etoexhib','pos24tk'
-	end
+	act 'Lie down on the couch (1:00)': gs 'sleep_simple', 'nap'
 
 	if hour >= 14 and hour <= 15:
 		temp = rand(1,100)

+ 5 - 11
locations/gadfield.qsrc

@@ -251,13 +251,10 @@ if $ARGS[0] = 'cow':
 						'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_lying.jpg"></center>'
 						'You feel drowsy watching the cows stand around, so you lie down on the grass. You doze off and wake up about an hour later.'
 
-						minut += 60
-						pcs_mood += 10
-						pcs_sleep+= 9
-						if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
-						gs 'stat'
+						if temper >= 25 and sunWeather = 1: pcs_hydra -= 12
+						gs 'sleep_simple', 'nap', 1
 
-						act 'Continue':gt'gadfield','cow'
+						act 'Continue': gt'gadfield','cow'
 					end
 				end
 				act 'Pick flowers (1:00)':
@@ -560,11 +557,8 @@ if $ARGS[0] = 'cow3':
 						'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_lying.jpg"></center>'
 						'You feel drowsy watching the cows stand around, so you lie down on the grass. You doze off and wake up about an hour later.'
 
-						minut += 60
-						pcs_mood += 10
-						pcs_sleep+= 9
-						if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
-						gs 'stat'
+						if temper >= 25 and sunWeather = 1: pcs_hydra -= 12
+						gs 'sleep_simple', 'nap', 1
 
 						act 'Continue':gt'gadfield','cow3'
 					end

+ 30 - 35
locations/gadforestlost.qsrc

@@ -207,11 +207,9 @@ if $ARGS[0] = 'relax':
 			act 'Nap on the ground (2:00)':
 				*clr & cla
 				menu_off = 1
-				minut += 120
-				pcs_sleep += 20
-				pcs_health += 5
 				pcs_mood += 10
-				gs'stat'
+				pcs_health -= 5
+				gs 'sleep_simple', 'nap_base', 120
 
 				if $clothingworntype = 'nude':'<center><img <<$set_imgh>> src="images/locations/gadukino/forest/gadforestrelax_sleepnude1.'+rand(1,2)+'.jpg"></center>'
 				if $clothingworntype ! 'nude' and PCloSkirt = 0:'<center><img <<$set_imgh>> src="images/locations/gadukino/forest/gadforestrelax_sleep.jpg"></center>'
@@ -225,33 +223,30 @@ if $ARGS[0] = 'relax':
 			end
 		end
 	elseif bonfire = 1:
-        act 'Warm up by the fire (1:00)':
-            *clr & cla
-            menu_off = 1
-            minut += 60
-            if frost > 0: frost -= 1
-            gs 'stat'
-
-            if hour >= 6 and hour < 21:
-                '<center><img <<$set_imgh>> src="images/locations/gadukino/forest/gadforestrelax_bonfire2.jpg"></center>'
-            else
-               '<center><img <<$set_imgh>> src="images/locations/gadukino/forest/gadforestrelax_bonfire3.jpg"></center>'
-            end
-            *nl
-            'You spend half an hour huddled by the flames'
-
-            act 'Continue':gt 'gadforestlost', 'relax'
-        end
+		act 'Warm up by the fire (1:00)':
+			*clr & cla
+			menu_off = 1
+			minut += 60
+			if frost > 0: frost -= 1
+			gs 'stat'
+
+			if hour >= 6 and hour < 21:
+				'<center><img <<$set_imgh>> src="images/locations/gadukino/forest/gadforestrelax_bonfire2.jpg"></center>'
+			else
+				'<center><img <<$set_imgh>> src="images/locations/gadukino/forest/gadforestrelax_bonfire3.jpg"></center>'
+			end
+			*nl
+			'You spend half an hour huddled by the flames'
+
+			act 'Continue':gt 'gadforestlost', 'relax'
+		end
 		if pcs_sleep < 40:
 			act 'Nap by the fire (2:00)':
 				*clr & cla
 				menu_off = 1
-				minut += 120
-				pcs_sleep += 20
-				pcs_health += 10
 				pcs_mood += 20
 				frost = 0
-				gs 'stat'
+				gs 'sleep_simple', 'nap_base', 120
 
 				'<center><img <<$set_imgh>> src="images/locations/gadukino/forest/gadforestrelax_bonfiresleep.jpg"></center>'
 				*nl
@@ -540,18 +535,18 @@ if $ARGS[0] = 'rescue':
 		if bonfire = 1:'They notice your fire and praise you, "When lost, it''s very smart if you stay in one place and make a fire. It will keep you warm, and make you visible to others."'
 		if grandmaQW['block'] = 0:
 			'They walk up to you and say, "Your grandparents are very worried about you. They asked us to keep an eye out for you. Follow us, you can stay at our camp for the time being until someone can take you back."'
-            if $ARGS[2] = 'forest_outskirts':
-                act 'Continue': minut += 45 & gt 'hunter_interactions', 'meet_hunters_after_rescue'
-            else
-                act 'Continue': minut += 30 & gt 'hunter_interactions', 'meet_hunters_after_rescue'
-            end
+			if $ARGS[2] = 'forest_outskirts':
+				act 'Continue': minut += 45 & gt 'hunter_interactions', 'meet_hunters_after_rescue'
+			else
+				act 'Continue': minut += 30 & gt 'hunter_interactions', 'meet_hunters_after_rescue'
+			end
 		else
 			'They walk up to you and say, "We heard there may have been a missing girl in the forest. Follow us, you can stay at our camp for the time being until someone can take you back."'
-            if $ARGS[2] = 'forest_outskirts':
-                act 'Continue': minut += 45 & gt 'hunter_interactions', 'meet_hunters_after_rescue'
-            else
-                act 'Continue': minut += 30 & gt 'hunter_interactions', 'meet_hunters_after_rescue'
-            end
+			if $ARGS[2] = 'forest_outskirts':
+				act 'Continue': minut += 45 & gt 'hunter_interactions', 'meet_hunters_after_rescue'
+			else
+				act 'Continue': minut += 30 & gt 'hunter_interactions', 'meet_hunters_after_rescue'
+			end
 		end
 	elseif $ARGS[1] = 'ranger':
 		'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/forester.jpg"></center>'

+ 2 - 2
locations/gschool_chats.qsrc

@@ -183,7 +183,7 @@ if $ARGS[0] = 'gopniks':
 				if PCloInhibit >= 30 or PCloTopCut = 4:
 					grupvalue[4] += 5
 					'You head to the stairwell that the gopniks like to gather in and find them leaning against the wall or sitting on the stairs engaged in a variety of conversations. As you approach, Dan stands up and whistles. "Hey it looks like there''s a wannabe slut approaching. Maybe I''ll ask you to you come over here and suck my dick?" Several of the other gopniks laugh and a few of the guys comment as well. "Hey Dan, it might be your lucky day! I''m just surprised she''s not heading my way," Radomir says. You feel yourself getting a little nervous around them dressed the way you are and think that they might actually try something. After all no one other than a gopnik comes down to this end of the school at this time of the day without a good reason so you''d be on your own if they do.'
-				elseif CloStyle = 2:
+				elseif PCloStyle = 2:
 					grupvalue[4] += 5
 					'There are some nods of approval and positive comments made about your rebelious uniform style.'
 				else
@@ -204,7 +204,7 @@ if $ARGS[0] = 'gopniks':
 				gs 'npc_relationship', 'modify', 'A189', 'like'
 				if PCloInhibit >= 35:
 					'You head to the stairwell that the gopniks like to gather in and find them leaning against the wall or sitting on the stairs engaged in a variety of conversations. As you approach, Dan stands up and whistles. "Hey it looks like there''s a wannabe slut approaching. Maybe I''ll ask you to you come over here and suck my dick?" Several of the other gopniks laugh and a few of the guys comment as well. "Hey Dan, it might be your lucky day! I''m just surprised she''s not heading my way," Radomir says. You feel yourself getting a little nervous around them dressed the way you are and think that they might actually try something. After all no one other than a gopnik comes down to this end of the school at this time of the day without a good reason so you''d be on your own if they do.'
-				elseif CloStyle = 2:
+				elseif PCloStyle = 2:
 					grupvalue[4] += 5
 					'There are some nods of approval and positive comments made about your rebelious uniform style.'
 				else

+ 5 - 1
locations/hourly_events.qsrc

@@ -48,7 +48,11 @@ else
 
 	if hypnoAddict > 0: dynamic $hypnoAddiction
 
-	if InSleepWake <= hour or InSleepWake[1] < daystart: pcs_sleep -= 4
+	if SleepVars['no_sleep_loss'] = 0:
+		pcs_sleep -= 5
+	else
+		SleepVars['no_sleep_loss'] = 0
+	end
 
 	if pcs_sleep <= 0 and succublvl = 0:
 		pcs_condition['lack_of_sleep'] += 2

+ 5 - 15
locations/hunter_interactions.qsrc

@@ -979,11 +979,9 @@ if $ARGS[0] = 'drunken_blackout':
 			gt 'hunter_interactions', 'nighttime_gangbang'
 		else
 			*clr & cla
-			minut += 176
-			pcs_sleep += 54
 			pcs_health -= 15
 			pcs_mood -= 25
-			gs 'stat'
+			gs 'sleep_simple', 'forced', 176
 
 			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel1.jpg"></center>'
 			*nl
@@ -1572,11 +1570,9 @@ if $ARGS[0] = 'striptease':
 
 				act 'Wake up':
 					*clr & cla
-					minut += 180
-					pcs_sleep += 54
 					pcs_health -= 15
 					pcs_mood -= 25
-					gs 'stat'
+					gs 'sleep_simple', 'forced', 180
 
 					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel1.jpg"></center>'
 					*nl
@@ -1597,11 +1593,9 @@ if $ARGS[0] = 'striptease':
 
 				act 'Wake up':
 					*clr & cla
-					minut += 240
-					pcs_sleep += 24
 					pcs_health -= 20
 					pcs_mood -= 25
-					gs 'stat'
+					gs 'sleep_simple', 'forced', 240
 
 					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel4.jpg"></center>'
 					*nl
@@ -1622,11 +1616,9 @@ if $ARGS[0] = 'striptease':
 
 				act 'Wake up':
 					*clr & cla
-					minut += 360
-					pcs_sleep += 36
 					pcs_health -= 10
 					pcs_mood -= 25
-					gs 'stat'
+					gs 'sleep_simple', 'forced', 360
 
 					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel2.jpg"></center>'
 					*nl
@@ -1697,11 +1689,9 @@ if $ARGS[0] = 'striptease':
 
 										act 'Wake up':
 											*clr & cla
-											minut += 240
-											pcs_sleep += 24
 											pcs_health -= 20
 											pcs_mood -= 25
-											gs 'stat'
+											gs 'sleep_simple', 'forced', 240
 
 											'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel3.jpg"></center>'
 											*nl

+ 2 - 6
locations/huntersex.qsrc

@@ -170,8 +170,6 @@ if $ARGS[0] = 'sexafterstrip1':
 
 															act 'Wake up':
 																*clr & cla
-																minut += 600
-																pcs_sleep += 60
 																pcs_health += 50
 																pcs_mood += 50
 																huntdanceslut = 1
@@ -184,7 +182,7 @@ if $ARGS[0] = 'sexafterstrip1':
 																'You don''t know how long you were asleep for, but your head is pounding when you wake up and your whole body hurts.'
 																'You vaguely remember dancing for the guys yesterday but the rest is still blurry.'
 																gs 'arousal', 'end'
-																gs 'stat'
+																gs 'sleep_simple', 'forced', 600
 
 																act 'Further': gt'swamphouse', 'start'
 															end
@@ -2534,14 +2532,12 @@ if $ARGS[0] = 'huntersGrEnd':
 
 	act 'Wake up':
 		*clr & cla
-		minut += 600
-		pcs_sleep += 60
 		pcs_health += 50
 		pcs_mood += 50
 		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel1.jpg"></center>'
 		'You don''t know how long you slept for, but you have a terrible headache and you vaguely remembered what happened yesterday.'
 		gs 'arousal', 'end'
-		gs 'stat'
+		gs 'sleep_simple', 'forced', 600
 		act 'Further': gt'swamphouse', 'start'
 	end
 end

+ 3 - 3
locations/kathouse0.qsrc

@@ -1,7 +1,7 @@
 # kathouse0
-hour = 31
-pcs_sleep = 100
-gs 'stat'
+
+gs 'sleep_simple', 'sleep_until', 31, 0		& ! This is bad
+
 '<center><img <<$set_imgh>> src="images/characters/city/katja/slip.jpg"></center>'
 'Katja walks you to her house, supporting you by wrapping an arm around you as you walk... you still feel a bit woozy from the sunstroke.'
 'She doesn''t live far from the lake and guides you to an apartment and into her bed. She lies down next to you and softly strokes your hair as she says: "You''re fine... just sleep. I will see you in the morning."'

+ 9 - 9
locations/lact_lib.qsrc

@@ -45,7 +45,7 @@
 if $ARGS[0] = 'init_breasttissue':
 	!!	use func('lact_lib','init_breasttissue')
 	!!	getting the useable tissue
-	lactation['useable_cupsize'] = pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_other'] - bodyVars['vofat']
+	lactation['useable_cupsize'] = pcs_mass['bust'] + bodyVars['bust_lact'] + bodyVars['bust_magic'] + bodyVars['bust_other'] - bodyVars['vofat']
 	!!	checking the variable. If it is greater 0, sveta has natural breast tissue to work with.
 	!!	else she has fake breasts or no breasts at all and no ability to lactate
 	if lactation['useable_cupsize'] > 0:
@@ -102,7 +102,7 @@ if $ARGS[0] = 'bsizetoccm':
 	!!	Getting breast ccm per breast function based on the bra size chart in here https://en.wikipedia.org/wiki/Bra_size
 	!!	I tried to create a math polynom for this, but ended up with x^16 monsters and inaccurate numbers, so I am going this approach.
 	!!	This is the most accurate function I was able to make, and is doing the job really good. So please do not touch it.
-	!!	usage func('lact_lib','bsizetoccm', (pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone']))
+	!!	usage func('lact_lib','bsizetoccm', (pcs_mass['bust'] + bodyVars['bust_lact'] + bodyVars['bust_magic'] + bodyVars['bust_silicone']))
 	if ARGS[1] < 0:
 		result = 100
 	elseif ARGS[1] <= 15:
@@ -143,7 +143,7 @@ if $ARGS[0] = 'bsizetoccm':
 end
 
 if $ARGS[0] = 'bccmtosize':
-	!!	backwardsfunction of bsizetoccm. It just reverts breast ccm to "pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone']" 
+	!!	backwardsfunction of bsizetoccm. It just reverts breast ccm to "pcs_mass['bust'] + bodyVars['bust_lact'] + bodyVars['bust_magic'] + bodyVars['bust_silicone']" 
 	!!	func('lact_lib','bccmtosize',lactation['breastccm'])
 	if ARGS[1] < 0:
 		result = 0
@@ -188,18 +188,18 @@ end
 if $ARGS[0] = 'lactationBreastGrowth':
 	if lactation['maturebreast'] = 1 and lactation['preggrowth'] > 0:
 !!		lactation['lactlib_change'] = 1
-		lactation['useable_cupsize'] = pcs_mass['bust'] + bodyVars['bust_magic'] - bodyVars['vofat']
-		pcs_mass['bust'] += func('lact_lib','bccmtosize',(func('lact_lib','bsizetoccm', lactation['useable_cupsize']) + (lactation['preggrowth']/100))) + bodyVars['vofat'] - bodyVars['bust_magic'] - pcs_mass['bust']
+		lactation['useable_cupsize'] = pcs_mass['bust'] + bodyVars['bust_lact'] + bodyVars['bust_magic'] - bodyVars['vofat']
+		bodyVars['bust_lact'] += func('lact_lib','bccmtosize',(func('lact_lib','bsizetoccm', lactation['useable_cupsize']) + (lactation['preggrowth']/100))) + bodyVars['vofat'] - bodyVars['bust_magic'] - pcs_mass['bust'] - bodyVars['bust_lact']
 		lactation['result'] = func('lact_lib','init_breasttissue')
 	end
 	if lactation['alveoliexpandlvl_change'] <> lactation['alveoliexpandlvl']:
 		!!	lactlib makes a change. we need to flag that, else checkExtBreastGrowth will go off and mess up everything.
 !!		lactation['lactlib_change'] = 1
 		if lactation['alveoliexpandlvl'] mod 3 = 0 and lactation['alveoliexpandlvl_change'] + 1 = lactation['alveoliexpandlvl']:
-			pcs_mass['bust'] += 5
+			bodyVars['bust_lact'] += 5
 			'<b>Your breasts seem fuller.</b>'
-		elseif lactation['alveoliexpandlvl_change'] mod 3 = 0 and lactation['alveoliexpandlvl'] + 1 = lactation['alveoliexpandlvl_change'] and lactation['alveoliexpandlvl_change'] > 0 and pcs_mass['bust'] > 10:
-			pcs_mass['bust'] -= 5
+		elseif lactation['alveoliexpandlvl_change'] mod 3 = 0 and lactation['alveoliexpandlvl'] + 1 = lactation['alveoliexpandlvl_change'] and lactation['alveoliexpandlvl_change'] > 0 and bodyVars['bust_lact'] >= 5:
+			bodyVars['bust_lact'] -= 5
 			'<b>Your breasts seem to be getting smaller.</b>'
 		end	
 		lactation['alveoliexpandlvl_change'] = lactation['alveoliexpandlvl'] 	
@@ -306,7 +306,7 @@ if $ARGS[0] = 'prod_milk':
 			else
 				!!	If energy is too low, milk will be produced but there is a chance that pcs_mass['body'] will shrink.
 				pcs_energy = 1
-				if rand(0,100) > 95: pcs_mass['body'] -= 1
+				if rand(0, 100) < 5: pcs_mass['body'] -= 1
 				if pain['breasts'] < 20: pain['breasts'] += 1
 			end
 			if pcs_energy < 1: pcs_energy = 1

+ 3 - 9
locations/mey_tamara_events.qsrc

@@ -654,12 +654,8 @@ if $args[0] = 'party3':
 	mey_vika['mey_vika_qw'] = 50
 	mey_tamara['qw_end'] = 1
 
-	zz_stage = 23*12+55-hour*60-minut
-	if zz_stage < 180: zz_stage = 180
-	!set to 11:55, modify to fit time system
-	minut += zz_stage
-	killvar 'zz_stage'
-	pcs_sleep += 3
+	!set to 23:55, modify to fit time system
+	minut += max(180, (23-hour)*60 + 55-minut)
 	gs 'stat'
 
 	act 'Fall asleep':
@@ -758,11 +754,9 @@ if $args[0] = 'party4a':
 									mey_vika['mey_vika_qw'] = 50
 									mey_tamara['drink_qw'] = 1
 									mey_tamara['qw_end'] = 1
-									hour = 23
-									minut = 55
+									minut += (23-hour) * 60 + 55-minut
 									pcs_mood -= 20
 									if alko > 0: alko -= 1
-									pcs_sleep += 3
 									gs 'stat'
 									'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/event/party15.jpg"></center>'
 									'You''re awoken by Tamara in the front yard. She deliberately slams the car door, while you were sleeping in the back seat. Your mouth tastes like crap and you have a hell of a headache.'

+ 9 - 38
locations/nichTaras.qsrc

@@ -60,10 +60,9 @@ if $ARGS[0] = 'abdIntro':
 			gt 'nichTaras','abdIntro'
 		end
 	elseif nichAbdStage = 20:
-		minut += 120
-		pcs_sleep += 20
 		gs 'pain', 'pubic', 'spank'
-		gs 'stat'
+		gs 'sleep_simple', 'forced', 120
+
 		'<center><img <<$set_imgh>> src="images/characters/city/taras/intro3.jpg"></center>'
 		'You are just to exhausted to stay awake any longer. You fall into an uneasy sleep.'
 		*nl
@@ -320,11 +319,8 @@ elseif $ARGS[0] = 'dungeon':
 			'Giving up you decide to try to sleep like this. It takes a while but finally you manage to fall asleep.'
 			*nl
 			if hour + 4 >= nichTarasReturn:
-				nichSleepTime = (nichTarasReturn - hour) * 60 - minut
-				minut += nichSleepTime
-				pcs_sleep = min(100 , pcs_sleep + nichSleepTime / 4)
-				killvar 'nichSleepTime'
-				gs 'stat'
+				gs 'sleep_simple', 'sleep_until', nichTarasReturn, 0
+
 				'You wake up by a sharp pain in your side. Taras has returned and woke you up by giving you a kick.'
 				'"Enough lazing, slut."'
 				'He grabs your hair and pulls you up.'
@@ -334,9 +330,8 @@ elseif $ARGS[0] = 'dungeon':
 				end
 			else
 				'You wake up after a few hour. Apperently you are still alone in the basement.'
-				minut += 240
-				pcs_sleep = min(100 , pcs_sleep + 60)
-				gs 'stat'
+				gs 'sleep_simple', 'forced', 240
+
 				if pcs_sleep < 80 or cheatVars['sleep'] ! 0:
 					act 'Sleep':
 						gt 'nichTaras','dungeon', 'bed', 'sleep'
@@ -487,16 +482,8 @@ elseif $ARGS[0] = 'session':
 			!! Sveta fell asleep after 10
 			'<center><img <<$set_imgh>> src="images/characters/city/taras/mirrorEvent1d.jpg"></center>'
 			'Despite your position being very uncomfortable you finally manage to fall asleep.'
-			if hour < 6:
-				nichSleepTime = (6 - hour) * 60 - minut
-			else
-				nichSleepTime = (30 - hour) * 60 - minut
-			end
 
-			pcs_sleep = min(100 , pcs_sleep + nichSleepTime / 4)
-			minut += nichSleepTime
-			killvar 'nichSleepTime'
-			gs 'stat'
+			gs 'sleep_simple', 'sleep_until', 6, 0
 
 			*nl
 			'You don''t know for how long you slept when a dash of cold water pulls you out of your dreams.'
@@ -558,16 +545,8 @@ elseif $ARGS[0] = 'session':
 			!! Sveta fell asleep after 20
 			'<center><img <<$set_imgh>> src="images/characters/city/taras/mirrorEvent1g.jpg"></center>'
 			'Despite the hard cold floor being very uncomfortable to lie on you finally manage to fall asleep.'
-			if hour < 6:
-				nichSleepTime = (6 - hour) * 60 - minut
-			else
-				nichSleepTime = (30 - hour) * 60 - minut
-			end
 
-			pcs_sleep = min(100 , pcs_sleep + nichSleepTime / 4)
-			minut += nichSleepTime
-			killvar 'nichSleepTime'
-			gs 'stat'
+			gs 'sleep_simple', 'sleep_until', 6, 0
 
 			*nl
 			'You don''t know for how long you slept when a dash of cold water pulls you out of your dreams.'
@@ -697,16 +676,8 @@ elseif $ARGS[0] = 'session':
 											'<center><img <<$set_imgh>> src="images/characters/city/taras/punishment1a.jpg"></center>'
 
 											'Being placed in this crate and all most of your weight resting on your shoulders while foul smelling urine is slowly drying on your head is a bad position to sleep in. But your need for sleep is too strong and so you fall asleep soon.'
-											if hour < 6:
-												nichSleepTime = (6 - hour) * 60 - minut
-											else
-												nichSleepTime = (30 - hour) * 60 - minut
-											end
 
-											pcs_sleep = min(100 , pcs_sleep + nichSleepTime / 4)
-											minut += nichSleepTime
-											killvar 'nichSleepTime'
-											gs 'stat'
+											gs 'sleep_simple', 'sleep_until', 6, 0
 
 											*nl
 											'You don''t know for how long you slept when a dash of cold water pulls you out of your dreams.'

+ 1 - 1
locations/obj_din.qsrc

@@ -2343,7 +2343,7 @@ if $ARGS[0] = 'rest':
 			pcs_sleep += 10
 		end
 	elseif waiting <= 0 or waiting > 120:
-		'Invalid time.'
+		msg 'Invalid time.'
 	end
 	gs 'stat'
 	gt $loc, $loc_arg

+ 0 - 2
locations/pav_church.qsrc

@@ -258,14 +258,12 @@ if $ARGS[0] = 'liturgy':
 	if fame['pav_slut'] < 150 and Conf_Kirill <= 1:
 		pcs_mood += 20
 		church_moral += 2
-		pcs_sleep += 5
 		'You join the congregation for the Divine Liturgy. You see mostly older people around, but there are some people around your age present as well. You participate in the singing, but that''s about it. Your presence seems to go largely unnoticed and you have the chance to rest. You feel a lot better.'
 		act 'Leave the church': gt 'pav_church' , 'service_end'
 	elseif fame['pav_slut'] < 150 and Conf_Kirill >= 2:
 		Kirill += 1
 		pcs_mood += 20
 		church_moral += 2
-		pcs_sleep += 5
 		'You participate fully in the Divine Liturgy, listening to the preaching and singing along. When going to communion and receiving the ceremonial bread, you lock eyes with Father Kirill. He seems happy to see you participating in the service.'
 		act 'Leave the church': gt 'pav_church' , 'service_end'
 	else

+ 5 - 25
locations/pav_park.qsrc

@@ -301,7 +301,7 @@ if $ARGS[0] = 'start':
 	else
 		'You could jog around the park if you were wearing sports clothes and shoes.'
 	end
-	act 'Sit on the bench': gt 'pav_park', 'sitting_park_bench'
+	act 'Sit on the bench': gt 'placer_sex', 'sitting_park_bench'
 
 	if mc_inventory['joints'] > 0 and drugVars['weed_high'] = 0: act 'Smoke a joint': minut += 10 & gs 'drugs', 'joint' & gt $loc, $loc_arg
 
@@ -434,11 +434,9 @@ if $ARGS[0] = 'sleeping_park_bench':
 	cla & *clr
 	pcs_health += 5
 	pcs_hairbsh = 0
-	InSleep = 1
-	minut += 480
-	pcs_sleep += 80
-	gs 'stat'
-	InSleep = 0
+
+	gs 'sleep_simple', 'simple'
+
 	if PCloStyle2 = 4:
 		'<center><img <<$set_imgh>> src="images/locations/shared/park/sleeping_park_form.jpg"></center>'
 	elseif PCloSkirt > 0:
@@ -475,24 +473,6 @@ if $ARGS[0] = 'sleeping_park_bench':
 		!act 'Continue': gt $loc, $loc_arg
 end
 
-if $ARGS[0] = 'sitting_park_bench':
-	
-	waiting = input ("How long would you like to rest?<br>(Default 15 minutes, maximum 120 minutes)")
-
-	if waiting = '':
-		minut += 15
-	elseif waiting > 0 and waiting <= 120:
-		minut = minut + waiting
-		pcs_mood += 10
-		if pcs_sleep < 90 and waiting >= 60:
-			pcs_sleep += 10
-		end
-	elseif waiting <= 0 or waiting > 120:
-		'Invalid time.'
-	end
-	gt $loc, $loc_arg
-end
-
 if mc_inventory['joints'] > 0 and drugVars['weed_high'] = 0: act 'Smoke a joint': minut += 10 & gs 'drugs', 'joint' & gt $loc, $loc_arg
 
 if (hour >= 20 or hour < 6) and (pcs_sleep <= 30 or cheatVars['sleep'] ! 0):
@@ -745,7 +725,7 @@ if $ARGS[0] = 'deeper_park':
 	elseif ($clothingworntype ! 'danilovich_outfits' or $shoeworntype ! 'danilovich') and hour > 5 and hour < 23 and daybegskver ! daystart:
 		'You could jog around the park if you were wearing sports clothes and shoes.'
 	end
-	act 'Sit down on the bench': gt 'pav_park', 'sitting_park_bench'
+	act 'Sit down on the bench': gt 'placer_sex', 'sitting_park_bench'
 
 	if mc_inventory['joints'] > 0 and drugVars['weed_high'] = 0: act 'Smoke a joint': minut += 10 & gs 'drugs', 'joint' & gt $loc, $loc_arg
 

+ 3 - 15
locations/pav_shared_apt.qsrc

@@ -756,11 +756,11 @@ if $ARGS[0] = 'pcsRoom':
 end
 	
 if $ARGS[0] = 'sofabed':
+	$loc = 'pav_shared_apt'
+	$loc_arg = 'sofabed'
 	$menu_loc = 'pav_shared_apt'
 	$menu_arg = 'sofabed'
 	menu_off = 0
-	$loc = 'pav_shared_apt'
-	$loc_arg = 'sofabed'
 	*clr & cla
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/shared/home/bedroom/sofabed.jpg"></center>'
@@ -781,19 +781,7 @@ if $ARGS[0] = 'sofabed':
 		act 'Masturbate':gt 'selfplay', 'start'
 	end
 
-	act 'Take a nap (1:00)':
-		if pcs_sleep < 90:
-			pcs_sleep += 10
-			pcs_health += 5
-			minut += 60
-			gs 'stat'
-			'You sleep about an hour.'
-		else
-			minut += 5
-			gs 'stat'
-			'You are not tired enough to sleep, even for a short nap.'
-		end
-	end
+	act 'Take a nap (1:00)': gs 'sleep_simple', 'nap'
 	act 'Get up':gt 'pav_shared_apt', 'pcsRoom'
 end
 

+ 47 - 4
locations/pcs_has_attr.qsrc

@@ -163,7 +163,6 @@ if $ARGS[0] = 'AND':
 	if pha_AND_i < pha_AND_maxi: jump 'pha_AND_loop'
 	result = 1
 
-
 	:pha_AND_killvar
 	killvar 'pha_AND_maxi'
 	killvar 'pha_AND_i'
@@ -189,6 +188,50 @@ elseif $ARGS[0] = 'OR':
 	:pha_OR_killvar
 	killvar 'pha_OR_maxi'
 	killvar 'pha_OR_i'
+
+elseif $ARGS[0] = 'NAND':
+	pha_NAND_maxi = arrsize('ARGS')
+
+	if pha_NAND_maxi = 1:
+		result = 0
+		jump 'pha_NAND_killvar'
+	end
+
+	pha_NAND_i = 1
+	:pha_NAND_loop
+		if func('pcs_has_attr', $ARGS[pha_NAND_i]) = 1:
+			result = 0
+			jump 'pha_AND_killvar'
+		end
+		pha_NAND_i += 1
+	if pha_NAND_i < pha_NAND_maxi: jump 'pha_AND_loop'
+	result = 1
+
+	:pha_NAND_killvar
+	killvar 'pha_NAND_maxi'
+	killvar 'pha_NAND_i'
+
+elseif $ARGS[0] = 'NOR':
+	pha_NOR_maxi = arrsize('ARGS')
+
+	if pha_NOR_maxi = 1:
+		result = 0
+		jump 'pha_NOR_killvar'
+	end
+
+	pha_NOR_i = 1
+	:pha_OR_loop
+		if func('pcs_has_attr', $ARGS[pha_NOR_i]) = 0:
+			result = 1
+			jump 'pha_OR_killvar'
+		end
+		pha_NOR_i += 1
+	if pha_NOR_i < pha_NOR_maxi: jump 'pha_OR_loop'
+	result = 0
+
+	:pha_OR_killvar
+	killvar 'pha_NOR_maxi'
+	killvar 'pha_NOR_i'
 end
 
 
@@ -211,7 +254,7 @@ if $ARGS[0] = 'body_ass_flat':
 
 elseif $ARGS[0] = 'body_ass_average':
 	!! average feminine butt
-	if pcs_butt >= 15 and pcs_butt <= 25:
+	if pcs_butt >= 15 and pcs_butt <= 29:
 		result = 1
 	else
 		result = 0
@@ -219,7 +262,7 @@ elseif $ARGS[0] = 'body_ass_average':
 
 elseif $ARGS[0] = 'body_ass_big':
 	!! Big round butt
-	if pcs_butt >= 26 and pcs_butt <= 40:
+	if pcs_butt >= 30 and pcs_butt <= 44:
 		result = 1
 	else
 		result = 0
@@ -227,7 +270,7 @@ elseif $ARGS[0] = 'body_ass_big':
 
 elseif $ARGS[0] = 'body_ass_heart':
 	!! Heart-shaped butt
-	if pcs_butt >= 41 and pcs_butt <= 59:
+	if pcs_butt >= 45 and pcs_butt <= 59:
 		result = 1
 	else
 		result = 0

+ 4 - 10
locations/post_events.qsrc

@@ -436,11 +436,8 @@ if $ARGS[0] = '2-2':
 						
 						act 'Stay and nap with Jenya':
 							*clr & cla
-							minut += 65
-							pcs_sleep += 15
-							pcs_health += 60
-							gs 'stat'
-							!!energy gain, equivalent of an hour of napping
+							gs 'sleep_simple', 'pass_time', 65
+
 							'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/sex/postevent2-17.jpg"></center>'
 							'"Now that you mention it, I could use a nap..." you reply and get comfortable on the bed.'
 							'Jenya embraces you and you both fall asleep. You''re then awoken by the sensation of her rubbing her body against yours. Her soft kisses on your neck give you goosebumps all over your body.'
@@ -517,11 +514,8 @@ if $ARGS[0] = '2-2':
 					
 					act 'Stay and nap with Jenya':
 						*clr & cla
-						minut += 65
-						pcs_sleep += 15
-						pcs_health += 60
-						gs 'stat'
-						!!energy gain, equivalent of an hour of napping
+						gs 'sleep_simple', 'pass_time', 65
+
 						'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/sex/postevent2-17.jpg"></center>'
 						'"Now that you mention it, I could use a nap..." you reply and get comfortable on the bed.'
 						'Jenya embraces you and you both fall asleep. You''re then awoken by the sensation of her rubbing her body against yours. Her soft kisses on your neck give you goosebumps all over your body.'

+ 4 - 4
locations/rape_events.qsrc

@@ -854,10 +854,10 @@ end
 
 if $ARGS[0] = 'park_wakeup':
 	menu_off = 1
-    minut += rand(60, 120)
-    pcs_sleep += rand(10, 20)
-    pcs_health += rand(5, 10)
-    gs 'stat'
+	sleepVars['no_health'] = 1
+	pcs_health += rand(5, 10)
+	gs 'sleep_simple', 'forced', rand(60, 120)
+
 	act'Wake up':
 		cla & *clr
 		'<center><img <<$set_imgh>> src="images/shared/sex/rape/park_after_nude1.jpg"></center>'

+ 3 - 2
locations/rex_party_smallEvents.qsrc

@@ -172,9 +172,10 @@ if $ARGS[0] = 'sleep':
 		end
 	else
 		if hour < 9 and hour > 3 :
-			pcs_sleep += (9 - hour) * 5
-			minut += ((8 - hour) * 60) + (60 - minut)
 			*clr & cla
+
+			gs 'sleep_simple', 'sleep_until', 9, 0
+
 			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/reksparty_party_kuh_7.jpg"></center>'
 			'Anya shakes you until you slowly wake up'
 			'She smiles at you. "Well it looks like you had fun tonight. How are you feeling?"'

+ 0 - 1
locations/salon.qsrc

@@ -2151,7 +2151,6 @@ if $ARGS[0] = 'magic_massage':
 		act 'Next':
 			pcs_mood += 40
 			orgasm += 10
-			pcs_sleep -= 20
 			gs 'stat'
 			cla & *clr
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/mall/salon/work/room.jpg"></center>'

+ 3 - 0
locations/saveupdater.qsrc

@@ -2988,6 +2988,9 @@ if temp_current_save_version < 00090204:
 		if Enable_auto_tampons = 0: cheatVars['auto_tampons'] = 1
 		killvar 'Enable_auto_tampons'
 	end
+
+
+	killvar 'InSleepWake'
 end
 
 

+ 3 - 5
locations/sex_ev_after.qsrc

@@ -2515,11 +2515,9 @@ if $ARGS[0] = 'sleep_function':
 		sex_ev['sleepover'] = 1
 		if rand(0,1) = 1:
 			sex_ev['extra_cum'] += 5
-			sex_ev['sleep_time'] = rand(1,3)
-			minut += 60*sex_ev['sleep_time']
-			pcs_sleep += 15*sex_ev['sleep_time']
-			pcs_health += 5*sex_ev['sleep_time']
-			gs'stat'
+			sex_ev['sleep_time'] = rand(60, 180)
+			gs 'sleep_simple', 'forced', sex_ev['sleep_time']
+
 			sex_ev['sleep_fuck'] = 1
 		else
 			if alko > 6:

+ 21 - 1
locations/sister_chat.qsrc

@@ -1180,6 +1180,25 @@ if $ARGS[0] = 'bathroom_dildo_talk2':
 	act 'Continue': gt 'bedrPar'
 end
 
+if $ARGS[0] = 'sex_room_talk1':
+	sisterQW['sex_room'] = 0
+	cla & *clr
+	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/resident/anya/sister2.jpg"></center>'
+	if sisterQW['sex_bed'] > daystart:
+		npc_rel['A33'] -= 5
+		if sisterQW['sex_bed_count'] = 1:
+			'"<<$pcs_nickname>> what the fuck! Did you fuck a guy in my bed?"'
+		else
+			'"<<$pcs_nickname>> what the fuck! Did you fuck a guy in my bed <i>again</i>?"'
+		end
+	else
+		'"Hey <<$pcs_nickname>>," your sister says with a wry look.'
+		'"What''s up?"'
+		'"Did you bring a guy home while we were visiting the village this weekend?" The look on your face makes her mouth twist into a smirk. "Cause it smelled like sex in here after I got back."'
+	end
+	act'Continue':gt'bedrPar'
+end
+
 if $ARGS[0] = 'momslut_talk1':
 	if momslut > 0:
 		act'Ask her if she knows mom is cheating':
@@ -1240,7 +1259,8 @@ if $ARGS[0] = 'momslut_talk3':
 		cla & *clr
 		'<center><img <<$set_imgh>> src="images/characters/pavlovsk/resident/anya/sister2.jpg"></center>'
 		'"Why didn''t you tell me?" you ask.'
-		'"Because I didn''t want to fuck up our family again," she replies with a sigh. "You weren''t old enough to remember when dad left. Our real dad. Everyone knew mom was cheating on him. The whole town. But it stayed hush hush until he found out. After they got divorced, mom would take me to church with her on Sunday and strangers would ask me what it''s like to be a whore''s daughter. I didn''t want to go through that again. Didn''t want <i>you</i> to have to go through that. And I guess I didn''t just didn''t want to acknowledge it either. That it was easier to pretend the truth was a lie..."'
+		'"Because I didn''t want to fuck up our family again," your sister replies with a sigh. "You weren''t old enough to remember when dad left. Our real dad. Everyone knew mom was cheating on him. The whole town. But it stayed hush hush until he found out. After they got divorced, mom would take me to church with her on Sunday and strangers would ask me what it''s like to be a whore''s daughter. I didn''t want to go through that again. Didn''t want <i>you</i> to have to go through that. And I guess I didn''t just didn''t want to acknowledge it either. That it was easier to pretend the truth was a lie..."'
+		act 'Keep talking': gt 'sister_chat', 'talking'
 	end
 end
 

+ 3 - 19
locations/sitrPar.qsrc

@@ -55,13 +55,11 @@ if $ARGS[0] = '':
 			gs 'npc_relationship', 'modify', 'A33', 10
 			gs 'npc_relationship', 'modify', 'A34', 10
 			money += 5000
-			hour = 23
-			minut = 0
-			minut += 120
-			pcs_sleep = 0
+			minut += (25 - hour) * 60 - minut
 			pcs_mood += 100
 			gs 'food', 'l_meal'
 			gs 'stat'
+
 			'You sit at the festive table laid in front of the TV and celebrate the New Year with your family, the TV providing some background noise. At the table, people strike up a conversation and common problems are forgotten as everyone is has fun talking to each other. At midnight, everyone wishes one another a happy New Year and enjoys the champagne and fireworks outside as your mother gives you an envelope with a greeting card and 5000 <b>₽</b>.' 
 			'You continue to watch TV and enjoy the champagne and company of your family, but everyone eventually grows tired and they go to bed, one by one.'
 
@@ -180,21 +178,7 @@ if $ARGS[0]= 'sofa':
 
 	gs 'events', 'read'
 
-	if locat['Fam_livingroom'] = 0:
-		act 'Take a nap (1:00)':
-			if pcs_sleep < 90:
-				pcs_sleep += 10
-				pcs_health += 5
-				minut += 60
-				gs 'stat'
-				'You sleep for about an hour.'
-			else
-				minut += 5
-				gs 'stat'
-				'You''re not tired enough to sleep, even for a short nap.'
-			end
-		end
-	end
+	if locat['Fam_livingroom'] = 0: act 'Take a nap (1:00)': gs 'sleep_simple', 'nap'
 end
 
 if $ARGS[0] = 'TVfam':

+ 2 - 1
locations/sleep.qsrc

@@ -118,7 +118,7 @@ if $ARGS[0] = 'sleep_loop':
 		sleepVars['minutes_to_wakeup'] -= 1
 		sleepVars['time_to_full'] -= 1
 
-		if recuperation = 0: pcs_health += 5
+		if recuperation = 0 or sleepVars['no_health'] = 1: pcs_health += 5
 
 		if vibratorIN = 1:
 			sleepVars['vtime'] += 1
@@ -151,6 +151,7 @@ if $ARGS[0] = 'sleep_loop':
 		end
 
 	if sleepVars['minutes_to_wakeup'] > 0: jump 'sleep_loop_loop'
+	sleepVars['no_health'] = 0
 
 	xgt 'sleep', 'post_sleep'
 end

+ 75 - 23
locations/sleep_simple.qsrc

@@ -10,9 +10,34 @@ if $ARGS[0] = 'simple':
 !! so we can add about 2 hours to time to full as a limit
 	sleepVars['time_to_full'] += 60 + rand(0, 90)
 
-
 	gs 'sleep', 'calc_minutes_to_wakeup'
 
+	gs 'sleep_simple', 'loop'
+end
+
+if $ARGS[0] = 'forced':
+	if ARGS[1] <= 0:
+		gs 'sleep_simple', 'simple'
+		exit
+	end
+
+	sleepVars['time_to_full'] = (100 - pcs_sleep) * 5
+	sleepVars['time_to_full'] += 60 + rand(0, 90)
+	sleepVars['minutes_to_wakeup'] = ARGS[1]
+
+	gs 'sleep_simple', 'loop'
+end
+
+if $ARGS[0] = 'sleep_until':
+	temp_minutes = (ARGS[1] - hour) * 60 + ARGS[2] - minut
+	if temp_minutes < 0: temp_minutes += 1440
+
+	gs 'sleep_simple', 'forced', temp_minutes
+	killvar 'temp_minutes'
+end
+
+
+if $ARGS[0] = 'loop':
 	InSleep = 1
 	:sleep_simple_loop
 		minut += 1
@@ -21,7 +46,7 @@ if $ARGS[0] = 'simple':
 		sleepVars['minutes_to_wakeup'] -= 1
 		sleepVars['time_to_full'] -= 1
 
-		if recuperation = 0: pcs_health += 5
+		if recuperation = 0 or SleepVars['no_health'] = 1: pcs_health += 5
 
 		if sleepVars['stime'] mod 5 = 0: pcs_sleep += 1
 		if sleepVars['stime'] >= 60: sleepVars['stime'] = 0
@@ -30,11 +55,13 @@ if $ARGS[0] = 'simple':
 		gs 'sleep_simple', 'mod_sleeptriggers'
 	if sleepVars['minutes_to_wakeup'] > 0: jump 'sleep_simple_loop'
 
+	sleepVars['no_health'] = 0
 	sleepVars['time_now'] = daystart * 1440 + hour * 60 + minut
 	InSleep = 0
 	gs 'stat'
 end
 
+
 if $ARGS[0] = 'mod_sleeptriggers':
 	!! This location is here to allow mods to hook into the system.
 	!! Check for: if $ARGS[0] = 'sleep_simple' and $ARGS[1] = 'mod_sleeptriggers'
@@ -44,28 +71,53 @@ if $ARGS[0] = 'mod_sleeptriggers':
 end
 
 if $ARGS[0] = 'nap_bed':
-	act 'Take a nap (1:00)':
-		menu_off = 1
-		cla
-		if pcs_sleep < 10:
-			gs 'shortgs', 'autosave'
-			gt 'pre_sleep', 'prepare_sleep'
-		elseif pcs_sleep <= 90:
-			InSleep = 1
-			pcs_sleep += 10
-			pcs_health += 5
-			minut += 60
-			gs 'stat'
-			*nl
-			'You sleep about an hour.'
-		else
-			minut += 5
-			gs 'stat'
-			*nl
-			'You are not tired enough to sleep, even for a short nap.'
-		end
-		act 'Get up': InSleep = 0 & gt 'bed_get_out', 'start'
+	cla
+	menu_off = 1
+	if pcs_sleep < 10:
+		gs 'shortgs', 'autosave'
+		gt 'pre_sleep', 'prepare_sleep'
+	elseif pcs_sleep <= 90:
+		InSleep = 1
+		gs 'sleep_simple', 'nap_base', 60
+		*nl
+		if ARGS[1] = 0: 'You sleep about an hour.'
+	else
+		minut += 5
+		*nl
+		if ARGS[1] = 0: 'You are not tired enough to sleep, even for a short nap.'
 	end
+	gs 'stat'
+	act 'Get up': InSleep = 0 & gt 'bed_get_out', 'start'
 end
 
+if $ARGS[0] = 'nap':
+	cla
+	menu_off = 1
+	if pcs_sleep <= 90:
+		InSleep = 1
+		gs 'sleep_simple', 'nap_base', 60
+		*nl
+		if ARGS[1] = 0: 'You nap for about an hour.'
+	else
+		minut += 5
+		*nl
+		if ARGS[1] = 0: 'You are not tired enough even for a short nap.'
+	end
+	gs 'stat'
+	InSleep = 0
+	act 'Get up': gt $loc, $loc_arg
+end
+
+if $ARGS[0] = 'nap_base':
+	if ARGS[1] > 0:
+		minut += ARGS[1]
+	else
+		ARGS[1] *= -1
+	end
+	pcs_sleep += ARGS[1] / 6
+	pcs_health += ARGS[1] / 12
+	gs 'stat'
+end
+
+
 --- sleep_simple ---------------------------------

+ 36 - 49
locations/swamphouse.qsrc

@@ -1136,12 +1136,10 @@ if $ARGS[0] = 'hunterstable':
 
 						act 'Wake up':
 							*clr & cla
-							minut += 180
-							pcs_sleep += 30
-							pcs_health -= 15
 							pcs_mood -= 25
-							gs 'stat'
-
+							sleepVars['no_health'] = 1
+							pcs_health -= 15
+							gs 'sleep_simple', 'forced', 180
 							'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel1.jpg"></center>'
 							*nl
 							'Three hours later, you wake up in the middle of the night. You''ve got a headache and vaguely remember yesterday.'
@@ -1162,11 +1160,10 @@ if $ARGS[0] = 'hunterstable':
 
 						act 'Wake up':
 							*clr & cla
-							minut += 240
-							pcs_sleep += 45
-							pcs_health -= 20
 							pcs_mood -= 25
-							gs 'stat'
+							sleepVars['no_health'] = 1
+							pcs_health -= 20
+							gs 'sleep_simple', 'forced', 240
 
 							'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel4.jpg"></center>'
 							*nl
@@ -1187,11 +1184,10 @@ if $ARGS[0] = 'hunterstable':
 
 						act 'Wake up':
 							*clr & cla
-							minut += 360
-							pcs_sleep += 75
-							pcs_health -= 10
 							pcs_mood -= 25
-							gs 'stat'
+							sleepVars['no_health'] = 1
+							pcs_health -= 10
+							gs 'sleep_simple', 'forced', 360
 
 							'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel2.jpg"></center>'
 							*nl
@@ -1221,11 +1217,10 @@ if $ARGS[0] = 'hunterstable':
 
 								act 'Wake up':
 									*clr & cla
-									minut += 480
-									pcs_sleep += 100
-									pcs_health -= 5
 									pcs_mood -= 25
-									gs 'stat'
+									sleepVars['no_health'] = 1
+									pcs_health -= 5
+									gs 'sleep_simple', 'forced', 480
 
 									'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel2.jpg"></center>'
 									*nl
@@ -1283,11 +1278,10 @@ if $ARGS[0] = 'hunterstable':
 
 													act 'Wake up':
 														*clr & cla
-														minut += 240
-														pcs_sleep += 45
-														pcs_health -= 5
 														pcs_mood -= 25
-														gs 'stat'
+														sleepVars['no_health'] = 1
+														pcs_health -= 5
+														gs 'sleep_simple', 'forced', 240
 
 														'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel4.jpg"></center>'
 														*nl
@@ -1308,11 +1302,10 @@ if $ARGS[0] = 'hunterstable':
 
 												act 'Wake up':
 													*clr & cla
-													minut += 360
-													pcs_sleep += 60
-													pcs_health -= 15
 													pcs_mood -= 25
-													gs 'stat'
+													sleepVars['no_health'] = 1
+													pcs_health -= 15
+													gs 'sleep_simple', 'forced', 360
 
 													'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel2.jpg"></center>'
 													*nl
@@ -1334,11 +1327,10 @@ if $ARGS[0] = 'hunterstable':
 
 										act 'Wake up':
 											*clr & cla
-											minut += 360
-											pcs_sleep += 60
-											pcs_health -= 15
 											pcs_mood -= 25
-											gs 'stat'
+											sleepVars['no_health'] = 1
+											pcs_health -= 15
+											gs 'sleep_simple', 'forced', 360
 
 											'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel2.jpg"></center>'
 											*nl
@@ -1424,11 +1416,10 @@ if $ARGS[0] = 'hunterstable':
 
 											act 'Wake up':
 												*clr & cla
-												minut += 240
-												pcs_sleep += 45
-												pcs_health -= 20
 												pcs_mood -= 25
-												gs 'stat'
+												sleepVars['no_health'] = 1
+												pcs_health -= 20
+												gs 'sleep_simple', 'forced', 240
 
 												'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel3.jpg"></center>'
 												*nl
@@ -1478,11 +1469,10 @@ if $ARGS[0] = 'hunterstable':
 
 					act 'Wake up':
 						*clr & cla
-						minut += 180
-						pcs_sleep += 30
-						pcs_health -= 15
 						pcs_mood -= 25
-						gs 'stat'
+						sleepVars['no_health'] = 1
+						pcs_health -= 15
+						gs 'sleep_simple', 'forced', 180
 
 						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel1.jpg"></center>'
 						*nl
@@ -1503,11 +1493,10 @@ if $ARGS[0] = 'hunterstable':
 
 					act 'Wake up':
 						*clr & cla
-						minut += 240
-						pcs_sleep += 45
-						pcs_health -= 20
 						pcs_mood -= 25
-						gs 'stat'
+						sleepVars['no_health'] = 1
+						pcs_health -= 20
+						gs 'sleep_simple', 'forced', 240
 
 						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel4.jpg"></center>'
 						*nl
@@ -1528,11 +1517,10 @@ if $ARGS[0] = 'hunterstable':
 
 					act 'Wake up':
 						*clr & cla
-						minut += 360
-						pcs_sleep += 75
-						pcs_health -= 10
 						pcs_mood -= 25
-						gs 'stat'
+						sleepVars['no_health'] = 1
+						pcs_health -= 10
+						gs 'sleep_simple', 'forced', 360
 
 						'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel2.jpg"></center>'
 						*nl
@@ -1601,11 +1589,10 @@ if $ARGS[0] = 'hunterstable':
 
 											act 'Wake up':
 												*clr & cla
-												minut += 240
-												pcs_sleep += 45
-												pcs_health -= 20
 												pcs_mood -= 25
-												gs 'stat'
+												sleepVars['no_health'] = 1
+												pcs_health -= 20
+												gs 'sleep_simple', 'forced', 240
 
 												'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel3.jpg"></center>'
 												*nl

+ 6 - 30
locations/therapist_hotel.qsrc

@@ -138,11 +138,7 @@ if $ARGS[0] = 'event1_post_shower':
 				therapistQW['hotel_visits'] = 1
 				gs 'sleep_simple', 'simple'
 				if hour < 7:
-					pcs_sleep += 15 * (6 - hour)
-					hour = 7
-					minut = 0
-					pcs_sleep = min(pcs_sleep, 100)
-					gs 'stat'
+					gs 'sleep_simple', 'forced', 7, 0
 				end
 				gt 'therapist_hotel', 'event1_morning'
 			end
@@ -258,11 +254,7 @@ if $ARGS[0] = 'event2_shower':
 				therapistQW['hotel_visits'] = 2
 				gs 'sleep_simple', 'simple'
 				if hour < 7:
-					pcs_sleep += 15 * (6 - hour)
-					hour = 7
-					minut = 0
-					pcs_sleep = min(pcs_sleep, 100)
-					gs 'stat'
+					gs 'sleep_simple', 'forced', 7, 0
 				end
 
 				dynamic $showerdin
@@ -352,11 +344,7 @@ if $ARGS[0] = 'event3':
 					therapistQW['hotel_visits'] = 3
 					gs 'sleep_simple', 'simple'
 					if hour < 7:
-						pcs_sleep += 15 * (6 - hour)
-						hour = 7
-						minut = 0
-						pcs_sleep = min(pcs_sleep, 100)
-						gs 'stat'
+						gs 'sleep_simple', 'forced', 7, 0
 					end
 
 					dynamic $showerdin
@@ -490,11 +478,7 @@ if $ARGS[0] = 'event4_post_wait':
 		therapistQW['hotel_visits'] += 1
 		gs 'sleep_simple', 'simple'
 		if hour < 7:
-			pcs_sleep += 15 * (6 - hour)
-			hour = 7
-			minut = 0
-			pcs_sleep = min(pcs_sleep, 100)
-			gs 'stat'
+			gs 'sleep_simple', 'forced', 7, 0
 		end
 
 		dynamic $showerdin
@@ -575,11 +559,7 @@ if $ARGS[0] = 'event5_submit':
 					gs 'sleep_simple', 'simple'
 					gs 'stat'
 					if hour < 7:
-						pcs_sleep += 15 * (6 - hour)
-						hour = 7
-						minut = 0
-						pcs_sleep = min(pcs_sleep, 100)
-						gs 'stat'
+						gs 'sleep_simple', 'forced', 7, 0
 					end
 
 					gs 'arousal', 'vaginal', 60, 'sub'
@@ -806,11 +786,7 @@ if $ARGS[0] = 'event6_submit3':
 			*clr & cla
 			gs 'sleep_simple', 'simple'
 			if hour < 7:
-				pcs_sleep += 15 * (6 - hour)
-				hour = 7
-				minut = 0
-				pcs_sleep = min(pcs_sleep, 100)
-				gs 'stat'
+				gs 'sleep_simple', 'forced', 7, 0
 			end
 
 			gs 'arousal', 'vaginal', -90, 'sub'

+ 6 - 14
locations/vasily_home_sex.qsrc

@@ -708,7 +708,6 @@ if $ARGS[0] = 'gang_sex_room_ev1_2':
 											else
 												pcs_hydra -= 20
 											end
-											pcs_sleep -= 8
 											gs 'arousal', 'end'
 											gs 'stat'
 											'You must have really gotten the guys worked up because even your stomach and breasts are all sticky. Idly licking your fingers, you head toward the shower. Your legs are a bit wobbly, but there''s still a spring in your step. Still licking your fingers, you step into the shower.'
@@ -809,19 +808,12 @@ if $ARGS[0] = 'drunken_sex':
 			*clr & cla
 			minut += 5
 			pcs_horny += 5
-			temp = rand(0,2)
-			if temp = 0: gs 'cum_call', 'stomach', $boy[2],1
-			if temp = 1: gs 'cum_call', 'face', $boy[2],1
-			if temp = 2: gs 'cum_call', 'mouth', $boy[2],1
-			temp = rand(0,2)
-			if temp = 0: gs 'cum_call', 'face', $boy[1],1
-			if temp = 1: gs 'cum_call', 'mouth', $boy[1],1
-			if temp = 2: gs 'cum_call', 'stomach', $boy[1],1
-			temp = rand(0,2)
-			if temp = 0: gs 'cum_call', 'mouth', $boy[3],1
-			if temp = 1: gs 'cum_call', 'stomach', $boy[3],1
-			if temp = 2: gs 'cum_call', 'face', $boy[3],1
-			pcs_sleep -= 5
+			$temp[0] = 'face'
+			$temp[1] = 'mouth'
+			$temp[2] = 'stomach'
+			gs 'cum_call', $temp[rand(0, 2)], $boy[2], 1
+			gs 'cum_call', $temp[rand(0, 2)], $boy[1], 1
+			gs 'cum_call', $temp[rand(0, 2)], $boy[3], 1
 			npc_sex['A9'] += 1
 			npc_sex['A10'] += 1
 			npc_sex['A11'] += 1

+ 10 - 45
locations/vasilyhome.qsrc

@@ -199,37 +199,15 @@ if $ARGS[0] = 'livingroom':
 		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/sdivan.jpg"></center>'
 		'<center>A small sofa just big enough for you to curl up and take a nap on.</center>'
 		act 'Look around the room': gt 'vasilyhome', 'livingroom'
-		act 'Take an hour long nap':
-			cla
-			if pcs_sleep < 90:
-				if pcs_sleep >= 80:
-					pcs_sleep = 100
-				else
-					pcs_sleep += 10
-				end
-				pcs_health += 5
-				minut += 60
-				gs 'stat'
-				'You sleep for about an hour.'
-				act 'Get up': gt 'vasilyhome', 'livingroom'
-			else
-				minut += 5
-				gs 'stat'
-				'You''re not tired enough to sleep, even for a short nap.'
-				act 'Stand up': gt 'vasilyhome', 'livingroom'
-			end
-		end
+		act 'Take an hour long nap (1:00)': gs 'sleep_simple', 'nap'
+
 		act 'Sleep for a few hours':
 			cla
 			if pcs_sleep < 90:
-				if pcs_sleep >= 60:
-					pcs_sleep = 100
-				else
-					pcs_sleep += 40
-				end
+				sleepVars['no_health']
 				pcs_health += 5
-				minut += 240
-				gs 'stat'
+				gs 'sleep_simple', 'forced', 240
+
 				'You sleep for about four hours.'
 				act 'Get up': gt 'vasilyhome', 'livingroom'
 			else
@@ -372,15 +350,10 @@ end
 
 if $ARGS[0] = 'drunken_sleep':
 	menu_off = 1
-	minut += 180
-	if pcs_sleep < 75:
-		pcs_sleep += 25
-	else
-		pcs_sleep = 100
-	end
+	sleepVars['no_health'] = 1
 	pcs_health -= healthmax/10
 	pcs_mood -= 25
-	gs 'stat'
+	gs 'sleep_simple', 'forced', 180
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/bigroom/drunk_ev/pohmel'+rand(1,4)+'.jpg"></center>'
 	'You passed out for about three hours and wake up with a splitting headache and only vague memories of your night with the guys. Remembering that somebody deserved a kick in the balls, you look around the room. Vasily is passed out in a heap on the sofa with no sign of the other two.'
 	'"It was probably Dan that deserved a kick..." you mutter to yourself as you try to get your bearings.'
@@ -1285,10 +1258,7 @@ if $ARGS[0] = 'sleep':
 	menu_off = 1
 	act 'Take a nap (2:00)':
 		cla
-		pcs_sleep += 20
-		pcs_health += 5
-		minut += 120
-		gs 'stat'
+		gs 'sleep_simple', 'nap_base', 120
 		'Since Sergey isn''t using his bed, you''re sure he won''t mind if you take a nap here. You get under the covers and snooze for a few hours, feeling less tired when you wake up.'
 		act 'Get out of bed': gt 'vasilyhome', 'sergey_room'
 	end
@@ -1336,15 +1306,10 @@ if $ARGS[0] = 'sleep_vasily_bed':
 	menu_off = 1
 	cla
 	npc_rel['A11'] += 1
-	if pcs_sleep >= 60:
-		pcs_sleep = 100
-	else
-		pcs_sleep += 40
-	end
-	minut += 240
+	gs 'sleep_simple', 'forced', 240
+
 	'You lay down and sleep for a few hours.'
 	act 'Get up': gt 'vasilyhome', 'vasily_room'
-	gs 'stat'
 end
 
 if $ARGS[0] = 'vasily_asleep':

+ 1 - 2
locations/wakeup.qsrc

@@ -10,8 +10,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = 'wake' or $ARGS[0] = '':
 	InSleep = 1
 	gs 'stat'
 
-	InSleepWake = hour + 1
-	InSleepWake[1] = daystart
+	SleepVars['no_sleep_loss'] = 1
 
 	xgt 'wakeup', 'mod_sleeptriggers'
 end

+ 2 - 7
locations/zaprFWash.qsrc

@@ -821,13 +821,8 @@ end
 if $ARGS[0] = 'fight':
 	! maybe at some point this could be an actual fight but with the state of the combat logic is in this will just be left to drain a stat to escape
 	! these values are based off of the cheat menu values for players who turn off these stats as they can never go below 35
-	if pcs_energy >= 35: 
-		pcs_energy -= 35
-	elseif pcs_hydra >= 35: 
-		pcs_hydra -= 35
-	elseif pcs_sleep >= 35: 
-		pcs_sleep -= 35
-	end
+	pcs_energy = max(0, pcs_energy - 35)
+	pcs_hydra = max(0, pcs_hydra - 35)
 	
 	gs 'arousal', 'end'
 	gs 'stat'

+ 2 - 2
locations/zsoft_gopskverGorSlut.qsrc

@@ -696,12 +696,12 @@ if $ARGS[0] = 'siski':
 end
 
 if $ARGS[0] = 'hornyparksex':
-	if horand > pcs_horny:pcs_horny = pcs_horny + 10 & pcs_sleep -=1 & '<<$horny_orgazm_text2>> <<$horny_orgazm_text3>>.'
+	if horand > pcs_horny:pcs_horny = pcs_horny + 10 & '<<$horny_orgazm_text2>> <<$horny_orgazm_text3>>.'
 	if horand <= pcs_horny:pcs_horny = 0 & pcs_mood += 5 &'<<$horny_orgazm_text2>> <<$horny_orgazm_text4>>'
 end
 
 if $ARGS[0] = 'hornyparksexanal':
-	if horand > pcs_horny:pcs_horny = pcs_horny + 10 & pcs_sleep -=1 & '<<$horny_orgazm_text2>> <<$horny_orgazm_text3>>.'
+	if horand > pcs_horny:pcs_horny = pcs_horny + 10 & '<<$horny_orgazm_text2>> <<$horny_orgazm_text3>>.'
 	if horand <= pcs_horny:pcs_horny = 0 & pcs_mood += 5 &'<<$horny_orgazm_text2>> <<$horny_orgazm_text4>>'
 end