Преглед изворни кода

Fixed payments in Salon not deducting correct amount.

Hooded Silence пре 1 година
родитељ
комит
a43907c2d2
1 измењених фајлова са 56 додато и 37 уклоњено
  1. 56 37
      locations/salon.qsrc

+ 56 - 37
locations/salon.qsrc

@@ -112,7 +112,7 @@ end
 if $ARGS[0] = 'discount':
 		!! Set staff discount
 		if masseuse['jobtype'] > 0: 
-			salon_rate = ARGS[1] /2
+			salon_rate = ARGS[1] / 2
 		else
 			salon_rate = ARGS[1]
 		end
@@ -131,14 +131,14 @@ if $ARGS[0] = 'services':
 	$epayments['banner']  = 'locations/city/citycenter/mall/salon/xian.jpg'
 
 	act 'Move away':gs 'salon', 'cleanvar' & gt 'salon', 'start'
-	
 	gs 'salon', 'discount', 1000
 	if money >= salon_rate or karta + bankDebtLimit >= salon_rate:
 		act 'Tanning booth <<salon_rate>> <b>₽</b>':
+			gs 'salon', 'discount', 1000
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 500
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 1000
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'tanning_booth'
 			$epayments['description'] = 'tanning session'
@@ -155,12 +155,13 @@ if $ARGS[0] = 'services':
 	act 'See the eyelash specialist':gt'salon','eyelashes'
 	
 	gs 'salon', 'discount', 5000
-	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and salon['skin_care_day'] < max(daystart - 7,1):
+	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and salon['skin_care_day'] < max(daystart - 7,1):	
 		act 'Skin care <<salon_rate>> <b>₽</b>':
+			gs 'salon', 'discount', 5000
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 2500
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 5000
+				epayments['value'] = salon_rate
 			end
 			epayments['value'] = salon_rate
 			$epayments['loc_arg'] = 'skin_care'
@@ -177,13 +178,14 @@ if $ARGS[0] = 'services':
 		end
 	end
 	
-	gs 'salon', 'discount', 25000
+	gs 'salon', 'discount', 25000	
 	if money >= salon_rate or karta + bankDebtLimit >= salon_rate:
-		act 'Full body rejuvination <<salon_rate>> <b>₽</b>':				
+		act 'Full body rejuvination <<salon_rate>> <b>₽</b>':
+			gs 'salon', 'discount', 25000			
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 12500
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 25000
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'rejuvination'
 			$epayments['description'] = 'full body rejuvination'
@@ -197,7 +199,10 @@ if $ARGS[0] = 'services':
 	
 	gs 'salon', 'discount', 1000
 	if (pcs_pubes > 9 or pcs_leghair > 9) and money >= salon_rate or karta + bankDebtLimit >= salon_rate:
-		act 'Partial or full body hair removal up to <<salon_rate>> <b>₽</b>':gt'salon','hair_removal'
+		act 'Partial or full body hair removal up to <<salon_rate>> <b>₽</b>':
+			gs 'salon', 'discount', 1000
+			gt'salon','hair_removal'
+		end
 	elseif (pcs_pubes > 9 or pcs_leghair > 9)  and (money < salon_rate and karta + bankDebtLimit  < salon_rate):
 		act 'Body hair removal <font color="red"><<salon_rate>> <b>₽</b> </font>':
 			msg'You don''t have enough money for this!'
@@ -208,13 +213,14 @@ if $ARGS[0] = 'services':
 		end
 	end
 
-	gs 'salon', 'discount', 500
+	gs 'salon', 'discount', 500	
 	if pcs_pubes > 20 and money >= salon_rate or karta + bankDebtLimit >= salon_rate:
-		act 'Dye your pubic hair <<salon_rate>> <b>₽</b>':				
+		act 'Dye your pubic hair <<salon_rate>> <b>₽</b>':
+			gs 'salon', 'discount', 500			
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 250
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 500
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'pubes'
 			$epayments['description'] = 'dye your pubic hair'
@@ -1109,10 +1115,11 @@ if $ARGS[0] = 'eyelashes':
 	gs 'salon', 'discount', 5000
 	if ( money >= salon_rate or karta + bankDebtLimit >= salon_rate) and pcs_naturallashes < 2:
 		act 'Eyelash growth treatment</a> - <<salon_rate>><b> ₽</b>': 
+			gs 'salon', 'discount', 5000
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 2500
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 5000
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashTreatment'
 			$epayments['description'] = 'eyelash growth treatment'
@@ -1127,10 +1134,11 @@ if $ARGS[0] = 'eyelashes':
 	gs 'salon', 'discount', 500
 	if ( money >= salon_rate or karta + bankDebtLimit >= salon_rate) and pcs_lashes < 3 and false_lashes <= 0:
 		act 'Simple false lashes':
+			gs 'salon', 'discount', 500
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 250
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 500
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashFalsies'
 			$epayments['description'] = 'simple false eyelashes'
@@ -1146,10 +1154,11 @@ if $ARGS[0] = 'eyelashes':
 	gs 'salon', 'discount', 1000
 	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and pcs_lashes < 4 and false_lashes <= 0:
 		act 'Dramatic false lashes':
+			gs 'salon', 'discount', 1000
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 500
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 1000
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashFalsies'
 			$epayments['description'] = 'Dramatic false lashes'
@@ -1165,10 +1174,11 @@ if $ARGS[0] = 'eyelashes':
 	gs 'salon', 'discount', 2000
 	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration <= 0:
 		act '2D volume eyelash extensions':
+			gs 'salon', 'discount', 2000
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 1000
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 2000
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashExtension'
 			$epayments['description'] = '2D volume eyelash extensions'
@@ -1186,10 +1196,11 @@ if $ARGS[0] = 'eyelashes':
 	gs 'salon', 'discount', 5000
 	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration <= 0:
 		act '4D volume eyelash extensions':
+			gs 'salon', 'discount', 5000
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 2500
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 5000
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashExtension'
 			$epayments['description'] = '4D volume eyelash extensions'
@@ -1206,10 +1217,11 @@ if $ARGS[0] = 'eyelashes':
 	gs 'salon', 'discount', 10000
 	if ( money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration <= 0:
 		act '6D volume eyelash extensions':
+			gs 'salon', 'discount', 10000
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 5000
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 10000
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashExtension'
 			$epayments['description'] = '6D volume eyelash extensions'
@@ -1226,10 +1238,11 @@ if $ARGS[0] = 'eyelashes':
 	gs 'salon', 'discount', 1000
 	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration >= 1 and lashextensionduration <= 4 and lashextensionstyle = 2:
 		act 'Refill your 2D lash extension':
+			gs 'salon', 'discount', 1000
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 500
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 1000
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashExtension'
 			$epayments['description'] = 'refill your 2D lash extensions'
@@ -1245,10 +1258,11 @@ if $ARGS[0] = 'eyelashes':
 	gs 'salon', 'discount', 2500
 	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate)and lashextensionduration >= 1 and lashextensionduration <= 4 and lashextensionstyle = 4:
 		act 'Refill your 4D lash extension':
+			gs 'salon', 'discount', 2500
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 1250
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 2500
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashExtension'
 			lashextensionnew = 0
@@ -1260,13 +1274,15 @@ if $ARGS[0] = 'eyelashes':
 	else
 		act 'Refill your 4D lash extension <font color="red"><<salon_rate>> <b>₽</b> </font>': msg 'You don''t need this service!'
 	end
+
 	gs 'salon', 'discount', 5000
 	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate)and lashextensionduration >= 1 and lashextensionduration <= 4 and lashextensionstyle = 6:
 		act 'Refill your 6D lash extension':
+			gs 'salon', 'discount', 5000
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 2500
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 5000
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashExtension'
 			$epayments['description'] = 'refill your 6D lash extensions'
@@ -1281,10 +1297,11 @@ if $ARGS[0] = 'eyelashes':
 	gs 'salon', 'discount', 500
 	if (money >= salon_rate or karta + bankDebtLimit >= salon_rate) and lashextensionduration > 0:
 		act 'Remove your eyelash extensions':
+			gs 'salon', 'discount', 500
 			if masseuse['jobtype'] > 0:  
-				epayments['value'] = 250
+				epayments['value'] = salon_rate
 			else
-				epayments['value'] = 500
+				epayments['value'] = salon_rate
 			end
 			$epayments['loc_arg'] = 'lashExtension'
 			$epayments['description'] = 'remove your eyelash extensions'
@@ -2396,9 +2413,10 @@ end
 
 if $ARGS[0] = 'cosmetic_tattoo_start':
 	cla & *clr
-	gs 'salon', 'discount', 2000
+	
 	'<br>We currently offer five levels of cosmetic tattoos: light, vibrant, sultry, professional and celebrity.<br>Please keep in mind that these procedures are permanent.<br>Also, be aware that after procedure using regular cosmetics will be difficult.<br>Price is set at <<salon_rate>><b>₽</b>'
 	if money >= salon_rate or karta + bankDebtLimit >= salon_rate:
+		gs 'salon', 'discount', 2000
 		if masseuse['jobtype'] > 0:  
 			epayments['value'] = 1000
 		else
@@ -2480,6 +2498,7 @@ if $ARGS[0] = 'cleanvar':
 	killvar 'partialservice'
 	killvar 'fullservice'
 	killvar 'epayments'
+	killvar 'salon_rate'
 end
 
 --- salon ---------------------------------