how to reduce screen shakeing from a loop PixelSearch

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
raiderrevenge2287
Posts: 4
Joined: 11 Apr 2018, 04:02

how to reduce screen shakeing from a loop PixelSearch

12 Aug 2019, 11:46

hi i just start using ahk to help me aiming at target in a game
so i search google for a script and modify it for personal use and offline game
(im not recommended this for anyone to cheating in an online game)

the problem is it shaking pretty bad and sometime this script just random go crazy (crosshair move to nowhere)

i try to find many way to reduce the shaking but whatever i do it just does not work

please someone who has knowledge . help me out
god bless you

Code: Select all

; Part 1 - i only know what some of this do not all of them
#NoEnv
#InstallMouseHook
#InstallKeybdHook
#UseHook
#MaxHotkeysPerInterval 99999999999999999999999
CoordMode, Pixel, Screen, RGB
CoordMode, Mouse, Screen
SendMode InputThenPlay
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, Realtime 

; Part 2
EMCol := 0xCE0C0C ;CE0C0C
ColVn := 20 ;30
ZeroX := 960
ZeroY := 540
CFovX := 440 
CFovY := 120 ; i want this only 120
 
ScanL := ZeroX - CFovX
ScanR := ZeroX + CFovX
ScanT := ZeroY - CFovY
ScanB := ZeroY + CFovY


;part 3
~rbutton::

loop
{
if getkeystate("rbutton","p")
 {
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, EMCol, ColVn, Fast RGB

If ErrorLevel = 0
DllCall("mouse_event", "UInt", 0x02)  ;  i want to hold not repeat

GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
  }
else
break
}

keywait rbutton
DllCall("mouse_event", "UInt", 0x04)  ;  release


GetAimOffset:
 AimX := AimPixelX - ZeroX
 AimY := (AimPixelY+60) - ZeroY ; i dont want Y at center but cant find a way better than +60 here(i want it automatic calculate but i dont know how)
  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:
DllCall("mouse_event", uint, 1, int, MoveX, int, MoveY, uint, 0, int, 0)
sleep 1
Return

User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: how to reduce screen shakeing from a loop PixelSearch

12 Aug 2019, 12:43

Code: Select all

CoordMode, Pixel, Screen, RGB
Start with the obvious:
There is no 3rd parameter for the CoordMode command.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: how to reduce screen shakeing from a loop PixelSearch

12 Aug 2019, 12:50

what even is the point of asking people to tweak an aimbot script u copy pasted from god knows where some 10 minutes ago...

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, GollyJer, Lamron750, septrinus and 244 guests