Jump to content


Photo

Minecraft Sprint / Run script with left click holder bonus


  • Please log in to reply
No replies to this topic

#1 OtakuFargo

OtakuFargo
  • Members
  • 72 posts

Posted 15 April 2012 - 02:47 PM

Hi fellow Miner and/or Crafters!
I wanted to share a couple hotkeys with the comunity. Nothing that hasn't been done, just my spin on it. :)
Credit goes to my friends here:
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=2&t=64217&p=525086&hilit=minecraft#p525086">viewtopic.php?f=2&t=64217&p=525086&hilit=minecraft#p525086</a><!-- l -->
for helping me get the Sprint function working.

Back to the mines. (Why is this game so damn fun?!)

#IfWinActive Minecraft ahk_exe javaw.exe
	^Lbutton::SendInput {lbutton down}
	^W::HoldW()
	^R::Sprint()
Sprint(){
	k:=A_KeyDelay
	SetKeyDelay 80
	Send {w Up}{w Down}{w Up}{w Down}
	SetKeyDelay %k%
	HoldW()
Return
HoldW(){
	SendInput {w up}{w down}
	Loop
	{
		Sleep 100
		GetKeyState state, w
		if state = u
			return
		If GetKeyState("s")
		{
			SendInput {w up}
			return
		}
	}
}