12-26-2014, 02:26 AM
Quite cool all sides atk with increased drop speed.. Looks artificial though.. I think antidote or GkevinOD are already improving the attack. But for those who can't wait for the better codes.. I modded their code a bit so try using them atm:
Code:
Global $DropSpeed=4
Func DropTroop()
While 1
GUICtrlSetData($Results, "Start to drop troops" & @CRLF, -1)
If $RunState = False Then
ExitLoop
EndIf
;---------------- ALL SIDES GIANT
DropSingle("Giant",$UpLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Giant",$UpRight)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Giant",$LowLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Giant",$LowRight)
If $RunState = False Then
ExitLoop
EndIf
;----------------ALL SIDES GIANT DROP ROUND 2
DropSingle("Giant",$UpLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Giant",$UpRight)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Giant",$LowLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Giant",$LowRight)
If $RunState = False Then
ExitLoop
EndIf
;---------------- ALL SIDES BARBS
DropSingle("Barbarian", $UpLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Barbarian", $UpRight)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Barbarian", $LowLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Barbarian", $LowRight)
If $RunState = False Then
ExitLoop
EndIf
;---------------- ALL SIDES ARCHERS
DropSingle("Archer", $UpLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Archer", $UpRight)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Archer", $LowLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Archer", $LowRight)
If $RunState = False Then
ExitLoop
EndIf
;---------------- ALL SIDES BARBS Round 2
DropSingle("Barbarian", $UpLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Barbarian", $UpRight)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Barbarian", $LowLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Barbarian", $LowRight)
If $RunState = False Then
ExitLoop
EndIf
;---------------- ALL SIDES ARCHERS Round 2
DropSingle("Archer", $UpLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Archer", $UpRight)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Archer", $LowLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Archer", $LowRight)
If $RunState = False Then
ExitLoop
EndIf
;---------------- ALL SIDES BARBS Round 3
DropSingle("Barbarian", $UpLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Barbarian", $UpRight)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Barbarian", $LowLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Barbarian", $LowRight)
If $RunState = False Then
ExitLoop
EndIf
;---------------- ALL SIDES ARCHERS Round 3
DropSingle("Archer", $UpLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Archer", $UpRight)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Archer", $LowLeft)
If $RunState = False Then
ExitLoop
EndIf
DropSingle("Archer", $LowRight)
If $RunState = False Then
ExitLoop
EndIf
;----------------- END
GUICtrlSetData($Results, "Finish dropping troops. Waiting for battle end." & @CRLF, -1)
ExitLoop
WEnd
EndFunc
Func DropSingle($T, $W)
While 1
If $RunState = False Then
ExitLoop
EndIf
If CheckTroop($T) Then
Select
Case $T = "Giant"
ControlClick ($HWnD, "","", "left", "1", $Giant[0], $Giant[1])
Sleep(300/$DropSpeed)
; For $i = 0 to 4 Step 1
For $i = 2 to 4 Step 2
ControlClick ($HWnD, "","", "left", "1", $W[$i][0], $W[$i][1])
Sleep(100/$DropSpeed)
Next
Sleep(3000/$DropSpeed)
If $RunState = False Then
ExitLoop
EndIf
Case $T = "Barbarian"
ControlClick ($HWnD, "","", "left", "1", $Barbarian[0], $Barbarian[1])
Sleep(300/$DropSpeed)
; For $x = 0 to 7 Step 1
For $x = 0 to 3 Step 1 ; MADE IT HALF TO ACCOMODATE ALL SIDES
For $i = 0 to 4 Step 1
ControlClick ($HWnD, "","", "left", "1", $W[$i][0], $W[$i][1])
Sleep(100/$DropSpeed)
Next
Next
Sleep(1000/$DropSpeed)
If $RunState = False Then
ExitLoop
EndIf
Case $T = "Archer"
ControlClick ($HWnD, "","", "left", "1", $Archer[0], $Archer[1])
Sleep(300/$DropSpeed)
; For $x = 0 to 7 Step 1
For $x = 0 to 3 Step 1 ; MADE IT HALF TO ACCOMODATE ALL SIDES
For $i = 0 to 4 Step 1
ControlClick ($HWnD, "","", "left", "1", $W[$i][0], $W[$i][1])
Sleep(100/$DropSpeed)
Next
Next
Sleep(1000/$DropSpeed)
If $RunState = False Then
ExitLoop
EndIf
Case $T = "Goblin"
ControlClick ($HWnD, "","", "left", "1", $Goblin[0], $Goblin[1])
Sleep(300/$DropSpeed)
; For $x = 0 to 7 Step 1
For $x = 0 to 3 Step 1 ; MADE IT HALF TO ACCOMODATE ALL SIDES
For $i = 0 to 4 Step 1
ControlClick ($HWnD, "","", "left", "1", $W[$i][0], $W[$i][1])
Sleep(100/$DropSpeed)
Next
Next
Sleep(300/$DropSpeed)
EndSelect
EndIf
ExitLoop
WEnd
EndFunc