Code:
GLOBAL $AdjustTolerance=0
Global $Tolerance[5][11]=[[55,55,55,80,70, 70,75,80,0,75, 65],[55,55,55,80,80, 70,75,80,0,75, 65],[55,55,55,80,80, 70,75,80,0,75, 65],[55,55,55,80,80, 60,75,75,0,75, 60],[55,55,55,80,80, 70,75,80,0,75, 65]]
Func ZombieSearch()
$ZombieCount = 0
For $i = 0 To 3 Step 1
$ZC = 0
For $s = 0 To ($ZombieFileSets - 1) Step 1
For $p = 0 + $ZSExclude To 10 Step 1
If FileExists($E[$s][$p]) Then
$Area[$s][$p][$i] = _ImageSearchArea($E[$s][$p], 0, $Lx[$i], $Ly[$i], $Rx[$i], $Ry[$i], $IS_x[$p][$i], $IS_y[$p][$i], $Tolerance[$s][$p]+$AdjustTolerance)
If $Area[$s][$p][$i] > 0 Then
$ZC = 1
ExitLoop (2)
EndIf
Else
$Area[$s][$p][$i]=0
EndIf
Next
Next
$ZombieCount += $ZC
Next
If $ZombieCount > 0 Then
Return True
Else
Return False
EndIf
EndFunc ;==>IS_Area
I'm using this one with SET B pictures for TH9. Kindly replace the two function with above code.
Note: $tolerance=55 may have disabled the imagesearch corresponding the file images. Good for collectors level 9 above, but idk for th7 below. I think you may replace those image files but I think there is no need anymore.
~~~
I'm a th9 and I'm getting ATLEAST 12m gold per day with this. When I optimize(w/o boosting), I sometimes reach 50% more but could not maintain trophy level. I believe this is already better than commercial bots in terms of performance LOL.
I would like to update the pictures but I don't see the need to do so because of its performance and the method used may not work for 32bit systems. Alternatively, we may use other algorithm for deadbase search like pixelsearch/pixelgetcolor/ memory reading.
Further suggestions for Bot: Optimization/Efficiency Logs like gold/troop, gold per hour, atk per hour, idle time per hour, etc.