Hab heute angefangen einen AutoIT Bot für WoQ2 zu schreiben. Wer Lust hat kann gerne etwas weitermachen ..
Window Mode in 1024x786 wird benötigt
ToDo:
Enemy Detection ohne eigene Mausbewegung
Live Detection verbessern
Mehr als einen Spell benutzen
Window Mode in 1024x786 wird benötigt
ToDo:
Enemy Detection ohne eigene Mausbewegung
Live Detection verbessern
Mehr als einen Spell benutzen
Code:
HotKeySet("{PAUSE}", "EndScript")
$win_title = "TJ2 Client - Beta - Final : 1100.117.0002.0000"
$mob_found = 0;
$mob_alive = 0;
$win_size = WinGetPos($win_title)
WinActivate($win_title, "")
WinSetOnTop($win_title, "", 0)
Sleep(1000)
While 1
Sleep(Int(Random(500,1000)))
;Linke Seite des Chars nach Mob suchen
FindMobRight()
If $mob_found == 1 Then
RightClick()
Sleep(1000)
MobLiving()
While $mob_alive == 1
Sleep(1000)
MobLiving()
WEnd
Sleep(Int(Random(1500,2000)))
AutoLoot()
EndIf
;Rechte Seite des Chars nach Mob suchen
FindMobLeft()
If $mob_found == 1 Then
RightClick()
Sleep(1000)
MobLiving()
While $mob_alive == 1
Sleep(1000)
MobLiving()
WEnd
Sleep(Int(Random(1500,2000)))
AutoLoot()
EndIf
WEnd
Func MobLiving()
$check_pix = PixelGetColor( 830 , 58 )
$mob_alive = 0
;MsgBox(0,"The hex color is", Hex($check_pix, 6))
If Hex($check_pix, 6) == 0xBDBEB5 Then
$mob_alive = 1
EndIf
EndFunc
Func AutoLoot()
Send("{ALTDOWN}")
MouseMove(1007,251)
LeftClick()
Sleep(10)
Send("{ALTUP}")
Sleep(1000)
EndFunc
Func FindMobRight()
;PixelSearch ( left, top, right, bottom, color [, shade-variation]
$pos = PixelSearch ( $win_size[0]+550, $win_size[1], $win_size[2]-100, $win_size[3]-100, 0xE72042, 50)
$mob_found = 0
If Not @error Then
MouseMove($pos[0], $pos[1]+10)
$mob_found = 1
EndIf
EndFunc
Func FindMobLeft()
;PixelSearch ( left, top, right, bottom, color [, shade-variation]
$pos = PixelSearch ( $win_size[0]+100, $win_size[1], $win_size[2]-350, $win_size[3]-100, 0xE72042, 50)
$mob_found = 0
If Not @error Then
MouseMove($pos[0], $pos[1]+10)
$mob_found = 1
EndIf
EndFunc
; Function to exit script
Func EndScript()
Exit
EndFunc
Func LeftClick()
MouseDown("left")
Sleep(100)
MouseUp("left")
EndFunc
Func RightClick()
MouseDown("right")
Sleep(100)
MouseUp("right")
EndFunc