Browse Source

[fixed] hair arranging vars check

Lusticon 2 weeks ago
parent
commit
a705dc035b
2 changed files with 74 additions and 60 deletions
  1. 21 12
      locations/din_bad.qsrc
  2. 53 48
      locations/mirror.qsrc

+ 21 - 12
locations/din_bad.qsrc

@@ -157,19 +157,28 @@ if $ARGS[0] = 'd_bag':
 	elseif (mc_inventory['travel_mirror'] =  1 or mc_inventory['comb'] =  1) and pcs_hairbsh = 1: 
 		'There''s a hairbrush in your purse. Your hair doesn''t need brushing right now.'
 	end
-	if pcs_hairlng > 80 and mc_inventory['scrunchies'] >= 1 and hbraids = 0:
-		if hscrunchw = 0 and hpingripw = 0: 'As you have a scrunchy, you can arrange your hair into a <a href="exec:hscrunchw = 1 & gs ''din_bad'', ''d_bag''">ponytail</a>. You have <<mc_inventory[''scrunchies'']>> scrunchies left.'
-		if hscrunchw = 1: 'Remove the <a href="exec:hscrunchw = 0 & gs ''din_bad'', ''d_bag''">scrunchie</a> to get rid of the ponytail.'
-	end
-	if pcs_hairlng > 80 and pcs_hairlng <= 400 and mc_inventory['kirbygrips'] >= 1 and hbraids = 0:
-		if hscrunchw = 0 and hpingripw = 0: 'You have several clips, pins and grips for you hair. Hence, you can <a href="exec:hpingripw = 1 & gs ''din_bad'', ''d_bag''">updo your hair</a>. You have <<mc_inventory[''kirbygrips'']>> hair accessories at your disposal.'
-		if hpingripw = 1: 'Let your hair <a href="exec:hpingripw = 0 & gs ''din_bad'', ''d_bag''">flow free</a>.'
-	end
-	if pcs_hairlng > 80 and pcs_hairlng <= 800 and mc_inventory['scrunchies'] >= 2 and hbraids = 0:
-		if hscrunchw = 0 and hpingripw = 0: 'You can use two hair ties to make yourself some <a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''din_bad'', ''d_bag''">pigtails</a>.'
-		if hscrunchw = 2: '<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''din_bad'', ''d_bag''">Remove</a> your scrunchies and let your hair flow free again.'
+	if pcs_hairbsh > 0 and pcs_hairlng > 80 and hbraids = 0:
+		*nl
+		if mc_inventory['scrunchies'] >= 1 and hscrunchw + hpingripw = 0:
+			'As you have a scrunchy, you can arrange your hair into a <a href="exec:hscrunchw = 1 & gs ''din_bad'', ''d_bag''">ponytail</a>. You have <<mc_inventory[''scrunchies'']>> scrunchies left.'
+		end
+		if pcs_hairlng <= 400 and mc_inventory['kirbygrips'] >= 1 and hscrunchw + hpingripw = 0:
+			'You have several clips, pins and grips for you hair. Hence, you can <a href="exec:hpingripw = 1 & gs ''din_bad'', ''d_bag''">updo your hair</a>. You have <<mc_inventory[''kirbygrips'']>> hair accessories at your disposal.'
+		end
+		if pcs_hairlng <= 800 and mc_inventory['scrunchies'] >= 1:
+			if mc_inventory['scrunchies'] >= 2 and hscrunchw + hpingripw = 0:
+				'You can use two hair ties to make yourself some <a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''din_bad'', ''d_bag''">pigtails</a>.'
+			end
+			if canBraidHair = 1 and hscrunchw + hpingripw + hpigtail = 0:
+				'You can spend <<pcs_hairlng/10>> minutes <a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''din_bad'', ''d_bag''">braiding</a> your hair, just the way your sister taught you.'
+			end
+		end
 	end
-	
+	if hscrunchw = 1: 'Remove the <a href="exec:hscrunchw = 0 & gs ''din_bad'', ''d_bag''">scrunchie</a> to get rid of the ponytail.'
+	if hscrunchw = 2: '<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''din_bad'', ''d_bag''">Remove</a> your scrunchies and let your hair flow free again.'
+	if hpingripw = 1: 'Let your hair <a href="exec:hpingripw = 0 & gs ''din_bad'', ''d_bag''">flow free</a>.'
+	if hbraids > 0: 'Take <<hbraids*2+pcs_hairlng/50>> minutes removing your <a href="exec:minut += hbraids*2+pcs_hairlng/50 & hbraids = 0 & gs ''din_bad'', ''d_bag''">braid</a>.'
+
 	*nl
 	if mc_inventory['equipped_condoms'] + mc_inventory['normal_condoms'] + mc_inventory['sabotaged_condoms'] > 0:
 		if preziktype = 2 or mc_inventory['sabotaged_condoms'] > 0:

+ 53 - 48
locations/mirror.qsrc

@@ -36,44 +36,48 @@ if $ARGS[0] = 'start':
 		if mc_inventory['kirbygrips'] < 1:hpingripw = 0
 		if mc_inventory['scrunchies'] < 2:hpigtail = 0
 
-		if pcs_hairbsh < 1: $serv['hairbrush']='<a href="exec: xgt ''mirror'', ''brush''"><img src="images/system/icons/action/hairbrush.png"></a>'
-		if pcs_hairlng > 80 and mc_inventory['scrunchies'] >= 1 and hbraids = 0:
-			if hscrunchw = 0 and hpingripw = 0:
-				$serv['ponytail']='<a href="exec:hscrunchw = 1 & gs ''mirror'', ''start''"><img src="images/system/icons/action/scrunchy.png"></a>'
-				$serv['ponytail desc']='As you have a scrunchy, you can arrange your hair into a <a href="exec:hscrunchw = 1 & gs ''mirror'', ''start''">ponytail</a>. You have <b><<mc_inventory[''scrunchies'']>></b> scrunchies left.'
-			end
-			if hscrunchw = 1:
-				$serv['ponytail']='<a href="exec:hscrunchw = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/ponytail.png"></a>'
-				$serv['ponytail desc']='Remove the <a href="exec:hscrunchw = 0 & gs ''mirror'', ''start''">scrunchie</a> to get rid of the ponytail.'
+		if pcs_hairbsh < 1:
+			$serv['hairbrush']='<a href="exec: xgt ''mirror'', ''brush''"><img src="images/system/icons/action/hairbrush.png"></a>'
+		else
+			if pcs_hairlng > 80 and hbraids = 0:
+				if mc_inventory['scrunchies'] >= 1 and hscrunchw + hpingripw = 0:
+					$serv['ponytail']='<a href="exec:hscrunchw = 1 & gs ''mirror'', ''start''"><img src="images/system/icons/action/scrunchy.png"></a>'
+					$serv['ponytail desc']='As you have a scrunchy, you can arrange your hair into a <a href="exec:hscrunchw = 1 & gs ''mirror'', ''start''">ponytail</a>. You have <b><<mc_inventory[''scrunchies'']>></b> scrunchies left.'
+				end
+				if pcs_hairlng <= 400 and mc_inventory['kirbygrips'] >= 1 and hscrunchw + hpingripw = 0:
+					$serv['bun']='<a href="exec:hpingripw = 1 & gs ''mirror'', ''start''"><img src="images/system/icons/action/clips_pins_grips.png"></a>'
+					$serv['bun desc']='You have several clips, pins and grips for you hair. Hence, you can <a href="exec:hpingripw = 1 & gs ''mirror'', ''start''">updo your hair</a>. You have <b><<mc_inventory[''kirbygrips'']>></b> hair accessories at your disposal.'
+				end
+				if pcs_hairlng <= 800 and mc_inventory['scrunchies'] >= 1:
+					if mc_inventory['scrunchies'] >= 2 and hscrunchw + hpingripw = 0:
+						$serv['pigtails']='<a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''mirror'', ''start''"><img src="images/system/icons/action/hair_ties.png"></a>'
+						$serv['pigtails desc']='You can use two hair ties to make yourself some <a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''mirror'', ''start''">pigtails</a>.'
+					end
+					if canBraidHair = 1 and hscrunchw + hpingripw + hpigtail = 0:
+						$serv['braid']='<a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''mirror'', ''start''"><img src="images/system/icons/action/braiding.png"></a>'
+						$serv['braid desc']='You can spend <<pcs_hairlng/10>> minutes <a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''mirror'', ''start''">braiding</a> your hair, just the way your sister taught you.'
+					end
+				end
 			end
 		end
-		if pcs_hairlng > 80 and pcs_hairlng <= 400 and mc_inventory['kirbygrips'] >= 1 and hbraids = 0:
-			if hscrunchw = 0 and hpingripw = 0:
-				$serv['bun']='<a href="exec:hpingripw = 1 & gs ''mirror'', ''start''"><img src="images/system/icons/action/clips_pins_grips.png"></a>'
-				$serv['bun desc']='You have several clips, pins and grips for you hair. Hence, you can <a href="exec:hpingripw = 1 & gs ''mirror'', ''start''">updo your hair</a>. You have <b><<mc_inventory[''kirbygrips'']>></b> hair accessories at your disposal.'
-			end
-			if hpingripw = 1:
-				$serv['bun']='<a href="exec:hpingripw = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/bun.png"></a>'
-				$serv['bun desc']='Let your hair <a href="exec:hpingripw = 0 & gs ''mirror'', ''start''">flow free</a>.'
-			end
+		
+		if hscrunchw = 1:
+			$serv['ponytail']='<a href="exec:hscrunchw = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/ponytail.png"></a>'
+			$serv['ponytail desc']='Remove the <a href="exec:hscrunchw = 0 & gs ''mirror'', ''start''">scrunchie</a> to get rid of the ponytail.'
 		end
-		if pcs_hairlng > 80 and pcs_hairlng <= 800 and mc_inventory['scrunchies'] >= 2 and hbraids = 0:
-			if hscrunchw = 0 and hpingripw = 0:
-				$serv['pigtails']='<a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''mirror'', ''start''"><img src="images/system/icons/action/hair_ties.png"></a>'
-				$serv['pigtails desc']='You can use two hair ties to make yourself some <a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''mirror'', ''start''">pigtails</a>.'
-			end
-			if hscrunchw = 2:
-				$serv['pigtails']='<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/pigtails.png"></a>'
-				$serv['pigtails desc']='<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''mirror'', ''start''">Remove</a> your scrunchies and let your hair flow free again.'
-			end
+		if hscrunchw = 2:
+			$serv['pigtails']='<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/pigtails.png"></a>'
+			$serv['pigtails desc']='<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''mirror'', ''start''">Remove</a> your scrunchies and let your hair flow free again.'
+		end
+		if hpingripw = 1:
+			$serv['bun']='<a href="exec:hpingripw = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/bun.png"></a>'
+			$serv['bun desc']='Let your hair <a href="exec:hpingripw = 0 & gs ''mirror'', ''start''">flow free</a>.'
 		end
-		if canBraidHair = 1 and mc_inventory['scrunchies'] >= 1 and hBraids = 0 and (pcs_hairlng > 80 and pcs_hairlng <= 800) and hscrunchw = 0 and hpingripw = 0 and hpigtail = 0:
-			$serv['braid']='<a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''mirror'', ''start''"><img src="images/system/icons/action/braiding.png"></a>'
-			$serv['braid desc']='You can spend <<pcs_hairlng/10>> minutes <a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''mirror'', ''start''">braiding</a> your hair, just the way your sister taught you.'
-		elseif hbraids > 0:
+		if hbraids > 0:
 			$serv['braid']='<a href="exec:minut += hbraids*2+pcs_hairlng/50 & hbraids = 0 & gs ''mirror'', ''start''"><img src="images/system/icons/action/braid.png"></a>'
 			$serv['braid desc']='Take <<hbraids*2+pcs_hairlng/50>> minutes removing your <a href="exec:minut += hbraids*2+pcs_hairlng/50 & hbraids = 0 & gs ''mirror'', ''start''">braid</a>.'
 		end
+
 		! ----- actions
 		$serv['back']='<a href="exec: gt ''mirror'',''fin''"><img src="images/system/icons/action/back.png"></a>'
 		! ----- lip balm and false lashes
@@ -245,26 +249,27 @@ if $ARGS[0] = 'start':
 		if mc_inventory['kirbygrips'] < 1:hpingripw = 0
 		if mc_inventory['scrunchies'] < 2:hpigtail = 0
 
-		if pcs_hairlng > 80 and mc_inventory['scrunchies'] >= 1 and hbraids = 0:
+		if pcs_hairbsh > 0 and pcs_hairlng > 80 and hbraids = 0:
 			*nl
-			if hscrunchw = 0 and hpingripw = 0: 'As you have a scrunchy, you can arrange your hair into a <a href="exec:hscrunchw = 1 & gs ''mirror'', ''start''">ponytail</a>. You have <<mc_inventory[''scrunchies'']>> scrunchies left.'
-			if hscrunchw = 1: 'Remove the <a href="exec:hscrunchw = 0 & gs ''mirror'', ''start''">scrunchie</a> to get rid of the ponytail.'
-		end
-
-		if pcs_hairlng > 80 and mc_inventory['kirbygrips'] >= 1 and hbraids = 0:
-			if hscrunchw = 0 and hpingripw = 0: 'You have several clips, pins and grips for you hair. Hence, you can <a href="exec:hpingripw = 1 & gs ''mirror'', ''start''">updo your hair</a>. You have <<mc_inventory[''kirbygrips'']>> hair accessories at your disposal.'
-			if hpingripw = 1: 'Let your hair <a href="exec:hpingripw = 0 & gs ''mirror'', ''start''">flow free</a>.'
-		end
-
-		if pcs_hairlng > 80 and mc_inventory['scrunchies'] >= 2 and hbraids = 0:
-			if hscrunchw = 0 and hpingripw = 0: 'You can use two hair ties to make yourself some <a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''mirror'', ''start''">pigtails</a>.'
-			if hscrunchw = 2: '<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''mirror'', ''start''">Remove</a> your scrunchies and let your hair flow free again.'
-		end
-
-		if canBraidHair = 1 and mc_inventory['scrunchies'] >= 1 and hBraids = 0 and (pcs_hairlng > 80 and pcs_hairlng <= 800) and hscrunchw = 0 and hpingripw = 0 and hpigtail = 0:
-			'You can spend <<pcs_hairlng/10>> minutes <a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''mirror'', ''start''">braiding</a> your hair, just the way your sister taught you.'
+			if mc_inventory['scrunchies'] >= 1 and hscrunchw + hpingripw = 0:
+				'As you have a scrunchy, you can arrange your hair into a <a href="exec:hscrunchw = 1 & gs ''mirror'', ''start''">ponytail</a>. You have <<mc_inventory[''scrunchies'']>> scrunchies left.'
+			end
+			if pcs_hairlng <= 400 and mc_inventory['kirbygrips'] >= 1 and hscrunchw + hpingripw = 0:
+				'You have several clips, pins and grips for you hair. Hence, you can <a href="exec:hpingripw = 1 & gs ''mirror'', ''start''">updo your hair</a>. You have <<mc_inventory[''kirbygrips'']>> hair accessories at your disposal.'
+			end
+			if pcs_hairlng <= 800 and mc_inventory['scrunchies'] >= 1:
+				if mc_inventory['scrunchies'] >= 2 and hscrunchw + hpingripw = 0:
+					'You can use two hair ties to make yourself some <a href="exec:hpigtail = 1 & hscrunchw = 2 & gs ''mirror'', ''start''">pigtails</a>.'
+				end
+				if canBraidHair = 1 and hscrunchw + hpingripw + hpigtail = 0:
+					'You can spend <<pcs_hairlng/10>> minutes <a href="exec:minut += pcs_hairlng/10 & hbraids = 15 & gs ''mirror'', ''start''">braiding</a> your hair, just the way your sister taught you.'
+				end
+			end
 		end
 
+		if hscrunchw = 1: 'Remove the <a href="exec:hscrunchw = 0 & gs ''mirror'', ''start''">scrunchie</a> to get rid of the ponytail.'
+		if hscrunchw = 2: '<a href="exec:hpigtail = 0 & hscrunchw = 0 & gs ''mirror'', ''start''">Remove</a> your scrunchies and let your hair flow free again.'
+		if hpingripw = 1: 'Let your hair <a href="exec:hpingripw = 0 & gs ''mirror'', ''start''">flow free</a>.'
 		if hbraids > 0: 'Take <<hbraids*2+pcs_hairlng/50>> minutes removing your <a href="exec:minut += hbraids*2+pcs_hairlng/50 & hbraids = 0 & gs ''mirror'', ''start''">braid</a>.'
 	end