Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[BUG] Attacks end prematurely
#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.

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.
Reply
#2
I have also noticed this with version 5.4.2.2
Reply
#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 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.
Reply
#4
barracode did upur edit worked? of so can show what you editred?
Reply
#5
Yes it worked. You have to edit "COC Bot v5.4.2.2.au3" ... see previous post for location.
Reply
#6
Will look into this.
Be Wise & Good As Much As You Could
-Mystery7 Shadetongue
Reply
 


Forum Jump:


Users browsing this thread: 4 Guest(s)

About The Bytecode Club

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