^1::
{
MouseGetPos tl_n_xpos, tl_n_ypos
return
}
^2::
{
MouseGetPos br_n_xpos, br_n_ypos
return
}
^3::
{
MouseGetPos tl_w_xpos, tl_w_ypos
return
}
^4::
{
MouseGetPos br_w_xpos, br_w_ypos
return
}
Home::
{
WinGet mPID, PID, A
SetKeyDelay -1
SetControlDelay -1
SetMouseDelay -1
; jokers = 0x8894F9
; porings = 0x8C94FF
searchColor := 0x8C94FF
; jokers = 5
; porings = 0
searchTolerance := 0
loop
{
Sleep 100
; first, a nearby search of yourself
; i recommend 6 character widths wide and 3 character heights tall
PixelSearch FoundX, FoundY, %tl_n_xpos%, %tl_n_ypos%, %br_n_xpos%, %br_n_ypos%, %searchColor%, %searchTolerance%, Fast
if ErrorLevel = 0
{
Cast(FoundX, FoundY)
}
else
{
; a more wide search range. make sure no part of your ui is in range
PixelSearch FoundX, FoundY, %tl_w_xpos%, %tl_w_ypos%, %br_w_xpos%, %br_w_ypos%, %searchColor%, %searchTolerance%, Fast
if ErrorLevel = 0
{
Cast(FoundX, FoundY)
}
else
{
; TELEPORT
ControlSend ,,{F5}, ahk_pid %mPID% ; teleport hotkey
Sleep 1000
}
}
}
return
Cast(x, y)
{
global
ControlSend ,,{F6},ahk_pid %mPID% ; skill hotkey
Sleep 50
Click %x%, %y%
Sleep 300
return
}
}
End::Pause