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 23, 2014#281

same problem, when d.elixir appears...
bot stop.

Dec 23, 2014#282

Okay I will work on fixing that soon.

Dec 23, 2014#283

Okay I will work on fixing that soon.

I am having the Dark Elixir issue too, hopefully you found the way to fix it. let me know if you needs any screenshot.
Oh ya, when you have giant troop, the troop dropping will pop out an error. i am skipping giant training for now.

Dec 23, 2014#284

Okay I think I manage to fix @fly3r01's problem and I believe that the Dark Elixir issue might be fixed too. However, in the case that it has not been fixed, please provide a screenshot when it becomes idle.

Use this for new Bot.au3:
http://pastebin.com/yUNhbAHg

You can also get the compiled bot here:
http://s000.tinyupload.com/index.php?file_id=27370253802162613985

Otherwise, we are improving fast! Reporting any bugs will help contribute to the development of this bot!

Dec 23, 2014#285

Thanks a lot for helping to fix the errors Kevin. Latest errors all relate to func ReadValue, which run fines on my machine but may fails on other computers. For non-dark value, y will be off by +1 or -1, and base x,y might be 52,93 or 53,94 accross different computers. Both checksearch and returnhome also use your code, so it's quite important to get it right. Can you name what you edited so I can update it in my code easier? I've just added Dark and Trophy search mode and still testing for errors.

Dec 23, 2014#286

@GkevinOD,

Great, dark elixir issue fixed. I salute you! Thanks for the fast fix.

Nothing wrong with Barcher troops, only with Giant troops, there is an error.

Image source

Dec 23, 2014#287

Help

Dec 23, 2014#288

@fly3r01: damn it was a silly mistake. Thanks a lot for the screenshot, lots people were reporting this problem
can you go to the code and find func DropSingle($T,$W)

Func DropSingle($T, $W)
  While 1
 If $RunState = False Then
ExitLoop
 EndIf
 If CheckTroop($T) Then
Select
Case $T = "Giant"
ControlClick ($HWnD, "","", "left", "1", $Giant[0], $Giant[1])
Sleep(300)
For $i = 1 to 5 Step 1
  ControlClick ($HWnD, "","", "left", "1", $W[$i][0], $W[$i][1])
  Sleep(100)
Next
Sleep(3000)

Change For $i = 1 to 5 Step 1 to For $i = 0 to 4 Step 1
I updated the code with GkevinOD's fix, corrected giant's issue and implement check for Out of sync error in search screen (haven't had chance to test this, but should work fine). Will upload the code in a minute

Dec 23, 2014#289

@mikypark: Was BlueStacks already open? It seems to me that BlueStacks was not open so $aPos didn't get any value thus the non-accesible error. In short just open BS first before opening the bot

This discussion is closed.