Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Minecraft script help



  • Please log in to reply
1 reply to this topic
TrivisionZero
  • Members
  • 7 posts
  • Last active: Aug 26 2015 12:19 AM
  • Joined: 20 Aug 2015

This is the script I have so far:

 

 

#MaxThreadsPerHotkey 2
$LButton::
  While GetKeyState("LButton","P")
    Send, {LButton}
Return




F::
  While GetKeyState("F","P")
  {
    Send, {RButton}
  }
Return

What it mainly does is when the left mouse button is held down, it spams it as fast as possible, when released it stops. And the second part to the script is when holding down the F key, it spams right click (throwing snowballs, exp bottles, etc). What I want to do is whenever the E key is pressed to open the Inventory, everything gets paused, so when I move around items with my mouse button, it doesn't spam grab the item. Then when I press Escape, it resumes the script, allowing me to hold down the left mouse to spam and F to spam right click.

 

If this is possible, it would be greatly appreciated, thanks!

 

Also I noticed that if I wanted to add this bit of code to the script:

Shift::Send % (t:=!t) ? "{Shift Down}" : "{Shift Up}"

It sometimes messes up the other Left mouse click and F key parts by not activating, so I would like to know why it happens and what I can do to fix it.



Xtra
  • Members
  • 954 posts
  • Last active: Jul 23 2016 09:04 PM
  • Joined: 29 Sep 2013
✓  Best Answer
;#MaxThreadsPerHotkey 2    ; not needed for your script


*LButton::                 ; $ not needed mouse hotkeys use mousehook
  While GetKeyState("LButton","P")
    Send, {LButton}
Return

*F::
  While GetKeyState("F","P")
    Send, {RButton}
Return

~*e::Suspend, On

~*esc::Suspend, Off

Shift::Send % (t:=!t) ? "{Shift Down}" : "{Shift Up}"

* Wildcard: Fire the hotkey even if extra modifiers are being held down.(ie: shift)

~ When the hotkey fires, its key's native function will not be blocked (hidden from the system).