(12-26-2014, 12:26 PM)k3iroll Wrote: I still have issue during the training mode and I believe there are a few more people reported that the bot is clicking on the walls.This also happened to me and even boosted my barracks accidentally. I think the only problem to this is it's too fast. Try adding sleep(100) to this:
The observation that I have is that the bot locates all the 4 barracks successfully.
Below is the detail flow of the issue that I had during training:
1- Bot click barrack to open the barrack training window
2- Bot execute 65 consecutive rapid clicking to train barb/archer
3- Suddenly the barrack training window is closed and bot is still clicking to finish the loop of the 65 times
4- Because the training windows is no longer there, the bot is not clicking on archer/barb, instead the click hits the village structure e.g. wall.
5- The bot finished the 65 clicks
6- Continue to next barracks for training
Some time the bot managed to train all 4 barracks flawlessly without the above incidents.
Some other time, the bot managed to train one or two barracks only without the above incidents.
The reason that I can think of probably because there is another click outside the barrack training window that caused the window to be closed while the bot is performing its 65 consecutive clicks.
Code:
Case $z = "Barbarian"
For $i = 1 To 65 Step 1
ControlClick ($HWnD, "","", "left", "1", 220*$x_ratio, 270*$y_ratio)
If $RunState = False Then
ExitLoop
EndIf
Sleep(50) ----> Change to 100 or 150.
Next