here is my current code with the added autoheal program.
Code:
#include <GUIConstantsEx.au3>
GUICreate("Jaret's Bot", 335, 200)
GUICtrlCreateLabel("Skill 1", 8, 10)
$key1 = GUICtrlCreateInput("", 40, 8, 50)
GUICtrlCreateLabel("Delay", 8, 44)
$time1 = GUICtrlCreateInput("", 40,40, 50)
GUICtrlCreateLabel("Skill 2", 8, 74)
$key2 = GUICtrlCreateInput("", 40,72, 50)
GUICtrlCreateLabel("Delay", 8, 104)
$time2 = GUICtrlCreateInput("", 40,104, 50)
$x = 0
$y = 0
$color = 0
$newColor = 0
$status = "off"
$startbutton = GUICtrlCreateButton("Start", 190, 8, 60)
GUISetState(@SW_SHOW)
HotKeySet("{END}", "close")
HotKeySet("{Insert}", "_getDefault")
While 1
$msg = GUIGetMsg()
Select
Case $msg = $startbutton
WinActive ("Lineage II")
_skills()
_autoHeal
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
Exit
EndSelect
WEnd
Func close() ;This is a function and doesn't actually run unless you tell it to.
Exit
EndFunc
Func _skills
$send1 = GUICtrlRead($key1)
$sleep1 = GUICtrlRead($time1)
While 1
Send($send1)
Sleep($sleep1)
WEnd
EndFunc
Func _autoHeal
While 1
If $status = "on" Then
If _getCurrentColor($x, $y) <> $color Then
Send("3")
EndIf
EndIf
WEnd
Func _getDefault()
$coord = MouseGetPos()
$x = $coord[0]
$y = $coord[1]
$color = Hex(PixelGetColor( $coord[0], $coord[1]), 6)
$status = "on"
EndFunc
Func _getCurrentColor($xDef, $yDef)
$newColor = Hex(PixelGetColor( $xDef, $yDef), 6)
Return ($newColor)
EndFunc
Code:
HotKeySet("{Insert}", "_getDefault")
$x = 0
$y = 0
$color = 0
$newColor = 0
$status = "off"
While 1
If $status = "on" Then
If _getCurrentColor($x, $y) <> $color Then
Send("3")
EndIf
EndIf
WEnd
Func _getDefault()
$coord = MouseGetPos()
$x = $coord[0]
$y = $coord[1]
$color = Hex(PixelGetColor( $coord[0], $coord[1]), 6)
$status = "on"
EndFunc
Func _getCurrentColor($xDef, $yDef)
$newColor = Hex(PixelGetColor( $xDef, $yDef), 6)
Return ($newColor)
EndFunc






