Strafe Script

Ask gaming related questions
[Ice]
Posts: 4
Joined: 18 Mar 2017, 00:53

Strafe Script

Post by [Ice] » 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

Post by LydiaRose » 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?
User avatar
evilC
Posts: 4341
Joined: 27 Feb 2014, 12:30

Re: Strafe Script

Post by evilC » 18 Mar 2017, 08:14

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.
[Ice]
Posts: 4
Joined: 18 Mar 2017, 00:53

Re: Strafe Script

Post by [Ice] » 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.
User avatar
evilC
Posts: 4341
Joined: 27 Feb 2014, 12:30

Re: Strafe Script

Post by evilC » 18 Mar 2017, 15:56

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.
[Ice]
Posts: 4
Joined: 18 Mar 2017, 00:53

Re: Strafe Script

Post by [Ice] » 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

Post by bluce » 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

Post by c0dycode » 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

Post by [Ice] » 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

Post by ryzelux » 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

Post by Guest » 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]
Post Reply

Return to “Gaming”