sure i just thouGh the other parts wasnt important
$rest_key = InputBox("Key setting", "Which key is your rest button?", "9")
$Pot_key = InputBox("Key setting", "Which key is your potion/food button?", "4")
MsgBox(0, "Next step", "Set your mouse on your stamina bar at approx 15% and press enter")
$stamina_xy = MouseGetPos ()
$stamina_co = PixelGetColor ($stamina_xy[0], $stamina_xy[1])
SplashTextOn ("Type it down:","Your X,Y coordinates are:"&" X = "&$stamina_xy[0]&" Y = "&$stamina_xy[1]&" Colour = "&$stamina_co, 150,150,100,100,16)
$loc_x = InputBox("Key setting", "Please input the X coordinate shown in the window","x")
$loc_y = InputBox("Key setting", "Please input the Y coordinate shown in the window","y")
$stamina_colour = InputBox("Key setting", "Please input the colour code shown in the window","colour code")
SplashOff ( )
While 1=1 ; Keeping the program alive
HotKeySet ("{ESC}", "terminate")
HotKeySet ("{F1}", "auto_rest")
WEnd
Func auto_rest() ; Restin, eating and back to work.
while 1=1
If PixelGetColor ($loc_x, $loc_y) <> $stamina_colour Then
SplashTextOn ( "You have less than 10%", "Beginning to heal stamina", 180, 70, 350,120,2)
Else
If PixelGetColor ($stamina_x, $stamina_y) = $stamina_colour Then
SplashTextOn ( "Done healing", "Begin gathering", 180, 70, 350,120,2)
EndIf
EndIf
WEnd
EndFunc
Func terminate() ; The exit bot function
ToolTip('Bot shuttin down',600,200,"",1,2)
sleep (1000)
exit
endfunc
Func TogglePause() ; the pause function
$Paused = NOT $Paused
While $Paused
ToolTip('Please press "F8" to resume!',600,200,"",1,2)
sleep(1000)
WEnd
ToolTip("")
EndFunc