Sign in to follow this  
Followers 0
Shadow14l

[Tutorial] How to make a macro for a game!

4 posts in this topic

First, before I begin, for you strict people out there, when I made the program I meant for 'gay' to mean 'crazy/impossible/hard', just so you know what I mean.

And yes, I did make the program, I made it using GameMaker (I spent less than 10 minutes making it, and I based it off the first tutorial). I'm only saying this to show you that it's not a virus >.>. If you want GameMaker, Google it! Download MY program (Catch the Gay Clownz 2)... HERE - Only if you want too.

Basically what we're gonna try to do is attempt to make a macro for a game that I made. The rules of the game are very simple. You must try to click [catch] each clown for points. Each time you successfully click one, a 'boing' sound will play (hard to hear if there are still a lot of clowns bouncing around fast) and that clown will speed up a bit. The green one is worth 500 points, the red ones are worth 100, and the normal ones (others) are worth 10 points.

If you happen to play my game before looking through this tutorial, then I can remind you of what happens if you click a certain clown too much. It will get so fast, that it will actually go through the outer walls and become unclickable as it explores the outerspace of the program. It has a very very very very very LOW chance of returning to the screen. But you might happen to hear them colliding still if they both left at similar times.

Anyways let's get on to the coding part! Open up any text editor and open "clown" or a similar name with the ".au3" extension with it. Now we're gonna have to use a loop, especially since we want to keep clicking and clicking the clowns, at least until they are all gone to "outerspace". That will be the initial goal. So let's start with a while loop. Let's also add some variables in, just so we can change them for later use (such as to break out of the loop). We are going to have to use 'PixelSearch' to find a color of the clownz so we know where to put the mouse. Let's also put in a click command which clicks the position that the color is found at. We use the color of 'white' which is in the eyes of the clowns. Here's what we have so far, plus a bit of sprucing up:

Posted Image

This script will successfully click each clown very fast and at a good speed. But... if you tried the script, your mouse might have got caught outside of the program (before you can launch it), and stuck opening a sh*t-load of files/folders which will annoy the hell out of you. If you had to restart, please excuse me, but it is a bit of fun for me :). We can add a hotkey (alt+s) to exit out of the program, in case we might get screwed over. We should also use a WinWait until the program loads. You should notice the program only becomes active once you click the three beginning dialogue boxes of it. Let's add a friendly reminder message box of our own to our app. Let's see our edits:

Posted Image

Now for the extras! The green clown is worth the most points and there is only one of him :party:! Let's make a system that clicks the green clown first until it's gone! If we focus only on the green one, we might be able to click it a few extra times before it disappears! Also, what if... well the game is placed different! If it gets set in a different position, then we'll have to find all those values again! Let's set it so we can easily find out the values without doing a thing! Remember that I have a 1024 x 768 screen resolution. Now let's see our finished script:

Posted Image

~Shadow14l

P.S. Comments are welcome, although I'd advise you against flaming! :)

Download completed script as .exe HERE!

Share this post


Link to post
Share on other sites



That's very cool and detailed, but one question: what do you do if the color can change, for example through game-shadows becoming darker ?

Share this post


Link to post
Share on other sites

That's very cool and detailed, but one question: what do you do if the color can change, for example through game-shadows becoming darker ?

You're probably talking about Runescape or WoW so I feel reluctant to even help people to help make shit autos for those games but you use color tolerances for them.

Share this post


Link to post
Share on other sites

Good tutorial but can I use this on games like runescape and stuff like that? Also can I have one more color to search for?

The tutorial worked great I got it to work on my first try :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0