02-06-2015, 08:45 AM
Hello all,
Im new here and was very interesting how everyone got along with developing a great bot. Thanks to all for making it
I have a small change that I think would be great speeding up the looting process. Ive noticed you dont always need the full let say 200 troops for a loot attack. i think about 150 is more than enough. If the bot begins to search for raids at 150, by the time it finds one and attacks, on return 50 troops will already be trained saving time.
I attempted to play around with the $fullArmy function but it didnt work.
The whole function is skipped when the bot is ran, dont understand why.
This is my non working edit of it:
Func CheckFullArmy()
_CaptureRegion()
Click(364, 435) ;Clicks my army camp
_Sleep(150)
Click(383, 596) ;Clicks info
;A green pixel is looked for at around 3/4 of filled capacity.
$Pixel = _ColorCheck(_GetPixelColor(644, 212), Hex(0x34A800, 6), 20)
If $Pixel Then
$fullArmy = True
Else
$fullArmy = False
EndIf
_Sleep(Random(5, 15, 1))
Click(697, 146) ;to close the info window
EndFunc ;==>CheckFullArmy
Would appreciate anyone that could help
Thank you
Im new here and was very interesting how everyone got along with developing a great bot. Thanks to all for making it
I have a small change that I think would be great speeding up the looting process. Ive noticed you dont always need the full let say 200 troops for a loot attack. i think about 150 is more than enough. If the bot begins to search for raids at 150, by the time it finds one and attacks, on return 50 troops will already be trained saving time.
I attempted to play around with the $fullArmy function but it didnt work.
The whole function is skipped when the bot is ran, dont understand why.
This is my non working edit of it:
Func CheckFullArmy()
_CaptureRegion()
Click(364, 435) ;Clicks my army camp
_Sleep(150)
Click(383, 596) ;Clicks info
;A green pixel is looked for at around 3/4 of filled capacity.
$Pixel = _ColorCheck(_GetPixelColor(644, 212), Hex(0x34A800, 6), 20)
If $Pixel Then
$fullArmy = True
Else
$fullArmy = False
EndIf
_Sleep(Random(5, 15, 1))
Click(697, 146) ;to close the info window
EndFunc ;==>CheckFullArmy
Would appreciate anyone that could help
Thank you