Browse Source

Merge remote-tracking branch 'Awesome/master'

Kevin_Smarts 6 months ago
parent
commit
69cea1fe76

+ 1 - 1
locations/IvanEv.qsrc

@@ -177,7 +177,7 @@ if $ARGS[0] = 'School Chat':
 					cla
 					gs'stat'
 					'<center><b><font color=#00eaff>School Hallway</font></b></center>'
-					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<Rand(0,2)>>.jpg"></center>'
+					'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<rand(0,2)>>.jpg"></center>'
 					'You don''t feel like attending all of your classes this morning. Surely no one will miss you if you skip one of your three morning classes.'
 
 					act 'Go to girl''s bathroom':gt 'gschool_girls_bathroom', 'start'

+ 2 - 2
locations/act_main1.qsrc

@@ -128,7 +128,7 @@ if $ARGS[0] = 'Unashamed_Intro':
 				'Vitaly sniggers as the extra stays dead still and you kick the bed as if trying to wake her up.'
 				act'Cut!':
 					cla & *clr
-					'<center><img <<$set_imgh>> src="images/locations/industrial/studio/set1.jpg"></center>'
+					'<center><img <<$set_imgh>> src="images/locations/city/industrial/studio/set1.jpg"></center>'
 					'The director calls cut as you finish up your first take. You spend a while longer cleaning up the bits that needed correction or the director wanted to tweak before going to the break.'
 					act'Go to break':gt 'studio_events', 'break'
 				end
@@ -322,7 +322,7 @@ if $ARGS[0] = 'Unashamed_nude_sex3':
 			'And slap down the phone in relief.'
 			act'Cut!':
 				cla & *clr
-				'<center><img <<$set_imgh>> src="images/locations/industrial/studio/set1.jpg"></center>'
+				'<center><img <<$set_imgh>> src="images/locations/city/industrial/studio/set1.jpg"></center>'
 				'The director calls cut and you slowly sit up on the bed.'
 				if acting['realsex'] = 0:
 					'"Yanovich!" you call out to the director. "You told him to blow on my pussy like that didn''t you?!"'

+ 2 - 2
locations/act_minor1.qsrc

@@ -27,7 +27,7 @@ if $ARGS[0] = 'club_flash':
 	acting['scene_count'] = 1
 	*clr & cla
 	if pcs_perform < 50: gs 'exp_gain', 'perform', 10
-	'<center><img <<$set_imgh>> src="images/locations/industrial/studio/set1.jpg"></center>'
+	'<center><img <<$set_imgh>> src="images/locations/city/industrial/studio/set1.jpg"></center>'
 	'You go on set and everyone is getting ready. You pass the time by continuing to study your lines until someone comes over to you and puts you on your mark. The director quickly runs through the scene with you and all the other actors to make sure there isn''t any confusion. With you and everybody else nodding in confirmation you all get back into place and the director yells, "Quiet on the set!"'
 	act'"Action!"':
 		*clr & cla
@@ -89,7 +89,7 @@ if $ARGS[0] = 'club_flash':
 							minut += 2
 							gs'stat'
 							*clr & cla
-							'<center><img <<$set_imgh>> src="images/locations/industrial/studio/set1.jpg"></center>'
+							'<center><img <<$set_imgh>> src="images/locations/city/industrial/studio/set1.jpg"></center>'
 							'The crew reviews the footage for a minute before the director calls to reset and you do a few more takes of the scene as everybody corrects the minor things that either went wrong or the director decided didn''t feel right for the scene.'
 							act'Additional takes':
 								minut += 30

+ 1 - 1
locations/cafe_parco.qsrc

@@ -7,7 +7,7 @@ if $args[0]= 'start':
 	$menu_arg = 'start'
 	menu_off = 0
 	'<center><h4><font color="maroon">Cafe "Del Parco"</font></h4></center>'
-	'<center><img <<$set_imgh>> src="'+'images/locations/pavlovsk/park/cafe/caffe_del_parco'+iif(hour > 20 or hour < 7,'_night','')+'.jpg'+'"></center>'
+	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/park/cafe/caffe_del_parco'+iif(hour > 20 or hour < 7,'_night','')+'.jpg"></center>'
 	'The newly opened cafe "Del Parco", with its striking facade, there are lots of tables and a summer terrace. Opening hours between 14.00 to 21.00.'
 
 	act 'Return to the square': gt 'pav_park', 'start'

+ 1 - 1
locations/clothing.qsrc

@@ -452,7 +452,7 @@ if $ARGS[0] = 'clothing_list':
 	if $args[1] = 'misc' or $args[1] = 'all':
 		if $args[1] ! 'all':
 			$ward_list_store = $args[1]
-			'<center><img src="img src="images/pc/items/misc/misc.png"></center>'
+			'<center><img src="images/pc/items/misc/misc.png"></center>'
 			gs 'clothing_QV', 'filter_header', 'store'
 			gs 'clothing', 'clothinglist_header'
 			!!To filter just this set

+ 2 - 2
locations/dimaRevenge.qsrc

@@ -158,7 +158,7 @@ if ARGS[0] = 3:
 							act 'Look for Feofan':
 								*clr & cla
 								'<center><b><font color="maroon">School Hallway</font></b></center>'
-								'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<Rand(0,2)>>.jpg"></center>'
+								'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<rand(0,2)>>.jpg"></center>'
 								'You search the hallway for Feofan. The hallway is crowded with students preparing to leave school. You spot him at the end of the hall talking to Zinaida. He must be hitting on her again. All the nerd boys ask her out.
 								You swear you even saw Julia asking her out once. She always turns them down. Feofan is an incorrigible flirt though and doesn''t let rejection dampen his spirit. You almost envy that about him. You approach him as Zinaida turns him down yet again.'
 								act 'Talk to Feofan':
@@ -1128,7 +1128,7 @@ if dimaRevChoice = 6:
 		!!fourth day in the hall!!
 		gs 'fame', 'pav', 'sex', 60
 		'<center><b><font color="maroon">School Hallway</font></b></center>'
-		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<Rand(0,2)>>.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<rand(0,2)>>.jpg"></center>'
 		'You see Artem in the hall talking with Ivan. When you greet him he says "Don''t worry, <<$pcs_nickname>>. I have a plan. I can''t talk about it now, though." Saying that he rushes off. What is he up to?'
 		act 'Continue': gt 'gschool_lessons', 'short_break'
 	end

+ 5 - 5
locations/gschool_lessons.qsrc

@@ -58,7 +58,7 @@ if $ARGS[0] = 'morning':
 		end
 	else
 		'<center><b><font color="maroon">School Hallway</font></b></center>'
-		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<Rand(0,2)>>.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<rand(0,2)>>.jpg"></center>'
 		'Walking down the halls, you barely notice the poor state of the school anymore, having grown used to it. Approaching your locker, you see several of your classmates and wave at them.'
 		act 'Go to first period': school_period = 0 & gt 'gschool_lessons', 'schedule'
 		act 'Skip first period': school_period = 1 & gt 'gschool_lessons', 'skip'
@@ -226,7 +226,7 @@ if $ARGS[0] = 'short_break':
 	if school_period = 2:
 		if $ARGS[1] ! 'nopict':
 			'<center><b><font color="maroon">School Hallway</font></b></center>'
-			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<Rand(0,2)>>.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<rand(0,2)>>.jpg"></center>'
 			nl
 			gs 'gschool', 'schedule'
 		end
@@ -234,7 +234,7 @@ if $ARGS[0] = 'short_break':
 	elseif school_period = 5:
 		if $ARGS[1] ! 'nopict':
 			'<center><b><font color="maroon">School Hallway</font></b></center>'
-			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<Rand(0,2)>>.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<rand(0,2)>>.jpg"></center>'
 			nl
 			gs 'gschool', 'schedule'
 		end
@@ -242,7 +242,7 @@ if $ARGS[0] = 'short_break':
 	elseif (school_period < 8):
 		if $ARGS[1] ! 'nopict':
 			'<center><b><font color="maroon">School Hallway</font></b></center>'
-			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<Rand(0,2)>>.jpg"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<rand(0,2)>>.jpg"></center>'
 			gs 'gschool_gossip', 'gossip'
 			nl
 			gs 'gschool', 'schedule'
@@ -260,7 +260,7 @@ if $ARGS[0] = 'short_break':
 		end
 	elseif Kuznetsov_punishment = 1:
 		'<center><b><font color="maroon">School Hallway</font></b></center>'
-		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<Rand(0,2)>>.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/building/gschool_hall0<<rand(0,2)>>.jpg"></center>'
 		act 'Go to Kuznetsov''s classroom': gt 'gschool_lessonsev2','shop_punishment'
 		act 'Leave the school': gt 'gschool_lessons', 'schedule'
 	else

+ 1 - 1
locations/igorev.qsrc

@@ -1996,7 +1996,7 @@ if $ARGS[0] = 'kruglov_desc':
 	*clr & cla
 	$ren_str  = '<center><font size=4><table cellspacing=0 cellpadding=0>'
 	$ren_str += '<tr><td align=center><b><font size=5> Igor Kruglov </font></b></td></tr>'
-	$ren_str += '<tr><td align=center><img <<$set_imgh>> src="/images/characters/shared/headshots_main/big4.jpg"></td></tr>'
+	$ren_str += '<tr><td align=center><img <<$set_imgh>> src="images/characters/shared/headshots_main/big4.jpg"></td></tr>'
 	$ren_str += '</table></font></center>'
 	*pl $ren_str
 end

+ 1 - 1
locations/katja_nightclub.qsrc

@@ -345,7 +345,7 @@ if $ARGS[0] = 'dance':
 	gs 'stat'
 	temp_rand = rand(0,20)
 	if temp_rand = 1:
-		'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/katja/uni/nightclub/disco_talking_on _dance_floor.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/katja/uni/nightclub/disco_talking_on__dance_floor.jpg"></center>'
 		'A song the Katja loves comes on and she starts singing the lyrics, and you join her.'
 		if katjaQW['drinks'] > 8:
 			'She is very drunk and it is basically just her shouting parts of the words very loud.'+iif( alko < 8 or pcs_vokal > 50, ' You at least manage to sing the correct lyrics.', ' But you are not doing any better.')+' At least'+iif( alko < 8, 'she is', 'you are')+' having fun.'

+ 2 - 2
locations/katja_nightclub_sex.qsrc

@@ -210,7 +210,7 @@ if $ARGS[0] = 'private_room1':
 								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 bows 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
@@ -297,7 +297,7 @@ if $ARGS[0] = 'private_room1':
 								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 bows 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

+ 1 - 1
locations/mey_home.qsrc

@@ -242,7 +242,7 @@ if $ARGS[0] = 'guest_bedroom':
 	act 'Return to the hallway':
 		if ($clothingworntype = 'nude' or PCloswimwear = 1):
 			*clr
-			'<center><img <<$set_imgh>> src="'+'images/pc/clothing/'+iif($pantyworntype = 'none','0','tanga')+'.jpg'+'"></center>'
+			'<center><img <<$set_imgh>> src="images/pc/clothing/'+iif($pantyworntype = 'none','0','tanga')+'.jpg"></center>'
 			*nl
 			'<center><font color=red><b>You can''t go out dressed like this!</b></font></center>'
 			exit

+ 22 - 22
locations/mey_vika_events.qsrc

@@ -166,7 +166,7 @@ if $ARGS[0] = 'play_game_wish0':
 
 			act 'Further':
 				*clr & cla
-				'<center><video autoplay loop src="'+'images/characters/pavlovsk/school/girl/vicky/event/vika_game2.mp4'+'"></video></center>'
+				'<center><video autoplay loop src="images/characters/pavlovsk/school/girl/vicky/event/vika_game2.mp4"></video></center>'
 				'Opening your eyes, you are astonished to see that it''s Vicky who''s been teasing you! She smiles at you while removing your panties. She eagerly begins licking you, sending shivers all over your body. You start panting, edging, ready to cum. Vicky noticing you nearing the edge intensifies her tongue movements. All of a sudden you feel her tongue moving more erratically, somewhat disturbing the pleasant feeling. You look up and see Vanya, moving in from behind, pushing his cock into Vicky. Vicky can''t keep on licking you and instead she starts moaning loudly, clearly enjoying Vanya''s cock. Not wanting to lose your orgasm you grab her by the head and drag her face towards your pulsating pussy. She comes to her senses again and starts licking you. Vicky''s tongue is so skillful you cum like a fountain all over her face.'
 				$orgasm_or = 'yes'
 				gs 'arousal', 'cuni', 5, 'lesbian'
@@ -176,7 +176,7 @@ if $ARGS[0] = 'play_game_wish0':
 				act 'Further':
 					gs 'boyStat', 'A165'
 					*clr & cla
-					'<center><video autoplay loop src="'+'images/characters/pavlovsk/school/girl/vicky/event/vika_game3.mp4'+'"></video></center>'
+					'<center><video autoplay loop src="images/characters/pavlovsk/school/girl/vicky/event/vika_game3.mp4"></video></center>'
 					'Your orgasm is so good that you''re still shaking several minutes after you''ve cum. Vanya grabs hold of you and pushes you onto Vicky''s bed, where she''s already waiting.'
 					'The two of you kiss, while Vicky is caressing Vanyas cock. Vicky pushes your head down towards Vanyas cock, making you go down on him. You suck on his head while Vicky sucks on his balls. Vanya panting a bit starts touching Vicky between her legs, getting her ready for his cock again. She starts moaning loudly, already edging. Vanya moves in and enters her wet pussy while you move over to the front playing with her nipples...'
 					'Vanya, enjoying himself starts pounding Vicky harder and harder while she moans louder and louder. All of a sudden Vanya stops and pulls out of her and lustfully stares at you, saying it''s your turn now. You let out a moan as he enters you. His cock is stretching your insides, making you even hornier. You hear him panting louder, his cock growing and throbbing. All of a sudden you feel something warm jetting inside you.'
@@ -193,7 +193,7 @@ if $ARGS[0] = 'play_game_wish0':
 
 					act 'Further':
 						*clr & cla
-						'<center><video autoplay loop src="'+'images/characters/pavlovsk/school/girl/vicky/event/vika_game4.mp4'+'"></video></center>'
+						'<center><video autoplay loop src="images/characters/pavlovsk/school/girl/vicky/event/vika_game4.mp4"></video></center>'
 						'The three of you lie down, exhausted, interwoven in an intricate sweaty tangle, slowly cooling off.'
 						'All of a sudden you hear a gentle knock on the door.'
 						'You hear the voice of Vicky''s mother...'
@@ -222,7 +222,7 @@ if $ARGS[0] = 'play_game_wish1':
 	zz_stage = args[1]
 	gs 'stat'
 	if zz_stage < 1:
-		'<center><video autoplay loop src="'+'images/characters/pavlovsk/school/girl/vicky/event/vika_game_strip0.mp4'+'"></video></center>'
+		'<center><video autoplay loop src="images/characters/pavlovsk/school/girl/vicky/event/vika_game_strip0.mp4"></video></center>'
 		'"You''ve won, <<$pcs_nickname>>. Pick your prize." Says Vicky.'
 		'You start thinking...'
 		'"Hmm... Can I pick anything? Anything I want?"'
@@ -377,7 +377,7 @@ if $ARGS[0] = 'play_game_wish3':
 	menu_off = 1
 	$location_type = 'event'
 	if mey_vika['mey_vika_qw'] < 27 and mey_vika['qw_day'] ! daystart: mey_vika['mey_vika_qw'] += 1
-	'<center><video autoplay loop src="'+'images/characters/pavlovsk/school/girl/vicky/event/vika_game_kiss.mp4'+'"></video></center>'
+	'<center><video autoplay loop src="images/characters/pavlovsk/school/girl/vicky/event/vika_game_kiss.mp4"></video></center>'
 	'"You Lost! You Lost!" sings Vicky. "Now let''s see, what do I want? I want... I want... I want you to make out with Vanya! A real kiss, not a little pecker! And don''t forget using your tongue!"'
 	'"Well, I lost, and will have to fulfill my promise." You lean to Vanya kissing him on the lips. Kissing someone else''s boyfriend fills you with excitement. Your private parts start pulsating, the juices start flowing and you feel your panties getting wet. His tongue intertwines in your mouth, you suck each other lips. Vanya holds you close to him and can you feel his erect cock pressing against you. You begin grabbing his ass, and at the end of your make out session you bite his lip.'
 	'Vicky heartily applauds.'
@@ -550,7 +550,7 @@ if $ARGS[0] = 'park_meet':
 			*nl
 		elseif mey_vika['mey_vika_park_action'] = 1:
 			'<center><h2>Pavlovsk Park</h2></center>'
-			'<center><img <<$set_imgh>> src="'+'images/locations/pavlovsk/resident/meynolds/sex/vika_park_kiss_'+iif(month>10 or month<4,'winter','summer')+'.jpg'+'"></center>'
+			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/meynolds/sex/vika_park_kiss_'+iif(month>10 or month<4,'winter','summer')+'.jpg"></center>'
 			*nl
 		elseif mey_vika['mey_vika_park_action'] = 2:
 			'<center><h2>Pavlovsk Park</h2></center>'
@@ -1197,13 +1197,13 @@ if $ARGS[0] = 'case_gift':
 		zz_stage = args[1]
 		if zz_stage < 2:
 			*clr & cla
-			'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift0.jpg'+'"></center>'
+			'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift0.jpg"></center>'
 			'Passing by Vicky''s room, you hear some muffled voices coming from behind the door. Vicky and Vanya are making a commotion, laughing.'
 
 			act 'Pass by': gs 'mey_vika_events', 'case_gift_ender'
 			act 'Listen':
 				*clr & cla
-				'<center><video autoplay loop src="'+'images/characters/pavlovsk/school/girl/vicky/event/case_gift1.mp4'+'"></video></center>'
+				'<center><video autoplay loop src="images/characters/pavlovsk/school/girl/vicky/event/case_gift1.mp4"></video></center>'
 				'Your curiosity gets the best of you and you stop by the door, trying to figure out what''s happening. You can''t hear them that well, and you can''t really figure out what they''re talking about.'
 
 				act 'Move on': gs 'mey_vika_events', 'case_gift_ender'
@@ -1212,7 +1212,7 @@ if $ARGS[0] = 'case_gift':
 		else
 			*clr & cla
 			if zz_stage < 14:
-				'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift2.jpg'+'"></center>'
+				'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift2.jpg"></center>'
 				'You can''t see anything, and you hesitate for a moment, afraid of getting caught. You push the door a little harder, hoping "that the door better not make a sound...". It moves silently, and you look through to the gap again.'
 				'The view is much better now.'
 				'You see Vicky, looking through the linen closet, and hear Vanya''s voice.'
@@ -1223,19 +1223,19 @@ if $ARGS[0] = 'case_gift':
 				act 'Further':
 					*clr
 					cla
-					'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift3.jpg'+'"></center>'
+					'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift3.jpg"></center>'
 					'She sits down on the chair, and almost instantly, notices you.'
 
 					act 'Further':
 						*clr
 						cla
-						'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift4.jpg'+'"></center>'
+						'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift4.jpg"></center>'
 						'She tries to settle in the chair but can''t seem to find the sweet spot. "This chair is a real a pain in the ass!" she grins at you.'
 
 						act 'Further':
 							*clr
 							cla
-							'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift5.jpg'+'"></center>'
+							'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift5.jpg"></center>'
 							'You can hear her clearly now. Vicky doesn''t seem to mind that you were spying on them.'
 							'Dangling her legs in the air, she grabs a large white Teddy bear and presses it to her.'
 							'"Since you don''t seem to love me, my new boyfriend will have to do instead." She says and pulls out a... dildo.'
@@ -1244,31 +1244,31 @@ if $ARGS[0] = 'case_gift':
 							act 'Further':
 								*clr
 								cla
-								'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift6.jpg'+'"></center>'
+								'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift6.jpg"></center>'
 								'You''ve never fantasized about Vicky in that way. However, now that there''s a chance of it happening, your head is spinning, wild with possibilities.'
 
 								act 'Further':
 									*clr
 									cla
-									'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift7.jpg'+'"></center>'
+									'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift7.jpg"></center>'
 									'She starts by removing her t-shirt and places the dildo in the bear''s paws.'
 
 									act 'Further':
 										*clr
 										cla
-										'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift8.jpg'+'"></center>'
+										'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift8.jpg"></center>'
 										'Shortly thereafter she removes her shorts. As usual, Vicky rarely bothers wearing underwear.'
 
 										act 'Further':
 											*clr
 											cla
-											'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift9.jpg'+'"></center>'
+											'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift9.jpg"></center>'
 											'She reaches for the Teddy bear, sliding it down her body and sticks the dildo between her legs.'
 
 											act 'Further':
 												*clr
 												cla
-												'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift10.jpg'+'"></center>'
+												'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift10.jpg"></center>'
 												'"Look how good my new boyfriend pleases me."'
 												'She glances at Vanya mischievously, as she begins licking the dildo.'
 												'The spectacle is turning you on and you can feel your pussy pulsating a bit.'
@@ -1276,19 +1276,19 @@ if $ARGS[0] = 'case_gift':
 												act 'Further':
 													*clr
 													cla
-													'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift11.jpg'+'"></center>'
+													'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift11.jpg"></center>'
 													'Vicky, spreading her legs mischievously, grabs the bear once again, then leads the dildo to her mouth and begins sucking it, bopping her head up and down.'
 
 													act 'Further':
 														*clr
 														cla
-														'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift11.jpg'+'"></center>'
+														'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift11.jpg"></center>'
 														'Looking at Vicky playing around with the teddy bear is turning you on. Your juices are flowing and your panties are wet. You begin touching yourself, your pussy is hot and wet. Not being able to withstand, you start masturbating while still spying.'
 
 														act 'Further':
 															*clr
 															cla
-															'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift13.jpg'+'"></center>'
+															'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift13.jpg"></center>'
 															'Vicky looks at you, not wanting to waste any time, she embraces the plush toy, slides the dildo up and down her pussy lips, lubing it up, and then thrusts it deep into her pussy.'
 
 															act 'Further':
@@ -1296,7 +1296,7 @@ if $ARGS[0] = 'case_gift':
 																cla
 																pcs_horny = 100
 																minut += 10
-																'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift14.jpg'+'"></center>'
+																'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift14.jpg"></center>'
 																'You knees are tremble as you approach an orgasm, but then all of a sudden you hear footsteps coming up the stairs, Tamara was apparently still awake, watching TV. You hastily retreat to avoid getting caught at the crime scene.'
 
 																act 'Quickly return to your room': mey_vika['mey_vika_qw'] = 31 & gs 'mey_vika_events', 'case_gift_ender'
@@ -1330,7 +1330,7 @@ if $ARGS[0] = 'learning0':
 		*clr & cla
 		minut += 5
 		mey_vika['qw_day'] = daystart
-		'<center><img <<$set_imgh>> src="'+'images/characters/pavlovsk/school/girl/vicky/sex/case_gift0.jpg'+'"></center>'
+		'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/vicky/sex/case_gift0.jpg"></center>'
 		'You walk around the house, hearing the voices of aunt Tamara, Vanya and Vicky. They''re whispering something, trying to explain how Vicky should carry herself. The door is closed but not locked.'
 		'Your curiosity comes over you and you sneak up to the door wanting to eavesdrop.'
 

+ 1 - 1
locations/mirror.qsrc

@@ -719,7 +719,7 @@ if $ARGS[0] = 'd_bag_mirror':
 	*clr & cla
 	gs 'stat'
 	'<center><h1>Compact Mirror</h1></center>'
-	'<center><img <<$set_imgh>> src="/images/pc/items/mirror_compact.jpg"></center>'
+	'<center><img <<$set_imgh>> src="images/pc/items/mirror_compact.jpg"></center>'
 	'<center><table cellspacing="0" cellpadding="20" valign="top"><tr>'
 	'<td cellspacing="0" cellpadding="0" valign="top">'
 	'You have '+iif(mc_inventory['travel_makeup'] > 0, '<b><<mc_inventory[''travel_makeup'']>></b>', 'no')+' cosmetic applications and '+iif(mc_inventory['makeup_wipes'] > 0, '<b><<mc_inventory[''makeup_wipes'']>></b>', 'no')+' tissues left in your purse.'

+ 2 - 3
locations/pav_lake_nude_forest.qsrc

@@ -48,9 +48,8 @@ if temper >= 20 and month >= 5 and month <= 9 and hour >= 6 and hour <= 20:
 				gs 'willpower', 'pay', 'self'
 				gs 'arousal', 'voyeur', 10
 				voyeurism += 1
-				kol_foto_piss = 169
-				viewforestpiss = rand(1,kol_foto_piss)
-				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/lake/secluded_beach/piss_forest/piss_forest_<<rand(1,kol_foto_piss)>>.jpg"></center>'
+				viewforestpiss = rand(1, 169)
+				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/lake/secluded_beach/piss_forest/piss_forest_<<viewforestpiss>>.jpg"></center>'
 				'You slip behind a tree and watch as a cute girl looks for a private spot to do her business. She finally decides on a patch of dirt near some bushes and squats down. You peek your head around the tree for a better look as the girl finds her balance and appears to relax. A stream of urine begins to flow from her and you hear a light moan escape her mouth.'
 				act'Go back': gt 'pav_lake_nude_forest'
 			end

+ 1 - 1
locations/pav_shared_nestor.qsrc

@@ -1167,7 +1167,7 @@ if $ARGS[0] = 'nestor_SexAnal':
 			act 'Let him continue':subStep = 1 & gt 'pav_shared_nestor', 'nestor_SexAnal'
 		elseif subStep = 1:
 			minut += 10
-			'<center><video autoplay loop src="/images/locations/shared/abduction/sex/slavewhorefuckanal5.mp4"></video></center>'
+			'<center><video autoplay loop src="images/locations/shared/abduction/sex/slavewhorefuckanal5.mp4"></video></center>'
 			''
 			'As he continuously and wildly rams your anus, you have no strength to do anything but endure it and moan like an injured pig.'
 			'<<$npc_firstname[$boy]>> now rams you as deep as he can, all his npc_dick[$boy] centimeters are inside you.'

+ 2 - 2
locations/swamp.qsrc

@@ -101,9 +101,9 @@ if $ARGS[0] = 'stuck':
 					elseif $clothingworntype = 'nude':
 						swamprand = rand(0,3)
 						if swamprand = 0:
-							'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/goswamp_nude0... jpg"></center>'
+							'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/goswamp_nude0..jpg"></center>'
 						else
-							'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/goswamp_nude0.'+swamprand+'.jpg"></center>'
+							'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/goswamp_nude0.'+rand(1,3)+'.jpg"></center>'
 						end
 					end
 					*nl

+ 12 - 12
locations/uni_lessons_electivesev1.qsrc

@@ -51,7 +51,7 @@ if $ARGS[0] = 'computers_101':
 		act 'Wait for the end of the lesson': gt 'uni_lessons', 'short_break'
 		act 'Wait for Anushka': gt 'uni_lessons_electivesev1', 'comp_nush'
 	elseif temp = 11:
-		'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril1.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl1.jpg"></center>'
 		if anushkaQW['djibril_sex'] >= 1:
 			'The class is pretty uneventful for the most part, but you notice Djibril sat next to Anushka. He''s flirting with her, but she''s really making him work for her attention, which you find a little amusing.'
 			'As Mr. Blagov finishes his lecture, he informs the class that he won''t be able to stay after to help anyone and if someone needs to ask him something, then they should come and see him in his office later or wait for the next class.' 
@@ -65,12 +65,12 @@ if $ARGS[0] = 'computers_101':
 				act 'Leave': gt 'uni_lessons', 'short_break'
 				act 'Peek':
 					*clr & cla
-					'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril2.jpg"></center>'
+					'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl2.jpg"></center>'
 					'You crack the door open and peek in. The two of them are seated back in their seats and seem to be talking about the computer, but you notice their overly flirting body language and that Anushka is sitting facing Djibril in a fairly short skirt with her legs spread wide enough for him to see her panties.'
 					act 'Leave': gt 'uni_lessons', 'short_break'
 					act 'Keep watching':
 						*clr & cla
-						'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril3.jpg"></center>'
+						'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl3.jpg"></center>'
 						'As you keep watching, you see Anushka turn to a notebook on her desk, apparently telling him about the notes she''s taken. Djibril unbuttons his pants and pulls his rather large and very thick dick out and starts stroking it, causing it to become hard very quickly. As he''s doing this, Anushka turns back to face him. She makes a squeaking noise and covers her mouth partially with her hands in surprise, but she doesn''t seem to be offended or upset. in fact, she''s grinning from ear to ear. You can just make out Djibril saying "Come on, suck my dick."'
 						'Anushka glances around and you duck back from the door. "What if someone comes back?" she asks as you peek back in.'
 						'Djibril grins. "No one is coming back, but getting caught is part of the thrill. Even if they did, so what? They''ll just see a pretty little thing like you sucking my big black dick. Come on, I know you want to..."'
@@ -79,14 +79,14 @@ if $ARGS[0] = 'computers_101':
 						act 'Leave': gt 'uni_lessons', 'short_break'
 						act 'Keep watching':
 							*clr & cla
-							'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril4.jpg"></center>'
+							'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl4.jpg"></center>'
 							'It doesn''t take a lot of convincing as Anushka slides off her chair and onto her knees in front of Djibril before taking his thick cock into her mouth and sucking it. He moans softly as she does and leans back enjoying it. You can faintly hear the slurping sounds of her mouth on his cock and it seems like she''s looking in your direction a few times, making you wonder if she''s spotted you.'
 							gs 'arousal', 'voyeur_sex', 3
 							gs 'stat'
 							act 'Leave': gt 'uni_lessons', 'short_break'
 							act 'Keep watching':
 								*clr & cla
-								'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril5.jpg"></center>'
+								'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl5.jpg"></center>'
 								'Anushka starts playing with her breasts as she bobs her head up and down on Djirbil''s dick. "Fuccck... You''re amazing at this," he moans out fairly loudly, which only encourages her to redouble her efforts and pick up the pace, making even more wet slurping sounds as she takes his cock deep into her mouth. "Oh, fuck yeah, just like that..." he moans out.' 
 								'She then pops his dick out of her mouth and gets off her knees. "My turn," she says as she sits on the table.'
 								gs 'arousal', 'voyeur_sex', 2
@@ -94,35 +94,35 @@ if $ARGS[0] = 'computers_101':
 								act 'Leave': gt 'uni_lessons', 'short_break'
 								act 'Keep watching':
 									*clr & cla
-									'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril6.jpg"></center>'
+									'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl6.jpg"></center>'
 									'Anushka sits on the table and spreads her legs wide while pulling her panties aside to expose her pussy. Djibril gets down on his knees in front of her and starts licking her pussy as she moans loudly and her hand slides up to the back of his head, forcing his face into her pussy as she grinds against him.'
 									gs 'arousal', 'voyeur_sex', 2
 									gs 'stat'
 									act 'Leave': gt 'uni_lessons', 'short_break'
 									act 'Keep watching':
 										*clr & cla
-										'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril7.jpg"></center>'
+										'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl7.jpg"></center>'
 										'He stops going down on her and stands up. He takes off her shirt and bra, leaving her small breasts on full display as he pushes her skirt up around her waist and pulls her panties off before grabbing her legs and spreading them apart. He rubs the tip of his dick against her pussy and then slides it in, causing her to moan loudly as he starts fucking her.'
 										gs 'arousal', 'voyeur_sex', 2
 										gs 'stat'
 										act 'Leave': gt 'uni_lessons', 'short_break'
 										act 'Keep watching':
 											*clr & cla
-											'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril8.jpg"></center>'
+											'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl8.jpg"></center>'
 											'Anushka starts rubbing her clit as Djibril thrusts his cock balls deep into her over and over. "Oh... Fuck... Yes... Tear my little white pussy up. With your huge black cock... Fuck... Yes!" The louder she moans and the more she gets into it, the faster and harder he thrusts into her. After a few minutes, he pulls all the way out of her. "Oh fuck... Don''t stop... Slide that massive cock back in..." she pleads with him.'
 											gs 'arousal', 'voyeur_sex', 3
 											gs 'stat'
 											act 'Leave': gt 'uni_lessons', 'short_break'
 											act 'Keep watching':
 												*clr & cla
-												'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril9.jpg"></center>'
+												'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl9.jpg"></center>'
 												'Instead, he manhandles her and flips her over onto her stomach, then pulls her up into a standing position, only to roughly push her forward at her back, making her partially bend over in front of him. He slides the tip of his dick back to her wet slit, then keeps going up to her asshole. "I''m going to rip that tight little asshole of yours apart with my big black dick." You can tell his words turn her on as he slides his cock into her asshole. She gasps in a mix of pain and pleasure as he starts fucking her asshole, but it quickly turns into full pleasure.'
 												gs 'arousal', 'voyeur_sex', 2
 												gs 'stat'
 												act 'Leave': gt 'uni_lessons', 'short_break'
 												act 'Keep watching':
 													*clr & cla
-													'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril10.jpg"></center>'
+													'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl10.jpg"></center>'
 													'"OH GOD! You''re so big... Oh fuck..." she moans as he thrusts his thick dick deeper and deeper into her ass.'
 													'Djibril slaps her ass. "Yeah, that''s right. You love my big black cock in your ass, don''t you?" he says while slapping her ass. "You just love it when you have a black dick balls deep in your ass. Tell me how much you love it."'
 													'The more he talks dirty to her, the more turned on she looks and the more she gets into it. "Yes... I love big black cocks... In my tight little... White ass..."'
@@ -131,7 +131,7 @@ if $ARGS[0] = 'computers_101':
 													act 'Leave': gt 'uni_lessons', 'short_break'
 													act 'Keep watching':
 														*clr & cla
-														'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril11.jpg"></center>'
+														'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl11.jpg"></center>'
 														'"Fuck, your ass is tight!" he says as he slaps her ass again.'
 														'"Ohhh... Your cock... Is so big..." she moans as he keeps fucking her.'
 														'He starts to grunt and thrust even harder into her ass. "Just think. Anyone could walk in and see you taking a big black cock, balls deep in your ass while you''re loving it."'
@@ -141,7 +141,7 @@ if $ARGS[0] = 'computers_101':
 														act 'Leave': gt 'uni_lessons', 'short_break'
 														act 'Keep watching':
 															*clr & cla
-															'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibril12.jpg"></center>'
+															'<center><img <<$set_imgh>> src="images/characters/pavlovsk/school/girl/anushka/sex/uni/classroom/comp_djibirl12.jpg"></center>'
 															'He suddenly pulls his dick out of her ass and she quickly gets down on her knees. As soon as she''s on her knees in front of him, he starts jerking off and almost immediately starts cumming over her face. Once he finishes cumming on her, he slips his dick away. "That was amazing. We should totally do that again," he says with a grin.'
 															'She grabs her purse and gets some tissues to start cleaning up her face. "Maybe if you''re a good boy," she says in a snarky, teasing tone.'
 															*nl

+ 164 - 112
tools/check_missing_media.py

@@ -1,41 +1,42 @@
 import os
 import re
+from collections import defaultdict
 
-#made by Awesome :peeposhrug:
+# made by Awesome
 
-script_directory = os.path.dirname(os.path.realpath(__file__))
-text_path = os.path.dirname(script_directory)
-qsrc_directory = os.path.join(text_path, 'locations')
+# Get the main directory path where the tools folder is located
+main_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+qsrc_dir = os.path.join(main_dir, "locations")
+# Set the text_path to the main directory
+text_path = main_dir
+
+# Get the game directory from the user
 image_directory = input('Enter the game directory: ')
-keywords = input('Enter keywords to exclude (comma-separated, press Enter to skip): ')
 
-keywords_to_exclude = keywords.split(',')
+# Ensure image_directory ends with a '/'
+if not image_directory.endswith('/'):
+    image_directory += '/'
 
-# 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']
+# Check if the user entered the images folder path instead of the game directory
+if image_directory.lower().endswith('images/'):
+    image_directory = os.path.dirname(os.path.dirname(image_directory))
 
-def exclude_keywords(image_path, keywords):
-    for keyword in keywords:
-        if keyword and keyword.lower() in image_path.lower():
-            return True
-    return False
+# Remove the 'images' subfolder from image_directory only if it's there
+if os.path.basename(image_directory.rstrip('/')).lower() == 'images':
+    image_directory = os.path.dirname(image_directory.rstrip('/'))
 
-keywords_to_exclude.append('$pcs_haircol')
-keywords_to_exclude.append('set_<<')
-keywords_to_exclude.append('+iif')
-keywords_to_exclude.append('<<FUNC')
+# Define keywords to exclude from media paths
+keywords_to_exclude = ['$pcs_haircol', 'pharma_picrand', 'mitkapicrand', '<<sex_ev[', '$epayments', '<<npc_apt_number', 'lover_picture[lover_number]', '<<lover_picrand[$boy]>>', '$_color', '<<masseuse', 'dress_', 'FUNC(', 'pants_', '<<pirs', '<<$phonetheme_name[pcs_phonetheme]>>', '$ARGS', '+iif', '<<BDSMmeet>>', 'kamasutra_page', '<<$']
 
-# 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\\", ""))
+# Create a list to store missing media (images and videos)
+missing_media = []
 
-# Function to evaluate and replace random expressions within a string
+# Function to evaluate and replace random expressions while preserving existing single quotes or '+' operators
 def evaluate_and_replace_random(expression):
-    image_paths = []
+    media_paths = []
 
-    # Define a regular expression pattern to find '+rand(...)' or '<<rand(...)>>' expressions
-    rand_pattern = r'(\+\s*rand\(([^)]*)\)\s*\+|\s*<<rand\(([^)]*)\)>>)'
+    # Define a regular expression pattern to find expressions like ' + rand(...) + ' or "'+rand(...)+'" or '<<rand(...)>>'
+    rand_pattern = r'(["\']?)\s*([\+\-]?)\s*(<<)?rand\s*\(\s*(\d+)\s*,\s*(\d+)\s*\)(>>)?\s*([\+\-]?)\s*(["\']?)'
 
     # Find all matching expressions in the input string
     matches = re.finditer(rand_pattern, expression)
@@ -45,113 +46,164 @@ def evaluate_and_replace_random(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)])
+        start_quote, start_operator, _, min_value, max_value, _, end_operator, end_quote = match.groups()
+        min_value = int(min_value)
+        max_value = int(max_value)
+
+        if min_value <= max_value:
+            # Generate media paths for each number in the range
+            for num in range(min_value, max_value + 1):
+                # Create a copy of the modified expression
+                temp_expression = modified_expression
 
-        # Replace the match in the expression with a placeholder
-        modified_expression = modified_expression.replace(match.group(0), '<REPLACED>')
+                # Replace the 'rand' expression with the current number
+                replacement = (start_operator if start_operator else '') + str(num) + (end_operator if end_operator else '')
+                if start_quote and start_quote == end_quote:
+                    replacement = replacement.strip("'")
+                    replacement = replacement.strip("+")
 
-    # Remove single quotes and extra spaces
-    modified_expression = modified_expression.replace("'", "").strip()
-    modified_expression = modified_expression.replace(" ", "")
+                temp_expression = temp_expression[:match.start()] + replacement + temp_expression[match.end():]
+                media_paths.append(temp_expression)
 
-    # Add the generated image paths to the result
-    image_paths = [modified_expression.replace('<REPLACED>', str(num)) for num in image_paths]
+    # If no random evaluations were found, return the original expression
+    if not media_paths:
+        media_paths = [modified_expression]
+
+    return media_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:], "")
+            variable_value = variables.get(variable_name[1:], None)
         else:
-            variable_value = variables.get(variable_name, "")
+            variable_value = variables.get(variable_name, None)
+            # Check if the variable value is a 'rand' function
+            if isinstance(variable_value, str) and 'rand(' in variable_value:
+                # Evaluate the 'rand' function
+                variable_value = evaluate_and_replace_random(variable_value)[0]
+        if variable_value is None:
+            return None
         expression = expression.replace(f"<<{variable_name}>>", str(variable_value))
     return [expression]
 
+# Initialize an empty dictionary to store variable values
+variables = {}
+
 # 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:
+for file in os.listdir(qsrc_dir):
+    if file.endswith(".qsrc"):
+        qsrc_file = os.path.join(qsrc_dir, file)
+
+        # Read the .qsrc file
+        with open(qsrc_file, "r", encoding="utf-8", errors="ignore") as script_file:
+            script_content = script_file.readlines()
+
+        # Initialize a dictionary to store the 'rand' variables and their expressions
+        rand_variables = {}
+
+        # Define a regular expression pattern to find 'rand' variable assignments
+        rand_assignment_pattern = r'<<(\$?[a-zA-Z_][a-zAZ0-9_]*)>>\s*=\s*(rand\(\d+,\s*\d+\))'
+
+        # Iterate through the script content to find and store 'rand' variable assignments
+        for line_number, line in enumerate(script_content, start=1):
+            matches = re.findall(rand_assignment_pattern, line)
+            for match in matches:
+                variable_name, rand_expression = match
+                rand_variables[variable_name.strip()] = rand_expression.strip()
+
+        # Iterate through each line in the .qsrc file
+        for line_number, line in enumerate(script_content, start=1):
+            # Check if the line contains a variable assignment
+            if "=" in line and "<<" in line and ">>" in line:
+                # Find all matches of the regular expression in the line
+                matches = re.findall(r'<<(\$?[a-zA-Z_][a-zAZ0-9_]*)>>\s*=\s*([\'"]?[^\'"]+[\'"]?)', line)
+                # Check if there are any matches
+                if matches:
+                    # Split the line into a variable name and value
+                    variable_name, variable_value = matches[0]
+                    # Check if the variable value contains a 'rand' function
+                    if "rand(" in variable_value:
+                        # Evaluate the 'rand' function
+                        variable_value = evaluate_and_replace_random(variable_value)[0]
+                    # Store the variable value in the dictionary with the filename and line number as the key
+                    variables[(qsrc_file, line_number)] = {variable_name.strip(): variable_value.strip("'\"")}
+
+            # Use regular expressions to find media references in the script
+            if line.strip().startswith('!') or '<<FUNC' in line:
+                continue
+            media_references = re.findall(r'<(?:img.*?|video.*?)src="([^"]+)"', line)
+
+            for media_reference in media_references:
+                if any(keyword in media_reference for keyword in keywords_to_exclude):
                     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):
+                # Special rules
+                media_reference = media_reference.replace("lover_picrand", 'rand(1, 30)')
+                media_reference = media_reference.replace("modelfoto[''debut_image'']+1", 'rand(1, 9)')
+                media_reference = media_reference.replace("modelfoto[''debut_image'']+2", 'rand(1, 9)')
+                media_reference = media_reference.replace("modelfoto[''debut_image'']", 'rand(1, 9)')
+                media_reference = media_reference.replace("zz_stage", 'rand(0, 7)')
+                media_reference = media_reference.replace("VKWoods", 'rand(0, 8)')
+                media_reference = media_reference.replace("metrorand['rand']", 'rand(1, 2)')
+                media_reference = media_reference.replace("picpRand", 'rand(1, 20)')
+                media_reference = media_reference.replace("Doublerand", 'rand(14, 15)')
+
+                # Find the variable assignment that is closest to (but above) the media reference
+                relevant_variables = max(((k, v) for k, v in variables.items() if k[0] == qsrc_file and k[1] < line_number), key=lambda item: item[0][1], default=({}, {}))[1]
+
+                # Evaluate variables first
+                media_reference = evaluate_and_replace_variables(media_reference, relevant_variables)
+                if media_reference is None:
+                    continue
+                media_reference = media_reference[0]
+
+                # Use regular expression to identify and replace variables set with rand in the image path
+                variable_references = re.findall(r'<<(\$?[a-zA-Z_][a-zAZ0-9_]*)>>', media_reference)
+                for variable_reference in variable_references:
+                    if variable_reference in rand_variables:
+                        rand_expression = rand_variables[variable_reference]
+                        media_reference = media_reference.replace(f"<<{variable_reference}>>", str(eval(rand_expression)))
+
+                media_paths = evaluate_and_replace_random(media_reference)
+
+                for path in media_paths:
+                    if any(keyword in path for keyword in 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)
+                    absolute_path = os.path.join(image_directory, path)
+
+                    # Check if the path is a directory
+                    if os.path.isdir(absolute_path) and not os.listdir(absolute_path):
+                        missing_media.append((os.path.basename(qsrc_file), path, line_number))
+
+                    elif not os.path.exists(absolute_path):
+                        missing_media.append((os.path.basename(qsrc_file), path, line_number))
 
 # 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
+# Convert the list to a set to remove duplicates, then convert it back to a list
+missing_media = [i for n, i in enumerate(missing_media) if i not in missing_media[n + 1:]]
+
+# Create a dictionary to store the file name, media path and line numbers
+missing_media_dict = defaultdict(list)
+
+for qsrc_file, media_path, line_number in missing_media:
+    # Use the file name and media path as the key, and append the line number to the list of values
+    missing_media_dict[(qsrc_file, media_path)].append(line_number)
+
+# Write the dictionary 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.")
+    for (qsrc_file, media_path), line_numbers in missing_media_dict.items():
+        # Join the line numbers with commas
+        line_numbers_str = ", ".join(map(str, line_numbers))
+        file.write(f"From file: {qsrc_file}, lines: {line_numbers_str}\n")  # Write the .qsrc filename and line numbers
+        file.write(f"{media_path}\n\n")  # Write the full media path and start a new line
+    file.write(f"\nTotal missing media files: {len(missing_media_dict)}\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"{len(missing_media_dict)} Missing media files have been saved to 'missing_media.txt'.")
+pause = input("Press Enter to exit.")
+