The Bytecode Club - Reverse Engineering Forum
[BUG] Attacks end prematurely - Printable Version

+- The Bytecode Club - Reverse Engineering Forum (https://the.bytecode.club)
+-- Forum: Lobby (https://the.bytecode.club/forumdisplay.php?fid=1)
+--- Forum: Game Cheating, Botting & Reverse Engineering (https://the.bytecode.club/forumdisplay.php?fid=97)
+--- Thread: [BUG] Attacks end prematurely (/showthread.php?tid=306)



[BUG] Attacks end prematurely - barracoda - 01-13-2015

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.

Code:
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.


RE: [BUG] Attacks end prematurely - copper - 01-14-2015

I have also noticed this with version 5.4.2.2


RE: [BUG] Attacks end prematurely - barracoda - 01-14-2015

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 Wink

~ line 894
Code:
If $Gold1 = $Gold2 Or $Elixir1 = $Elixir2 Or $Gold2 = "" Or $Elixir2 = "" Then

I'm going to change this to:
Code:
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.


RE: [BUG] Attacks end prematurely - pinay26 - 01-14-2015

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


RE: [BUG] Attacks end prematurely - barracoda - 01-14-2015

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


RE: [BUG] Attacks end prematurely - Mystery7 - 01-14-2015

Will look into this.