Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TH Sniping Bot
#1
Hey guys, i've been trying to develop a TH sniping bot for clash of clans, and require a little help, or just trying to warrant some friendly discussion on this forum:

A little bit about myself:
I've been lurking on this forum for a while, and want to contribute (even if my ideas are shitty) so here goes:
I'm 100% new to all forms of programming and this is the first time i've ventured into such fields. The most I have is a short high-school introductory course to Java programming (extremely limited).
So far what i've created is a simple script using pulover's macro creator just to create my army composition for farming: (x23 barb, x23 arch, x2 barb)
I've exported it to AHK: http://pastebin.com/XspAkLQT

While experimenting with this program, and lurking a bit on the other threads, the idea of image comparing came to mind and the easiest thing I could think of was to make a TH Sniping bot. This could be quite profitable in higher levels (masters,crystal) due to the loot bonus, so it could be a more fool-proof idea than making bots that raid bases.
So far, I have absolutely no idea where to start, or what program to use to create it, but i've thought of the logic to create such bot:
My ideas are as follows:
- Army is pumped out using simple keyclicks + mouseclick script (x2 rax making barbs, x2 rax making archers)
- Picture of Townhall is compared to their base to grab the location of townhall
- A small 20x20 pixel area is compared on top of the townhall
- Hopefully there will be a unique pixel (colour) within this area, which it's x,y location can be located
- If that x,y location is somewhere near the edge of the map, it'll deploy 25x arch/25x barb in a circle around said pixel ( or just on the edge )
- if TH isn't located near the edge, it'll next the base and do it again
- Rinse and Repeat

To expand on the pixel comparison/image comparison idea:

The reason why I'm looking for a unique pixel in the 20x20 area is so that incase theres multiple shades of the color elsewhere on the map it won't mistake it for being the townhall. Furthermore, when the pixel is found, it'll have to be located in a region for troops to deploy. (see following image: http://puu.sh/duvVv/e46f4ef606.png) So if the x,y co-ordinate of the pixel is within the green parameter the troop deployment will execute.


That's basically it. Would like to hear some of your guys feedback, and if anyone would like to take me under their wing and teach me a bit about the basics of scripting/programming that would be nice as well. (don't make fun of me for being an idiot I probably have 0 idea what im doing.)
Reply
#2
Solid plan, I've noticed that a lot of the other users are using AutoIt for creating bots. Maybe you'd be interested in trying that out, it seems like you could create a much more advanced bot with it than the current tool you're using.
Reply
#3
Reply
 


Forum Jump:


Users browsing this thread: 1 Guest(s)

About The Bytecode Club

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