created an edited form of this with a pixelsearch for the white in the D on detonate mines
also a settings config file, cause i like the exe versions more.
Code:
#singleinstance force
#ifwinactive Path of Exile
;~ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;~ Settings
;~ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
global PixelSearchX = 1632
global PixelSearchY = 920
global PixelSearchXDelve = 1516
global Tick = 333
global detonatecolor = 0xFEFEFE
global detonating = 0
global Gui2X=1580
global Gui2Y=933
;~ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;~ Standard ini read
;~ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If FileExist("Settings.ini"){
;~ General
IniRead, Tick, Settings.ini, General, Tick
;~ Coordinates
IniRead, Gui2X, Settings.ini, Coordinates, GuiX
IniRead, Gui2Y, Settings.ini, Coordinates, GuiY
} else {
;~ General
IniWrite, %Tick%, Settings.ini, General, Tick
;~ Coordinates
IniWrite, %Gui2X%, Settings.ini, Coordinates, GuiX
IniWrite, %Gui2Y%, Settings.ini, Coordinates, GuiY
}
;~ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;~ Ingame Overlay
;~ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Gui 2:Color, 0X130F13
Gui 2:+LastFound +AlwaysOnTop +ToolWindow
WinSet, TransColor, 0X130F13
Gui 2: -Caption
Gui 2:Font, bold cFFFFFF S10, Arial
Gui 2:Add, Text, x+1 y+2.5 BackgroundTrans vT1, Detonate: OFF
IfWinExist, ahk_class POEWindowClass
{
WinGetPos, X, Y, Width, Height
varX:=X + Round(Width / 1920 * Gui2X)
varY:=Y + Round(Height / 1080 * Gui2Y)
Gui 2: Show, x%varX% y%varY%
}
return
;~ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;~ Script Start
;~ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~F9::
if (detonating) {
detonating := 0
settimer, detonateloop, off
GuiControl, 2:, T1, Detonate: OFF
} else {
detonating := 1
settimer, detonateloop, %Tick%
GuiControl, 2:, T1, Detonate: ON
}
return
~B::suspend
~F10::ExitApp
detonateloop:
IfWinActive, ahk_class POEWindowClass
{
if (GetKeyState("shift", "p")){
return
}else{
PixelSearch, Px, Py, %PixelSearchX%, %PixelSearchY%, %PixelSearchX%, %PixelSearchY%, %detonatecolor%, 1, Fast
if ErrorLevel{
PixelSearch, Px, Py, %PixelSearchXDelve%, %PixelSearchY%, %PixelSearchXDelve%, %PixelSearchY%, %detonatecolor%, 1, Fast
if ErrorLevel
return
else
send {d}
}
else
send {d}
}
}
return