Can also confirm that the bot seems to be clicking different coordinates than the ones set manually.
Video Game Reverse Engineering
v 5.4.0
Started by GkevinOD · Jan 4, 2015
There are several weird things in v5.4, I gonna use the v5.3.1 by @Antidote for now. Need to take a rest.
Will check the latest versions and test it later. See you later guys.
It clicks the barracks fine for me at least however it then clicks the upgrade button instead of the train troops button. Also it says barracks unavailable when I use the hide option.
@blindpick Okay I found the source of the problem, if you want to fix it immediately use the coordinates from v5.3
Otherwise if you want to fix it in the code, replace the FindPos() function with this and also add getBSpos() above:
Func getBSPos()
$aPos = ControlGetPos("BlueStacks App Player", "", "[CLASS:BlueStacksApp; INSTANCE:1]")
$tPoint = DllStructCreate("int X;int Y")
DllStructSetData($tpoint, "X", $aPos[0])
DllStructSetData($tpoint, "Y", $aPos[1])
_WinAPI_ClientToScreen(WinGetHandle(WinGetTitle("BlueStacks App Player")), $tPoint)
$BSpos[0] = DllStructGetData($tpoint, "X")
$BSpos[1] = DllStructGetData($tpoint, "Y")
$CtrlHandle = ControlGetHandle("BlueStacks App Player", "", "BlueStacksApp1")
EndFunc
Func FindPos()
getBSPos()
Local $Pos[2]
While 1
If _IsPressed("01") Then
$Pos[0] = MouseGetPos()[0] - $BSpos[0]
$Pos[1] = MouseGetPos()[1] - $BSpos[1]
Return $Pos
EndIf
WEnd
EndFunc
@DiviniT3a go to line 1146 try changing the 10 as the last parameter to a lower number like 5. I'll find a better pixel for it because I have max barracks.
Local $TrainPos = _PixelSearch(155, 603, 694, 605, Hex(0x603818, 6), 5) ;Finds Train Troops button
i tried replacing the coordinates but only level 2 barracks is trying to make troops.

level 5 and 4 barracks is not. it's trying to click upgrade.

@GkevinOD Thanks man that worked. It was line 1144 btw for anyone that has the same issue.
edit: Also is the background function still in development and not supposed to work or is there just something wrong on my end?
Hey guys, can we have a compiled version with the hotfix?
Best Regards
just download autoit @goondar it's easy.
i just fixed the barracks problem thank's @GkevinOD
also had trouble with coordinates and fining buttons after patch. but with your fix it works.
i think the pixel is fine only variation of 10 was too much!
This discussion is closed.