i played with the timers a bit and after reading your message about what does what i changed to
Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compile_Both=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; Drücke Esc um das Script zu beenden, Pause um es zu pausieren
Global $Paused, $vab, $countdown = 0
HotKeySet("p", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d
;;;; Hier ist der Hauptteil des Programms ;;;;
Func search_Mob()
$search = PixelSearch( 385, 185, 1285, 790, 0xFF0004 )
If IsArray($search) Then
MouseMove($search[0]+18, $search[1]+80, 1)
MouseClick("left")
sleep(1000)
Send("2")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}") ;kann auch verkürzt werden wenn nötig
ConsoleWrite("Sucht Pixel")
$search_loot = PixelSearch( 595, 680, 940, 735, 0x030303 )
If IsArray($search_loot) Then
ConsoleWrite('Monster angeclickt')
sleep(12000) ; war vorher 8000
Send("2")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}")
$vab = "kampf"
EndIf
EndIf
Return $vab;
EndFunc
Func kampf()
;~ Kampf funktion
ConsoleWrite('Lädt KamPf')
$countdown = $countdown + 1
$search_kampf = PixelSearch( 385, 730, 1225, 860, 0xffffe4 )
If IsArray($search_kampf) Then
Send("2")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}")
$end_kampf = PixelSearch( 155, 100, 305, 135, 0xaa8708 )
If IsArray($end_kampf) Then
Send("2")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}")
$vab = false
$countdown = 0
Endif
Elseif $countdown > 7 Then ;erhöht auf 7 Counts, war vorher 6
;~ nicht kampf
$vab = false
$countdown = $countdown + 1
Send("2")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}")
ConsoleWrite('Nicht im kampf');
EndIf
Return $vab;
EndFunc
Sleep(5000)
While 1
Sleep(1000)
If $vab == "kampf" Then
$vab = kampf()
Else
$vab = search_Mob()
EndIf
WEnd
;;;;;;;;
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script ist pausiert',0,0)
WEnd
ToolTip("")
EndFunc
Func Terminate()
Exit 0
EndFunc
tested this for a while and seems that it clicks the iris and kills it without jumping from sylph to sylph.
now im stuck with another smoothness issue and that is when it clicks the iris and walks to it but the iris moves away. before it searches again takes to long, atleast 3-4 seconds.
///----------------------------------------------------------------///
also an other question
Code:
PixelSearch( 595, 680, 940, 735, 0x030303 )
this is the color code??