NeedMoarFPS

Blackside MMORPG Blog

Saturday, July 19, 2014

Clash of Clans (CoC) Auto Clicker 2.0 (BlueStack)

Name of Game: Clash of Clans
Version: Any
Root Needed?: No

Name of cheat: Clash of Clans (CoC) Auto Clicker 2.0

For those who play Clash of Clans and did not know that you can play on your PC, well, you can. Download BlueStacks. Yay. Play on the PC. Awesome.

So, now that you can play on the PC, here is a stupid little AutoIt script I made. The script will allow you to select troops during battle much faster and accurately than you can on your own. This will also allow you to do what I call 'idle clicking', I.E. click the mouse while you are not there so that you do not get logged off.

I do not wish to inlcude a link to a pre-compiled binary for several reasons:

1) Nobody knows me and should not trust me.
2) AutoIt is regularly flagged as a false positive by many anti-virus programs. I don't want to be accused of spreading something when I am not.
3) I don't always like 'spoon feeding' people. Installing AutoIt and compiling the script is childs play but, I bet you learn something doing it 

To use the script, download and install AutoIt, copy this script into a new file and compile.

There are a few controls for this script:

Press Esc to exit the script.

F1 - F11: Pressing these keys while you are attacking another village will rapidly select a troop for deployment. F1 - F11 corresponds with the troop pictures presented during the attack. In the image below, I have utilized my amazing MS Paint skillz to demonstrate:

To use the anti-idle clicking, hover your mouse over a building and press the left Shift button and F1 at the same time. I would recommend hovering over a resource building, such as a mine or pump. Once the anti-idle is engaged, you may use your computer normally however, DO NOT minimize BlueStacks. It will not work minimized. To dis-engage the anti-idle, press the left Shift button and F2 at the same time. CoC has a built in timer that will disconnect you after six hours of continious connection. If there is a way around that timer, I don't know how to do it. If you figure it out, please, let us all know. I do not know how to detect a disconnection so, this script will not be able to recover from it. If you do get disconnect, it will just keep clicking away as if there is nothing wrong.

Start BlueStacks, start CoC, start your new file. Enjoy.

Code:
#include <TrayConstants.au3>

Opt ("MouseClickDelay", 0)
Opt ("MouseClickDownDelay", 0)
Opt ("MouseCoordMode", 0)

Global $ThisVariable = 0

SplashTextOn ("CoC Clicker", "CoC Clicker 2.0", 200, 100)
Sleep (3000)
SplashOff ()

$Title = "BlueStacks App Player for Windows (beta-1)" ; The Name Of The Game...
$Full = WinGetTitle ($Title) ; Get The Full Title..
$HWnD = WinGetHandle ($Full) ; Get The Handle
WinActivate ($HWnD)

; Press Esc to terminate script
; Press F1 - F11 to select a troop
; Press Left Shift + F1 to enable anti-idle clicking
; Press Left Shift + F2 to disable anti-idle clicking

HotKeySet ("{ESC}", "Terminate")

HotKeySet ("{F1}", "HotKeyPressed")
HotKeySet ("{F2}", "HotKeyPressed")
HotKeySet ("{F3}", "HotKeyPressed")
HotKeySet ("{F4}", "HotKeyPressed")
HotKeySet ("{F5}", "HotKeyPressed")
HotKeySet ("{F6}", "HotKeyPressed")
HotKeySet ("{F7}", "HotKeyPressed")
HotKeySet ("{F8}", "HotKeyPressed")
HotKeySet ("{F9}", "HotKeyPressed")
HotKeySet ("{F10}", "HotKeyPressed")
HotKeySet ("{F11}", "HotKeyPressed")

HotKeySet ("+{F1}", "ClickyIdle")
HotKeySet ("+{F2}", "ClickyIdleDisable")

While 1
   Sleep (100)
WEnd

Func Terminate()
   SplashTextOn ("Goodbye", "Thanks For Playing :)", 200, 100)
   Sleep (500)
   SplashOff ()
   Exit
EndFunc   ;==>Terminate

Func HotKeyPressed ()
   Local $CurrentMouseLocation = MouseGetPos ()
      Switch @HotKeyPressed ; The last hotkey pressed.
         Case "{F1}" ; Select troop position 1
            MouseMove (232, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
         Case "{F2}" ; Select troop position 2
            MouseMove (286, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
         Case "{F3}" ; Select troop position 3
            MouseMove (352, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
         Case "{F4}" ; Select troop position 4
            MouseMove (414, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
         Case "{F5}" ; Select troop position 5
            MouseMove (471, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
            Case "{F6}" ; Select troop position 6
            MouseMove (534, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
         Case "{F7}" ; Select troop position 7
            MouseMove (597, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
            Case "{F8}" ; Select troop position 8
            MouseMove (660, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
         Case "{F9}" ; Select troop position 9
            MouseMove (722, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
            Case "{F10}" ; Select troop position 10
            MouseMove (784, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
            Case "{F11}" ; Select troop position 11
            MouseMove (846, 513, 0)
            MouseClick ("left")
            MouseMove ($CurrentMouseLocation[0], $CurrentMouseLocation[1], 0)
      EndSwitch
EndFunc   ;==>HotKeyPressed

Func ClickyIdle ()
   Opt ("MouseClickDelay", 10)
   Opt ("MouseClickDownDelay", 10)
   TrayTip ("Anti-idle enabled", "CoC Anti-idle is enabled. Press Left Shift + F2 to disable. You may use your computer normally while anti-idle is enabled however, do not minimize BlueStacks.", 0, $TIP_ICONASTERISK)
   Local $CurrentMouseLocation = MouseGetPos ()
   $ThisVariable = 1
   While $ThisVariable = 1
      If IsHWnD ($HWnD) And WinExists ($Full) <> '0' Then ; Win Check
          ControlClick ($HWnD, "","", "left", "1", $CurrentMouseLocation[0], $CurrentMouseLocation[1])
              Sleep (8000)
          ControlClick ($HWnD, "","", "left", "1", $CurrentMouseLocation[0], $CurrentMouseLocation[1])
      EndIf
   Sleep (40000)
   WEnd
   Opt ("MouseClickDelay", 0)
   Opt ("MouseClickDownDelay", 0)
EndFunc    ;==>ClickyIdle

Func ClickyIdleDisable ()
   TrayTip ("Anti-idle disabled", "CoC Anti-idle is disabled. Press Left Shift + F1 to enable.", 0, $TIP_ICONASTERISK)
   $ThisVariable = 0
EndFunc    ;==>CLlckyIdleDisable
Oh, in case I need to mention this directly, this is for BlueStacks. Obviously, it will not work on a regular Android device. If you are using any other Android simulator on your PC, try changing this line to whatever the name of your window is:
Code:
$Title = "BlueStacks App Player for Windows (beta-1)" ; The Name Of The Game...

0 comments:

 

My Blog List