#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
$cccount = 0
WinActivate("Demon_Slayer_Anmeldeclient")
Sleep(1500)
Func search_Mob()
$tot = PixelSearch( 1245, 45, 1250, 50, 0x603C29 ) ;death-routine
If IsArray($tot) Then
Sleep(1500)
$map = PixelSearch( 1150, 400, 1250, 600, 0xccffff )
If IsArray($map) Then
MouseMove($map[0]+5, $map[1]+3, 1)
MouseClick("left")
EndIf
Mousemove( 973, 297 )
Sleep(1500)
MouseClick( "left" )
ConsoleWrite("Geht zur Insel") ; going to isle
Sleep(30000)
Mousemove( 477, 233 )
Sleep(1500)
MouseClick( "left" )
$map = PixelSearch( 1150, 400, 1250, 600, 0xccffff )
If IsArray($map) Then
MouseMove($map[0]+5, $map[1]+3, 1)
MouseClick("left")
EndIf
Mousemove( 477, 233 ) ; defined position at iris level-map, you can change to other coordinates, if you like
Sleep(1500)
MouseClick( "left" )
ConsoleWrite("Suche Position")
$map = PixelSearch( 1150, 400, 1250, 600, 0xccffff )
If IsArray($map) Then
MouseMove($map[0]+5, $map[1]+3, 1)
MouseClick("left")
EndIf
Sleep(30000)
Endif
$varc = 0
$search = PixelSearch( 295, 110, 1115, 600, 0xd5f5cf ) ;searching for color of iris
$cccount = $cccount + 1
If IsArray($search) Then
$cccount = 0
ToolTip("")
MouseMove($search[0], $search[1], 1)
MouseClick("left")
sleep(2500)
$varc=1
ConsoleWrite("Sucht Pixel")
;~ nicht ein monster angreifen was bereits angegriffen wird
$search_loot = PixelSearch( 519, 536, 836, 581, 0x030303 )
If IsArray($search_loot) Then
ConsoleWrite('Monster angeclickt')
sleep(5000)
$vab = "kampf"
Else
if($varc == 1) Then
$sToolTip = ToolTip("BLOCK " & @CRLF & "BLOCK" & @CRLF & "BLOCK", $search[0]-20, $search[1]-20, 'Copyright by Vegeta17') ; blocking rectangle so that another iris will be found
MouseMove(400, 400, 1)
WinSetOnTop('hallo','',1)
EndIf
EndIf
Else
;~ Portal()
;~ sleep(1000)
ConsoleWrite($varc)
EndIf
if($cccount >100) Then
$map = PixelSearch( 1150, 400, 1250, 600, 0xccffff )
If IsArray($map) Then
MouseMove($map[0]+5, $map[1]+3, 1)
MouseClick("left")
EndIf
sleep(500)
MouseMove(555, 300, 1); and again defined position on map, you can change this again if you want
sleep(500)
MouseClick("left")
$map = PixelSearch( 1150, 400, 1250, 600, 0xccffff )
If IsArray($map) Then
MouseMove($map[0]+5, $map[1]+3, 1)
MouseClick("left")
EndIf
sleep(10000)
$cccount=0
Endif
Return $vab;
EndFunc
Func kampf()
;~ Kampf funktion
ConsoleWrite('Lädt Kampf')
$countdown = $countdown + 1
$search_kampf = PixelSearch( 288, 600, 710, 735, 0x080807 )
;(755,875,1220,935)
If IsArray($search_kampf) Then
Send("{SPACE}")
Send("{z}") ; first skill could be shield or heal over time
Send("{3}")
Send("{1}")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}")
$end_kampf = PixelSearch( 100, 80, 300, 100, 0x800303 )
;(353,180,512,192)
If IsArray($end_kampf) Then
$vab = false
$countdown = 0
Endif
Elseif $countdown > 5 Then
;~ nicht kampf
$vab = false;
$countdown = 0
ConsoleWrite('Nicht im kampf');
EndIf
Return $vab;
EndFunc
Func Portal()
;~ Wenn ein ausgang gesehen wird in gegengestzter richtung drücken
$search = PixelSearch(280, 120, 1165, 661, 0x070906 )
; (565,195,1500,933)
If IsArray($search) Then
$movey=390
$movex=660
if($search[0] < 500) Then
$movex = 800
Else
$movex = 300
EndIf
if($search[1] < 350) Then
$movey = 650
Else
$movex = 200
EndIf
MouseMove($movex, $movey, 1)
MouseClick("left")
Else
MouseClick("left",Random(200,1100,1),Random(180,63 0,1))
Sleep(1000)
EndIf
EndFunc
Sleep(5000)
While 1
Sleep(300)
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