First of all, I think you only can be Archer or Warrior (at a given time)
so you should use a radio button not checkboxes.
[function is GUICtrlCreateRadio]
Second, you should not bind a Key to two different functions, i mean you must use only one function.
Third, for your info message ("type F5 to start/stop"), i think you should use a label because you are overwriting
the text describing your checkboxes.
So, here it is :
Opt("GUIOnEventMode", 1)
Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 0)
#include <GUIConstants.au3>
HotKeySet("{F5}", "On")
HotKeySet("{ESC}", "Terminate")
Dim $SearchMob=0
GUICreate("Test",150,100,100,100)
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate")
$Label=GUICtrlCreateLabel("F5 to turn on bot.",10,5,130,15)
$Radio1=GUICtrlCreateRadio("Warrior",10,35,130,15)
$Radio2=GUICtrlCreateRadio("Archer",10,65,130,15)
GUICtrlSetState ($Radio1, $GUI_CHECKED)
GUISetState()
While 1
If $SearchMob Then Attack()
Sleep(1000)
WEnd
Func On()
$SearchMob=NOT $SearchMob
If $SearchMob Then
GUICtrlSetData($Label,"F5 to turn off bot.")
Else
GUICtrlSetData($Label,"F5 to turn on bot.")
EndIf
EndFunc
Func Jump()
$x=Random(0,1024,1)
$y=Random(0,690,1)
MouseMove($x,$y,0)
Send("{CTRLDOWN}")
MouseClick("Left")
Send("{CTRLUP}")
Sleep(100)
EndFunc
Func Attack()
$Coords=PixelSearch(200,100,825,600,12059395,5)
If NOT @error Then
if BitAND(GUICtrlRead($Radio1), $GUI_CHECKED) = $GUI_CHECKED then
MouseClick("left",$Coords[0],$Coords[1]+20,1,0)
Sleep(2500)
else
MouseClick("right",$Coords[0],$Coords[1]+20,1,0)
Sleep(2500)
endif
Else
Jump()
EndIf
EndFunc
Func Terminate()
Exit
EndFunc;==> Terminate()