The Bytecode Club
Log inJoin the club
Video Game Reverse Engineering

[BUG] Attacks end prematurely

Started by barracoda · Jan 12, 2015

5 replies76,179 views
Jan 12, 2015#1

I noticed a couple times that my troops were still attacking, and the bot would end the battle with ~30sec left, even though there was loot still available. I think the troops were working on a storage, but there were a couple collectors left as well.

While TimerDiff($iBegin) < 30000

Is this time left in the match, or does it check every 30 sec? If the first, I may just change it to 0.

Jan 13, 2015#2

I have also noticed this with version 5.4.2.2

Jan 13, 2015#3

I believe I figured it out. Once one of the resources is depleted, it will end the attack. So you could, in theory, have 0 gold left & 200k elixir left, and it would end 😉

~ line 894

If $Gold1 = $Gold2 Or $Elixir1 = $Elixir2 Or $Gold2 = "" Or $Elixir2 = "" Then

I'm going to change this to:

If $Gold1 = $Gold2 Or $Elixir1 = $Elixir2 Or ($Gold2 = "" And $Elixir2 = "") Then

This should fix the issue, assuming parentheses are used the same as other languages.

Jan 14, 2015#4

barracode did upur edit worked? of so can show what you editred?

Jan 14, 2015#5

Yes it worked. You have to edit "COC Bot v5.4.2.2.au3" ... see previous post for location.

Jan 14, 2015#6

Will look into this.

Got something to add?

Log in to post a reply.

Join the conversation