Strafe Script

Ask gaming related questions (AHK v1.1 and older)
[Ice]
Posts: 4
Joined: 18 Mar 2017, 00:53

Strafe Script

18 Mar 2017, 01:03

Hi.

I'm new to ahk and coding and general and kind of lost on making my own script. I was wondering if there is a script where when I press a it moves my mouse left and when I let go of a it, my mouse stops going left. Same thing with d just going to the right. If there is thank you for your help.
LydiaRose
Posts: 2
Joined: 18 Mar 2017, 06:13

Re: Strafe Script

18 Mar 2017, 06:54

So when you press the "A" key, it moves your mouse to the left; and when you press the "D" key, it moves your mouse to the right?
[Ice]
Posts: 4
Joined: 18 Mar 2017, 00:53

Re: Strafe Script

18 Mar 2017, 15:27

evilC wrote:What do you want it for? A mouse-look FPS game, or a game where you have a mouse cursor?

The code would be quite different for each of these scenarios.

FPS game. CSGO to be exact.
[Ice]
Posts: 4
Joined: 18 Mar 2017, 00:53

Re: Strafe Script

19 Mar 2017, 04:33

evilC wrote:From what I understand, CSGO is fairly uncommon in the fact that it responds to either cursor movement or "delta" input, so anything should work.
I've seen bhop scripts that work like this but can you help me with some of the commands since I have no idea what to do?
bluce
Posts: 70
Joined: 01 Feb 2017, 13:23

Re: Strafe Script

20 Mar 2017, 10:45

What you are looking for is a reverse AutoStrafe/StrafeHack script. I'll help you. What you can do is use the mouseXY function when pressing A and D to move left and right, your script may look something like this

Code: Select all

mouseXY(x,y)
{
DllCall("mouse_event",short,1,short,x,short,y,short,0,short,0)
}
*~$A::
while GetKeyState("A","P")
{
     mouseXY(-10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
*~$D::
while GetKeyState("D","P")
{
     mouseXY(10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
I can hook you up with a normal AutoStrafe script (holds A when you look left and holds D when you look right) or any other CSGO script you may need, just PM me ;)
c0dycode
Posts: 1
Joined: 03 Mar 2017, 14:49

Re: Strafe Script

20 Mar 2017, 13:15

Isn't this basically a turn bind people often use for surfing + moving left or right?

If that's what you basically want, you can do this with ingame cvars. I've stopped playing cs a few months ago but it should probably be something like

Code: Select all

alias "+strafeleft" "+left; +moveleft"
alias "-strafeleft" "-left; -moveleft"

alias "+straferight" "+right; +moveright"
alias "-straferight" "-right; -moveright"
put these in your autoexec.cfg or something and then bind this to your preferred key.

For example:

Code: Select all

bind "a" "+strafeleft"
EDIT: Fixed a typo. Also if you only want to turn just use "bind "a" "+left" for example.
[Ice]
Posts: 4
Joined: 18 Mar 2017, 00:53

Re: Strafe Script

20 Mar 2017, 21:43

bluce wrote:What you are looking for is a reverse AutoStrafe/StrafeHack script. I'll help you. What you can do is use the mouseXY function when pressing A and D to move left and right, your script may look something like this

Code: Select all

mouseXY(x,y)
{
DllCall("mouse_event",short,1,short,x,short,y,short,0,short,0)
}
*~$A::
while GetKeyState("A","P")
{
     mouseXY(-10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
*~$D::
while GetKeyState("D","P")
{
     mouseXY(10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
I can hook you up with a normal AutoStrafe script (holds A when you look left and holds D when you look right) or any other CSGO script you may need, just PM me ;)
Thank you. Just testing some things out to see if its what I want. Im going to test this now.
ryzelux

Re: Strafe Script

07 Feb 2018, 06:57

bluce wrote:What you are looking for is a reverse AutoStrafe/StrafeHack script. I'll help you. What you can do is use the mouseXY function when pressing A and D to move left and right, your script may look something like this

Code: Select all

mouseXY(x,y)
{
DllCall("mouse_event",short,1,short,x,short,y,short,0,short,0)
}
*~$A::
while GetKeyState("A","P")
{
     mouseXY(-10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
*~$D::
while GetKeyState("D","P")
{
     mouseXY(10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
I can hook you up with a normal AutoStrafe script (holds A when you look left and holds D when you look right) or any other CSGO script you may need, just PM me ;)




Bro this is the best thing iv ever tried! way better than all those auto exec scripts thanks for this!! woah didn't think id find anything as good as this!
Guest

Re: Strafe Script

10 Feb 2018, 03:45

Hi, i would like to know how to do for activate and unactivate the script plz

[code=mouseXY(x,y)
{
DllCall("mouse_event",short,1,short,x,short,y,short,0,short,0)
}
*~$A::
while GetKeyState("A","P")
{
mouseXY(-20,0) ;Change this value to your preference
Sleep 5 ;Change this value to your preference
}
return
*~$D::
while GetKeyState("D","P")
{
mouseXY(20,0) ;Change this value to your preference
Sleep 5 ;Change this value to your preference
}
return file=strafe csgo.ahk][/code]
roydaniels
Posts: 2
Joined: 05 Aug 2019, 16:01

Re: Strafe Script

05 Aug 2019, 16:08

bluce wrote:
20 Mar 2017, 10:45
What you are looking for is a reverse AutoStrafe/StrafeHack script. I'll help you. What you can do is use the mouseXY function when pressing A and D to move left and right, your script may look something like this

Code: Select all

mouseXY(x,y)
{
DllCall("mouse_event",short,1,short,x,short,y,short,0,short,0)
}
*~$A::
while GetKeyState("A","P")
{
     mouseXY(-10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
*~$D::
while GetKeyState("D","P")
{
     mouseXY(10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
I can hook you up with a normal AutoStrafe script (holds A when you look left and holds D when you look right) or any other CSGO script you may need, just PM me ;)
Hi, I know it's been a long time, I tried to message you but it seems like I can't. I'm newly registered but I'm looking for exactly that "(holds A when you look left and holds D when you look right)".
There are many roaming around but they just don't seem to work, they spam "a" and "d" rather than holding. I don't know if that's a problem for you or so but I would appreciate it :)
Nathan818
Posts: 1
Joined: 17 Apr 2020, 17:53

Re: Strafe Script

17 Apr 2020, 18:06

bluce wrote:
20 Mar 2017, 10:45
What you are looking for is a reverse AutoStrafe/StrafeHack script. I'll help you. What you can do is use the mouseXY function when pressing A and D to move left and right, your script may look something like this

Code: Select all

mouseXY(x,y)
{
DllCall("mouse_event",short,1,short,x,short,y,short,0,short,0)
}
*~$A::
while GetKeyState("A","P")
{
     mouseXY(-10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
*~$D::
while GetKeyState("D","P")
{
     mouseXY(10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
I can hook you up with a normal AutoStrafe script (holds A when you look left and holds D when you look right) or any other CSGO script you may need, just PM me ;)
yo dude for some reason I cannot message u but can you PLEASE send me the regular autostrafe script? It is exactly what I need rn and I would greatly appreciate it.
TeLeSc0pIc
Posts: 1
Joined: 01 Jul 2020, 08:52

Re: Strafe Script

01 Jul 2020, 08:57

bluce wrote:
20 Mar 2017, 10:45
What you are looking for is a reverse AutoStrafe/StrafeHack script. I'll help you. What you can do is use the mouseXY function when pressing A and D to move left and right, your script may look something like this

Code: Select all

mouseXY(x,y)
{
DllCall("mouse_event",short,1,short,x,short,y,short,0,short,0)
}
*~$A::
while GetKeyState("A","P")
{
     mouseXY(-10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
*~$D::
while GetKeyState("D","P")
{
     mouseXY(10,0) ;Change this value to your preference
     Sleep 5 ;Change this value to your preference
}
return
I can hook you up with a normal AutoStrafe script (holds A when you look left and holds D when you look right) or any other CSGO script you may need, just PM me ;)
i need t his

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 55 guests