Clickdraw Clicker

Clickdraw Clicker

Not enough ratings
[Script] Playing the Game Script
By aquatorrent
AutoHotKey script to play the game.
   
Award
Favorite
Favorited
Unfavorite
Introduction
I know, i know that there are useful scripts available in the discussion thread already. In fact, i even used one of the scripts to finish the game. However, i found that it's a bit lacking, especially if you want to get the "kill in less than 8 rounds" achievements. I did try RuFleS's script before, but i couldn't seem to find a way to copy paste the whole thing to JitBit and it somehow didn't work as i want even after i put them manually. I probably messed it up or something, but i was too lazy to solve the problem and uninstalled the whole thing. I also downloaded another macro recorder[www.macrocreator.com] before, but i had a problem in configuring it as i want and since i'm too lazy (again) to watch youtube video to learn it, i ended up coming back to AHK[autohotkey.com] and modified the script as i want.

That being said, this script requires you to install AutoHotkey[autohotkey.com].

Based on the AutoHotkey website,
AutoHotkey is a free, open-source scripting language for Windows that allows users to easily create small to complex scripts for all kinds of tasks such as: form fillers, auto-clicking, macros, etc.

This script might or might not require some configuration on your end so you have to install AutoHotkey to use this script.

Lastly, use it at your own risk.
Prerequisities
You might need to check your own coordinates and replace the one in the script based on your screen. Install this script by copying and paste-ing this code in a notepad and save it with an .ahk extension (ex: getcoordinates.ahk). Make sure that it has .ahk extension instead of .txt. You can change the setting in Windows here[support.microsoft.com].

CoordMode, Mouse, Window SetTimer, Check, 20 return Check: MouseGetPos, xx, yy PixelGetColor, color, %xx%, %yy% Tooltip %color% %xx% %yy% return ~^c:: Clipboard = %color% %xx% %yy% ClipWait return Esc::ExitApp

This code will basically retrieve your cursor's screen coordinates and pixel color based on your active window and show it in your cursor's tooltip. You can copy the information to your clipboard by pressing CTRL+C to paste it somewhere else (in a notepad, for example) by pressing CTRL+V. Lastly, the app will close if you press Escape button or you can right click the 'H' icon in your right taskbar tray and click Close. The second option works for all AHK script so you can also use it to close the actual script below.
Normal Mode Script
This script is used to kill enemies in stage 1-8. Actually, Lollipop's script is enough if you want to just finish the level but you can use the script below if you want more.

SetMouseDelay, 1 Pause Loop{ restart: ; checking battle mode or not PixelGetColor, color, 420, 330 if (color != 0x78BEFF){ ; click below box PixelGetColor, color, 320, 648 if(color != 0x30E0A0){ Click down, 320, 648 Click up {ClickUp} } ; click above box PixelGetColor, color, 436, 420 if (color != 0x30E0A0){ Click down, 436, 420 Click up {ClickUp} } ; click gun Click down, 90, 700 Click up {ClickUp} goto restart } ; hit 'hard' button (upon losing) PixelGetColor, color, 312, 530 if (color == 0x082554) { Click down, 314, 448 Click up {ClickUp} goto restart } } F8::Pause Esc::ExitApp

I'll break down the script one by one. Note that anything that starts with comma is treated as comments; meaning that they won't be compiled by the compiler.

Also, make sure that the window Clickdraw Clicker is active when you retrieve the coordinates (if you're not sure, just click somewhere in the game beforehand).


; checking battle mode or not PixelGetColor, color, 420, 330 if (color != 0x78BEFF){ ; code }

These lines of code checks whether you're in a battle or not. Change the coordinates (420, 330) based on the number you see in this picture and the color based on the color hex you see in this picture.





; click below box PixelGetColor, color, 320, 648 if(color != 0x30E0A0){ Click down, 320, 648 Click up {ClickUp} }

These lines of code checks whether the box in your defending side (the one placed below) have already clicked or not. If not, it'll click the box. Change both 320, 648 coordinates to whatever you got when your cursor is in the green tick zone like in the picture below. You also can change the color hex when necessary.





; click above box PixelGetColor, color, 436, 420 if (color != 0x30E0A0){ Click down, 436, 420 Click up {ClickUp} }

This is basically the same as above except that it's for the box in your attacking side (the one placed above). Change the coordinates and color hex when necessary.





; click gun Click down, 90, 700 Click up {ClickUp}

These lines just allows you to click the gun to shoot the enemy. Again, change the coordinates when necessary.





; hit 'hard' button (upon losing) PixelGetColor, color, 312, 530 if (color == 0x082554) { Click down, 314, 448 Click up {ClickUp} goto restart }

These lines of code checks whether you're in the difficulty selection screen. Change 312, 530 and 0x082554 based on whatever your cursor points to when you move it to the brown colored back button like in this picture and change 295, 309 to the difficulty button coordinates. This script uses the coordinates for the hard difficulty but you can change it to other difficulties as you see fit.





That's the basic stuff that you need to do. The script will end after you win and you can choose other enemies to fight afterwards.
- Advanced Script
This can be used if you're aiming for "killing in less than 8 rounds" achievements. Note that the achievement has been removed but i'll just leave it here just in case.

SetMouseDelay, 1 Pause Loop{ restart: ; checking battle mode or not PixelGetColor, color, 420, 330 if (color != 0x78BEFF){ ; click below box PixelGetColor, color, 320, 648 if(color != 0x30E0A0){ Click down, 320, 648 Click up {ClickUp} } ; click above box PixelGetColor, color, 436, 420 if (color != 0x30E0A0){ Click down, 436, 420 Click up {ClickUp} } ; click gun Click down, 90, 700 Click up {ClickUp} ; hit reload button if in round 10 PixelGetColor, color, 132, 90 if (color == 0x1A3E47) { Click down, 550, 80 Click up {ClickUp} goto restart } goto restart } ; hit 'hard' button (upon losing) PixelGetColor, color, 312, 530 if (color == 0x082554) { Click down, 314, 448 Click up {ClickUp} goto restart } ; restart the match when the screen goes to main menu PixelGetColor, color, 196, 192 if (color == 0x133860) { Click down, 304, 288 Click up {ClickUp} Click down, 372, 444 Click up {ClickUp} Click down, 314, 448 Click up {ClickUp} goto restart } ; restart the match when the screen goes to winning screen PixelGetColor, color, 213, 296 if (color == 0x0000FF) { Click down, 304, 288 ;basically click anywhere on the screen to go to main menu Click up {ClickUp} Click down, 304, 288 Click up {ClickUp} Click down, 372, 444 Click up {ClickUp} Click down, 314, 448 Click up {ClickUp} goto restart } } F8::Pause Esc::ExitApp

This is basically the same as above with a few improvements.


; hit reload button if in round 10 PixelGetColor, color, 132, 90 if (color == 0x1A3E47) { Click down, 550, 80 Click up {ClickUp} goto restart }

These line of codes will check whether you're in round 10 or not and press the reload button if you are in round 10.
Change the 132, 90, and 0x1A3E47 to the coordinate where the 0 in 'Round 10' text is. Note that the color hex will change if the coordinates is different so don't worry about the color hex not being the same as the one in the code.
Change the 550, 80 to the reload button location.





; restart the match when the screen goes to main menu PixelGetColor, color, 196, 192 if (color == 0x133860) { Click down, 304, 288 Click up {ClickUp} Click down, 372, 444 Click up {ClickUp} Click down, 295, 309 Click up {ClickUp} goto restart }

These line of codes will check if you're in the main menu.
Change the 196, 192 and 0x133860 to the coordinates and color hex of the brown 'C' letter in the main menu.
Change the 304, 288 to the coordinates of the 'Start' menu.
Change the 372, 444 to the coordinates of the stage button (i used stage 7 for this code).
Change the 295, 309 to the coordinates of the difficulty button (i used hard for this code).





; restart the match when the screen goes to winning screen PixelGetColor, color, 213, 296 if (color == 0x0000FF) { Click down, 304, 288 ;basically click anywhere on the screen to go to main menu Click up {ClickUp} Click down, 304, 288 Click up {ClickUp} Click down, 374, 432 Click up {ClickUp} Click down, 330, 446 Click up {ClickUp} goto restart }

These lines of code will check if you land on winning screen and restart the match if it is.
This can be a bit tricky since you probably won't have an access to retrieve the coordinates so if you can't do that for now, you can comment the line for the time being by either deleting the whole line or giving commas (;) to all of the lines like this. Also, if you're having trouble to locate the red ribbon coordinates for certain enemies, you can try to get it show up on easier enemies like El Chapo since they have the same coordinates for all enemies. (Credits to PabloDiablo for figuring that out!)

; restart the match when the screen goes to winning screen ;PixelGetColor, color, 213, 296 ;if (color == 0x0000FF) { ; Click down, 304, 288 ;basically click anywhere on the screen to go to main menu ; Click up {ClickUp} ; Click down, 304, 288 ; Click up {ClickUp} ; Click down, 374, 432 ; Click up {ClickUp} ; Click down, 330, 446 ; Click up {ClickUp} ; goto restart ;}

That being said, if you can retrieve the coordinates, DO NOT CLICK ANYTHING IN THE GAME. Clicking anywhere in the game will redirect you to the main menu. Instead, click the top of the window that has 'Clickdraw Clicker' text in it to switch it to an active window.
Change 213, 296, and 0x0000FF to any red coordinates in the screen.
The rest is basically the same as the previous one, with the addition of the first click being done twice to move the screen to the main menu screen.

- Reload Script
If you somehow notice that the script is being slow after a certain period of time, you can use this script to reload the script every few minutes. Sometimes, the script might also slow down even though you have just reloaded the script, but i think it works better than not reloading it at all.

Also, unlike the other scripts, this script will start clicking automatically. This is because you need the script to keep on clicking after reload.

#MaxThreadsPerHotkey, 2 SetMouseDelay, 1 ; change active window IfWinExist Clickdraw Clicker { WinActivate Send {F8} } F8:: ; restart script every minute if toggle is on SetTimer, restartScript, % (toggle := !toggle) ? -60000 : "Off" while toggle { ; checking battle mode or not PixelGetColor, color, 420, 330 if (color != 0x78BEFF){ ; click below box PixelGetColor, color, 320, 648 if(color != 0x30E0A0){ Click down, 320, 648 Click up {ClickUp} } ; click above box PixelGetColor, color, 436, 420 if (color != 0x30E0A0){ Click down, 436, 420 Click up {ClickUp} } ; click gun Click down, 90, 700 Click up {ClickUp} ; hit reload button if in round 10 PixelGetColor, color, 132, 90 if (color == 0x1A3E47) { Click down, 550, 80 Click up {ClickUp} continue } continue } ; hit 'hard' button (upon losing) PixelGetColor, color, 312, 530 if (color == 0x082554) { Click down, 314, 448 Click up {ClickUp} continue } ; restart the match when the screen goes to main menu PixelGetColor, color, 196, 192 if (color == 0x133860) { Click down, 304, 288 Click up {ClickUp} Click down, 372, 444 Click up {ClickUp} Click down, 314, 448 Click up {ClickUp} continue } ; restart the match when the screen goes to winning screen PixelGetColor, color, 213, 296 if (color == 0x0000FF) { Click down, 304, 288 ;basically click anywhere on the screen to go to main menu Click up {ClickUp} Click down, 304, 288 Click up {ClickUp} Click down, 372, 444 Click up {ClickUp} Click down, 314, 448 Click up {ClickUp} continue } } return restartScript: reload return Esc::ExitApp

This is basically the same as above with a few improvements.


; change active window IfWinExist Clickdraw Clicker { WinActivate Send {F8} }

This is used to switch your current active window to Clickdraw Clicker game and press F8 to start clicking.


; restart script every minute if toggle is on SetTimer, restartScript, % (toggle := !toggle) ? -60000 : "Off"

This is used to refresh the script every minute. You can change it however you want after converting the time to milisecond (60000ms is 1 minute if you're wondering).

The rest is just changing the loop to a while loop and goto to continue to accommodate the timer.
- Additional Script for Flynn
Both advanced and reload script can be used for all bosses except if you're aiming to defeat Flynn (Stage 7's boss) in less than 8 rounds. The scripts won't work in this stage without some adding some lines because there are 2 bosses in this stage: Flynn and Grizz. You'll start by fighting Grizz (the brown bear) and then switch to Flynn (the human) after you landed 3 shots on him. There is an invicibility frame for around 3 seconds when the switch happened, meaning that you won't land any shots if you shoot at that time. Since the script shoots very fast, you'll very likely shoot more than 3 times when the invicibility frame shows up, making you lose the opportunity to win the game in less than 8 rounds. Many thanks for PabloDiablo for letting me know about this and RuFleS for confirming it.

Note that the achievement has been removed but i'll just leave it here just in case.

Anyways, in order to make both scripts work for Flynn, you need to add this:

; give some time until flynn shows up PixelGetColor, color, 327, 457 if (color == 0x2891E1){ Sleep, 6000 }

above this:

; click gun Click down, 90, 700 Click up {ClickUp}

in either advanced or reload script.

This will make sure that the script will wait for 6 seconds after you defeat Grizz to wait for the 'dead and changing to Flynn' animation to finish. Actually, you can change the 6000 value (which means 6 seconds if you're wondering) to 3000 (3s) to make it faster, but i decided to doubled it up instead to really make sure that the invicibility frame has gone after that time frame.

For the coordinates, you need to change 327, 457 to the area that doesn't show as orange background when Grizz and Flynn are standing and attacking, but show as orange background when Grizz dead (falls to the ground). I recommend you to choose the area around the nose for this.

As for the color hex (0x2891E1), change it to the orange background color.

Basically, the script means that "if the pixel coordinate that you selected has the same color as the background color, the script will wait for 6 seconds before continuing to fire".



Anyways, if you have trouble in locating where to place those line of codes, i'll give you the full script below.

Advanced Script
SetMouseDelay, 1 Pause Loop{ restart: ; checking battle mode or not PixelGetColor, color, 420, 330 if (color != 0x78BEFF){ ; click below box PixelGetColor, color, 320, 648 if(color != 0x30E0A0){ Click down, 320, 648 Click up {ClickUp} } ; click above box PixelGetColor, color, 436, 420 if (color != 0x30E0A0){ Click down, 436, 420 Click up {ClickUp} } ; give some time until flynn shows up PixelGetColor, color, 327, 457 if (color == 0x2891E1){ Sleep, 6000 } ; click gun Click down, 90, 700 Click up {ClickUp} ; hit reload button if in round 10 PixelGetColor, color, 132, 90 if (color == 0x1A3E47) { Click down, 550, 80 Click up {ClickUp} goto restart } goto restart } ; hit 'hard' button (upon losing) PixelGetColor, color, 312, 530 if (color == 0x082554) { Click down, 314, 448 Click up {ClickUp} goto restart } ; restart the match when the screen goes to main menu PixelGetColor, color, 196, 192 if (color == 0x133860) { Click down, 304, 288 Click up {ClickUp} Click down, 372, 444 Click up {ClickUp} Click down, 314, 448 Click up {ClickUp} goto restart } ; restart the match when the screen goes to winning screen PixelGetColor, color, 213, 296 if (color == 0x0000FF) { Click down, 304, 288 ;basically click anywhere on the screen to go to main menu Click up {ClickUp} Click down, 304, 288 Click up {ClickUp} Click down, 372, 444 Click up {ClickUp} Click down, 314, 448 Click up {ClickUp} goto restart } } F8::Pause Esc::ExitApp

Reload Script
#MaxThreadsPerHotkey, 2 SetMouseDelay, 1 ; change active window IfWinExist Clickdraw Clicker { WinActivate Send {F8} } F8:: ; restart script every minute if toggle is on SetTimer, restartScript, % (toggle := !toggle) ? -60000 : "Off" while toggle { ; checking battle mode or not PixelGetColor, color, 420, 330 if (color != 0x78BEFF){ ; click below box PixelGetColor, color, 320, 648 if(color != 0x30E0A0){ Click down, 320, 648 Click up {ClickUp} } ; click above box PixelGetColor, color, 436, 420 if (color != 0x30E0A0){ Click down, 436, 420 Click up {ClickUp} } ; give some time until flynn shows up PixelGetColor, color, 327, 457 if (color == 0x2891E1){ Sleep, 6000 } ; click gun Click down, 90, 700 Click up {ClickUp} ; hit reload button if in round 10 PixelGetColor, color, 132, 90 if (color == 0x1A3E47) { Click down, 550, 80 Click up {ClickUp} continue } continue } ; hit 'hard' button (upon losing) PixelGetColor, color, 312, 530 if (color == 0x082554) { Click down, 314, 448 Click up {ClickUp} continue } ; restart the match when the screen goes to main menu PixelGetColor, color, 196, 192 if (color == 0x133860) { Click down, 304, 288 Click up {ClickUp} Click down, 372, 444 Click up {ClickUp} Click down, 314, 448 Click up {ClickUp} continue } ; restart the match when the screen goes to winning screen PixelGetColor, color, 213, 296 if (color == 0x0000FF) { Click down, 304, 288 ;basically click anywhere on the screen to go to main menu Click up {ClickUp} Click down, 304, 288 Click up {ClickUp} Click down, 372, 444 Click up {ClickUp} Click down, 314, 448 Click up {ClickUp} continue } } return restartScript: reload return Esc::ExitApp

Notoriety Mode Script
I don't recommend you to fully automate notoriety mode since the attacking side box's (the one placed above) position of El Chapo is different from the rest. You also need to pick your opponent for this and avoid difficult opponent such as Carlson, Flynn, and Dallas.

SetMouseDelay, 1 Pause Loop{ ; checking battle mode or not PixelGetColor, color, 420, 330 if (color != 0x78BEFF){ ; click below box PixelGetColor, color, 320, 648 if(color != 0x30E0A0){ Click down, 320, 648 Click up {ClickUp} } ; click above box Click down, 430, 400 Click up {ClickUp} ; click above box for el chapo Click down, 430, 350 Click up {ClickUp} ; click gun Click down, 90, 700 Click up {ClickUp} } ; hit 'hard' button (upon losing) PixelGetColor, color, 312, 530 if (color == 0x082554) { Click down, 314, 448 Click up {ClickUp} continue } } F8::Pause Esc::ExitApp

This script is just basically as the above script with an addition of two click for the above box (one for El Chapo and one for the others).

I didn't add a reload on winning condition because as i said before, you need to supervise the script to pick the right enemies.
- Modifying the Save Files
There is also a way to 'cheat' this achievement by modifying the save files. The save file for this game in Windows is located in C:\Users\<your user name>\AppData\Local\Western2. Open savedata.ini and modify the "stats" value as you like. Here is my save data at the moment if you need a reference:

[options] music="0.000000" [player] stats="202.000000" [levels] bounties="9.000000" level8="3.000000" level7="3.000000" level6="3.000000" level5="3.000000" level4="3.000000" level3="3.000000" level2="3.000000" level1="3.000000" [achievements] enemy7timesplayed="24953.000000" enemy5timesplayed="85.000000" enemy4timesplayed="6651.000000" playerhits="100165.000000" enemyhits="60561.000000" shotsfired="135496.000000" enemy1timesplayed="81.000000" enemy2timesplayed="211.000000" enemy3timesplayed="205.000000" enemy6timesplayed="107.000000" enemy8timesplayed="1269.000000"
As you might figure out already, you can't cheat your way to get the "killing in less than 8 rounds" this way.
Utilizing the Script
Press F8 to start and/or pause the script and press Escape to exit the script. You can also close the script by doing right click on the 'H' icon in your taskbar tray and choose exit.

You might have to edit the script coordinates for every enemies and supervise the script for a few runs before leaving it unsupervised to make sure everything works properly.
Workarounds
If you're still having trouble with the script performances, you might want to read this.

My script is running too slow!
First of all, try to use the Reload Script and see if it works for you. If it still doesn't work, try to add this line:
SetBatchLines -1
below
SetMouseDelay, 1
Make sure you put a new line between them!

Example:


SetMouseDelay, 1 SetBatchLines -1 ; the rest of codes

My script is running too fast!
Try changing SetMouseDelay value to a higher one.
SetMouseDelay, 2
Try to add one number to the value and reload the script (either by right clicking the 'H' icon in the taskbar and click reload script or by double clicking your .ahk script and press 'Yes' to replace the instance). If that doesn't work, continue adding a number until the speed is okay for you.

Note that you can also do the other way around; changing the value to 0 or -1 will make the script runs very fast. However, the game might not register your input because you're clicking so fast, making the script to be ineffective.
Afterwords
Finally, it's done. Actually, i was planning to make a script guide for this game since a long time but i haven't got the time to do so. Even though this script can help you to finish the achievements, you also need to have a good spec PC or laptop to make it to work. This script abuses heavily on the RNG calculation in this game; i suspect that the RNG is based on current time and the 'hit' trigger will happen a lot if you squeeze the shots in similar timeframe. That being said, if your script is clicking slowly, chances are it won't really help you to get the "killing less in 8 rounds" achievement.

Let me know if you have a better improvement to be made to the script. This script lets me get all achievements for the game.
9 Comments
aquatorrent  [author] May 25, 2020 @ 7:28pm 
@Shrodu: yeah, but i guess i'll leave it as it is.i already mentioned that the achievement has been removed in the sections but i'll just leave it here in case the dev decided to implement similar achievement.
Trash May 25, 2020 @ 1:18pm 
That said, I don't think you need the speedrun info anymore
Trash May 24, 2020 @ 9:22pm 
Well...aside from various issues with this game, without those dreaded speedrun achievements, it's only a pinch more fair to 100%.

Dev says he's too busy with work to develop games these days...such is life.

But...he is making some tweajs here and there. I'll be giving feedback where I can, hopefully to balance these titles mord for fair completion. But for now, speedruns are a thing of legend...not daily news.
aquatorrent  [author] May 24, 2020 @ 7:30pm 
@Shrodu: whoa, i didn't know that the dev is still active on the game. Thanks for letting me know! :)
Trash May 24, 2020 @ 3:46pm 
Speedruns are removed. I reported the dissatisfaction from players and the dev has removed them.
aquatorrent  [author] Mar 31, 2020 @ 12:51pm 
@RuFleS: nice, thanks for confirming! i'll look at it later then. i guess i'm just being unlucky. :)
RuFleS Mar 31, 2020 @ 11:36am 
Hey, mate! Thanks for your work! I'm planning on making a guide of my own once i get things up and running. I just got the Flynn achievement using a script you can find here https://steamcommunity.com/app/541370/discussions/ . See if that helps you!

Cheers!
aquatorrent  [author] Mar 25, 2020 @ 11:36pm 
@PabloDiablo: you're welcome! good luck for your achievement hunting! :)
PabloDiablo Mar 25, 2020 @ 9:18pm 
Thank you so much for your detailed guide. It is quite universal as well, since it is going to clarify some AHK possibilities for the reader. At the very least, it did for yours truly ;)