Warzone BHOP Script

Ask gaming related questions (AHK v1.1 and older)
AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 03:29

I'm trying to make a BHop script that spams spacebar when I hold down Spacebar AND also hold Right Mouse Button at the same time.

This is what I have so far but I don't know how to add the Right Mouse Button extension onto the command (so that it only spams spacebar when both spacebar and right mouse button are held down).

Code: Select all

*space::
Loop
{
GetKeyState,state,space,P
If state = U
break


Send, {space}
Sleep, 10
}
return
[Mod edit: [code][/code] tags added.]

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Warzone BHOP Script

Post by mikeyww » 29 Apr 2021, 04:51

Code: Select all

RButton::RButton
RButton & Space::
While GetKeyState("RButton", "P") & GetKeyState("Space", "P") {
 Send {Space}
 Sleep, 20
}
Return

AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Re: Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 05:01

@mikeyww

I tried that but now my Right mouse button doesnt even work unless im holding space button down also

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Warzone BHOP Script

Post by mikeyww » 29 Apr 2021, 05:51

And you included the first line of my script? Please post your script.

AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Re: Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 05:56

@mikeyww

Code: Select all

RButton::RButton
RButton & Space::
While GetKeyState("RButton", "P") & GetKeyState("Space", "P") {
 Send {Space}
 Sleep, 10
}
Return

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Warzone BHOP Script

Post by mikeyww » 29 Apr 2021, 06:01

Does it work in Notepad?

AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Re: Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 06:05

@mikeyww

Code: Select all

RButton::RButton
RButton & Space::
While GetKeyState("RButton", "P") & GetKeyState("Space", "P") {
 Send {Space}
 Sleep, 10
}
Return
[Mod edit: [code][/code] tags added.]

AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Re: Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 06:07

@mikeyww

I dont know anything about coding or scripts... I just ran across autohotkey and wanted to see if someone had a command that could do what I want! I copied what you sent and tried it but my right mouse button only works when holding Space also

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Warzone BHOP Script

Post by mikeyww » 29 Apr 2021, 06:26

If you open Notepad and try your script in Notepad, does the right button work there, as well as your key combination?

AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Re: Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 06:32

yes my right button works when the script is running and I have notepad open. But as soon as I launch the COD:Warzone application, my right button stops working (I'm even executing the script as administrator)

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Warzone BHOP Script

Post by mikeyww » 29 Apr 2021, 07:12

I assume that this is the entire script, and that no other scripts are running at the same time. It would appear that the script works, but your game is not responding to it in the way that you expect. I do not have a way to fix or even test that, but the tips for games have helped others with their games.

https://autohotkey.com/board/topic/111737-how-to-make-ahk-work-in-most-games-the-basics/

You may also want to search the forum here for your specific game, in case others have posted solutions.

You could try the following variation, in case the remap is a problem.

Code: Select all

RButton::Click, R
RButton & Space::
While GetKeyState("RButton", "P") & GetKeyState("Space", "P") {
 Send {Space}
 Sleep, 10
}
Return
Others here may have better ideas for you.

AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Re: Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 09:57

@mikeyww

Thank you!

could I ask 1 more quick favor?

Is there a script that you can use space bar normally, but if I hold the spacebar down (after a 1 second delay) the space bar spams/loops until I let go of the space bar?

That might be an easier way of what I am trying to do!

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Warzone BHOP Script

Post by mikeyww » 29 Apr 2021, 10:04

Code: Select all

$Space::
KeyWait, Space, T1
If ErrorLevel {
 While GetKeyState("Space", "P") {
  Send x
  Sleep, 25
 }
} Else Send {Space}
Return

AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Re: Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 14:22

When I use that script and hold space bar down, it spams x or c... but not spacebar

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Warzone BHOP Script

Post by mikeyww » 29 Apr 2021, 14:46

It's just a demo.

Are you asking for something that your keyboard does not normally do without AHK?

AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Re: Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 20:31

@mikeyww

YES! I'd like this exact same script but instead of spamming X or C I would like it to spam space bar until I let go of the spacebar (so keep the 1 second delay on the first space bar press but then after 1 second have the space bar spammed every 10ms or something)

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Warzone BHOP Script

Post by mikeyww » 29 Apr 2021, 20:41

Code: Select all

$Space::
KeyWait, Space, T1
If ErrorLevel
 While GetKeyState("Space", "P")
  Send {Space}
Else Send {Space}
Return
Or:

Code: Select all

$Space::
Send {Space}
KeyWait, Space, T1
If ErrorLevel
 While GetKeyState("Space", "P")
  Send {Space}
Return

AshMann
Posts: 15
Joined: 29 Apr 2021, 03:21

Re: Warzone BHOP Script

Post by AshMann » 29 Apr 2021, 21:09

@mikeyww

Thank you!!! is there a way to shorten the delay from 1 second to half a second? or three quarters of a second???

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Warzone BHOP Script

Post by mikeyww » 29 Apr 2021, 21:28

T.5

Explained: KeyWait

LOLCrazyy
Posts: 2
Joined: 29 Mar 2022, 10:26

Re: Warzone BHOP Script

Post by LOLCrazyy » 29 Mar 2022, 10:29

mikeyww wrote:
29 Apr 2021, 07:12
I assume that this is the entire script, and that no other scripts are running at the same time. It would appear that the script works, but your game is not responding to it in the way that you expect. I do not have a way to fix or even test that, but the tips for games have helped others with their games.

https://autohotkey.com/board/topic/111737-how-to-make-ahk-work-in-most-games-the-basics/

You may also want to search the forum here for your specific game, in case others have posted solutions.

You could try the following variation, in case the remap is a problem.

Code: Select all

RButton::Click, R
RButton & Space::
While GetKeyState("RButton", "P") & GetKeyState("Space", "P") {
 Send {Space}
 Sleep, 10
}
Return
Others here may have better ideas for you.
Can I please have this script just instead of R Mouse Button its set as shift?

Post Reply

Return to “Gaming Help (v1)”