Browse Source

[fixed] unknown error and other code optimizations

Lusticon 1 month ago
parent
commit
cb7f9ce58c
2 changed files with 30 additions and 70 deletions
  1. 28 70
      locations/MagEncounterFairy.qsrc
  2. 2 0
      locations/treeCircle.qsrc

+ 28 - 70
locations/MagEncounterFairy.qsrc

@@ -50,8 +50,8 @@ if $ARGS[0] = 'fairy_chat_no1':
 			pcs_horny += 10
 			gs 'stat'
 			'The fairy bids you farewell. Just as she flies off, she returns fluttering in front of your face.'
-			''
 			wait 725
+			*nl
 			'"You know, someone as nice as you should look just as lovely.", she says. "Hold still and don''t breath!"'
 			'Before you can do anything, the fairy blows some sparkling dust into your face. Surprised you hold your breath, albeit barely. You feel the powdery substance soak into your skin and your face starts tingling. It is not uncomfortable, rather like the brush of a feather.'
 			' ''That must have been MAGICAL FAIRY DUST!'', it hits you as the fairy flies off.'
@@ -94,7 +94,7 @@ if $ARGS[0] = 'fairy_chat':
 	act 'Chat with the fairy':
 		cla
 		minut += 30
-		if fairyshoo = 1 and rand (1, 3) = 2:
+		if fairyshoo = 1 and rand(1,3) = 2:
 			fairyshoo = 0
 		elseif fairyshoo > 1 and (fairyshoo * 3 - fairychat) <= 0:
 			fairyshoo -= 1
@@ -102,111 +102,75 @@ if $ARGS[0] = 'fairy_chat':
 		fairychat += 1
 		pcs_mana += 25 * pcs_magik
 		pcs_mood += 15
+		gs 'stat'
 		gs 'MagEncounterFairy', 'fairychattopic'
 		if fairyday['skin_increase'] <= 10 and fairyday ! daystart and fairyshoo = 0:
+			cla
 			pcs_skin += 10
 			if pcs_skin > 1000: pcs_skin = 1000
 			fairyday['skin_increase'] += 1
 			fairyday = daystart
 			gs 'stat'
 			'The fairy bids you farewell.'
-			*nl
 			wait 725
+			*nl
 			'Just as she flies off, she returns fluttering in front of your face.'
 			'"You know, you could still look lovelier.", she says. "Don''t move."'
 			'Remembering the last time you hold your breath and close your eyes. Just a moment later you feel your skin start tingling, again, as if brushed by a feather.'
+			act 'Go on your way': gt $loc, $loc_arg
 		elseif fairyday['skin_increase'] > 10 and fairyday < daystart and fairyshoo = 0 and pcs_magik >= 8 and fairychat > 9 and succubusQW < 1:
 			!Sets the Succubus setup dream
+			cla
 			succubusQW = 1
 			pcs_horny = 100
 			fairyday = daystart
 			gs 'stat'
 			'The fairy bids you farewell.'
-			*nl
 			wait 725
+			*nl
 			'Just as she flies off, she returns fluttering in front of your face.'
 			'"You know, you''re almost a magical creature now.", she says. "Don''t move."'
 			'Remembering the last time you hold your breath and close your eyes. Just a moment later you feel a much more intense tingling, this time seeming to go all the way through you.'
+			act 'Go on your way': gt $loc, $loc_arg
 		elseif fairyday ! daystart and (pcs_nips < 80 or clit_size < 80):
 			fairyday = daystart
-			gs 'stat'
 			'The fairy takes another quick look at you, rubs her chin, and says "Hmm, since you''ve been a little nice to me, maybe I could be a little nice to you."'
 			act 'Huh?':
 				cla
 				*nl
-				'You look at her, puzzled, wondering if you heard her right.  She just shrugs her shoulders and says "Okay, if you''re not interested"'
+				'You look at her, puzzled, wondering if you heard her right. She just shrugs her shoulders and says "Okay, if you''re not interested"'
 				act 'Go on your way': gt $loc, $loc_arg
 			end
 			act 'Sure':
 				cla
 				fday_surprise += 1
-				fairy_surprise = RAND(1,9)
-				if fairy_surprise =< 2:
+				fairy_surprise = rand(1,8)
+				if fairy_surprise = 1:
 					pcs_nips += 5
 					pcs_horny += 10
-					gs 'stat'
-					if pcs_nips < 20:
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples1.jpg"></center>'
-					elseif pcs_nips < 40:
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples2.jpg"></center>'
-					elseif pcs_nips < 60:
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples3.jpg"></center>'
-					elseif pcs_nips < 80:
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples4.jpg"></center>'
-					else
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples5.jpg"></center>'
-					end
+					*clr
+					'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples<<max(1,min(5,pcs_nips/20+1))>>.jpg"></center>'
 					'You hear a giggle.  Suddenly, your nipples get really firm and pointed, and seem to be a bit larger now.'
 					'You can''t help but rub both breasts, feeling the warm tingling in them, and in your pussy.'
-				elseif fairy_surprise = 3:
+				elseif fairy_surprise = 2:
 					pcs_nips -= 5
-					gs 'stat'
-					if pcs_nips < 20:
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples1.jpg"></center>'
-					elseif pcs_nips < 40:
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples2.jpg"></center>'
-					elseif pcs_nips < 60:
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples3.jpg"></center>'
-					elseif pcs_nips < 80:
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples4.jpg"></center>'
-					else
-						'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples5.jpg"></center>'
-					end
+					*clr
+					'<center><img <<$set_imgh>> src="images/pc/body/nipples/nipples<<max(1,min(5,pcs_nips/20+1))>>.jpg"></center>'
 					'You hear a giggle.  Suddenly, your nipples get really firm and pointed, yet seem to be smaller then before.'
 					'You can''t help but rub both breasts, feeling the warm tingling in them, and in your pussy.'
-				elseif fairy_surprise <= 4:
+				elseif fairy_surprise = 3:
 					clit_size += 5
 					pcs_horny += 10
-					gs 'stat'
-					if clit_size < 20:
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit1.jpg"></center>'
-					elseif clit_size < 40:
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit2.jpg"></center>'
-					elseif clit_size < 60:
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit3.jpg"></center>'
-					elseif clit_size < 80:
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit4.jpg"></center>'
-					else
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit5.jpg"></center>'
-					end
+					*clr
+					'<center><img <<$set_imgh>> src="images/pc/body/clit/clit<<max(1,min(5,clit_size/20+1))>>.jpg"></center>'
 					'You hear a giggle and you feel a warm tingle at the top of your slit, you reach down and part your pussy lips with your fingers.'
 					'Your clitoris has swollen, and seems to stand out even more than before! You can''t help but rub all around it, feeling the warm tingling and the moisture build at the entrance.'
 					'The fairy admires the changes she''s made, and smiles at you, looking again at your puffy pussy and licking her lips.'
 					'You two say your goodbyes and the fairy flies off.'
-				elseif fairy_surprise = 5:
+				elseif fairy_surprise = 4:
 					clit_size -= 5
-					gs 'stat'
-					if clit_size < 20:
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit1.jpg"></center>'
-					elseif clit_size < 40:
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit2.jpg"></center>'
-					elseif clit_size < 60:
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit3.jpg"></center>'
-					elseif clit_size < 80:
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit4.jpg"></center>'
-					else
-						'<center><img <<$set_imgh>> src="images/pc/body/clit/clit5.jpg"></center>'
-					end
+					*clr
+					'<center><img <<$set_imgh>> src="images/pc/body/clit/clit<<max(1,min(5,clit_size/20+1))>>.jpg"></center>'
 					'You hear a giggle and you feel a warm tingle at the top of your slit, you reach down and part your pussy lips with your fingers.'
 					'Your clitoris has shunk, and seems to more demure than before! You can''t help but rub all around it, feeling the warm tingling and the moisture build at the entrance.'
 				elseif fairy_surprise <= 6:
@@ -218,14 +182,13 @@ if $ARGS[0] = 'fairy_chat':
 					'You hear a giggle, then sparkles surround your body and you get all tingly.'
 					'You suddenly feel colder and less aroused then before.'
 				end
+				gs 'stat'
 				act 'Go on your way': gt $loc, $loc_arg
 			end
 		end
 	end
 end
 
-killvar '$din_fairy_chat_no1' & killvar '$din_fairy_shoo' & killvar '$din_fairy_chat'
-
 if $ARGS[0] = 'fairychattopic':
 !!	These are the random chat texts for the Fairy from UsagiTripleSix
 	frandchat = rand(1,16)
@@ -261,10 +224,12 @@ if $ARGS[0] = 'fairychattopic':
 	elseif frandchat = 15:
 		'Today the fairy introduces you to fairy knock-knock jokes. She spends almost half an hour telling joke after joke, but you failed to understand a single one. By the time you''re ready to leave, she''s complaining about how humans have no sense of humor.'
 	else
-		killvar 'frandchat' & gt 'MagEncounterFairy', 'teleport'
+		killvar 'frandchat'
+		gt 'MagEncounterFairy', 'teleport'
 	end
 
-	act 'Go on your way': killvar 'frandchat' & gt $loc, $loc_arg
+	killvar 'frandchat'
+	act 'Go on your way': gt $loc, $loc_arg
 
 end
 
@@ -273,20 +238,13 @@ if $ARGS[0] = 'teleport':
 	if spellKnown['teleport'] = 0:
 		!show and teach Teleport spell
 		'The Fairy wraps her arms around your thumb and lightly tugs you over to a mysterious circle of trees.'
-		''
 		'She says, "You may have seen these circles of trees around the lands. Fairies planted them long ago and used their magic to tether them together. Since you also have Fae magic, I can show you how to use them."'
-		''
 		'She continues, "Most of the work was already done in the binding. In a way, the trees of each circle are the same trees. You just have to stand inside the circle, then hold in your mind a picture of another circle that you have been to before. Then you say the word <i>inla</i>. If your will is strong enough and you have enough magical energy, your energy can be used to enact your will."'
-		''
 		'She giggles. "This lets you dance through any field you like! "Let''s go!"'
-		''
 		'She grunts and give you a nudge into the circle.'
 		act 'Stumble into Circle':
-			''
 			'The view outside the circle seems blurry and a little indistinct.  The Fairy''s face scrunches up in concentration as she incants "inla", and the world outside seems to shimmer a little. You feel like you understand how she did that.  Though you can''t tell exactly where you are now in the blurriness, it does look different.'
-			''
 			'The Fairy says, "It''s important to take the time to feel each Fairy Ring, that''s how you can find your way back."  She flies off.'
-			''
 			'You decide it would be wise to memorize your surroundings.'
 			spellKnown['teleport'] = 1
 			tpKnown['GadForest'] = 1

+ 2 - 0
locations/treeCircle.qsrc

@@ -38,6 +38,8 @@ $treeCircArg['Village'] = 'pos6'
 
 $EntryPoint = $ARGS[0]
 
+killvar '$tpRand'
+
 *clr & cla
 
 '<center><h2>Mysterious Circle of Trees</h2></center>'