(01-20-2015, 09:08 PM)DiviniT3a Wrote: @chase Barch works absolutely fine for me. Unfortunately it doesn't work with giants on my end. I'm going to have to try it again and post the error when I get a chance but that's beside the point.
edit: Here is the error I get If I don't include barbarians
- #comments-start
- SetLog("Dropping first wave of Barbarians")
- For $i = 0 To 4 ;Drop first round of Barbarians
- Click(68 + (72 * $Barb), 595) ;Select Troop
- If _Sleep(100) Then ExitLoop (2)
- Click($TopLeft[$i][0], $TopLeft[$i][1], $numBarbPerSpot, 1)
- Click($BottomRight[$i][0], $BottomRight[$i][1], $numBarbPerSpot, 1)
- Next
-
- If _Sleep(1000) Then ExitLoop
- #comments-end
Func DonateCC()
If GUICtrlRead($donatec) = $GUI_CHECKED THEN
While 1
SetLog("Donating for Clan Castle's Troops")
Click(10, 334)
If _Sleep(10000) Then ExitLoop
Click(189, 24)
$DonateTroop = _PixelSearch(112, 150, 122, 685, Hex(0xC0E460, 6), 10)
While IsArray($DonateTroop)
SetLog("Found donate button on " & $DonateTroop[0] & "," & $DonateTroop[1])
Click($DonateTroop[0], $DonateTroop[1]) ; click button donate
If _Sleep(10000) Then ExitLoop
Click(($DonateTroop[0]+200), ($DonateTroop[1]-20),5) ; donate archer
If _Sleep(10000) Then ExitLoop
$DonateTroop = _PixelSearch(112, 150, 122, ($DonateTroop[1]-20), Hex(0xC0E460, 6), 10)
WEnd
(01-23-2015, 11:03 AM)dixonhill Wrote: I added the auto-donations to my own script from the cross-bot, and the way I got them to work reliably was to increase the search area within the clan chat window. See code below. The only things changed were the $DonateTroop pixelsearch coordinates.
Code:Func DonateCC()
If GUICtrlRead($donatec) = $GUI_CHECKED THEN
While 1
SetLog("Donating for Clan Castle's Troops")
Click(10, 334)
If _Sleep(10000) Then ExitLoop
Click(189, 24)
$DonateTroop = _PixelSearch(112, 150, 122, 685, Hex(0xC0E460, 6), 10)
While IsArray($DonateTroop)
SetLog("Found donate button on " & $DonateTroop[0] & "," & $DonateTroop[1])
Click($DonateTroop[0], $DonateTroop[1]) ; click button donate
If _Sleep(10000) Then ExitLoop
Click(($DonateTroop[0]+200), ($DonateTroop[1]-20),5) ; donate archer
If _Sleep(10000) Then ExitLoop
$DonateTroop = _PixelSearch(112, 150, 122, ($DonateTroop[1]-20), Hex(0xC0E460, 6), 10)
WEnd