Thread Rating:
  • 3 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
5.4.2.2 + Giants atk and donate troops
#36
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
Reply
 


Messages In This Thread
5.4.2.2 + Giants atk and donate troops - by xtheo - 01-17-2015, 11:28 PM
RE: 5.4.2.2 + Giants atk and donate troops - by dixonhill - 01-23-2015, 11:03 AM

Forum Jump:


Users browsing this thread: 14 Guest(s)

About The Bytecode Club

We're a community forum 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.

Website