Jump to content

Clan level checking


Recommended Posts

I was testing the bot with my low level account that doesn't have a clan castle yet. I noticed that after the bot attempted to detect my clan level, it couldn't close the clan tab back. It then proceeded to verify collectors/collect resources with the chat still open.

The problem was here (ClanLevel.au3, line 38):

SetLog("Please join a Clan ...", $COLOR_GREEN)
If _ColorCheck(_GetPixelColor($aCloseChat[0], $aCloseChat[1]), Hex($aCloseChat[2], 6), $aCloseChat[3]) Then
; Clicks chat thing
Click($aCloseChat[0], $aCloseChat[1], 1, 0, "#0470")
EndIf
Return

The bot is supposed to check for the orange "close chat" button, but the screen hasn't been captured yet. The pixel for the orange button needs to the captured again. There is an easy fix: in the _GetPixelColor function call, set the parameter $bNeedCapture to true, so the bot will capture the pixel before checking if it is the correct color.

		SetLog("Please join a Clan ...", $COLOR_GREEN)
If _ColorCheck(_GetPixelColor($aCloseChat[0], $aCloseChat[1],1), Hex($aCloseChat[2], 6), $aCloseChat[3]) Then
; Clicks chat thing
Click($aCloseChat[0], $aCloseChat[1], 1, 0, "#0470")
EndIf
Return

Link to post
Share on other sites
×
×
  • Create New...