1
0
Selaa lähdekoodia

[fixed] more bugfixes to blackmailer

anjuna krokus 7 kuukautta sitten
vanhempi
sitoutus
eeec75e22f
1 muutettua tiedostoa jossa 12 lisäystä ja 16 poistoa
  1. 12 16
      locations/blackmailer.qsrc

+ 12 - 16
locations/blackmailer.qsrc

@@ -91,15 +91,14 @@ end
 
 if $ARGS[0] = 'add_blackmail_selfie':
 	temp_i = 0
-	if blackmailQW['total_material'] <= 10:
-		:add_blackmail_loop
-		if $blackmailQW['selfie_image_<<temp_i>>'] ! '':
-			temp_i += 1
-			if temp_i < 10: jump 'add_blackmail_loop'
+	:add_blackmail_loop
+	if $blackmailQW['selfie_image_<<temp_i>>'] = $ARGS[1]:
+		killvar 'temp_i'
+		exit
+	elseif $blackmailQW['selfie_image_<<temp_i>>'] ! '':
+		temp_i += 1
+		if temp_i < 10: jump 'add_blackmail_loop'
 
-			temp_i = rand(0, 9)
-		end
-	else
 		temp_i = rand(0, 9)
 	end
 
@@ -108,16 +107,14 @@ if $ARGS[0] = 'add_blackmail_selfie':
 	$blackmailQW['selfie_dress_<<temp_i>>']		= $ARGS[3]
 	 blackmailQW['selfie_LocIndex_<<temp_i>>']	=  ARGS[4]
 	 blackmailQW['selfie_number_<<temp_i>>']	=  ARGS[5]
+	 blackmailQW['total_material'] += 1
 	killvar 'temp_i'
 end
 
 if $ARGS[0] = 'choose_blackmail_image':
+	$result = ''
 	if rand(0, 10) > 0:
-		$result = $blackmailQW['selfie_image_<<rand(0, 9)>>']
-		if $result = '':
-			$result = $blackmailQW['selfie_image_<<rand(0, 8)>>']
-			if $result = '': $result = $blackmailQW['selfie_image_<<rand(0, 7)>>']
-		end
+		$result = $blackmailQW['selfie_image_<<rand(0, min(blackmailQW[''total_material'']-1, 9))>>']
 	end
 	if $result = '': $result = $blackmailQW['init_flashimage']
 end
@@ -814,7 +811,7 @@ end
 !  ARGS[5] = self loc index
 !  ARGS[6] = selfie code
 if $ARGS[0] = 'sms_repeat_switch2':
-	gs 'blackmailer', 'set_SMSTree', $ARGS[4]
+	gs 'blackmailer', 'set_SMSTree'
 
 	gs 'SMStext_builder', 'start'
 		gs 'SMStext_builder', 'send_img', $ARGS[2]
@@ -841,7 +838,6 @@ if $ARGS[0] = 'sms_repeat_switch2':
 			if blackmailQW['stage'] = 6: blackmailQW['stage'] = 7
 			gs 'blackmailer', 'add_blackmail_selfie', $ARGS[2], $ARGS[3], $ARGS[4], ARGS[5], ARGS[6]
 			$temp_path = 'd'
-
 		end
 
 		gs 'SMStext_builder', 'receive', $SMSTree[$temp_path + '20']
@@ -971,6 +967,6 @@ if $ARGS[0] = 'park_repeat':
 end
 
 
-if $ARGS[0] ! 'set_SMSTree': killvar 'SMSTree'
+if $ARGS[0] ! 'set_SMSTree' and $ARGS[0] ! 'add_blackmail_selfie': killvar 'SMSTree'
 
 --- blackmailer ---------------------------------