Change:
Func RecruitTroops()
;Recruits more troops
$troopPortrait = ""
If $troops = "templar" Then
$troopPortrait = "templarportrait"
ElseIf $troops = "warlock" Then
$troopPortrait = "warlockportrait"
EndIf
Do
ClickImage($buttonsDir,"scrollarrow(down)")
Until CheckFor($buttonsDir,$troopPortrait)
$troopRecruitY = $gY
ClickImage($buttonsDir,"recruit",0,$troopRecruitY, @DesktopWidth,@DesktopHeight,0.5,50)
ClickImage($buttonsDir,"ok")
ClickImage($buttonsDir,"x")
EndFunc
to:
Func RecruitTroops()
;Recruits more troops
MouseMove (x,y,0) ;change x,y for coords just a little up the scrolldown arrow
MouseDown ("left")
Sleep (5000)
MouseUp ("left")
Sleep (1000)
MouseClick ("left",x,y,1,0) ;x,y = coords of "recruit" button on "recruit troops" windows
ClickImage($buttonsDir,"ok")
ClickImage($buttonsDir,"x")
EndFunc
this should scrolldown till you see warlock then click on the good "recruit" button
Func RecruitTroops()
;Recruits more troops
$troopPortrait = ""
If $troops = "templar" Then
$troopPortrait = "templarportrait"
ElseIf $troops = "warlock" Then
$troopPortrait = "warlockportrait"
EndIf
Do
ClickImage($buttonsDir,"scrollarrow(down)")
Until CheckFor($buttonsDir,$troopPortrait)
$troopRecruitY = $gY
ClickImage($buttonsDir,"recruit",0,$troopRecruitY, @DesktopWidth,@DesktopHeight,0.5,50)
ClickImage($buttonsDir,"ok")
ClickImage($buttonsDir,"x")
EndFunc
to:
Func RecruitTroops()
;Recruits more troops
MouseMove (x,y,0) ;change x,y for coords just a little up the scrolldown arrow
MouseDown ("left")
Sleep (5000)
MouseUp ("left")
Sleep (1000)
MouseClick ("left",x,y,1,0) ;x,y = coords of "recruit" button on "recruit troops" windows
ClickImage($buttonsDir,"ok")
ClickImage($buttonsDir,"x")
EndFunc
this should scrolldown till you see warlock then click on the good "recruit" button