#NoEnv
SetWorkingDir %A_ScriptDir%
IniRead, suspendKey, settings.ini, Hotkeys, suspendKey, F1
IniRead, adsKey, settings.ini, Hotkeys, adsKey, RButton
IniRead, passthroughKey, settings.ini, Hotkeys, passthroughKey, BLANK
IniRead, aimKey, settings.ini, PUBGKeyMapping, aimKey, RButton
IniRead, useAnchors, settings.ini, Recognition, useAnchors, true
if(%useAnchors%)
{
IniRead, standTargetAnchorX, settings.ini, Recognition, standTargetAnchorX, 0.0234375
IniRead, standTargetAnchorY, settings.ini, Recognition, standTargetAnchorY, 0.9287037
IniRead, crouchTargetAnchorX, settings.ini, Recognition, crouchTargetAnchorX, 0.0244792
IniRead, crouchTargetAnchorY, settings.ini, Recognition, crouchTargetAnchorY, 0.9472222
IniRead, proneTargetAnchorX, settings.ini, Recognition, proneTargetAnchorX, 0.0322917
IniRead, proneTargetAnchorY, settings.ini, Recognition, proneTargetAnchorY, 0.9564815
standTargetX := Round(standTargetAnchorX * A_ScreenWidth)
standTargetY := Round(standTargetAnchorY * A_ScreenHeight)
crouchTargetX := Round(crouchTargetAnchorX * A_ScreenWidth)
crouchTargetY := Round(crouchTargetAnchorY * A_ScreenHeight)
proneTargetX := Round(proneTargetAnchorX * A_ScreenWidth)
proneTargetY := Round(proneTargetAnchorY * A_ScreenHeight)
} else
{
IniRead, standTargetX, settings.ini, Recognition, standTargetX, 45
IniRead, standTargetY, settings.ini, Recognition, standTargetY, 1003
IniRead, crouchTargetX, settings.ini, Recognition, crouchTargetX, 47
IniRead, crouchTargetY, settings.ini, Recognition, crouchTargetY, 1023
IniRead, proneTargetX, settings.ini, Recognition, proneTargetX, 62
IniRead, proneTargetY, settings.ini, Recognition, proneTargetY, 1033
}
IniRead, targetColor, settings.ini, Recognition, targetColor, 0xf5f5f5
IniRead, variation, settings.ini, Recognition, variation, 10
IfNotEqual, suspendKey, BLANK, Hotkey, *%suspendKey%, suspend
IfNotEqual, adsKey, BLANK, Hotkey, *%adsKey%, adsKeyDown
IfNotEqual, adsKey, BLANK, Hotkey, *%adsKey% up, adsKeyUp
IfNotEqual, passthroughKey, BLANK, Hotkey, *%passthroughKey%, passthroughKeyDown
IfNotEqual, passthroughKey, BLANK, Hotkey, *%passthroughKey% up, passthroughKeyUp
return
suspend:
Suspend
if (A_IsSuspended)
SoundBeep, 200
else
SoundBeep
return
adsKeyDown:
IfNotEqual, aimKey, BLANK, SendInput {%aimKey%}
return
adsKeyUp:
PixelSearch, , , standTargetX, standTargetY, standTargetX, standTargetY, targetColor, variation, RGB
if !ErrorLevel
{
IfNotEqual, aimKey, BLANK, SendInput {%aimKey%}
return
}
PixelSearch, , , crouchTargetX, crouchTargetY, crouchTargetX, crouchTargetY, targetColor, variation, RGB
if !ErrorLevel
{
IfNotEqual, aimKey, BLANK, SendInput {%aimKey%}
return
}
PixelSearch, , , proneTargetX, proneTargetY, proneTargetX, proneTargetY, targetColor, variation, RGB
if !ErrorLevel
IfNotEqual, aimKey, BLANK, SendInput {%aimKey%}
return
passthroughKeyDown:
IfNotEqual, aimKey, BLANK, SendInput {%aimKey% Down}
return
passthroughKeyUp:
IfNotEqual, aimKey, BLANK, SendInput {%aimKey% Up}
return