1
0
Переглянути джерело

Stupid arrays, for ARRPOS you need the`$` in the name.

netuttki 1 рік тому
батько
коміт
ee9739aa9e
1 змінених файлів з 5 додано та 5 видалено
  1. 5 5
      locations/prostitution_functions.qsrc

+ 5 - 5
locations/prostitution_functions.qsrc

@@ -72,7 +72,7 @@ end
 if $ARGS[0] = 'prostitute_work_hours':
 	if $region = 'pushkin':
 		RESULT = (hour >= 0 and hour < 2) or (hours >= 12 and hour < 14) or (hour >= 17 and hour <= 23)
-	elseif $region = 'pav' or MID($loc,1,4) = 'pav_':
+	elseif $region = 'pav' or $MID($loc,1,4) = 'pav_':
 		RESULT = (hour >= 12 and hour < 14) or (hour >= 17 and hour <= 23)
 	else
 		RESULT = 0
@@ -80,7 +80,7 @@ if $ARGS[0] = 'prostitute_work_hours':
 end
 
 if $ARGS[0] = 'is_solicitation_location':
-	RESULT =$curloc ! 'shop' and $loc = $curloc and menu_off and ($loc_arg = '' or $loc_arg = 'start') and ARRPOS('solicitation_locations', $loc)
+	RESULT = $curloc ! 'shop' and $curloc ! 'prostitution_pavlovsk' and $loc = $curloc and menu_off = 0 and ($loc_arg = '' or $loc_arg = 'start') and (ARRPOS('$solicitation_locations', $loc) ! -1)
 end
 !!-----------------------------------------------------------------------------------------------------------------------
 !!-----------------------------------------------------------------------------------------------------------------------
@@ -247,8 +247,8 @@ end
   
 if $ARGS[0] = 'check_solicitation_event':
 	gs 'prostitution_functions', 'work_clothes'
-    if prostitute['blocked'] = 0 and func('prostitution_functions', 'prostitute_work_hours') and func('prostitution_functions','is_solicitation_location'):
-		if prostitute['pavlovsk'] = 1 and prostitute['pav_time_hour'] ! hour and rand(-20, 70) < minut and $curloc ! 'prostitution_pavlovsk' and $curloc ! 'shop' and menu_off = 0 and $loc = $curloc: 
+	if prostitute['blocked'] = 0 and func('prostitution_functions', 'prostitute_work_hours') and func('prostitution_functions','is_solicitation_location'):
+		if prostitute['pavlovsk'] = 1 and prostitute['pav_time_hour'] ! hour and rand(-20, 70) < minut: 
 			gs 'prostitution_pavlovsk', 'chance'
 		end
 		
@@ -258,7 +258,7 @@ if $ARGS[0] = 'check_solicitation_event':
 
 		if prostitute['pav_residential_prost_day'] ! daystart: prostitute['pav_residential_prost_day'] = daystart
 		!!pav_residential_prost_day
-    end
+	end
 end