Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Help with Bhop script :/


  • Please log in to reply
12 replies to this topic
Dryvnt
  • Guests
  • Last active:
  • Joined: --
I play half life 1 alot and find it very funny to bunnyhop but heres my problem

*Lalt::
Loop
{
GetKeyState, state, LAlt, P
if State = U
break
; Otherwise:
Send, {Space}
Sleep, 1
return
}

This is my current script... It works as a charm... But when i duck while jumping, my screen kindda "Spass" while i hold Ctrl... Because it want to duck but the spamming of space makes it go up again... But i found, if i put
*Lalt::
Send, {Ctrldown}
Loop
{
GetKeyState, state, LAlt, P
if State = U
break
; Otherwise:
Send, {Space}
Sleep, 1
Send, {Ctrldown}
return
}

It does not spam... But i dont wanna be ducked while bunnyhopping... Sooooo here comes my question

*Lalt::
Loop
{
GetKeyState, state, LAlt, P
if State = U
break
; Otherwise:
Send, {Space}
Sleep, 1
GetKeyState, state, Ctrl, P
if State = (Help needed here)
Send {Ctrldown}
; Otherwise:
Send, {Ctrlup}
}
return

So all i need to know is... Whats the opposite of the U? :/

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
That would be D:
if State = D


orbik
  • Members
  • 36 posts
  • Last active: Jul 11 2015 05:35 PM
  • Joined: 09 Apr 2008
As much as I think you need to be told to rtfm, why don't you just do it like this:
*LAlt::
Loop
{
  If (!GetKeyState("LAlt"))
    break
  
  If (!GetKeyState("LControl"))
    Send, {Space}

  Sleep, 10
}
return


Dryvnt
  • Guests
  • Last active:
  • Joined: --

As much as I think you need to be told to rtfm, why don't you just do it like this:

*LAlt::
Loop
{
  If (!GetKeyState("LAlt"))
    break
  
  If (!GetKeyState("LControl"))
    Send, {Space}

  Sleep, 10
}
return


Nop doesent work
It says:
"Error at line 4.

Line Text: If(!GetKeyState("LAlt"))
Error: When used this way, the symbol must be "!=" not "!".

The script was not reloaded; the old version will remain in effect"

And i tryed to change the ! to != but then it says another error.. :/

orbik
  • Members
  • 36 posts
  • Last active: Jul 11 2015 05:35 PM
  • Joined: 09 Apr 2008
Do you have the latest version installed?
Anyway, I made a mistake: You must use either
*~LAlt::
or
If (!GetKeyState("LAlt", "p"))
Apparently the logical key state doesn't get updated without the ~

Dryvnt
  • Guests
  • Last active:
  • Joined: --
Nop doesent work... My sensivity gets alot lower when i bhop and when i duck my senstivity goes to 0... Nothing to do with game, its all in script :/

orbik
  • Members
  • 36 posts
  • Last active: Jul 11 2015 05:35 PM
  • Joined: 09 Apr 2008
I did dome testing in Q3A and at least the following works perfectly. I never got the hang of SetKeyDelay so I just send up and down events explicitly. Also, the game seems to mess with logical key states so getting the "physical" state is safer.
SendMode, Input
*LAlt:: 
	Loop
	{ 
		If (!GetKeyState("LAlt", "p"))                                                              
			break 

		If (!GetKeyState("LControl")) 
		{
			Send, {Space down} 
			Sleep, 10
			Send, {Space up} 
		}
		Else
			Sleep, 10
	} 
return

EDIT:
I guess this would work just as well:
...
		If (!GetKeyState("LControl")) 
			Send, {Space down} 

		Sleep, 10
	} 
return

*LAlt up::Send, {Space up} 


Dryvnt
  • Guests
  • Last active:
  • Joined: --
DANG! You are so close to a breakthrough :/... But when i jump, i sometimes land and stand still for like .5 sec making my bunnyhop fail :(...

Dryvnt
  • Guests
  • Last active:
  • Joined: --
Hey! wait a sec!
*LAlt::
Loop
{
  If (!GetKeyState("LAlt" "p"))
    break
 
  If (!GetKeyState("LControl"))
    Send, {Space}

  Sleep, 10
}
return
This code works perfect :D

The bugged code was
*~LAlt::
Loop
{
  If (!GetKeyState("LAlt"))
    break
 
  If (!GetKeyState("LControl"))
    Send, {Space}

  Sleep, 10
}
return

Thanks for your help dewd!

Dryvnt
  • Guests
  • Last active:
  • Joined: --
It somehow doesent work anymore, when i press another button it stops working...
Help please :(

bmaya
  • Guests
  • Last active:
  • Joined: --

DANG! You are so close to a breakthrough :/... But when i jump, i sometimes land and stand still for like .5 sec making my bunnyhop fail :(...


this delay of half a second after the first jump is what ruins it all. I just can't get around what I am doing wrong. Is this caused by my PC or by Counterstrike?

bmaya
  • Guests
  • Last active:
  • Joined: --
what I've tried out now is that I increased the 10ms to 37ms and this has now solved the problem of the lag after the first jump. but doing the bunnyhops with 37ms has now become impossible because thats just too slow. What I'm thinking is that one maybe just can't send keystrokes to CS:S in such a high frequency.

rawrsters
  • Members
  • 1 posts
  • Last active: Jun 17 2015 07:44 PM
  • Joined: 09 May 2015

Can someone make the EXACT same thing. But instead of binding it to "LAlt", to the spacebar.

 

Thanks.

 

~Rawrsters