elite*gold: 0
Join Date: Mar 2006
Posts: 583
Received Thanks: 182
|
@dedrick you need to get the color of the faded hp bar through taking a screenshot and getting the color from there...
here the source for anyone thats cares, its pretty simple.....
#include <GUIConstants.au3>
#include <Misc.au3>
$Form1 = GUICreate("Autopoter", 268, 204, 193, 115)
$Checkbox1 = GUICtrlCreateCheckbox("F1", 0, 24, 33, 17)
$Checkbox2 = GUICtrlCreateCheckbox("F2", 0, 40, 33, 17)
$Checkbox3 = GUICtrlCreateCheckbox("F3", 0, 56, 33, 17)
$Input1 = GUICtrlCreateInput("", 112, 8, 49, 21)
$Input2 = GUICtrlCreateInput("", 112, 32, 49, 21)
$Input3 = GUICtrlCreateInput("", 112, 56, 49, 21)
$Input4 = GUICtrlCreateInput("", 112, 80, 49, 21)
$Label1 = GUICtrlCreateLabel("Left:", 80, 8, 25, 17)
$Label2 = GUICtrlCreateLabel("Top:", 80, 32, 26, 17)
$Label3 = GUICtrlCreateLabel("Right:", 80, 56, 32, 17)
$Label4 = GUICtrlCreateLabel("Bottom:", 72, 80, 40, 17)
$Input5 = GUICtrlCreateInput("", 112, 104, 73, 21)
$Label5 = GUICtrlCreateLabel("Color:", 80, 104, 31, 17)
$Button1 = GUICtrlCreateButton("Set Coords", 168, 40, 70, 24)
$Button5 = GUICtrlCreateButton("Start", 104, 152, 65, 33, 0)
$Label10 = GUICtrlCreateLabel("Click...", 0, 8, 36, 17)
GUISetState(@SW_SHOW)
While 1
$Msg = GUIGetMsg()
Select
Case $Msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button1
$a12 = 0
Do
Sleep(10)
If $a12 = 0 Then
If _IsPressed("01") Then
$a11 = MouseGetPos()
$a12= 1
sleep(200)
EndIf
EndIf
If $a12 = 1 Then
If _IsPressed("01") Then
$a13 = MouseGetPos()
$a12 = 3
WinActivate ("Autopoter","")
MsgBox(0,"update", "Left: " & $a11[0] & " Top: " & $a11[1] & " Right: " & $a13[0] & " Bottom: " & $a13[1])
EndIf
EndIf
Until $a12 = 3
GUICtrlSetData($Input1, $a11[0])
GUICtrlSetData($Input2, $a11[1])
GUICtrlSetData($Input3, $a13[0])
GUICtrlSetData($Input4, $a13[1])
Case $msg = $Button5
$a1 = GUICtrlRead ($Checkbox1)
$a2 = GUICtrlRead ($Checkbox2)
$a3 = GUICtrlRead ($Checkbox3)
$a5 = GUICtrlRead ($Input1)
$a6 = GUICtrlRead ($Input2)
$a7 = GUICtrlRead ($Input3)
$a8 = GUICtrlRead ($Input4)
$a9 = GUICtrlRead ($Input5)
Do
sleep(500)
$a10 = PixelSearch($a5, $a6, $a7, $a8, $a9)
if @error Then
Else
If $a1 = $GUI_CHECKED Then
ControlSend("2Moons","","","{F1}")
EndIf
If $a2 = $GUI_CHECKED Then
ControlSend("2Moons","","","{F2}")
EndIf
If $a3 = $GUI_CHECKED Then
ControlSend("2Moons","","","{F3}")
EndIf
EndIf
until _IsPressed("7A")
EndSelect
WEnd
|