To adjust the speed and length of each strafe, look for the following block of text in the code:
moveCount := 25
sleepInterval := 2
relativeMove := 28
Adjust these variables to get different results until you find your favorite config. Or, if the existing config is good enough for you, do not edit any other pieces of code.
If you do, it may break the script. Please note that this is only for testing purposes and that I am not responsible for any server bans or VAC bans (VAC is unlikely).
Don't forget to give me feedback. It helps me improve.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance ignore
#NoEnv
SendMode, Input
SetBatchLines -1
CoordMode, Mouse, Screen
F6::Suspend
Home::Reload
jump()
{
Send, {Space}
}
mouseXY(x, y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}
strafe(left)
{
moveCount := 25
sleepInterval := 2
relativeMove := 28
if (left)
{
key := "d"
move := relativeMove
} else
{
key := "a"
move := -relativeMove
}
send {%key% down}
DllCall("Sleep", "UInt", 5)
Loop, %moveCount%
{
mouseXY(move, -(move/4))
DllCall("Sleep", "UInt", sleepInterval)
}
send {%key% up}
}
$mbutton::
while getkeystate("mbutton","P")
{
jump()
strafe(true)
strafe(false)
}
Return