01-16-2015, 10:20 AM
So I'm trying to add WBs into the mix. I know this will be an option down the road, but I'm impatient, and wanted to try adding myself
I'm trying to figure out logistically how this would work. From looking at the code, these cases click the troop selection until the color changes/dims, correct?
I've added Case 4 as wallbreakers with the correct coords, but I can't figure out where this comes into play.
Could I just modify the Click() in the Giant case & have it click each 4 times?
Any tips would be great!
I'm trying to figure out logistically how this would work. From looking at the code, these cases click the troop selection until the color changes/dims, correct?
Code:
Switch $barrackTroop[$i]
Case 0
While _ColorCheckVariation(Hex(PixelGetColor($BSpos[0] + 329, $BSpos[1] + 297), 6), Hex(0xDC3F70, 6), 20)
If $RunState = False Then ExitLoop (2)
Click(220, 320) ;Barbarian
WEnd
Case 1
While _ColorCheckVariation(Hex(PixelGetColor($BSpos[0] + 217, $BSpos[1] + 297), 6), Hex(0xF8AD20, 6), 20)
If $RunState = False Then ExitLoop (2)
Click(331, 320) ;Archer
WEnd
Case 2
While _ColorCheckVariation(Hex(PixelGetColor($BSpos[0] + 217, $BSpos[1] + 297), 6), Hex(0xF8AD20, 6), 20)
If $RunState = False Then ExitLoop (2)
Click(432, 320) ;Giant
WEnd
Case 3
While _ColorCheckVariation(Hex(PixelGetColor($BSpos[0] + 217, $BSpos[1] + 297), 6), Hex(0xF8AD20, 6), 20)
If $RunState = False Then ExitLoop (2)
Click(546, 320) ;Goblins
WEnd
Case 4
While _ColorCheckVariation(Hex(PixelGetColor($BSpos[0] + 217, $BSpos[1] + 297), 6), Hex(0xF8AD20, 6), 20)
If $RunState = False Then ExitLoop (2)
Click(648, 320) ;Wallbreakers
WEnd
EndSwitch
I've added Case 4 as wallbreakers with the correct coords, but I can't figure out where this comes into play.
Could I just modify the Click() in the Giant case & have it click each 4 times?
Any tips would be great!