slanon před 4 roky
rodič
revize
1d13b9bb52

+ 3 - 6
locations/bed.qsrc

@@ -4,12 +4,10 @@ if $ARGS[0] = 'start':
 	*clr
 	menu_off = 1
 	shour = 24 - hour
-	houserabrand = rand(0, 100)
-	housevorrand = rand(0, 200)
 	gs 'stat'
 
-	if hour > 22 and houserabrand < 2 and houserab = 1 and houserabday ! daystart and pcs_sleep < 50 and tanhouse1 = 1:gt 'bed', 'rab'
-	if hour > 22 and housevorrand = 0 and housrA = 1 and husband = 0:gt 'bed', 'vor'
+	if hour > 22 and rand(0, 100) < 2 and houserab = 1 and houserabday ! daystart and pcs_sleep < 50 and tanhouse1 = 1:gt 'bed', 'rab'
+	if hour > 22 and rand(0, 200) = 0 and housrA = 1 and husband = 0:gt 'bed', 'vor'
 
 	gt 'bed2'
 end
@@ -380,7 +378,6 @@ if $ARGS[0] = 'vor2':
 			act 'Up':
 				cla
 				*clr
-				picrand = 38
 				orgasm += 1
 				gs 'npcgeneratec', 0, 'Rapist', rand(18,40)
 				$boy[0] = $npclastgenerated
@@ -400,7 +397,7 @@ if $ARGS[0] = 'vor2':
 				minut -= 15
 				gs 'stat'
 			
-				act 'Continue':xgt 'sexdvoe', 'var'
+				act 'Continue': picrand = 38 & xgt 'sexdvoe', 'var'
 			end
 		end
 	elseif pcs_apprnc < 120:

+ 1 - 2
locations/bedr.qsrc

@@ -209,8 +209,7 @@ if sick >= 1:
 		if sick < 0:sick = 0
 
 		gs 'stat'
-		picrand = rand(11, 17)
-		'<center><img <<$set_imgh>> src="images/locations/shared/apartment/event/sick/sick<<picrand>>.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/shared/apartment/event/sick/sick<<rand(11, 17)>>.jpg"></center>'
 		'You are lying in bed, coughing, sneezing and blowing your nose'
 
 		act 'Measure temperature':gt 'bedr'

+ 1 - 2
locations/bedr2x.qsrc

@@ -193,8 +193,7 @@ if sick >= 1:
 		sick = sick - 1
 		if sick < 0:sick = 0
 		gs'stat'
-		picrand = RAND(11,17)
-		'<center><img <<$set_imgh>> src="images/locations/shared/apartment/event/sick/sick<<picrand>>.jpg"></center>'
+		'<center><img <<$set_imgh>> src="images/locations/shared/apartment/event/sick/sick<<rand(11,17)>>.jpg"></center>'
 
 		'You lie in bed, coughing, sneezing and blowing your nose'
 

+ 11 - 10
locations/bedrPar.qsrc

@@ -81,16 +81,17 @@ if popugai2 = 1:
 	if daystart - parbuydate > 55 and saveparQW < 3: 'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>Yeah <<$npc_firstname[''A33'']>>  your pussy tastes great</b>"'
 	if saveparQW = 3:
 		parfixrand = rand(0,9)
-		if parfixrand = 0:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>What Did You Say To Me?</b>"'
-		if parfixrand = 1:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>3.1415926535897932384 ....</b>"'
-		if parfixrand = 2:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>Come Closer, My Friend</b>"'
-		if parfixrand = 3:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>Here Kitty, Kitty!</b>"'
-		if parfixrand = 4:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>I Just Met You and This is Crazy</b>"'
-		if parfixrand = 5:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>Bow Before Me!</b>"'
-		if parfixrand = 6:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>He’s Just a Friend, Honest!</b>"'
-		if parfixrand = 7:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>What Did You Do To My Socks?</b>"'
-		if parfixrand = 8:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>That’s What She Said!</b>"'
-		if parfixrand = 9:'When <<$namepopu2>> sees you he starts ''speaking''. He  is saying "<b>Help! They’ve Turned Me Into a Parrot!</b>"'
+		if parfixrand = 0:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>What Did You Say To Me?</b>"'
+		if parfixrand = 1:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>3.1415926535897932384 ....</b>"'
+		if parfixrand = 2:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>Come Closer, My Friend</b>"'
+		if parfixrand = 3:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>Here Kitty, Kitty!</b>"'
+		if parfixrand = 4:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>I Just Met You and This is Crazy</b>"'
+		if parfixrand = 5:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>Bow Before Me!</b>"'
+		if parfixrand = 6:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>He’s Just a Friend, Honest!</b>"'
+		if parfixrand = 7:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>What Did You Do To My Socks?</b>"'
+		if parfixrand = 8:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>That’s What She Said!</b>"'
+		if parfixrand = 9:'When <<$namepopu2>> sees you he starts ''speaking''. He is saying "<b>Help! They’ve Turned Me Into a Parrot!</b>"'
+		killvar 'parfixrand'
 	end
 
 	*nl

+ 7 - 6
locations/beforeFW.qsrc

@@ -133,14 +133,15 @@ act 'Arm wrestle':
 		crouch = 0
 		'You''ve lost the arm wrestle and the referee has you get down on all fours, and the opponent position herself behind you.'
 	elseif strenw = strenwE:
-		varrand = rand(0, 1)
 		'No one seems to be able to win the arm wrestle so the referee stops and tells you that they would use a coin instead that would determine who wins.'
 
-		if varrand = 0:crouch = 1
-		'The referee has your opponent get down on all fours, as you position yourself behind her.'
-
-		if varrand = 1:crouch = 0
-		'The referee has you get down on all fours, and the opponent position herself behind you.'		
+		if rand(0, 1) = 0:
+			crouch = 1
+			'The referee has your opponent get down on all fours, as you position yourself behind her.'
+		else
+			crouch = 0
+			'The referee has you get down on all fours, and the opponent position herself behind you.'
+		end
 	end
 
 	act 'Follow the referees instruction':gt 'FightCrouch'

+ 7 - 8
locations/blowPR.qsrc

@@ -30,14 +30,13 @@ if $ARGS[0] = '1':
 	gs 'arousal', 'bj', 5, 'unknown', 'prostitution'
 	gs'stat'
 	menu_off = 1
-	picrand = RAND(0,6)
-	if picrand = 0:'<center><img <<$set_imgh>> src="images/shared/sex/blowjob/bjp.jpg"></center>'
-	if picrand = 1:'<center><img <<$set_imgh>> src="images/shared/sex/blowjob/bjp2.jpg"></center>'
-	if picrand = 2:'<center><img <<$set_imgh>> src="images/shared/sex/blowjob/bjp3.jpg"></center>'
-	if picrand = 3:'<center><img <<$set_imgh>> src="images/shared/sex/blowjob/bjp4.jpg"></center>'
-	if picrand = 4:'<center><img <<$set_imgh>> src="images/shared/sex/blowjob/bjp5.jpg"></center>'
-	if picrand = 5:'<center><img <<$set_imgh>> src="images/shared/sex/blowjob/bjp6.jpg"></center>'
-	if picrand = 6:'<center><img <<$set_imgh>> src="images/shared/sex/blowjob/bjp7.jpg"></center>'
+	tmppicrand = RAND(1,7)
+	if tmppicrand = 1:
+		'<center><img <<$set_imgh>> src="images/shared/sex/blowjob/bjp.jpg"></center>'
+	else
+		'<center><img <<$set_imgh>> src="images/shared/sex/blowjob/bjp<<tmppicrand>>.jpg"></center>'
+	end
+	killvar 'tmppicrand'
 
 	'You put a condom between your lips and slowly guide your mouth to his penis, gently rolling the condom down using only your lips. You can tell the guy is impressed with your skills.'
 

+ 1 - 7
locations/bobka.qsrc

@@ -42,10 +42,7 @@ if ARGS[0] = 1:
 	act 'Drop down into a doggystyle position for Bobka':
 		cls
 		gs 'boyStat', 'A49'
-		$boydesc = $npc_usedname['A49']
 		sexpartkno = 1
-		dick = npc_dick['A49']
-		silavag = npc_sexskill['A49']
 		gs 'dinSex', 'std_trigger'
 		'<center><img <<$set_imgh>> src="images/characters/city/bobka/sex/doggy.jpg"></center>'
 		
@@ -78,10 +75,7 @@ if ARGS[0] = 2:
 		cls
 		gs 'boyStat', 'A49'
 		gs 'dinSex', 'std_trigger'
-		$boydesc = $npc_usedname['A49']
 		sexpartkno = 1
-		dick = npc_dick['A49']
-		silavag = npc_sexskill['A49']
 		spafinloc = 3
 		gs 'cum_manage'
 		'<center><img <<$set_imgh>> src="images/characters/city/bobka/sex/anal.jpg"></center>'
@@ -169,7 +163,7 @@ if $ARGS[0] = 'inject':
 	'<center><img <<$set_imgh>> src="images/locations/city/residential/den/crackwhore.jpg"></center>'
 	'You grab the syringe desperately and inject yourself<<$tempval>>. Meanwhile Bobka is looking down at you haughtily, shaking his head while laughing softly. "Another happy customer. Just like you''re going to make a lot of customers happy one day..."'
 
-	if HaveMetBobka = 0:'"By the way, I''m Bobka. Who are you?"<br>The drugs is quickly clouding your mind, and you barely register him talking. You softly mutter: "<<$pcs_nickname>>..."' & HaveMetBobka = 1
+	if HaveMetBobka = 0:'"By the way, I''m Bobka. Who are you?"<br>The drug is quickly clouding your mind, and you barely register him talking. You softly mutter: "<<$pcs_nickname>>..."' & HaveMetBobka = 1
 
 	act 'Leave the drug den':
 		minut += 5

+ 1 - 1
locations/body_din.qsrc

@@ -16,7 +16,7 @@
 if $ARGS[0] = 'pregnancyVisibility':
 	RESULT = 0
 	pregchemTemp = iif(ARGS[1] = 0,pregchem,ARGS[1])
-	$clothingworntypeTemp = iif(ARGS[2] = '',$clothingworntype,ARGS[2])
+	$clothingworntypeTemp = iif($ARGS[2] = '',$clothingworntype,$ARGS[2])
 	clothingwornnumberTemp = iif(ARGS[3] = 0,clothingwornnumber,ARGS[3])
 	
 	gs 'clothing_attributes',$clothingworntypeTemp,clothingwornnumberTemp

+ 4 - 6
locations/bordel.qsrc

@@ -107,12 +107,6 @@ if $ARGS[0] = 'var':
 	end
 	gs 'npcgeneratec', 0, 'Client', rand(18,40)
 	gs 'boyStat', $npclastgenerated
-	gs 'npcgeneratec', 0, 'Client', rand(18,40)
-	$boy1 = $npclastgenerated
-	$boydesc1 = $npc_usedname[$npclastgenerated]
-	dick1 = npc_dick[$npclastgenerated]
-	$dick_girth1 = $npc_thdick[$npclastgenerated]
-	silavag1 = npc_sexskill[$npclastgenerated]
 	minut += 30
 	borrand = rand(0, 10)
 
@@ -196,6 +190,8 @@ if $ARGS[0] = 'var':
 
 			if zpprand >= 70:gs 'dinSex', 'std_trigger'
 
+			gs 'npcgeneratec', 0, 'Client', rand(18,40)
+			gs 'boyStat', $npclastgenerated,'1'
 			gt 'sexdvoe', 'start'
 		end
 	elseif borrand = 3:
@@ -223,6 +219,8 @@ if $ARGS[0] = 'var':
 
 			if zpprand >= 70:gs 'dinSex', 'std_trigger'
 
+			gs 'npcgeneratec', 0, 'Client', rand(18,40)
+			gs 'boyStat', $npclastgenerated,'1'
 			gt 'sexdvanadva', 'start'
 		end
 	elseif borrand = 4:

+ 1 - 3
locations/bordelv.qsrc

@@ -15,7 +15,6 @@ gs 'stat'
 act 'Watch Vika work':
 	cla
 	*clr
-	picrand = 2
 	'<center><img <<$set_imgh>> src="images/locations/city/residential/sauna/sex/bvika2.jpg"></center>'
 	'A few minutes later, two men enter the room. Vika jumps off the bed and kneels between them, grabs hold of their members while still looking in your direction, and begins sucking them both at once.'
 	'You look on in amazement as her mouth makes one of the cocks disappears down the throat then moves on to the other member. She diligently continues to satisfy the men not taking her eyes from the mirror. This sight has your pussy dripping wet wanting to join them.'
@@ -43,10 +42,9 @@ end
 if $ARGS[0] = 'sex':
 	cla
 	*clr
-	picrand = rand(3,7)
 	dviksex += 1
 	gs 'stat'
-	'<center><img <<$set_imgh>> src="images/locations/city/residential/sauna/sex/bvika<<picrand>>.jpg"></center>'
+	'<center><img <<$set_imgh>> src="images/locations/city/residential/sauna/sex/bvika<<rand(3,7)>>.jpg"></center>'
 	'You continue to watch on as the men start to fuck Vika. They keep changing positions alternately entering her pussy, then switching her anus, and letting her taste it all. Vika moans loudly and struggles to please them, she tries her hardest to keep looking towards you behind the mirror.'
 	'Even though you knew that she could not see you, if felt she could see you right in the eyes, searching for your approval.'
 

+ 4 - 0
locations/bouling.qsrc

@@ -33,6 +33,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = '':
 			act 'Leave': gt 'bouling'
 				
 			if boulrand = 0:
+				killvar 'boulrand'
 				'You see two guys and they challenge you to a game.'
 				act 'Gamble (2000 <b>₽</b>)':boulvar = 1 & gt 'bouling', 'randwin'
 				gs 'willpower', 'sex', 'resist', 'hard'
@@ -47,6 +48,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = '':
 					act 'Refuse and play a normal game (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 				end
 			elseif boulrand = 1:
+				killvar 'boulrand'
 				'You meet two girls and they suggest challenging two guys to a game: Prize 5000 <b>₽</b>, lose and they have sex with you.'
 				act 'Play':boulvar = 2 & gt 'bouling', 'randwin'
 				gs 'willpower', 'sex', 'resist', 'hard'
@@ -61,6 +63,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = '':
 					act 'Refuse and play a normal game (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 				end
 			elseif boulrand > 1:
+				killvar 'boulrand'
 				gt 'bouling', 'randwin' 
 			end
 		end
@@ -129,6 +132,7 @@ if $ARGS[0] = 'randwin':
 
 		act 'Pay':gt 'sexorg', 'var'
 	end
+	killvar 'boulwin'
 end
 
 --- bouling ---------------------------------

+ 6 - 4
locations/boy.qsrc

@@ -82,10 +82,11 @@ if $ARGS[0] = 'details':
 	!!0 - black, 1 - brown, 2 - Redhead, 3 - blonde
 	npc_haircol[$npclastgenerated] = rand(0, 3)
 	!!character 0 - soft, 1 -norm 2 - aggressor
-	randizvrat = rand(0, 100)
-
-	if randizvrat < 80:izvrat = 0
-	if randizvrat >= 80:izvrat = 1
+	if rand(0, 100) < 80:
+		izvrat = 0
+	else
+		izvrat = 1
+	end
 
 
 
@@ -277,6 +278,7 @@ if $ARGS[0] = 'details':
 	IQPrefTmp = 0
 	if rand(0, 4) = 4:IQPrefTmp = rand(1, 3) 
 
+	killvar 'randchan'
 end
 
 --- boy ---------------------------------

+ 8 - 5
locations/girl.qsrc

@@ -88,10 +88,11 @@ if $ARGS[0] = 'details':
 	!!0 - black, 1 - brown, 2 - Redhead, 3 - blonde
 	npc_haircol[$npclastgenerated] = rand(0, 3)
 	!!character 0 - soft, 1 -norm 2 - aggressor
-	randizvrat = rand(0, 100)
-
-	if randizvrat < 90:izvrat = 0
-	if randizvrat >= 90:izvrat = 1
+	if rand(0, 100) < 90:
+		izvrat = 0
+	else
+		izvrat = 1
+	end
 
 
 
@@ -281,8 +282,10 @@ if $ARGS[0] = 'details':
 	!!0 - no preference, 1 - 1 to 30 intelligence, 2 - 30 to 85 intelligence, 3 - 85 + intelligence. 
 
 	IQPrefTmp = 0
-	if rand(0, 4) = 4:IQPrefTmp = rand(1, 2) + rand(1, 2) + rand(0,1)
+	!! IQPrefTmp is capped at 3. With old code: rand(1, 2) + rand(1, 2) + rand(0,1) => 1/8 chance for 2 else 3 (or more)
+	if rand(0, 4) = 4:IQPrefTmp = iif(rand(1,8) = 1, 2, 3)
 
+	killvar 'randchan'
 end
 
 --- girl ---------------------------------