@kojometa: just tested out your script. The count down timer is neat, actually I did the same with TimerInit and TimerDiff, but I agree with vanadium, letting the script sleep through the whole time is quite counter intuitive, just a temporary measure til we can find better solution. DropTroop is helpful for testing as well (small mistake at Case $VSButton, GUICtrlSetData($DTButton,"Dropping Troops..."). About goblin or giants, I've tested with giants, bar, archer and it was able to drop giants, bar, archer in consecutive order. Haven't tested goblin though. Basically what func AssignTroop does is sorting troops arcording to combobox selection. For example, selection: Giant,Bar,Bar,Arch. Troop orders in attack panel will be: Bar, Arch, Giant.
@vanadium: seems like it's how lf does, but I find it unproductive as sometimes my troops finish clearing all defense and go for loot when it detects no gold change and just end battle. i think to detect when the Return Home screen appears would be best
@AtoZ: can you share how you detect maxed zoom out? it's quite an important check to ensure the rest of the script function.
I'm still testing on GkevinOD's script. I made a script to brute force the correct first pixels but it's quite tedious to test on elixir as I'm not sure which pixels he uses for each number (trying to replicate the hex in photoshop). But this is a good approach.
Opt ('PixelCoordMode', 2)
Func ZoomOut()
For $z = 1 To 20 Step 1
ControlSend($Title, "", "", "{DOWN}", 0)
$PixelZoom1 = PixelGetColor( 854, 10,$HWnD)
$PixelZoom2 = PixelGetColor(8,14,$HWnD)
$PixelZoom3 = PixelGetColor(551, 662,$HWnD)
If $PixelZoom1=2176264 Then
If $PixelZoom2=1649672 Then
IF $PixelZoom3=7770925 Then
$z=20
EndIf
EndIf
EndIf
Sleep(200)
Next
EndFunc
