Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deadbase Search

Your private message is disabled. LOL.

Dinobot sent a lot of images to update zombiesearch so I need testers for the 3 imagesets. It's time consuming for me to test all images LOL and I'm busy atm so I need help.

Must add this screencapture to villagesearch func like this:
                  If ZombieSearch() Then
                     SetLog("~~~~~~~Dead Base Found!~~~~~~~")
                        SetLog("~~~~~~~Not dead base, skipping~~~~~~~")
                    Local    $Date = @MDAY & "." & @MON & "." & @YEAR
                    Local    $Time = @HOUR & "." & @MIN
                        _ScreenCapture_CaptureWnd(@ScriptDir & "\SkippedZombies\" & $Date & " at " & $Time & ".jpg", $hWnd)
                     Click(750, 500) ;Click Next

;Must add this at the top:
DirCreate(@ScriptDir & "\SkippedZombies\")

Take note guys which set or settings are more prone to hang.

$ZSexclude values will depend on your TH level. Basically every step excludes a collector based from the lows and fills.
Recommended settings TH9= 2-3, TH8=1-2, TH7=0-1.

SETA = Original PLUS NEW images (Thanks to Dinobot): Collectors 6 and up are now included.

SETB= 2 side cut imgs

SETC= Condensed SetB imgs, less loops.

All sets must have varying tolerance in order to work. I haven't tested SET A and B because SET C I think has the most efficient design.

Recommended Tolerance:
SET A = 90 (Probably because just added images)
SET B = 65 (This worked on SET C)
SET C = 65 (80 above gives false positives (FP). 70 some FP as well.
As long as you don't skip dead bases, you may lower tolerance.

For image testing you may use this:
#include <ImageSearch.au3>
#include <MsgBoxConstants.au3>

HotKeySet("{ESC}", "Terminate")

Func Terminate()
   Exit 0


Global $Title = "BlueStacks App Player"
Global $HWnD = WinGetHandle (WinGetTitle($Title))

Global $ZC=0,$ZombieCount=0;, $E
Global $SearchZombie=0, $ZombieCount=0

Global $ZombieFileSets=5 ;Variant Image to use organized as per Folder
Global $Tolerance=70
Global $ZSExclude=3 ;Exlude lowest collector level for ZombieSearch. LowestCollector: $ZSExclude=0 means Search Lv6 up. Recommended Th9 = 2-3 (Start Elixir Lv9)

Global $Lx[4]= [ 0, 400, 0, 400 ]
Global $Ly[4]= [ 0, 0, 265, 265 ]
Global $Rx[4]= [ 460, 860, 400, 860 ]
Global $Ry[4]= [ 325, 325, 590, 590 ]

Global $MatchCount=0, $match=0

Global $Area[11][4]
Global $IS_x[11][4], $IS_y[11][4], $E[5][11]
;   Global $Area[5][4], $IS_x[8][4], $IS_y[8][4], $E[5][11]

$E[0][0] = @ScriptDir&"\images\ELIX1\E6F9.bmp"
$E[0][1] = @ScriptDir&"\images\ELIX1\E7F9.bmp"
$E[0][2] = @ScriptDir&"\images\ELIX1\E8F9.bmp"
$E[0][3] = @ScriptDir&"\images\ELIX1\E9F9.bmp"
$E[0][4] = @ScriptDir&"\images\ELIX1\E10F8.bmp"
$E[0][5] = @ScriptDir&"\images\ELIX1\E10F9.bmp"
$E[0][6] = @ScriptDir&"\images\ELIX1\E11F8.bmp"
$E[0][7] = @ScriptDir&"\images\ELIX1\E11F9.bmp"
$E[0][8] = @ScriptDir&"\images\ELIX1\E12F7.bmp"
$E[0][9] = @ScriptDir&"\images\ELIX1\E12F8.bmp"
$E[0][10] = @ScriptDir&"\images\ELIX1\E12F9.bmp"

$E[1][0] = @ScriptDir&"\images\ELIX2\E6F9.bmp"
$E[1][1] = @ScriptDir&"\images\ELIX2\E7F9.bmp"
$E[1][2] = @ScriptDir&"\images\ELIX2\E8F9.bmp"
$E[1][3] = @ScriptDir&"\images\ELIX2\E9F9.bmp"
$E[1][4] = @ScriptDir&"\images\ELIX2\E10F8.bmp"
$E[1][5] = @ScriptDir&"\images\ELIX2\E10F9.bmp"
$E[1][6] = @ScriptDir&"\images\ELIX2\E11F8.bmp"
$E[1][7] = @ScriptDir&"\images\ELIX2\E11F9.bmp"
$E[1][8] = @ScriptDir&"\images\ELIX2\E12F7.bmp"
$E[1][9] = @ScriptDir&"\images\ELIX2\E12F8.bmp"
$E[1][10] = @ScriptDir&"\images\ELIX2\E12F9.bmp"

$E[2][0] = @ScriptDir&"\images\ELIX3\E6F9.bmp"
$E[2][1] = @ScriptDir&"\images\ELIX3\E7F9.bmp"
$E[2][2] = @ScriptDir&"\images\ELIX3\E8F9.bmp"
$E[2][3] = @ScriptDir&"\images\ELIX3\E9F9.bmp"
$E[2][4] = @ScriptDir&"\images\ELIX3\E10F8.bmp"
$E[2][5] = @ScriptDir&"\images\ELIX3\E10F9.bmp"
$E[2][6] = @ScriptDir&"\images\ELIX3\E11F8.bmp"
$E[2][7] = @ScriptDir&"\images\ELIX3\E11F9.bmp"
$E[2][8] = @ScriptDir&"\images\ELIX3\E12F7.bmp"
$E[2][9] = @ScriptDir&"\images\ELIX3\E12F8.bmp"
$E[2][10] = @ScriptDir&"\images\ELIX3\E12F9.bmp"

$E[3][0] = @ScriptDir&"\images\ELIX4\E6F9.bmp"
$E[3][1] = @ScriptDir&"\images\ELIX4\E7F9.bmp"
$E[3][2] = @ScriptDir&"\images\ELIX4\E8F9.bmp"
$E[3][3] = @ScriptDir&"\images\ELIX4\E9F9.bmp"
$E[3][4] = @ScriptDir&"\images\ELIX4\E10F8.bmp"
$E[3][5] = @ScriptDir&"\images\ELIX4\E10F9.bmp"
$E[3][6] = @ScriptDir&"\images\ELIX4\E11F8.bmp"
$E[3][7] = @ScriptDir&"\images\ELIX4\E11F9.bmp"
$E[3][8] = @ScriptDir&"\images\ELIX4\E12F7.bmp"
$E[3][9] = @ScriptDir&"\images\ELIX4\E12F8.bmp"
$E[3][10] = @ScriptDir&"\images\ELIX4\E12F9.bmp"

$E[4][0] = @ScriptDir&"\images\ELIXSNOW\E6F9.bmp"
$E[4][1] = @ScriptDir&"\images\ELIXSNOW\E7F9.bmp"
$E[4][2] = @ScriptDir&"\images\ELIXSNOW\E8F9.bmp"
$E[4][3] = @ScriptDir&"\images\ELIXSNOW\E9F9.bmp"
$E[4][4] = @ScriptDir&"\images\ELIXSNOW\E10F8.bmp"
$E[4][5] = @ScriptDir&"\images\ELIXSNOW\E10F9.bmp"
$E[4][6] = @ScriptDir&"\images\ELIXSNOW\E11F8.bmp"
$E[4][7] = @ScriptDir&"\images\ELIXSNOW\E11F9.bmp"
$E[4][8] = @ScriptDir&"\images\ELIXSNOW\E12F7.bmp"
$E[4][9] = @ScriptDir&"\images\ELIXSNOW\E12F8.bmp"
$E[4][10] = @ScriptDir&"\images\ELIXSNOW\E12F9.bmp"


Func ZombieSearch()
  WinActivate ($HWnD)
  For $i=0 to 3 Step 1 ;Search per area
      IS_Area($i, $Tolerance)

If $ZombieCount > 1 Then

MsgBox(0,"","$ZombieCount= "&$ZOmbieCount&", $SearchZombie= "&$SearchZombie&", $MatchCount= "&$MatchCount&@CRLF&"----------------FILE1 E6F9"&@CRLF&$Area[0][0]&","&$Area[0][1]&@CRLF&$Area[0][2]&","&$Area[0][3]&@CRLF&"----------------FILE2: E7F9"&@CRLF&$Area[1][0]&","&$Area[1][1]&@CRLF&$Area[1][2]&","&$Area[1][3]&@CRLF&"----------------FILE3:E8F9"&@CRLF&$Area[2][0]&","&$Area[2][1]&@CRLF&$Area[2][2]&","&$Area[2][3]&@CRLF&"----------------FILE4:E9F9"&@CRLF&$Area[3][0]&","&$Area[3][1]&@CRLF&$Area[3][2]&","&$Area[3][3]&@CRLF&"----------------FILE5:E10F8"&@CRLF&$Area[4][0]&","&$Area[4][1]&@CRLF&$Area[4][2]&","&$Area[4][3]&@CRLF&"----------------FILE6:E10F9"&@CRLF&$Area[5][0]&","&$Area[5][1]&@CRLF&$Area[5][2]&","&$Area[5][3]&@CRLF&"----------------FILE7:E11F8"&@CRLF&$Area[6][0]&","&$Area[6][1]&@CRLF&$Area[6][2]&","&$Area[6][3]&@CRLF&"----------------FILE8:E11F9"&@CRLF&$Area[7][0]&","&$Area[7][1]&@CRLF&$Area[7][2]&","&$Area[7][3]&@CRLF&"----------------FILE9:E12F7"&@CRLF&$Area[8][0]&","&$Area[8][1]&@CRLF&$Area[8][2]&","&$Area[8][3]&@CRLF&"----------------FILE10:E12F8"&@CRLF&$Area[9][0]&","&$Area[9][1]&@CRLF&$Area[9][2]&","&$Area[9][3]&@CRLF&"----------------FILE11:E12F9"&@CRLF&$Area[10][0]&","&$Area[10][1]&@CRLF&$Area[10][2]&","&$Area[10][3]&@CRLF)


Func IS_Area($i, $Tolerance) ;Search per area then search per file. If not succeed variant 1 proceed 2 else proceed 3.
  $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[$p][$i]=_ImageSearchArea($E[$s][$p],0,$Lx[$i],$Ly[$i],$Rx[$i],$Ry[$i], $IS_x[$p][$i], $IS_y[$p][$i],$Tolerance)
            If $Area[$p][$i]>0 Then
;   MsgBox(0,"","$Area ["&$i&"] $ZC: "&$ZC&" $march="&$match&" ElixSet["&$s&"] = "&$Area[0][$i]&","&$Area[1][$i]&","&$Area[2][$i]&","&$Area[3][$i]&","&$Area[4][$i])
  ;If $ZC=1 Then
    ;  ExitLoop

With the above code, you could  test your base if will return a false positive. A message will appear and you'll see the collector type hit. So as long as you don't have false positives you may increase tolerance.

It's also important to know if it will still hang for all sets.

Thank You!
I am trying Imageset B.
I added another line, so I could also check later in the screenshot whether the Attacked Zombie was a real Zombie.
Feel free to use it Wink

    AUTOIT Programming
  1. If ZombieSearch() Then
  2. SetLog("~~~~~~~Dead Base Found!~~~~~~~")
  3. Local $Date = <DVZ_ME#3> & "." & <DVZ_ME#4> & "." & <DVZ_ME#5>
  4. Local $Time = <DVZ_ME#6> & "." & <DVZ_ME#7>
  5. _ScreenCapture_CaptureWnd(@ScriptDir & "\AttackedZombies\" & $Date & " at " & $Time & ".jpg", $hWnd)
  6. SetLog("~~~~~~~Not dead base, skipping~~~~~~~")
  7. Local $Date = <DVZ_ME#3> & "." & <DVZ_ME#4> & "." & <DVZ_ME#5>
  8. Local $Time = <DVZ_ME#6> & "." & <DVZ_ME#7>
  9. _ScreenCapture_CaptureWnd(@ScriptDir & "\SkippedZombies\" & $Date & " at " & $Time & ".jpg", $hWnd)
  10. Click(750, 500) ;Click Next

Add this to the very top of the script(important!!!):

    AUTOIT Programming
  1. DirCreate(@ScriptDir & "\AttackedZombies\")


Thanks man! Don't forget this: DirCreate(@ScriptDir & "\AttackedZombies\")
We have autoit syntax highlighting, try [code=autoit with the last ]
Quote:Recommended Tolerance:
SET A = 90 (Probably because just added images)
SET B = 65 (This worked on SET C)
SET C = 65 (80 above gives false positives (FP). 70 some FP as well.
As long as you don't skip dead bases, you may lower tolerance.

Just a question whether I got it right.

The higher the tolerance, the higher the chance to attack an "zombie" even though it isn't one, right?
Very nice work AtoZ and dinobot. I have included new images in testing version (set b) and will post it in development soon.
Also this need to be changed as well right? Otherwise it will give subscript error
    AUTOIT Programming
  1. Global $Area[11][4], $IS_x[11][4], $IS_y[11][4], $E[5][11]

@AtoZ what coc bot version should i paste this code? thanks nice update Smile
I am at Alpha 5.3.4 (the one where king,queen and CC is mostly working) but 5.3 is also fine as far as I know
Ran SetA for a couple of hours now with tolerance 90.
It seems that every single base it matches thinks it has zombies which is usually not the case.
I'll test some more and I'll attach all the screenshots and logs it has been through.
Will test next set soon.

edit: Oh and no hang after 4 hours of running though! Good stuff!

Forum Jump:

Users browsing this thread: 1 Guest(s)

About The Bytecode Club

We're a community focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.