AtoZ   12-26-2014, 02:26 AM
[Image: g9LEop.png]
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
Replace the 2 functions above and don't forget to add the declaration. I only tried barchers with this one.. Enjoy!
  
Users browsing this thread: 12 Guest(s)
Konloch Software - Bytecode Viewer - Reverse Engineering Forum
Copyright © 2014-2025 The Bytecode Club. Powered By MyBB.
CC0 Unless Specified Otherwise.