Ok lets compile all the codes into one. This will work if you check the search for dead base function. First your bot will find a base that meets your resources preference, then will check if the base is a dead base or has its town hall located outside or has a town hall level 7 and below. If any of this 3 condition is true, it will attack that base.
just add this under the dead base if clause
just add this under the dead base if clause
Code:
ElseIf $searchTH <= 6 Then
SetLog("~~~~~~~Weak Town Hall Found!~~~~~~~", $COLOR_GREEN)
ExitLoop
ElseIf $THLoc = "Outside" Then
SetLog("~~~~~~~Farming Base Found!~~~~~~~", $COLOR_GREEN)
ExitLoop