Jump to content

Bot is attacking with 1/2 barbarians, droping trophies

Recommended Posts

Here is log: http://justpaste.it/p6tz

Problem starts at hour in log: 2015-11-23 18:14:37

Not quite sure what caused that, but well:

2015-11-23 18:14:29 : Restarted after Out of Sync Error: Attack Now

2015-11-23 18:14:29 : Going to Attack...

2015-11-23 18:14:37 : ~~~~~~~~~~~~~~ RESOURCE CONDITIONS ~~~~~~~~~~~~~~~

2015-11-23 18:14:37 : Aim: [G]: 968000 [E]: 968000 [D]: 0 [T]: 0 for: Dead Base

2015-11-23 18:14:37 : ~~~~~~~~~~~~~~~ ADVANCED SETTINGS ~~~~~~~~~~~~~~~~

2015-11-23 18:14:38 : THSnipe Combo, 4 Tile(s), Attack: GBarch

2015-11-23 18:14:38 : ==================================================

2015-11-23 18:14:40 : 224> [G]: [E]: [D]: N/A [T]: [TH]: 9, Out

2015-11-23 18:14:40 : No Inferno Towers Detected

It happened on two different accounts, and It happened to me many times. Randomly for how I see it. Im using MBR for 6-7 months.

I was in titan - dropped to champion. Whole day such attacks:

http://justpaste.it/p6ul <-- galery inside,


basically 1 barb, on other account, 1 archer, on both accocunts shitload of wallbreakers, and first unit on the units list was sent to fight (archer or barbarian).

MBR is horribly fine bot, but due to stability - I just cant leave its working for whole day, or it might just loose work of weeks of pushing in couple hours.

From now on, I will enable developer log in my every bot instance to help you guys work out this problem, but this problem is very hard to catch, and it might not apear for weeks of bot runing :/

Link to post
Share on other sites

Have seen this error. Challenge with this bug is most time the debug log looks normal. Only if you see the BS window when it clicks do you see the issue. Was able to watch this error run once, and think I might know the cause?

What I witness was bot had OOS and code became out of sync with actual BS window. The bot would fast start the new attack after OOS, but BS still had not presented end battle button due very long cloud time. Then bot would blindly click on attack and find a match button, and actually be dropping 1-2 barbarians in attack window on lower left side.

There are couple code changes required to fix this rare error condition.

1) In case of OOS due long clouds, bot needs to triple check it has ended the battle, before assuming it has returned to home window (this creates chance for random drop).

2) Preparesearch needs to have the 2 blind button clicks changed to look for the button before clicking (this drops the troops and losses trophy)

3) The OOS error code segments in village search & preparesearch need to have a way to disable fast restart flag when window not available error happens, and not impact the statistics, or add too much wait time, while it adds some delay for COC return to main window and restart attack search.

The fix is not really hard, just time consuming to integrate into the existing search code and not create new errors.

Rumor is one of the developers is working on an improved search function integrating some user MOD's, hopefully they can correct the problem?


Link to post
Share on other sites
  • 2 weeks later...

After having this error push me from down from Titan 3 to Champion 2, decided to write some code to prevent this random drop issue.

Created a new feature on my GitHub for the changed code.


The code changes can be viewed in this commit:


I changed the button location and added color check data to COCBot/functions/Config/ScreenCoordinates.au3 file. Also edited COCBot/functions/Search/PrepareSearch.au3.  

It now looks to make sure CoC is on the main screen and not stuck in clouds or somewhere else for up to 30 seconds, and then checks for a unique color pixel in button to exist before clicking.  If these checks fail, will reset the fast restart OOS flag and force the bot to restart over.  Have tested it works on several PC, but have not witnessed it recover from an error.  

Appreciate if anyone who is seeing this issue could help me test it?

2 areas to watch:

- The 30 second wait time may need to be adjusted shorter?

- need to check that normal checkmainscreen error recovery loop consistently return CoC back to a known condition during restart due error.


Link to post
Share on other sites
  • Create New...