Browse Source

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

netuttki 7 months ago
parent
commit
6495ac2c46

+ 3 - 0
Check_media.bat

@@ -0,0 +1,3 @@
+@echo off
+python "%~dp0tools\check_missing_media.py"
+if errorlevel 1 pause

+ 0 - 1
glife.qproj

@@ -592,7 +592,6 @@
 		<Location name="placer_pav_park"/>
 		<Location name="placer_man"/>
 		<Location name="placer_act"/>
-		<Location name="skverdin"/>
 		<Location name="placer_end"/>
 		<Location name="placer_sex"/>
 		<Location name="podval_rape"/>

+ 1 - 1
locations/city_pharmacy.qsrc

@@ -81,7 +81,7 @@ if $ARGS[0] = 'cart':
 	gs 'stat'
 	gs 'themes', 'indoors'
 
-$backimage= 'images/locations/pavlovsk/pharmacy/apteka_worker_'+pharma_picrand+'.jpg'
+	$backimage= 'images/locations/pavlovsk/pharmacy/apteka_worker_'+pharma_picrand+'.jpg'
 	act 'Exit shopping cart':gt 'city_pharmacy', 'start'
 end
 

+ 2 - 2
locations/dream_events.qsrc

@@ -5,7 +5,7 @@ menu_off = 1
 !! Dream events trigger after deciding to go to sleep, but before any time has advanced.
 !! Note that dreams are supposed to stick on the screen during the sleep cycle. So only use xgt and gs!!
 !!
-!! Moved here from pre_sleep
+!! Moved here from sleep
 !! When done: Move to sleep
 
 	!!=====================================!!
@@ -135,7 +135,7 @@ if $ARGS[0] = 'continue':
 	killvar 'temp_slev_id'
 	killvar '$temp_sleep_event_chosen'
 
-	xgt 'sleep', 'start'
+	xgt 'sleep', 'post_dream'
 end
 
 

+ 1 - 0
locations/emp_functions.qsrc

@@ -523,6 +523,7 @@ if $ARGS[0] = 'evt_day_chk':
 			if month = evt_month and day = evt_day: evt_chk = 1
 			job_idx += 1
 		if job_idx < arrsize('evt_event') : jump 'evt_day_chk'
+		killvar 'job_idx'
 	end
 end
 !! --------------------- End Event Generator

+ 2 - 2
locations/fame.qsrc

@@ -777,8 +777,8 @@ end
 
 if $ARGS[0] = 'church_reduction':
 !! Special gs for reducing sex and prostitution fame by doing activities at the local church 
-	dynamic 'fame[''<<$ARGS[1]>>_sex''] += ARGS[2]'
-	dynamic 'fame[''<<$ARGS[1]>>_prostitute''] += ARGS[2]'
+	dynamic 'fame[''<<$ARGS[1]>>_sex''] += <<ARGS[2]>>'
+	dynamic 'fame[''<<$ARGS[1]>>_prostitute''] += <<ARGS[2]>>'
 
 	if dyneval('RESULT = fame[''<<$ARGS[1]>>_sex'']') < 0: dynamic 'fame[''<<$ARGS[1]>>_sex''] = 0'
 	if dyneval('RESULT = fame[''<<$ARGS[1]>>_prostitute'']') < 0: dynamic 'fame[''<<$ARGS[1]>>_prostitute''] = 0'

+ 1 - 1
locations/gadmarket.qsrc

@@ -60,7 +60,7 @@ if $ARGS[0] = 'cart':
 	gs 'themes', 'indoors'
 	$backimage= 'images/locations/gadukino/village/market.jpg'
 
-	act 'Exit shopping cart':gt 'gadmarket'
+	act 'Exit shopping cart': $backimage = '' & gt 'gadmarket'
 	act 'Leave the market': minut += 5 & gt 'gadukino'
 end
 

+ 4 - 4
locations/gloryhole.qsrc

@@ -302,22 +302,22 @@ if $ARGS[0] = 'blowjob':
 	stat['gloryhole'] += 1
 	temp = rand(1,5)
 
-	$bjVideoSource = 'images/locations/shared/gloryhole/sex/dressed'
-	'<center><video autoplay loop src="<<$bjVideoSource>>/bj<<rand(1,5)>>.mp4"></video></center>'
+	
+	'<center><video autoplay loop src="images/locations/shared/gloryhole/sex/dressed/bj<<rand(1,5)>>.mp4"></video></center>'
 	'You wrap your lips around his dick and take his <<npc_dick[$npclastgenerated]>>cm long <<$npc_thdick[$npclastgenerated]>> cock in your mouth and start to suck it, you suck the cock enthusiastically.'
 	gs 'arousal', 'bj', 5, 'unknown', 'sub'
 	gs 'stat'
 	if stat['vaginal'] > 0 or stat['anal'] > 0:act 'Undress':gt 'gloryhole', 'ghsex'
 	act 'Continue to Suck':
 		*clr & cla
-		'<center><video autoplay loop src="<<$bjVideoSource>>/bj<<rand(1,5)>>.mp4"></video></center>'
+		'<center><video autoplay loop src="images/locations/shared/gloryhole/sex/dressed/bj<<rand(1,5)>>.mp4"></video></center>'
 		'You suck on his dick, bobbing your head, sometimes using your hands to stroke his shaft at the same time, other times your hands massage his balls. Before to long you hear the guy moan in pleasure, "I''m cuming."'
 		gs 'arousal', 'bj', 5, 'unknown', 'sub'
 		gs 'stat'
 		
 		act 'Keep sucking':
 			*clr & cla
-			'<center><video autoplay loop src="<<$bjVideoSource>>/bj<<rand(1,5)>>.mp4"></video></center>'
+			'<center><video autoplay loop src="images/locations/shared/gloryhole/sex/dressed/bj<<rand(1,5)>>.mp4"></video></center>'
 			'Despite what he says you keep sucking his dick, you are looking forward to him filling your mouth up with his tasty sperm. Moments later hot spurts of cum fill your mouth.'
 			act 'Swallow':
 				cla

+ 7 - 2
locations/gschool_lessons2.qsrc

@@ -1185,7 +1185,7 @@ if $ARGS[0] = 'music':
 					i = rand(1,temp_selfietot)
 					dynamic 'school_classroom_titflash[<<i>>] = 1'
 					'<center><img <<$set_imgh>> src="images/pc/activities/phone/selfies/school_classroom/titflash/<<i>>.jpg"></center>'
-					'Feeling particularily brash,you decide taking a selfie of your bare breasts in the middle of class is a great idea. Maybe you''ll share it, maybe not, but either way it should be fun and might be useful for teasing someone later. You glance around and when everyone is busy, you pull open your shirt and expose your breasts. You take a couple of quick selfies of your exposed breasts until you get one you really like.'+iif(pcs_cupsize >= 30, ' You fight with your blouse to cover yourself back up. Once it''s finally back in place, you take a look around and see a few grinning faces among your classmates. ', '')+'You save that one to your phone and delete the rest.'
+					'Feeling particularily brash, you decide taking a selfie of your bare breasts in the middle of class is a great idea. Maybe you''ll share it, maybe not, but either way it should be fun and might be useful for teasing someone later. You glance around and when everyone is busy, you pull open your shirt and expose your breasts. You take a couple of quick selfies of your exposed breasts until you get one you really like.'+iif(pcs_cupsize >= 30, ' You fight with your blouse to cover yourself back up. Once it''s finally back in place, you take a look around and see a few grinning faces among your classmates. ', '')+'You save that one to your phone and delete the rest.'
 					act 'Wait for the end of the lesson': gs 'gschool_lessonsev3', 'music'
 				end
 			else
@@ -1696,7 +1696,12 @@ if $ARGS[0] = 'biology':
 					gs 'arousal', 'flash', -5, 'exhibitionism'
 					gs 'fame', 'pav', 'sex', 3
 					gs 'stat'
-					i = rand(1,classroom_titflash)
+					if Enable_Android = 1:
+						dynamic 'temp_selfietot = <<selfieTitflash[arrpos(''$selfieLoc'', ''school_classroom'',1)]>>'
+					else
+						dynamic 'temp_selfietot = <<selfieTitflash[arrpos(1, ''$selfieLoc'', ''school_classroom'')]>>'
+					end
+					i = rand(1,temp_selfietot)
 					dynamic 'school_classroom_titflash[<<i>>] = 1'
 					'<center><img <<$set_imgh>> src="images/pc/activities/phone/selfies/school_classroom/titflash/<<i>>.jpg"></center>'
 					'Feeling particularily brash, you decide taking a selfie of your bare breasts in the middle of class is a great idea. Maybe you''ll share it, maybe not, but either way it should be fun and might be useful for teasing someone later. You glance around and when everyone is busy, you pull open your shirt and expose your breasts. You take a couple of quick selfies of your exposed breasts until you get one you really like.'+iif(pcs_cupsize >= 30, ' You fight with your blouse to cover yourself back up. Once it''s finally back in place, you take a look around and see a few grinning faces among your classmates. ', '')+'You save that one to your phone and delete the rest.'

+ 5 - 5
locations/katja_city_sex.qsrc

@@ -1,7 +1,7 @@
 # katja_city_sex
 !2023/05/08
 
-if $ARGS[0] = 'walking_home_with_a_guy.':
+if $ARGS[0] = 'walking_home_with_a_guy':
 	menu_off = 1
 	minut += 20
 	gs 'npcgeneratec', 0, '', rand(18,55), 4
@@ -87,7 +87,7 @@ if $ARGS[0] = 'walking_home_with_a_guy.':
 									gs 'willpower', 'pay', 'force'
 									gs 'katja_procedural', 'take_cocaine'
 									gs 'stat'										
-									'<center><img <<$set_imgh>> src="images/pavlovsk/school/girl/katja/uni/nightclub/katja_cocaine2.jpg"></center>'
+									'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/katja/uni/nightclub/katja_cocaine2.jpg"></center>'
 									'"Come on, Katja. Just try it. It won''t hurt you," you say, but Katja still looks skeptical.'
 									'"I don''t know, <<$pcs_nickname>>. I''m not sure it''s a good idea. I don''t think it''s for me," she replies.'
 									'"You won''t know unless you try it. See, we are both fine," you continue.'
@@ -222,7 +222,7 @@ if $ARGS[0] = 'walking_home_with_a_guy.':
 									minut += 5
 									gs 'katja_procedural', 'take_cocaine'
 									gs 'stat'										
-									'<center><img <<$set_imgh>> src="images/pavlovsk/school/girl/katja/uni/nightclub/katja_cocaine2.jpg"></center>'
+									'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/katja/uni/nightclub/katja_cocaine2.jpg"></center>'
 									'You watch as Katja takes the tube, puts one end at her nose and bends down to the start of the line that <<$npc_nickname[$npclastgenerated]>> has prepared for her.'
 									'She then sniffs the line with no problem and just sits up waiting for the the drugs to hit her.' 
 									*nl
@@ -308,7 +308,7 @@ if $ARGS[0] = 'walking_home_with_a_guy.':
 									minut += 5
 									gs 'katja_procedural', 'take_cocaine'
 									gs 'stat'										
-									'<center><img <<$set_imgh>> src="images/pavlovsk/school/girl/katja/uni/nightclub/katja_cocaine2.jpg"></center>'
+									'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/katja/uni/nightclub/katja_cocaine2.jpg"></center>'
 									'You watch as Katja takes the tube, puts one end at her nose and bends down so the other end is at the start of the line that <<$npc_nickname[$npclastgenerated]>> has prepared for her.'
 									'She then sniffs the line like a pro and sits up, waiting for the drugs to hit her.' 
 									*nl
@@ -1258,7 +1258,7 @@ if $ARGS[0] = 'two_guys_anal_sex2':
 	if katjaQW['anal_quest'] < 3:
 		'Katja looks a little confused and you explain to her what to do, and get down on all fours to help her.'
 	else
-		'Katja says "Help me <<$pcs_nickname>> and you get down on all fours and help her.'
+		'Katja says "Help me <<$pcs_nickname>>" and you get down on all fours and help her.'
 	end
 	'Seeing you with your ass in the air while Katja slides down on  <<$npc_nickname[$boy1]>> dick,  <<$npc_nickname[$boy2]>> won''t be left out and jams his hard cock into your butthole.'
 	katjaQW['horny'] += rand(5,15)

+ 3 - 3
locations/katja_nightclub.qsrc

@@ -294,7 +294,7 @@ if $ARGS[0] = 'dance_two_guys_approach':
 				cla
 				if katjaQW['disco_arrival'] + 600 > totminut and katjaQW['disco_met'] + 600 > totminut: katjaQW['disco_met'] = totminut & gs 'npc_relationship', 'modify', 'A14', 'like'
 				'You get closer and get the attention of Katja. When she sees you, she motions you to come join them.'
-				act 'Join the dance': gt 'katja_nightclub', 'dance_guy2'
+				act 'Join the dance': gt 'katja_nightclub', 'dance_two_guys2'
 			end
 			act 'Stay back and see how it goes':
 				cla
@@ -367,9 +367,9 @@ if $ARGS[0] = 'dance':
 			iif(alko > 4, 'You and Katja are', 'Katja is')+' having some issues with not bumping into other dancers, not that they seem to be paying any notion to it.'
 		end
 	elseif temp_rand <= hotcat/2:
-		gt 'katja_nightclub', 'dance_guy2'
+		gt 'katja_nightclub', 'dance_two_guys1'
 	elseif temp_rand <= hotcat:
-		gt 'katja_nightclub', 'dance_guy'
+		gt 'katja_nightclub', 'dance_guy1'
 	elseif temp_rand = 11 and func('katja_procedural', 'willing_to_be_naughty') > 30*(2 -npc_sex['A14']):
 		katjaQW['horny'] += 5
 		gs 'arousal', 'foreplay', -5

+ 2 - 2
locations/katja_nightclub_sex.qsrc

@@ -610,13 +610,13 @@ if $ARGS[0] = 'private_booth_FFM':
 	end
 end
 
-if $ARGS = 'lone_bartender':
+if $ARGS[0] = 'lone_bartender':
 	menu_off = 1
 	minut += 5
 	katjaQW['lone_bartender'] = daystart 
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/katja/uni/nightclub/disco_talking_on__dance_floor.jpg"></center>'
-	'"Let'' go to one of the small bars upstairs. There are usually not that many people," Katja says, and you agree and follow her upstairs.'
+	'"Let''s go to one of the small bars upstairs. There are usually not that many people," Katja says, and you agree and follow her upstairs.'
 	'There you quickly find a bar that is actually empty except for the bartender. As you are about to enter Katja suddenly stops.'
 	'"I'' sorry, really need to powder my nose. Just go ahead, and start ordering" I will be back in just a minute, and before you can say anything, she'' gone.'
 	act 'Go to the bartender':

+ 1 - 1
locations/kiosk.qsrc

@@ -116,9 +116,9 @@ if $ARGS[0] = 'counter':
 
     gs 'item_cart', 'shoppping_aisle', 'kiosk'
     gs 'stat'
-	$backimage='images/locations/city/shared/kiosk/kiosk123.jpg'
     gs 'themes', 'outdoors'
 	
+	$backimage='images/locations/city/shared/kiosk/kiosk123.jpg'
 	act 'Leave':minut += 1 & gt $loc
 	
 	if money >= 100:

+ 6 - 8
locations/kompMFCanal.qsrc

@@ -304,10 +304,10 @@ act 'Decide to improvise':
 		'Even though you give it your best shot, you have to yield at 3. For now... this could be fun as a recurring challenge!'
 		if pcs_horny >= 100:
 			pcs_mood = 100
-			$orgasm_txt = { 
-			'You were already quite horny, and the extra sensation of your anus being stretched by those sharpies puts you over the edge. You rub your clit without even really realizing it, and gasp in surprise when an orgasm suddenly hits you!'
-			'Your ass squeezes out the sharpies one by one from the spasms, while the chat is singing your praises. They all love a girl that can orgasm from anal sex...'
-			}
+			$orgasm_txt = '
+			You were already quite horny, and the extra sensation of your anus being stretched by those sharpies puts you over the edge. You rub your clit without even really realizing it, and gasp in surprise when an orgasm suddenly hits you!
+			Your ass squeezes out the sharpies one by one from the spasms, while the chat is singing your praises. They all love a girl that can orgasm from anal sex...
+			'
 			$orgasm_or = 'custom'
 		else
 			'The sharpies stretch your anus nicely, but you''re not horny enough to orgasm from this. You make an effort of trying to add a fourth in front of the camera, but take them out and return to your seat once you think you won''t get any more donations.'
@@ -319,10 +319,8 @@ act 'Decide to improvise':
 		'The remote feels a bit uncomfortable, with its angular shape and sharp edges, but you still manage to get nearly half of it inside your ass.'
 		if pcs_horny >= 100:
 			pcs_mood = 100
-			$orgasm_txt = { 
-			'You were already quite horny, and the extra sensation of your anus being stretched by the remote puts you over the edge. You rub your clit without even really realizing it, and gasp in surprise when an orgasm suddenly hits you!'
-			'Your ass clasps tightly around the emote, while the chat is singing your praises. They all love a girl that can orgasm from anal sex...'
-			}			
+			$orgasm_txt = 'You were already quite horny, and the extra sensation of your anus being stretched by the remote puts you over the edge. You rub your clit without even really realizing it, and gasp in surprise when an orgasm suddenly hits you! Your ass clasps tightly around the emote, while the chat is singing your praises. They all love a girl that can orgasm from anal sex...'
+	
 			$orgasm_or = 'custom'
 		else
 			'The remote stretches your anus nicely, but you''re not horny enough to orgasm from this. You make an effort of fucking yourself with it in front of the camera, but take it out and return to your seat once you think you won''t get any more donations.'

+ 2 - 7
locations/kompMFCtwo.qsrc

@@ -330,7 +330,6 @@ if ARGS[0] = 83:
 		cls
 		mfcclients = 0
 		pcs_vag += 1
-
 		minut += 5
 		vgape += 2
 		pcs_horny += rand(10,20)
@@ -339,15 +338,11 @@ if ARGS[0] = 83:
 		'You look around quickly and see the wooden knobs on your bed. Those look kinda phallic... should work!'
 		'After you spit on your fingers and coat it with saliva, you carefully rest the tip of the wooden knob against your labia and lower yourself down onto it, feeling how it stretches you nicely.'
 		if pcs_horny >= 95:
-			$orgasm_or = 'custom'
 			pcs_horny = 0
 			pcs_mood = 100
 			'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/camwhore78.jpg"></center>'
-			$orgasm_txt = {
-			'It hurts a little, but you''re too horny to care right now. You could get off on this!'
-			'Shortly after you begin humping the wooden knob, you reach a loud orgasm. Your legs have some issues carrying your weight and the knob presses far inside your pussy when you fall, pressing against your uterus uncomfortably.'
-			'Ouch! You quickly get off it and rub your sore snatch while you sigh... other than that moment, it felt nice!'
-			}
+			$orgasm_txt = 'It hurts a little, but you''re too horny to care right now. You could get off on this! Shortly after you begin humping the wooden knob, you reach a loud orgasm. Your legs have some issues carrying your weight and the knob presses far inside your pussy when you fall, pressing against your uterus uncomfortably. Ouch! You quickly get off it and rub your sore snatch while you sigh... other than that moment, it felt nice!'
+			$orgasm_or = 'custom'
 		else
 			'<center><img <<$set_imgh>> src="images/pc/items/accessories/computer/camwhore77.jpg"></center>'
 			'Despite the nice feeling of fullness it provides, it''s not enough to reach an orgasm right now. You make an effort of riding the wooden knob for a little while, but have to stop when your vagina hurts too much to continue.'

+ 2 - 1
locations/lover.qsrc

@@ -102,6 +102,7 @@ if $ARGS[0] = 'remove':
 	killvar 'meethour', i
 	killvar 'svidanie', i
 	killvar 'meetday', i
+	if loverGender[i] = 1: pcs_girlfriends -= 1
 	killvar 'loverGender', i
 	
 	!!new preferences
@@ -131,7 +132,7 @@ if $ARGS[0] = 'remove':
 
 	killvar 'pcs_lovers', i
 	pcs_lover -=1
-	if loverGender[i] = 1: pcs_girlfriends -= 1
+	
 end
 
 if $ARGS[0] = 'add fuckbuddy':

+ 1 - 0
locations/natbel_friend.qsrc

@@ -933,6 +933,7 @@ if $ARGS[0] = 'netbelapt_sex':
 				end
 
 				act 'No, I''m a virgin':
+					*clr & cla
 					'<center><video autoplay loop src="images/characters/pavlovsk/school/girl/natasha/events/kissing_games/natasha29b.jpg"></center>'
 					'Realising what''s happening, you decide to stop Natasha. "Wait, I''m still a virgin!"'
 					'She immediately stops and removes the dildo. "I''m sorry, <<$pcs_nickname>>! I didn''t know. Okay, let''s leave that for now."'

+ 1 - 0
locations/pav_aptcourtev.qsrc

@@ -1466,6 +1466,7 @@ if $ARGS[0] = 'smokeblowjob':
 			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/events/sex/smokebj3.jpg"></center>'
 			'Suddenly, though not unexpectedly, cum starts splattering on your face. Seconds later, the other one starts to cum as well and soon both of them have coated your face in their cum. They then put their dicks away, "Hey, what about my cigarette?" you ask and one of them laughs and tosses you the rest of his pack of smokes.'
 			'"Here you go, best investment I ever made," he tells his friend. "Come on, let''s go buy some more." They both walk away, leaving you on your knees with some cigarettes and a face full of cum.'
+			mc_inventory['cigarettes'] += rand(3, 8)
 			gs 'arousal', 'hj', 5,  'group', 'exhibitionism'
 			gs 'arousal', 'hj', -5,  'group', 'exhibitionism'
 			gs 'arousal', 'end'

+ 1 - 1
locations/pav_park.qsrc

@@ -247,7 +247,7 @@ if $ARGS[0] = 'start':
 		if locat['Vicky'] ! 11:
 			'<br>Vicky and Vanya are never in the park at this time.'
 		else
-			act 'Look for Vicky and Vanya (0:05)':
+			act 'Look for Vicky and Vanya (0:05-0:25)':
 				cla
 				minut += 5
 				gs 'mey_vika_events', 'park_meet'

+ 1 - 0
locations/pav_pharmacy.qsrc

@@ -1167,6 +1167,7 @@ if $ARGS[0] = 'ointment':
 			pharmacy_timers['morning_after'] = daystart
 		end
 		cla
+		$backimage = ''
 		act'Meekly ask':
 			cla & *clr
 			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/pharmacy/apteka_aunt_1.jpg"></center>'

+ 1 - 1
locations/pav_pool.qsrc

@@ -554,7 +554,7 @@ if $ARGS[0]= 'exitpool':
 				'You jump bravely into the water after him. He swims off towards the other side of the pool and you attempt to follow, but the pool is full and many notice your lewdness. You suddenly realize, stop and cover yourself as a number of people stare at you.'
 				'You could try to reach the edge of the pool, but you would have to get very close to other people. You could also wait and hope that the pool empties a little without calling attention to yourself.'
 				act 'Wait': gt 'pav_pool_events', 'watertoplost'
-				act 'Try to reach the edge': gt 'pav_pool_events', 'tryreachedge'
+				act 'Try to reach the edge': gt 'pav_pool_events', 'tryreachedgenotop'
 			end
 		end
 	else

+ 1 - 1
locations/pre_sleep.qsrc

@@ -172,7 +172,7 @@ if $ARGS[0] = 'end':
 		InSleep = 1
 		gs 'stat'
 
-		gt 'dream_events', 'start'
+		gt 'sleep', 'start'
 	end
 end
 

+ 114 - 103
locations/prostitution_functions.qsrc

@@ -3,23 +3,23 @@
 !! ---- Variables -------------------------------------------------------------------------------------------------------
 !!
 !! prostitute['payment_method']: 1 - Sveta works for herself; 0 - Sveta works for someone else who will take a cut
-!! prostitute['wl_block']: 1 - WLife is loaded which blocks some of the locations: Pavlovsk will rely on the WLife mod 
+!! prostitute['wl_block']: 1 - WLife is loaded which blocks some of the locations: Pavlovsk will rely on the WLife mod
 !!							  and the Gas Station will be completely blocked
-!!						  0 - WLife is not loaded, or WLife released the lock, everything works as normal.	
+!!						  0 - WLife is not loaded, or WLife released the lock, everything works as normal.
 !! prostitute['full_block']: 1 - Some mod or some other event completely blocked the prostitution content.
 !! prostitute[<<$location>>]: 1 - Sveta can work at the location.
 !!                            0 - Sveta can''t work at the location
-!!     current locations: Pavlovsk - ''pavlovsk'', Gadukino - ''gadukino'', 
+!!     current locations: Pavlovsk - ''pavlovsk'', Gadukino - ''gadukino'',
 !!                        Road between Pavlovsk and St Petersburg - ''road'', Gas Station ''gas_station''
 !! prostitute['active']: 1- Sveta ''unlocked'' prostitution somewhere. It is use for non-location specific checks, like
 !!							being able set a default prostitute outfit at home, or finding new places to work at.
 !! prostitute['work_clothes']: 1 - Sveta is wearing a prostitute outfit, i.e. clothes and shoes
-!! prostitute['outfit_is_set']: 1 - Sveta has a default outfit set up. Needed if she wants to change in restrooms 
+!! prostitute['outfit_is_set']: 1 - Sveta has a default outfit set up. Needed if she wants to change in restrooms
 !!									or in the car on location, and not travel wearing that outfit
 !! prostitute['changed_for_work']: 1 - It means that Sveta changed into her prostitute outfit on site from some regular
 !!                                     clothes. This enables the 'Change into regular clothes' action in the changing
-!!									   location. 
-!!								   0 - Sveta didn''t change which means she can''t change into regular clothing. 
+!!									   location.
+!!								   0 - Sveta didn''t change which means she can''t change into regular clothing.
 
 !!---------- Initial set up, enabling locations, etc. -------------------------------------------------------------------
 !!-----------------------------------------------------------------------------------------------------------------------
@@ -44,9 +44,9 @@ end
 if $ARGS[0] = 'wl_block':
 	prostitute['wl_block'] = ARGS[1]
 	if prostitute['wl_block']:
-		gs 'prostitution_functions', 'set_pavlovsk_hours', 6, 23	
+		gs 'prostitution_functions', 'set_pavlovsk_hours', 6, 23
 	else
-		gs 'prostitution_functions', 'set_pavlovsk_hours', 14, 2	
+		gs 'prostitution_functions', 'set_pavlovsk_hours', 14, 2
 	end
 end
 
@@ -87,7 +87,7 @@ if $ARGS[0] = 'set_pavlovsk_prostitute':
 end
 
 if $ARGS[0] = 'set_gadukion_prostitute':
-	if gadriver_gang = 2 and (mirapimp = 0 or mirapimp = 2) and prostitute['full_block'] = 0: 
+	if gadriver_gang = 2 and (mirapimp = 0 or mirapimp = 2) and prostitute['full_block'] = 0:
 		prostitute['gadukino'] = 1
 		prostitute['active'] = 1
 		prostitute['payment_method'] = 1
@@ -127,22 +127,22 @@ if $ARGS[0] = 'prostitute_outfit_at_home':
 		if prostitute['work_clothes']:
 			gs 'prostitution_functions', 'is_default'
 			if prostitute['outfit_is_set'] = 1 and is_default = 0:
-				act 'Replace your default prostitute outfit with the current outfit': 
+				act 'Replace your default prostitute outfit with the current outfit':
 					gs 'prostitution_functions', 'set_default_outfit'
 					gt $loc, $loc_arg
 				end
 			elseif prostitute['outfit_is_set'] = 0:
-				act 'Set the current as your default prostitute outfit': 
-					gs 'prostitution_functions', 'set_default_outfit'	
+				act 'Set the current as your default prostitute outfit':
+					gs 'prostitution_functions', 'set_default_outfit'
 					gt $loc, $loc_arg
 				end
 			end
-			act 'Change into regular clothes': 
+			act 'Change into regular clothes':
 				gs 'prostitution_functions', 'change_into_regular_clothes'
 				gt $loc, $loc_arg
 			end
-		elseif prostitute['outfit_is_set']: 
-			act 'Change into prostitute outfit': 
+		elseif prostitute['outfit_is_set']:
+			act 'Change into prostitute outfit':
 				gs 'prostitution_functions', 'change_into_prostitute_outfit'
 				gt $loc, $loc_arg
 			end
@@ -169,31 +169,31 @@ if $ARGS[0] = 'clothing_chance_modifier':
 		if hour > 19 : temp_mult = 2
 
 		if PCloStyle = 3: temp_result_attr -= 15 * temp_mult
-		
-		if PCloQuality = 7: 
-			temp_result_attr -= 15 * temp_mult 		
+
+		if PCloQuality = 7:
+			temp_result_attr -= 15 * temp_mult
 		elseif PCloQuality = 6:
-			temp_result_attr -= 10 * temp_mult 		
-		elseif PCloQuality = 5: 
-			temp_result_attr -= 5 * temp_mult 		
-		elseif PCloQuality >= 3: 
-			if temp_mult > 1: temp_result_attr -= 10 
+			temp_result_attr -= 10 * temp_mult
+		elseif PCloQuality = 5:
+			temp_result_attr -= 5 * temp_mult
+		elseif PCloQuality >= 3:
+			if temp_mult > 1: temp_result_attr -= 10
 		else
 			temp_result_attr += 5
 		end
 	end
 
-	!! PCloThinness: 
-	!!	6: intentionally reveals breast/pubic areas, with translucent/transparent areas, 
-	!!	   indecent exposure/arrest event if worn in public without underwear. 
-	!!	5: see through only in bright light, or tight enough to show the body in detail if opaque.  
-	!!	4: is thin or tight enough to be flirty, fine in most places except the most conservative (church, school, etc). 
+	!! PCloThinness:
+	!!	6: intentionally reveals breast/pubic areas, with translucent/transparent areas,
+	!!	   indecent exposure/arrest event if worn in public without underwear.
+	!!	5: see through only in bright light, or tight enough to show the body in detail if opaque.
+	!!	4: is thin or tight enough to be flirty, fine in most places except the most conservative (church, school, etc).
 	!!	3-2 standard publicly worn outfit.
 	!!	1 baggy, hiding the body, makes it hard to see the body shape.
 	!! PCloTopCut:
-	!!	4: reveals over half the skin on the torso area, 
-	!!	3: has a deep neckline that reaches the cleavage between the breasts, 
-	!!	2: is a cut high enough to be considered appropriate in most places (above the cleavage, or just below where it starts), 
+	!!	4: reveals over half the skin on the torso area,
+	!!	3: has a deep neckline that reaches the cleavage between the breasts,
+	!!	2: is a cut high enough to be considered appropriate in most places (above the cleavage, or just below where it starts),
 	!!	1: is a neckline that ends very near the neck or higher.
 	!! PCloBra
 	!!	2: Your chest is not covered at all by the outfit, if you wear a bra that will be your top
@@ -203,7 +203,7 @@ if $ARGS[0] = 'clothing_chance_modifier':
 	if PCloThinness = 5: temp_result_attr += 3
 	if PCloThinness = 4: temp_result_attr += 1
 	if PCloThinness = 1: temp_result_attr -= 4
-	
+
 	!! Top outfit
 	if PCloTopCut = 7: temp_result_attr += 7
 	if PCloTopCut = 6: temp_result_attr += 6
@@ -219,11 +219,11 @@ if $ARGS[0] = 'clothing_chance_modifier':
 	!! Bottom outfit
 	!!	CloSkirtShortness
 	!! IMPORTANT: CloSkirtShortness is mapped to PCloSkirt
-	!!	6: is short enough to reveal pubic areas at all times 
-	!!	5 is ~20% thigh length or less (micro-skirt), and can reveal underwear frequently 
-	!!	4 is ~40% thigh length (miniskirt) and may show underwear if bending over 
-	!!	3 is up to ~60% thigh length (skirt) and normally never reveals underwear 
-	!!	2 is ending immediately above, at or below the knees (knee-length) 
+	!!	6: is short enough to reveal pubic areas at all times
+	!!	5 is ~20% thigh length or less (micro-skirt), and can reveal underwear frequently
+	!!	4 is ~40% thigh length (miniskirt) and may show underwear if bending over
+	!!	3 is up to ~60% thigh length (skirt) and normally never reveals underwear
+	!!	2 is ending immediately above, at or below the knees (knee-length)
 	!!	1 is ankle-length.
 	!! CloPantsShortness = 1-6 scale. Higher values are shorter.
 	!! IMPORTANT: CloPantsShortness is mapped to PCloPants
@@ -234,7 +234,7 @@ if $ARGS[0] = 'clothing_chance_modifier':
 	!!	2 is calf length
 	!!	1 is ankle length
 	!! CloPanties = 1 for yes
-	!!	1: The bottom of this outfit offers no more coverage than panties and it will 
+	!!	1: The bottom of this outfit offers no more coverage than panties and it will
 	!!		replace your panties (if worn)
 
 	if PCloSkirt = 6: temp_result_attr += 6
@@ -247,11 +247,11 @@ if $ARGS[0] = 'clothing_chance_modifier':
 	if PCloPants = 1: temp_result_attr -= 4
 
 	if PCloPanties = 1: temp_result_attr += 8
-	
+
 
 	temp_result_attr = MAX(temp_result_attr, temp_result_style)
-	
-	!! PShoHeels values: 1 flats (<5cm), 2 low heel (~5cm), 3 Mid heel (~7.5cm), 
+
+	!! PShoHeels values: 1 flats (<5cm), 2 low heel (~5cm), 3 Mid heel (~7.5cm),
 	!!		 4 High heel (~10cm), 5 ultra high heel (~15cm), 6 fetish heel (>15cm)
 	!! PShoStyle values: 1 stripping or whoring, 2: bimbo style, 3: alternative style
 	!! PShoCut values: 1: shoes 2: ankle boots, 3: calf high, 4: knee high, 5: thigh high, 6: groin high
@@ -268,9 +268,9 @@ if $ARGS[0] = 'clothing_chance_modifier':
 
 	if PShoCut = 6: temp_result_attr += 2
 	if PShoCut = 5: temp_result_attr += 1
-	
+
 	result = temp_result_attr
-	
+
 	killvar 'temp_result_attr'
 	killvar 'temp_result_style'
 end
@@ -281,14 +281,14 @@ if $ARGS[0] = 'upclose_chance':
 	temp_groom_mod = func('prostitution_functions', 'grooming_modifier')
 	temp_tat_pierc_mod = func('prostitution_functions', 'tattoo_and_piercing_modifier')
 	temp_clothes_base = func('prostitution_functions', 'clothing_chance_modifier', 'upclose')
-	
+
 
 	result = (temp_base_app_mod + temp_makeup_mod + temp_groom_mod + temp_tat_pierc_mod + temp_clothes_base)
 
 	killvar 'temp_base_app_mod'
 	killvar 'temp_makeup_mod'
 	killvar 'temp_groom_mod'
-	killvar 'temp_tat_pierc_mod'	
+	killvar 'temp_tat_pierc_mod'
 	killvar 'temp_clothes_base'
 end
 
@@ -309,7 +309,7 @@ if $ARGS[0] = 'makeup_modifier':
 	if pcs_makeup = 1: result -= 5
 	if pcs_makeup = 0: result -= 10
 	temp_display = result
-	
+
 	killvar 'temp_display'
 end
 
@@ -318,8 +318,8 @@ if $ARGS[0] = 'base_appearance_modifier':
 
 	!! The following can lower the penalty from high appearance
 	!! A stunningly pretty girl being a street hooker is hard to believe
-	!! but a stunningly pretty but somewhat ran down girl is easier to 
-	!! accept. 
+	!! but a stunningly pretty but somewhat ran down girl is easier to
+	!! accept.
 	temp_hair -= (1 - pcs_hairbsh) * 10
 
 	if pcs_haircol ! nathcol:
@@ -329,31 +329,31 @@ if $ARGS[0] = 'base_appearance_modifier':
 
 	if pcs_makeup = 0: temp_makeup_corr = 20
 
-	if pcs_apprncbase <= 20: 
+	if pcs_apprncbase <= 20:
 		result -= 100
-	elseif pcs_apprncbase <= 40: 
+	elseif pcs_apprncbase <= 40:
 		result -= 20
-	elseif pcs_apprncbase <= 60: 
+	elseif pcs_apprncbase <= 60:
 		result -= 10
-	elseif pcs_apprncbase <= 80: 
+	elseif pcs_apprncbase <= 80:
 		result += 10
-	elseif pcs_apprncbase <= 100: 
+	elseif pcs_apprncbase <= 100:
 		result += 30
-	elseif pcs_apprncbase <= 120: 
+	elseif pcs_apprncbase <= 120:
 		result += 30
-	elseif pcs_apprncbase <= 140: 
+	elseif pcs_apprncbase <= 140:
 		result += 10
-	!! Over a certain beauty people will be less likely to think that Sveta is a prostitute working 
+	!! Over a certain beauty people will be less likely to think that Sveta is a prostitute working
 	!! the highway unless she is acting like one, or looks really neglected.
-	elseif pcs_apprncbase <= 160: 
-		result -= 30 + temp_dyefade + pcs_leghair + temp_hair 
+	elseif pcs_apprncbase <= 160:
+		result -= 30 + temp_dyefade + pcs_leghair + temp_hair
 	elseif pcs_apprncbase <= 179:
-		result -= 40 + temp_dyefade + pcs_leghair + temp_hair  
+		result -= 40 + temp_dyefade + pcs_leghair + temp_hair
 	else
 		result -= 50 + temp_dyefade + pcs_leghair + temp_hair + temp_makeup_corr
 	end
 
-	!! Being high or looking like someone fighting withdrawal, downbeat or exhausted, dirty, etc. 
+	!! Being high or looking like someone fighting withdrawal, downbeat or exhausted, dirty, etc.
 	!! will lessen the high appearance penalty. Will add those later when I figure out a sensible way.
 
 	killvar 'temp_display'
@@ -373,7 +373,7 @@ if $ARGS[0] = 'grooming_modifier':
 		result -= (pcs_sweat - 10) / 2 & !! 54-10 / 2 = 22
 	else
 		result -= 3 * (pcs_sweat - 10) / 4 & !! 3 * 100-10 / 4 = 67
-	end	
+	end
 
 	temp_display = result
 	killvar 'temp_display'
@@ -398,13 +398,13 @@ if $ARGS[0] = 'tattoo_and_piercing_modifier':
 	if (PCloThinness >= 5 or PCloTopCut >= 3 or PCloBra = 1 or PCloStyle = 4 or PCloStyle2 = 3) and tatlech > 0: temp_tattoo_mod += 3
 	if (PCloThinness >= 3 or PCloTopCut >= 2 or PCloBra = 1 or PCloStyle = 4 or PCloStyle2 = 3) and tatneck > 0: temp_tattoo_mod += 5
 	if tatfce > 0: temp_tattoo_mod += 3
-	
+
 	result = temp_tattoo_mod
-	
+
 	killvar 'temp_tattoo_mod'
 end
 
-!!---- Outfit checks ---------------------------------------------------------------------------------  
+!!---- Outfit checks ---------------------------------------------------------------------------------
 if $ARGS[0] = 'work_clothes':
 	prostitute['work_clothes'] = (PCloStyle = 4 and (PShoStyle = 1 or PShoStyle = 2 or PShoHeels >= 3))
 end
@@ -417,7 +417,7 @@ end
 
 !!---- Setting, clearing and changing outfits ------------------------------------------------------------------
 if $ARGS[0] = 'set_default_outfit':
-	!!-- Clothing	
+	!!-- Clothing
 	$prostitute['clothingworntype'] = $clothingworntype
 	prostitute['clothingwornnumber'] = clothingwornnumber
 
@@ -435,7 +435,7 @@ if $ARGS[0] = 'set_default_outfit':
 end
 
 if $ARGS[0] = 'clearing_default_outfit':
-	!!-- Clothing	
+	!!-- Clothing
 	$prostitute['clothingworntype'] = ''
 	prostitute['clothingwornnumber'] = 0
 
@@ -448,15 +448,27 @@ if $ARGS[0] = 'clearing_default_outfit':
 	!!-- Shoes
 	$prostitute['shoeworntype'] = ''
 	prostitute['shoewornnumber'] = 0
-	
+
 	prostitute['outfit_is_set'] = 0
 end
 
 
-if $ARGS[0] = 'change_into_prostitute_outfit':	
+if $ARGS[0] = 'change_into_prostitute_outfit':
+	!!-- Backup
+	$lastwornclothingtype['prostitute'] = $clothingworntype
+	lastwornclothingnumber['prostitute'] = clothingwornnumber
+	$lastwornpantytype['prostitute'] = $pantyworntype
+	lastwornpantynumber['prostitute'] = pantywornnumber
+	$lastwornbratype['prostitute'] = $braworntype
+	lastwornbranumber['prostitute'] = brawornnumber
+	$lastwornshoetype['prostitute'] = $shoeworntype
+	lastwornshoenumber['prostitute'] = shoewornnumber
+	!!-- Clothing
 	gs 'clothing', 'wear', $prostitute['clothingworntype'], prostitute['clothingwornnumber']
+	!!-- Underwear
 	gs 'panties', 'wear', $prostitute['pantyworntype'], prostitute['pantywornnumber']
 	gs 'bras', 'wear', $prostitute['braworntype'], prostitute['brawornnumber']
+	!!-- Shoes
 	gs 'shoes', 'strip'
 	gs 'shoes', 'wear', $prostitute['shoeworntype'], prostitute['shoewornnumber']
 
@@ -468,12 +480,11 @@ if $ARGS[0] = 'change_into_prostitute_outfit':
 end
 
 if $ARGS[0] = 'change_into_regular_clothes':
-	!!-- Clothing	
-	gs 'clothing', 'wear_last_worn'
+	!!-- Clothing
+	gs 'clothing', 'wear', $lastwornclothingtype['prostitute'], lastwornclothingnumber['prostitute']
 	!!-- Underwear
-	gs 'panties', 'wear_last_worn'
-	gs 'bras', 'wear_last_worn'
-
+	gs 'panties', 'wear', $lastwornpantytype['prostitute'], lastwornpantynumber['prostitute']
+	gs 'bras', 'wear', $lastwornbratype['prostitute'], lastwornbranumber['prostitute']
 	!!-- Shoes
 	gs 'shoes', 'wear', 'last_worn'
 	gs 'prostitution_functions', 'work_clothes'
@@ -494,7 +505,7 @@ if $ARGS[0] = 'change_to_work':
 	if $ARGS[1] = 'restroom':
 		!! TODO: Video / image and some text describing the cloth change in the men''s restroom
 		!! Is there a way to know if it''s a men''s or women''s restroom?
-		''+iif($loc_desc = $loc_desc,  'You slip into a stall and quickly change into your working outfit, trying t avoid your clothes touching the floor or, really, anything before you place them safely in your bag.', $loc_desc)
+		''+iif($loc_desc = $loc_desc,  'You slip into a stall and quickly change into your working outfit, trying to avoid your clothes touching the floor or, really, anything before you place them safely in your bag.', $loc_desc)
 	end
 
 	gs 'prostitution_functions', 'change_into_prostitute_outfit', 'work'
@@ -532,10 +543,10 @@ end
 if $ARGS[0] = 'check_solicitation_event':
 	gs 'prostitution_functions', 'work_clothes'
 	if prostitute['wl_block'] = 0 and prostitute['full_block'] = 0 and func('prostitution_functions', 'prostitute_work_hours') and func('prostitution_functions','is_solicitation_location'):
-		if prostitute['pavlovsk'] = 1 and prostitute['pav_time_hour'] ! hour and rand(-20, 70) < minut: 
+		if prostitute['pavlovsk'] = 1 and prostitute['pav_time_hour'] ! hour and rand(-20, 70) < minut:
 			gs 'prostitution_pavlovsk', 'chance'
 		end
-		
+
 		if prostitute['pavlovsk'] = 1 and prostitute['work_clothes'] :
 			pl '<center><a href="exec: gt ''prostitution_pavlovsk'', ''search''"><img title="Click to start working in Pavlovsk." height = 80 src="images/system/icons/icon_prostitute.png"></a></center>'
 		end
@@ -849,7 +860,7 @@ if $ARGS[0] = 'client_effort':
 end
 
 if $ARGS[0] = 'daily_effects':
-	if prostitute['age_mod'] >= 100: 
+	if prostitute['age_mod'] >= 100:
 		temp_age_mod_remain = prostitute['age_mod'] MOD 100
 		vidageday -= ((prostitute['age_mod'] - temp_age_mod_remain) / 100)
 		prostitute['age_mod'] = temp_age_mod_remain
@@ -870,8 +881,8 @@ end
 		prostitute['vidage_mod'] = 0
 	end
 
-!!---------- Scenes ----------------------------------------------------------------------------------------------	
-!!----------------------------------------------------------------------------------------------------------------	
+!!---------- Scenes ----------------------------------------------------------------------------------------------
+!!----------------------------------------------------------------------------------------------------------------
 
 	pro_scene_rand = rand(1,100)
 
@@ -895,7 +906,7 @@ end
 		$prostitute['client_scene'] = 'Blowjob'
 	end
 
-	!!---- Regular Worker ----------------------------------------------------------------------------------------	
+	!!---- Regular Worker ----------------------------------------------------------------------------------------
 
 	if prostitute['customer_total'] < 10:
 		prostitute['regular_chance'] = 0
@@ -909,12 +920,12 @@ end
 		prostitute['regular_chance'] = 4
 	end
 
-	!!---- Chance to find a client --------------------------------------------------------------------------------	
+	!!---- Chance to find a client --------------------------------------------------------------------------------
 
 	prostitute['client_chance'] = hotcat * 10 + prostitute['regular_chance'] * 5 + rand(1,100) + prostitute['pity_counter']
 	if $pantyworntype = 'eroto' and CloSkirtShortness > 4: prostitute['client_chance'] += 10
 
-	!!---- Client ------------------------------------------------------------------------------------------------	
+	!!---- Client ------------------------------------------------------------------------------------------------
 
 	if prostitute['regular_timer'] ! daystart and $prostitute['client_scene'] ! 'Blowjob':
 		if (prostitute['regular_chance'] = 1 and rand(1,100) > 95) or (prostitute['regular_chance'] = 2 and rand(1,100) > 90) or (prostitute['regular_chance'] = 3 and rand(1,100) > 80) or (prostitute['regular_chance'] = 4 and rand(1,100) > 60):
@@ -948,10 +959,10 @@ end
 	end
 end
 
-!!---------- Payment ---------------------------------------------------------------------------------------------	
+!!---------- Payment ---------------------------------------------------------------------------------------------
 
 if $ARGS[0] = 'payment':
-	!!---- Basic Payment -----------------------------------------------------------------------------------------	
+	!!---- Basic Payment -----------------------------------------------------------------------------------------
 
 	if $ARGS[1] = 'pav':
 		if $prostitute['pav_scene'] = 'blowjob':
@@ -977,8 +988,8 @@ if $ARGS[0] = 'payment':
 		end
 	end
 
-	!!---- Bonus -------------------------------------------------------------------------------------------------	
-	
+	!!---- Bonus -------------------------------------------------------------------------------------------------
+
 	prostitute['payment_mod'] = hotcat * 10
 	if pcs_makeup = 0:
 		prostitute['payment_mod'] -= 20
@@ -1044,7 +1055,7 @@ if $ARGS[0] = 'payment':
 	prostitute['payment_backup'] = func('prostitution_functions', 'exact_round', prostitute['payment_backup'], 10)
 end
 
-!!---------- Abortion --------------------------------------------------------------------------------------------	
+!!---------- Abortion --------------------------------------------------------------------------------------------
 
 if $ARGS[0] = 'abortion':
 	abort += 1
@@ -1068,7 +1079,7 @@ if $ARGS[0] = 'abortion':
 	if broodcurse > 0: over = 13 & gt'gameover'
 end
 
-!!---------- Random Name -----------------------------------------------------------------------------------------	
+!!---------- Random Name -----------------------------------------------------------------------------------------
 
 if $ARGS[0] = 'random_name':
 
@@ -1145,7 +1156,7 @@ if $ARGS[0] = 'random_name':
 	killvar '$pro_temp'
 end
 
-!!---------- Payment ---------------------------------------------------------------------------------------------	
+!!---------- Payment ---------------------------------------------------------------------------------------------
 
 if $ARGS[0] = 'tat_pierce_count':
 	tattCount = 0
@@ -1181,7 +1192,7 @@ if $ARGS[0] = 'tat_pierce_count':
 	if pirsN > 0 and pirsN ! 10000:	pierWearCount += 1
 end
 
-!!---------- Random Name -----------------------------------------------------------------------------------------	
+!!---------- Random Name -----------------------------------------------------------------------------------------
 
 if $ARGS[0] = 'pav_client':
 	!!Reset
@@ -1213,8 +1224,8 @@ if $ARGS[0] = 'pav_client':
 !!ToDo: Add cheat for this chance
 	$prostitute['client_behavior'] = iif(rand(1,100) < prostitute['client_behavior_chance'] or prostitute['pav_regular'] = -1, 'nice', 'abusive')
 
-	!!---- Scene --------------------------------------------------------------------------------------------------	
-	
+	!!---- Scene --------------------------------------------------------------------------------------------------
+
 	if pro_rand > 7:
 		$prostitute['pav_scene'] = 'anal'
 	elseif mesec = 0 and rand(0,100) < 50:
@@ -1243,25 +1254,25 @@ if $ARGS[0] = 'pav_client':
 		prostitute['pav_condom_refusal'] = 0
 	end
 
-	!!---- Generator ----------------------------------------------------------------------------------------------	
-	
+	!!---- Generator ----------------------------------------------------------------------------------------------
+
 	gs 'npcgeneratec', 0, 'pavlovsk client', rand(18,45)
 	gs 'boyStat', $npclastgenerated
 end
 
-!!---- Checking visible STD and cum -------------------------------------------------------------------------------	
+!!---- Checking visible STD and cum -------------------------------------------------------------------------------
 
 if $ARGS[0] = 'std_cum_check':
-	!!---- Visible STD --------------------------------------------------------------------------------------------	
-	
+	!!---- Visible STD --------------------------------------------------------------------------------------------
+
 	if pcs_apprnc = -10 and rand(1,10) < 8:
 		prostitute['std_mod'] = 1
 	else
 		prostitute['std_mod'] = 0
 	end
 
-	!!---- Non-Visible Cum ----------------------------------------------------------------------------------------	
-	
+	!!---- Non-Visible Cum ----------------------------------------------------------------------------------------
+
 	if cumloc[0] = 1:
 		prostitute['cum_vaginal_mod'] = 1
 	else
@@ -1274,8 +1285,8 @@ if $ARGS[0] = 'std_cum_check':
 		prostitute['cum_anal_mod'] = 0
 	end
 
-	!!---- Visible Cum (Dressed) ----------------------------------------------------------------------------------	
-	
+	!!---- Visible Cum (Dressed) ----------------------------------------------------------------------------------
+
 	if cumloc[7] = 1 or cumloc[11] = 1 or cumloc[13] = 1 or cumloc[15] = 1:
 		prostitute['cum_dressed'] = 1
 	else
@@ -1290,8 +1301,8 @@ if $ARGS[0] = 'std_cum_check':
 	end
 end
 
-	
-!!---------- Exact Rounding --------------------------------------------------------------------------------------	
+
+!!---------- Exact Rounding --------------------------------------------------------------------------------------
 if $ARGS[0] = 'exact_round':
 	!! ARGS[1] = value you want divided
 	!! ARGS[2] = divider

+ 10 - 7
locations/rex_party_firstTime.qsrc

@@ -148,12 +148,16 @@ if $ARGS[0] = 'anya_kit':
 				act 'Join':
 					*clr & cla
 					sisterknowslut = 2
-					gs 'npcgeneratec', 0, 'Boy from Rex''s Party', 17
-					gs 'boyStat', $npclastgenerated
-
-					gs 'npcgeneratec', 0, 'Boy from Rex''s Party', 17
+					gs 'npcgeneratec', 0, 'Boy from Rex''s Party', 17, 1, 1
 					gs 'boyStat', $npclastgenerated, 'a'
-					gs 'cum_call', 'anus', 'Boy from Rex''s Party', 1
+
+					gs 'npcgeneratec', 0, 'Boy from Rex''s Party', 17, 1, 1
+					gs 'boyStat', $npclastgenerated, 'b'
+					gs 'cum_call', 'anus', $boy1, 1
+
+					gs 'arousal', 'anal', 10, 'rough', 'sub', 'group', 'unknown'
+					gs 'stat'
+
 					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/rekshome/party/sisboyqwparty_28.jpg"></center>'
 					*nl
 					'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.'
@@ -161,8 +165,7 @@ if $ARGS[0] = 'anya_kit':
 					'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, 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'
+
 					if hour < 22:
 						minut += ((21 - hour) * 60) + (60 - minut)
 						gs 'arousal', 'end'

+ 1 - 0
locations/sex_ev_cum.qsrc

@@ -409,6 +409,7 @@ if $ARGS[0] = 'fuck_cum':
 	
 	if npc_two_pump[$boy] = 1 and sex_ev['two_pump'] = 0:
 		sex_ev['two_pump'] = 1
+		sex_ev['fuck_count'] += 1
 		sex_ev['boy_cum'] = 1
 	end
 	

+ 4 - 0
locations/sex_ev_doggy.qsrc

@@ -124,6 +124,8 @@ if $ARGS[0] = 'doggy_start':
 end
 
 if $ARGS[0] = 'doggy_insert_slow':
+	$sex_ev['position'] = 'doggy'
+	$sex_ev['pos_speed'] = 'doggy<<sex_ev[''speed'']>>'
 	if sex_ev['cock_inserted'] = 1:
 		gs'sex_ev_doggy', 'doggy_goto'
 	else
@@ -363,6 +365,7 @@ if $ARGS[0] = 'doggy_goto':
 	sex_ev['cock_inserted'] = 1
 	$sex_ev['position'] = 'doggy'
 	if sex_ev['speed'] = 0: sex_ev['speed'] = rand(1,3)
+	$sex_ev['pos_speed'] = 'doggy<<sex_ev[''speed'']>>'
 	act'Get fucked':gt 'sex_ev_doggy', 'doggy<<sex_ev[''speed'']>>'
 end
 
@@ -372,6 +375,7 @@ if $ARGS[0] = 'doggy_goto2':
 	else
 		sex_ev['cock_inserted'] = 1
 		$sex_ev['position'] = 'doggy'
+		$sex_ev['pos_speed'] = 'doggy<<sex_ev[''speed'']>>'
 		if sex_ev['speed'] = 0: sex_ev['speed'] = rand(1,3)
 		act'Get fucked':gt 'sex_ev_doggy', 'doggy<<sex_ev[''speed'']>>.2'
 	end

+ 1 - 0
locations/sex_ev_dress_talking.qsrc

@@ -576,6 +576,7 @@ if $ARGS[0] = 'pc_sex_ev_invite2':
 	if sex_ev['invite_today'] = 1:
 		if npc_booty_call_time[$boy] = npc_start_free_time[$boy]:
 			'"How about <<npc_booty_call_time[$boy]>>?" you smirk <<$sex_ev[''dress_describe'']>>. "We can get off together."'
+			'"Works for me," he grins back.'
 			gs 'sex_ev_dress_talking', 'pc_sex_ev_invite_accepted'
 		else
 			'"How about <<npc_booty_call_time[$boy]>>?" you ask <<$sex_ev[''dress_describe'']>>.'

+ 1 - 0
locations/sex_ev_foreplay.qsrc

@@ -782,6 +782,7 @@ if $ARGS[0] = 'bj_sub_cum_surprise':
 					act'I''ll try':
 						cla & *nl
 						'"I''ll do my best," you say.'
+						gs 'sex_ev_sex', 'sex_end'
 					end
 					act'Nod':
 						cla & *nl

+ 1 - 1
locations/sex_ev_leave.qsrc

@@ -8,7 +8,7 @@ if $ARGS[0] = 'exit':
 		gt $sex_ev_exit['exit_file'], $sex_ev_exit['exit_arg']
 	else
 		if $sex_ev['loc'] = 'npc_home':
-				gs 'sex_ev_leave', 'ending'
+			gs 'sex_ev_leave', 'ending'
 			if npc_residence[$boy] = 1:
 				!! Pav residential exit
 				gt 'pav_residential'

+ 4 - 1
locations/sex_ev_miss.qsrc

@@ -65,6 +65,8 @@ if $ARGS[0] = 'missionary_start':
 end
 
 if $ARGS[0] = 'miss_insert_slow':
+	$sex_ev['position'] = 'miss'
+	$sex_ev['pos_speed'] = 'miss<<sex_ev[''speed'']>>'
 	if sex_ev['cock_inserted'] = 1:
 		gs'sex_ev_miss', 'miss_goto'
 	else
@@ -305,6 +307,7 @@ if $ARGS[0] = 'miss_goto':
 	$sex_ev['position'] = 'miss'
 	sex_ev['cock_inserted'] = 1
 	if sex_ev['speed'] = 0: sex_ev['speed'] = rand(1,3)
+	$sex_ev['pos_speed'] = 'miss<<sex_ev[''speed'']>>'
 	if $sex_ev['mood_type'] = 'romantic' and sex_ev['speed'] < 3:
 		act'Make love to <<$npc_firstname[$boy]>>':gt 'sex_ev_miss', 'miss<<sex_ev[''speed'']>>'
 	else
@@ -318,6 +321,7 @@ if $ARGS[0] = 'miss_goto2':
 		$sex_ev['position'] = 'miss'
 		sex_ev['cock_inserted'] = 1
 		if sex_ev['speed'] = 0: sex_ev['speed'] = rand(1,3)
+		$sex_ev['pos_speed'] = 'miss<<sex_ev[''speed'']>>'
 		if $sex_ev['mood_type'] = 'romantic' and sex_ev['speed'] < 3:
 			act'Make love to <<$npc_firstname[$boy]>>':gt 'sex_ev_miss', 'miss<<sex_ev[''speed'']>>.2'
 		else
@@ -825,7 +829,6 @@ if $ARGS[0] = 'miss2.1':
 	elseif $sex_ev['pos_speed'] = 'miss3':
 		'<<$npc_firstname[$boy]>> ramps down to a more manageable pace and you breathe a sigh of relief. With your pussy no longer feeling like it''s being hammered numb, you start to enjoy this a lot more.'
 	end
-	$sex_ev['pos_speed'] = 'miss2'
 	gs 'sex_ev_miss', 'miss2.1_desc'
 	gs 'sex_ev_cum', 'fuck_cum'
 end

+ 0 - 1
locations/sexshop.qsrc

@@ -153,7 +153,6 @@ if $ARGS[0] = 'sexshop_menu' or $ARGS[0] = '':
 	*clr & cla
 	$args_s = 'sexshop_menu'
 	$loc_s = 'sexshop'
-	gs 'stat'
 
     gs 'item_cart', 'shoppping_aisle', 'sexshop'
     gs 'stat'

+ 0 - 224
locations/skverdin.qsrc

@@ -1,224 +0,0 @@
-# skverdin
-$d_park_placer_bj = {
-	guy += 1
-	parkfuckboy += 1
-	parktimes += 1
-	pphj = 0
-	ppbj = 0
-	ppsex = 0
-	ppanal = 0
-	dynamic $d_pp_hand
-	dynamic $d_pp_squat
-}
-
-$d_pp_hand = {
-	act 'Take the member in your hand':
-		cls
-		gs 'stat'
-		'<center><img <<$set_imgh>> src="images/shared/sex/handjob/hj.jpg"></center>'
-		'You clasp your fingers around the erect <<dick>>cm cock and pull back the skin to reveal the crimson head then start to slowly move your hands back and forth.'
-		
-		gs 'arousal', 'hj', 1, 'sub'
-		gs 'stat'
-		
-		if rand(0, 1) = 0:
-			if rand(0, 4) = 0:
-				'<<$boydesc>> takes you by the shoulders and pushes, trying to force you to kneel.'
-				dynamic $d_pp_squat
-			else
-				'<<$boydesc>> says impatiently, "<<$pcs_nickname>>, kiss it."'
-				dynamic $d_pp_squat
-			end
-		else
-			'<<$boydesc>> stands still and looks into your eyes expectantly.'
-			gs 'willpower', 'hj', 'resist', 'medium'
-			if will_cost <= pcs_willpwr:
-				act 'Give him a handjob (<<will_cost>> Willpower)':
-					*clr & cla
-					gs 'willpower', 'pay', 'resist'
-					gs 'stat'
-					dynamic $d_pp_hjcum
-				end
-			else
-				act 'Give him a handjob (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
-			end
-			dynamic $d_pp_squat
-		end
-	end
-}
-
-$d_pp_hjcum = {
-	act 'Faster':
-		cls
-		gs 'arousal', 'hj', 1, 'sub'
-		gs 'stat'
-
-		if rand(1, 100) >= 80:
-			spafinloc = 7
-			gs 'cum_manage'
-			$pptext = 'As he cums, a jet of semen gets onto your clothes.'
-		else
-			$pptext = 'The mans sperm shoots out on to the ground.'
-		end
-
-		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/pphjcum.jpg"></center>'
-		'You speed up your movements and tighten your grip, then continue to masturbate his cock until he reaches orgasm. <<$pptext>>'
-		dynamic $d_pp_goend
-	end
-}
-
-$d_pp_squat = {
-	act 'Squat':
-		cls
-		minut += 1
-		gs 'stat'
-		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/squat.jpg"></center>'
-		'You sat on his haunches and right in front of your face turned stand-up <<dick>>cm cock'
-		dynamic $d_pp_bj
-	end
-}
-
-$d_pp_bj = {
-	act 'Suck':
-		cls
-		parkslut += 1
-		gs 'stat'
-		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/ppbj.jpg"></center>'
-		'You wrap your lips wrapped around his hard <<dick>>cm cock, and suck it carefully feeling it with your tongue and lips.'
-		gs 'arousal', 'bj', 5, 'sub'
-		gs 'stat'
-		tiprand = rand(1, 100)
-
-		if tiprand = 100:
-			'Suddenly, he laughed and said "shit, <<$boydesc>> fifteen minutes you can not leave, already what that heifer cheek wheeled." <<$boydesc>> laughed and turned to his friend "What do you tupish? Come_Over!" The second guy immediately came up to you and pulled out of his pants his dick.'
-			dynamic $d_pp_double
-		elseif tiprand >= 90:
-			'<<$boydesc>> suddenly took out a member of your mouth and began to say a word to lift you and expand back to him'
-			dynamic $d_pp_sex
-		elseif tiprand >= 70:
-			'<<$boydesc>> whispers to you "<<$pcs_nickname>>, your mouth is not tired? can perepihnemsya?"'
-			dynamic $d_pp_sex
-			dynamic $d_pp_bjcum
-		else
-			'You feel his cock stiffen, it seems he is already about to finish'
-			dynamic $d_pp_hjcum
-			dynamic $d_pp_bjcum
-		end
-	end
-}
-
-$d_pp_bjcum = {
-	act 'Continue sucking':
-		cls
-		minut += 1
-		spafinloc = 12
-		gs 'cum_manage'
-		spafinloc = 7
-		gs 'cum_manage'
-		spafinloc = 11
-		gs 'cum_manage'
-		gs 'stat'
-		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/ppbjcum.jpg"></center>'
-		'You continue to suck and in less than a minute his member bursts filling your mouth with seed. The sperm is so much, that part of it drips out on your lips and chin .'
-		dynamic $d_pp_goend
-	end
-}
-
-$d_pp_sex = {
-	act 'Bend over':
-		cls
-		pose = 1
-		gs 'stat'
-		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/ppsex.jpg"></center>'
-		'You bared her butt and bending framed his boyfriend'
-		gs 'dinSex', 'wear_condom'
-		gs 'dinsex','vaginal_sex',10
-		
-		gs 'arousal', 'vaginal', 10, 'sub'
-		gs 'stat'
-
-		if rand(1, 100) >= 20:
-			gs 'dinsex','sexcum'
-			dynamic $d_pp_goend
-		else
-			'<<$boydesc>> took out of you cock and you deploying to face him began to put you on his heels'
-			dynamic $d_pp_squat
-		end
-	end
-}
-
-$d_pp_double = {
-	act 'ohrenevayu':
-		cls
-		parkslut += 10
-		guy += 1
-		gs 'stat'
-		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/ppbjdouble.jpg"></center>'
-		'It all happened quickly and you do not even have time to realize in both your hands turned over the penis, their purple heads were right in front of your face. One of the guys hand impatiently pushed your head against a member.'
-
-		gs 'arousal', 'bj', 5, 'sub', 'group'
-		gs 'stat'
-		
-		act 'Sucking two members':
-			cls
-			gs 'stat'
-			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/ppbjdouble2.jpg"></center>'
-			'You have become a polished just two bow with her wet lips spitted her mouth purple hat guys take turns. Soon <<$boydesc>> groaned "Open your mouth slut"'
-
-			gs 'arousal', 'bj', 15, 'sub', 'group'
-			gs 'stat'
-		
-			act 'open your mouth':
-				cls
-				minut += 15
-				spafinloc = 11
-				gs 'cum_manage'
-				spafinloc = 12
-				gs 'cum_manage'
-				gs 'stat'
-				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/ppbjdouble3.jpg"></center>'
-				'You obediently opened the procedure already tired mouth and <<$boydesc>> you shot a thick white liquid directly on wet and slightly swollen lips of the work done. His friend choked hissed "finish" and grab you by the hair turned your face to its members.'
-
-				act 'turn the face':
-					cls
-					minut += 15
-					spafinloc = 11
-					gs 'cum_manage'
-					spafinloc = 12
-					gs 'cum_manage'
-					spafinloc = 7
-					gs 'cum_manage'
-					gs 'stat'
-					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/ppbjdouble4.jpg"></center>'
-					'You turned your face and you immediately charged a second portion struhni directly into open mouth, you instinctively shaken and a large ball of sperm fell out of your mouth and you shmyaknulsya on clothes. <<$boydesc>> neigh "epta! You''re a sniper, huesoska loaded directly into her mouth fucking!"'
-					dynamic $d_pp_goend
-				end
-			end
-		end
-	end
-}
-
-$d_pp_goend = {
-	act 'Brush up':
-		cls
-
-		minut += 5
-		gs 'stat'
-
-		if cumloc[11] = 1 or cumloc[12] = 1:
-			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/ppendcum.jpg"></center>'
-		else
-			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/sex/ppendno.jpg"></center>'
-		end
-
-		'You began to brush up. <<$boydesc>> has already buttoned his pants "Well, catch you around <<$pcs_nickname>>, I still have things to do now, hope to see you again."'
-
-		act 'Leave':
-			gs 'arousal', 'end'
-			gt 'pav_park', 'start'
-		end
-	end
-}
-
---- skverdin ---------------------------------
-

+ 26 - 20
locations/sleep.qsrc

@@ -3,37 +3,38 @@ $sleep_loc = 'sleep'
 
 !! Deals with the sleep cycle, advancing both time and stats during sleep.
 !!
-!! Moved here from dream_events
+!! Moved here from pre_sleep
+!! Move to dream_events. Then back to sleep (this location).
 !! When busy moves back and forth to sleep_events (and can be redirected from there)
 !! When done: Move to wakeup
 
 if $ARGS[0] = 'full':
-	msg 'gt ''sleep'', ''full'' is depricated! If you did not load an old save, please report this bug.'
-	gt 'pre_sleep_events', 'start'
+	msg 'gt ''sleep'', ''full'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
+	gt 'pre_sleep', 'start'
 end
 
 if $ARGS[0] = 'sleep':
-	msg 'gt ''sleep'', ''sleep'' is depricated! If you did not load an old save, please report this bug.'
+	msg 'gt ''sleep'', ''sleep'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
 	gt 'pre_sleep', 'prepare_sleep'
 end
 
 if $ARGS[0] = 'dream':
-	msg 'gt ''sleep'', ''dream'' is depricated! If you did not load an old save, please report this bug.'
-	gt 'dream_events', 'start'
+	msg 'gt ''sleep'', ''dream'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
+	gt 'sleep', 'start'
 end
 
 if $ARGS[0] = 'wake':
-	msg 'gt ''sleep'', ''wake'' is depricated! If you did not load an old save, please report this bug.'
+	msg 'gt ''sleep'', ''wake'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
 	gt 'wakeup', 'start'
 end
 
 if $ARGS[0] = 'end':
-	msg 'gt ''sleep'', ''end'' is depricated! If you did not load an old save, please report this bug.'
+	msg 'gt ''sleep'', ''end'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
 	gt 'bed_get_out', 'start'
 end
 
 if $ARGS[0] = '':
-	msg 'gt ''sleep'', is depricated! If you did not load an old save, please report this bug.'
+	msg 'gt ''sleep'', is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
 	gt 'pre_sleep', 'start'
 	
 end
@@ -42,6 +43,11 @@ end
 
 
 if $ARGS[0] = 'start':
+	menu_off = 1
+	gt 'dream_events', 'start'
+end
+
+if $ARGS[0] = 'post_dream':
 	menu_off = 1
 	!! to avoid sleeping the whole day I decide to calcululate the duration of the sleep in advance
 	!! the quality of the sleep depends on many factors, so the time of sleep can be modify later, especially the part when the time of sleep is shortened
@@ -54,6 +60,17 @@ if $ARGS[0] = 'start':
 	xgt 'sleep', 'sleep_handler'
 end
 
+if $ARGS[0] = 'sleep_handler':
+	menu_off = 1
+	gs 'sleep', 'calc_minutes_to_wakeup'
+
+	if sleepVars['minutes_to_wakeup'] > 0:
+		xgt 'sleep', 'sleep_loop'
+	else
+		xgt 'sleep', 'post_sleep'
+	end
+end
+
 if $ARGS[0] = 'calc_minutes_to_wakeup':
 	sleepVars['time_now'] = daystart * 1440 + hour * 60 + minut
 
@@ -72,17 +89,6 @@ if $ARGS[0] = 'calc_minutes_to_wakeup':
 	end
 end
 
-if $ARGS[0] = 'sleep_handler':
-	menu_off = 1
-	gs 'sleep', 'calc_minutes_to_wakeup'
-
-	if sleepVars['minutes_to_wakeup'] > 0:
-		xgt 'sleep', 'sleep_loop'
-	else
-		xgt 'sleep', 'post_sleep'
-	end
-end
-
 
 if $ARGS[0] = 'sleep_loop':
 	menu_off = 1

+ 1 - 1
locations/sleep_events.qsrc

@@ -132,7 +132,7 @@ if $ARGS[0] = 'continue':
 	if $ARGS[1] = 'sleep':
 		xgt 'sleep', 'sleep_handler'
 	elseif $ARGS[1] = 'dream':
-		gt 'dream_events', 'start'
+		gt 'sleep', 'start'
 	else
 		!! Empty on purpose
 	end

+ 6 - 6
locations/themes.qsrc

@@ -179,17 +179,17 @@ end
 
 if $ARGS[0] = 'alt_color':
 	if night_mode = 0:
-		if BColorBase <= 160:
-			$result = iif($ARGS[1]='#0C0B11','#000000','#0C0B11')
+		if $bcolor ! '"#FFFFFF"' and BColorBase <= 160:
+			$result = iif($ARGS[1]='#202020','#000000','#202020')
 		else
-			$result = iif($ARGS[1]='#f3f4ee','#ffffff','#f3f4ee')
+			$result = iif($ARGS[1]='#e6f2ff','#ffffff','#e6f2ff')
 		end
 	elseif night_mode = 1:
-		$result = iif($ARGS[1]='#0C0B11','#000000','#0C0B11')
+		$result = iif($ARGS[1]='#202020','#000000','#202020')
 	elseif night_mode = 2:
-		$result = iif($ARGS[1]='#0C0B11','#141414','#0C0B11')
+		$result = iif($ARGS[1]='#303030','#141414','#303030')
 	elseif night_mode = 3:
-		$result = iif($ARGS[1]='#f3f4ee','#ffffff','#f3f4ee')
+		$result = iif($ARGS[1]='#e6f2ff','#ffffff','#e6f2ff')
 	end
 end
 

+ 157 - 0
tools/check_missing_media.py

@@ -0,0 +1,157 @@
+import os
+import re
+
+#made by Awesome :peeposhrug:
+
+script_directory = os.path.dirname(os.path.realpath(__file__))
+text_path = os.path.dirname(script_directory)
+qsrc_directory = os.path.join(text_path, 'locations')
+image_directory = input('Enter the game directory: ')
+keywords = input('Enter keywords to exclude (comma-separated, press Enter to skip): ')
+
+keywords_to_exclude = keywords.split(',')
+
+# Create a list to store missing images
+missing_images = []
+color_values = ['black', 'brown', 'red', 'blonde', 'light red', 'dark blue', 'blue', 'light blue', 'dark green', 'green', 'light green', 'dark pink', 'pink', 'light pink', 'dark purple', 'purple', 'light purple', 'light orange', 'dark red', 'medium red', 'turquoise', 'medium orange', 'dark orange']
+
+def exclude_keywords(image_path, keywords):
+    for keyword in keywords:
+        if keyword and keyword.lower() in image_path.lower():
+            return True
+    return False
+
+keywords_to_exclude.append('$pcs_haircol')
+keywords_to_exclude.append('set_<<')
+keywords_to_exclude.append('+iif')
+keywords_to_exclude.append('<<FUNC')
+
+# Function to construct the absolute path from a relative image reference
+def construct_absolute_path(image_reference, image_directory):
+    return os.path.join(image_directory, image_reference.replace("images\\", ""))
+
+# Function to evaluate and replace random expressions within a string
+def evaluate_and_replace_random(expression):
+    image_paths = []
+
+    # Define a regular expression pattern to find '+rand(...)' or '<<rand(...)>>' expressions
+    rand_pattern = r'(\+\s*rand\(([^)]*)\)\s*\+|\s*<<rand\(([^)]*)\)>>)'
+
+    # Find all matching expressions in the input string
+    matches = re.finditer(rand_pattern, expression)
+
+    # Initialize the modified expression
+    modified_expression = expression
+
+    # Iterate through the matches and replace them
+    for match in matches:
+        rand_expression = match.group(2) or match.group(3)
+        if rand_expression:
+            # Check if there are numeric values within the parentheses
+            numeric_values = re.findall(r'\d+', rand_expression)
+            if numeric_values:
+                min_value = int(numeric_values[0])
+                max_value = int(numeric_values[1]) if len(numeric_values) > 1 else min_value
+                if min_value <= max_value:
+                    # Generate image paths for each number in the range
+                    image_paths.extend([str(num) for num in range(min_value, max_value + 1)])
+
+        # Replace the match in the expression with a placeholder
+        modified_expression = modified_expression.replace(match.group(0), '<REPLACED>')
+
+    # Remove single quotes and extra spaces
+    modified_expression = modified_expression.replace("'", "").strip()
+    modified_expression = modified_expression.replace(" ", "")
+
+    # Add the generated image paths to the result
+    image_paths = [modified_expression.replace('<REPLACED>', str(num)) for num in image_paths]
+
+    return image_paths
+
+# Function to evaluate and replace variables within a string
+def evaluate_and_replace_variables(expression, variables):
+    variable_matches = re.findall(r'<<(\$?[a-zA-Z_][a-zAZ0-9_]*)>>', expression)
+    for variable_name in variable_matches:
+        if variable_name.startswith("$"):
+            variable_value = variables.get(variable_name[1:], "")
+        else:
+            variable_value = variables.get(variable_name, "")
+        expression = expression.replace(f"<<{variable_name}>>", str(variable_value))
+    return [expression]
+
+# Iterate through .qsrc files in the specified directory and its subdirectories
+for root, dirs, files in os.walk(qsrc_directory):
+    for file in files:
+        if file.endswith(".qsrc"):
+            qsrc_file = os.path.join(root, file)
+
+            # Read the .qsrc file
+            with open(qsrc_file, "r", encoding="utf-8") as script_file:
+                script_content = script_file.readlines()
+
+            # Find and extract variable assignments within the same code block
+            variable_matches = re.findall(r'<<(\$?[a-zA-Z_][a-zAZ0-9_]*)>>\s*=\s*([\'"]?[^\'"]+[\'"]?)', ''.join(script_content))
+
+            # Store variable values for this code block
+            code_block_variables = {}
+            for variable_name, variable_value in variable_matches:
+                code_block_variables[variable_name] = variable_value.strip("'\"")
+
+            # Use regular expressions to find image references in the script
+            for line_number, line in enumerate(script_content, start=1):
+                if line.strip().startswith('!') or '+iif' in line or '<<FUNC' in line:
+                    continue
+                image_references = re.findall(r'<(?:img <<\$set_imgh>>|video autoplay loop) src="([^"]+)"', line)
+
+                for image_reference in image_references:
+                    if exclude_keywords(image_reference, keywords_to_exclude):
+                        continue
+                    # If the image reference contains '<<$pcs_haircol>>', replace it with each color value
+                    if '<<$pcs_haircol>>' in image_reference:
+                        for color in color_values:
+                            # Replace spaces with underscores in color names
+                            image_reference_color = image_reference.replace('<<$pcs_haircol>>', color)
+                            # Handle the '+rand(1,19)+' part
+                            if '+rand(1,19)+' in image_reference_color:
+                                for i in range(1, 20):  # 20 is exclusive, so this will give numbers from 1 to 19
+                                    image_reference_color_i = image_reference_color.replace('+rand(1,19)+', str(i))
+                                    # Remove single quotes around the number
+                                    image_reference_color_i = image_reference_color_i.replace("'"+str(i)+"'", str(i))
+                                    absolute_path = construct_absolute_path(image_reference_color_i, image_directory)
+                                    
+                                    if not os.path.exists(absolute_path):
+                                        
+                                        missing_images.append((os.path.basename(qsrc_file), image_reference_color_i, line_number))  # Store the .qsrc filename, image path, and line number
+                            else:
+                                absolute_path = construct_absolute_path(image_reference_color, image_directory)
+                                
+                                if not os.path.exists(absolute_path):
+                                    
+                                    missing_images.append((os.path.basename(qsrc_file), image_reference_color, line_number))  # Store the .qsrc filename, image path, and line number
+                    else:
+                        # Evaluate variables first
+                        image_reference = evaluate_and_replace_variables(image_reference, code_block_variables)[0]
+                        image_paths = evaluate_and_replace_random(image_reference)
+
+                        for path in image_paths:
+                            if exclude_keywords(path, keywords_to_exclude):
+                                continue
+                            absolute_path = construct_absolute_path(path, image_directory)
+                            
+                            if not os.path.exists(absolute_path):
+                                
+                                missing_images.append((os.path.basename(qsrc_file), path, line_number))  # Store the .qsrc filename, image path, and line number
+missing_media_count = len(missing_images)
+
+# Specify the path to the "missing_media.txt" output file
+missing_media_file = os.path.join(text_path, "missing_media.txt")
+
+# Write the list of missing images with full image paths to the "missing_media.txt" file
+with open(missing_media_file, "w", encoding="utf-8") as file:
+    for qsrc_file, image_path, line_number in missing_images:
+        file.write(f"From file: {qsrc_file}, line: {line_number}\n")  # Write the .qsrc filename and line number
+        file.write(f"images/{image_path.replace('images/', '')}\n\n")  # Write the relative image path and start a new line
+    file.write(f"\nTotal missing media files: {missing_media_count}\n")  # Write the count of missing media files at the end of the file
+    file.write(f"this amazing script was made by Awesome(with help from chatGPT)\n") #bragging
+print(f"{missing_media_count} Missing images have been saved to 'missing_media.txt'.")
+pause = input("Press Enter to exit.")