The Bytecode Club
Log inJoin the club
Video Game Reverse Engineering

Developing Bot

Started by Antidote · Dec 5, 2014

1,033 replies21,297,466 viewsLocked
Dec 24, 2014#371

the latest d/l links are like 4 post above your post im pretty sure

Dec 24, 2014#372

The "disconnected due to inactivity" issue is fixed (I believe) in latest version (refer to page 1)
The Zoom Out function use pixel color to detect max zoom out but there's color variation between different computers so I updated it with GkevinOD's code (thanks again). Also optimize search function so it will skip to next base if it fails to read gold value (~5%) and restart if out of sync error appears. I updated latest links in first post so you guys can easily keep track of latest development.
@some(rnd)guy: bypassing 6 hr forced break not added yet so your wife just helped you indeed lol

Dec 24, 2014#373

The "disconnected due to inactivity" issue is fixed (I believe) in latest version (refer to page 1)
The Zoom Out function use pixel color to detect max zoom out but there's color variation between different computers so I updated it with GkevinOD's code (thanks again). Also optimize search function so it will skip to next base if it fails to read gold value (~5%) and restart if out of sync error appears. I updated latest links in first post so you guys can easily keep track of latest development.
@some(rnd)guy: bypassing 6 hr forced break not added yet so your wife just helped you indeed lol

Amazing work @Antidote just testing right now, it seems good!

Right now it's just as good as LazyPressing BOT 🙂

Would be great to see King and Queen implemented in battle, 4 ways attacks and deadbase search,
KEEP UP the AMAZING WORK!

Dec 24, 2014#374

@goondar: thanks, 4 ways atatck & King, Queen is actually quite easy to implement and will be added soon (4 ways is already in the code, just not activated yet). For deadbase I'm gonna need more time (need to use imagesearch, which is what it lacks compared to lf robot)

Dec 24, 2014#375

After reading through the thread, and seeing the work everyone is putting in, I was motivated to help out. I'm not too savy with coding, though I intend to give it a shot. However since I'm jumping in after you've all created a function bot, maybe I can help lower barriers to entry for new users by drafting an installation and user guide.

Edit: solve my problem below... I've ran into this using other bots, but generally I have to do a full computer reboot to have the resolution changes be effective

[ At the moment, I'm struggling to get my setup off and running. I wasn't able to enable the option within Developer Options. My bluestacks doesn't show this under settings, and I have checked to make sure I have the latest version.

Assuming that's not the problem, I'm next having trouble with locating the barracks. What is the step by step here? Do I hit start and then Locate Barracks, or just Locate Barracks? Then, I've gathered I need to click on the actual barracks to map them out. (side note, I created a new account for testing purposes and only have 3 barracks. thoughts on this working?)]

Dec 24, 2014#376

@goondar: thanks, 4 ways atatck & King, Queen is actually quite easy to implement and will be added soon (4 ways is already in the code, just not activated yet). For deadbase I'm gonna need more time (need to use imagesearch, which is what it lacks compared to lf robot)

@Antidote
first 2 attacks went good, but as soon as i gem boosted the barracks, the bot can't train troops any longer, it keep selecting the racks first then spam clicking on an elixir storage, i tried to Locate Barracks multiple time now without any luck,

if there is anything we can do to help (not involving code) just say a word🙂

Dec 24, 2014#377

Very concerning... I got the bot to run after identifying my barracks. Troops trained, was waiting to observe search function... Bot clicks on plus sign next to gems, selects $9.99 gem pack, and buys gems using my default payment option....

Now, I got the gems so I guess whatever. But what in the hell just happened....

Dec 24, 2014#378

@Squrl: I just added a neccessary check in the code so it will work with any number of barracks (for ex. in the selection drop down if you have 3 barracks just choose troops for the first 3 and leave the other as Barrack 04, same for 2 barracks). It's the same links in first post
@goondar: I've been boosting barrack constantly (will add auto boost soon) and having no issue. So it was able to train normally and only misbehave after you boost? Spam clicking is actually because it misclick the barrack and continue to click on troop training (thus the repeated spam). There might be a slightly variation in y-axis that cause the bot to misclick barrack, can you try to move the main screen up (or down) after max zoom out to see if it can click on barrack?
I'd really appreciate any help. Actually coding is not hard for me, I'm having more problem with logic flow or error check. If you can suggest features or improvement (if you observe something can be done better I'll try to translate it to code). For now I need more input on attack strategy (troop composition, amount to drop, waiting time in between, ..). But the most important part is error reporting (best if screenshot provided :D) as I can only test on my own computer.

Dec 24, 2014#379

@Squrl: Very sorry for that.. What happened is it misclick on barrack (either because you have less than 4 barracks or barracks location not set up properly) and continue to click train troop, then click close barrack (this is where it misclick plus sign in buy gems as it's the same location). I have edited to fix this issue (updated in same link in first post). Can you try again and if you notice it misclick the barrack, just press stop immediately. Once barrack is located properly, all next run won't have any issue

Dec 24, 2014#380

@Squrl: Very sorry for that.. What happened is it misclick on barrack (either because you have less than 4 barracks or barracks location not set up properly) and continue to click train troop, then click close barrack (this is where it misclick plus sign in buy gems as it's the same location). I have edited to fix this issue (updated in same link in first post). Can you try again and if you notice it misclick the barrack, just press stop immediately. Once barrack is located properly, all next run won't have any issue

Hey Antidote, yup that makes perfect sense. The gem purchase went through because my barracks were located at the same X/Y coordinates as the confirm purchase button, imagine that lol.

I grabbed the newer version, and your setup for 3 barracks is working great!

From experience, the trophy drop feature of LP is really useful. Any plans to work on this implementation? I'm thinking given my shocking first attempt, a beginners guide could be very useful 🙂 I think I'll start drafting tomorrow

This discussion is closed.