im using this for now, well im trying to get it working correctly tbh.
so far it does hook and does work, but it seems to keep pulling away from the ENEMY instead of twords it, it works when the mouse is close or on the target but once it goes outside the fov or a little bit off the guy it just keeps tracking LEFT, how do i stop this? if i can stop this then it would work perfectly.
also if any1 knows how to fix this to work with spacebar as the trigger instead of mouse 2 that'd be sick..
;/ ----------------------------------------------------------------------------
; Version 2.0
; QuakeLive AutoAim
;/ ----------------------------------------------------------------------------
#Persistent
#KeyHistory, 0
#NoEnv
#HotKeyInterval 1
#MaxHotkeysPerInterval 127
#InstallKeybdHook
#UseHook
#SingleInstance, Force
SetKeyDelay,-1, 8
SetControlDelay, -1
SetMouseDelay, -1
SetWinDelay,-1
SendMode, InputThenPlay
SetBatchLines,-1
ListLines, Off
CoordMode, Pixel, Screen, RGB
CoordMode, Mouse, Screen
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, Normal
EMCol := 0x00FF00
ColVn := 96
ZeroX := 850
ZeroY := 565
CFovX := 60
CFovY := 60
ScanL := ZeroX - CFovX
ScanR := ZeroX + CFovX
ScanT := ZeroY - CFovY
ScanB := ZeroY + CFovY
Loop, {
GetKeyState, space, RButton, P
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, EMCol, ColVn, Fast RGB
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
;GoSub DebugTool
GoSub SleepF
}
GetAimOffset:
AimX := AimPixelX - ZeroX
AimY := AimPixelY - ZeroY
If ( AimX < 0 ) {
DirX := 1
}
If ( AimX > 0 ) {
DirX := -1
}
If ( AimY < 0 ) {
DirY := 1
}
If ( AimY > 0 ) {
DirY := -1
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
Return
GetAimMoves:
RootX := Ceil(( AimOffsetX ** ( 1 / 2 )))
RootY := Ceil(( AimOffsetY ** ( 1 / 2 )))
MoveX := RootX * DirX
MoveY := RootY * DirY
Return
MouseMoves:
If ( Mouse2 == "D" ) {
DllCall("mouse_event", uint, 1, int, MoveX, int, MoveY, uint, 0, int, 0)
}
Return
SleepF:
SleepDuration = 6
TimePeriod = 1
DllCall("Winmm\timeBeginPeriod", uint, TimePeriod)
Iterations = 4
StartTime := A_TickCount
Loop, %Iterations% {
DllCall("Sleep", UInt, TimePeriod)
}
DllCall("Winmm\timeEndPeriod", UInt, TimePeriod)
Return
DebugTool:
;MouseGetPos, MX, MY
;ToolTip, %AimOffsetX% | %AimOffsetY%
;ToolTip, %AimX% | %AimY%
;ToolTip, %IntAimX% | %IntAimY%
;ToolTip, %RootX% | %RootY%
;ToolTip, %MoveX% | %MoveY% || %MX% %MY%
Return