Jump to content

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

Minecraft Scripts!


  • Please log in to reply
14 replies to this topic
Mickers
  • Members
  • 1239 posts
  • Last active: Sep 25 2015 03:03 PM
  • Joined: 11 Oct 2010
So I started playing Minecraft and starting to love it but I'd like to build a script that adds some functionality to the game since I notice you spent most of your play time holding down the left mouse button.
The issues I run into when implementing simple key spam scripts is that I'm constantly swapping to the wiki and other sites for info on building redstone circuits and other structures as well as item ID's.
I plan on pasting scripts found on the forums as well as my own here on this post to keep them all together since I see that a few people have already posted here looking for answers. :wink:

Also I've been using a few mods most prominent amond them is a mod that adds guns to the game (SDK's Guns, Grappling Hooks, and Utilities Mod)).

A few hotkeys I'm working on are:

Sniper Rifle(SR): Quickscope and fire. Since firing in while scoped gives 0 miss rate but the scoping process takes a few seconds to focus.

Rapid fire weapons (All): I noticed that all the guns have a simple backlash program and I think with trial and error I can build a script that can determine if I'm holding the key down or single firing to wip the cursor back on my target.

Weapon swapping: I want to be able to swap weapons on the fly. What I mean by this is firing once with a SR and then swap to another weapon and continue firing while keeping the cursor on my target in the blink of an eye. Not sure if it's possible to reload weapons while they are not equiped but if I can fire the SF, press reload key, swap weapons, fire untill SR is ready, press reload key, swap back to SR, fire, and Loop. Would be totally awesome.

Anyway post any script idea's Minecraft related here and in my spare time I'll search the forum and post link's here to related questions. :D

Home keybind by girlgamer:
http://www.autohotke...topic68818.html
*F6::
Send, t
sleep 500
Send, /home{enter}
Sleep 500
Return

Auto-walk and Auto-Crouch+Left Mouse Spam by Demi:
http://www.autohotke...topic64217.html
;
; Minecraft Remaps v2
; Author:         Desi Quintans <me@desiquintans.com>
; Website:         http://www.desiquintans.com
;
; Script Function:
;  The following only apply inside the Minecraft window:
;   1) Mouse Button 4 performs a left-click.
;   2) F1 toggles hold-left-click. Handy for breaking lots of blocks or mining obsidian.
;   3) F2 toggles hold-W, making you move forward automatically. Use with F1 for automated mining action!
;   4) LCtrl toggles crouching upon double-pressing it. Press it again (once) to turn off.
;  The following only applies if IrfanView is running.
;   5) PrintScreen -> Ctrl+F11 for taking screenies via IrfanView.
;

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

#IfWinActive, Minecraft
{
   XButton1::LButton ; Remaps button 4 to left-click

   ; The following autopilot code was borrowed from jaceguay at http://www.autohotkey.com/forum/topic59506.html
   F1::Send % "{LButton " ((Cnt := !Cnt) ? "Down}" : "Up}" )
   F2::Send % "{w " ((Cnt2 := !Cnt2) ? "Down}" : "Up}" )

   ;The following crouch-toggle code was borrowed from Lanser at http://www.autohotkey.com/forum/topic16058.html
   ~LCtrl up::
     Goto, Crouch
   
   Crouch:
     If (a_tickCount-lasttime < 400)
     {
       Loop
       {
         Send, {LCtrl down}
         If IsKeyPressed("LCtrl")
           Send, {LCtrl up}
         Break
       }
     }
     lasttime:=a_tickCount
   Return
   
   IsKeyPressed(v_KeyName)
     {
       GetKeyState, state, %v_KeyName%, P
       If state = D
       {
         Return 1
       }
       Return 0
     }
}

#IfWinExist, IrfanView
{
   PrintScreen::^F11 ;Remaps Ctrl+F11 to PrintScreen for easy screenies via IrfanView.
}


nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
I couldn't help but notice this:

IsKeyPressed(v_KeyName)
     {
       GetKeyState, state, %v_KeyName%, P
       If state = D
       {
         Return 1
       }
       Return 0
     }

... And it hurt me inside :cry: All of that just means this:
IsKeyPressed("F1")
is the long way of doing this:
GetKeyState("F1","P")

So I would:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

#IfWinActive, Minecraft
   XButton1::LButton ; Remaps button 4 to left-click
   F1::Send % "{LButton " ((Cnt := !Cnt) ? "Down}" : "Up}" )
   F2::Send % "{w " ((Cnt2 := !Cnt2) ? "Down}" : "Up}" )

   ~LCtrl up::
     If (a_TimeSinceThisHotkey < 400)
      [color=red] Loop
       {
         Send, {LCtrl down}
         If GetKeyState("LCtrl","P")
           Send, {LCtrl up}
         Break
       } ; WHAT IS ALL THIS? YOU REALIZE IT DOESN'T LOOP? I CANT MODIFY IT SINCE IT'S SO UNCLEAR[/color]!
   Return

#IfWinExist, IrfanView
   PrintScreen::^F11 ;Remaps Ctrl+F11 to PrintScreen for easy screenies via IrfanView.


Mickers
  • Members
  • 1239 posts
  • Last active: Sep 25 2015 03:03 PM
  • Joined: 11 Oct 2010
Didn't notice that Lol. Luckily I didn't write it. :wink:

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
Please check my edited post. I'm in shock.

Mickers
  • Members
  • 1239 posts
  • Last active: Sep 25 2015 03:03 PM
  • Joined: 11 Oct 2010
Quick Q: How do you make certain portions of code red? :oops:

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009

Quick Q: How do you make certain portions of code red? :oops:

It's BBCode.
When posting, use the "Font colour: Default" thing below the "B i u Quote" buttons.

[color=[color=red]red[/color]]this[/color]

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio França -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


Mickers
  • Members
  • 1239 posts
  • Last active: Sep 25 2015 03:03 PM
  • Joined: 11 Oct 2010
Thanks!

420dood
  • Members
  • 3 posts
  • Last active: Apr 29 2011 11:26 PM
  • Joined: 29 Apr 2011
can anyone help me with making a code. im trying to make a code for easy use of fly mode+hyperspeed warps (shift button)
but i can't even get it to Send 'w' to move forward.
i've trying many things, with *, with sleep 500, like gamergirl model.

anyone could help?

Acuena
  • Members
  • 117 posts
  • Last active: Jul 21 2016 02:53 PM
  • Joined: 12 Oct 2010
Here is a part of my MineCraft script. It bassicly holds the right mousebutton and shift key down and then in a loop sends s to move backwards while crouched. This is used to make bridges in mid air without falling down.

Maybe you can configure it so it does what you want it to do :)


^RButton::
send {RButton down}
send {shift down}
loop
{
   if not getkeystate("w", "p")
    {
      send, {s DOWN}
      sleep, 650
      send, {s UP}
    }
  else
    {
      break
    }
  sleep, 50
}
send {RButton up}
send {shift up}
return


PS: It could proberly be shortend a bit :p

420dood
  • Members
  • 3 posts
  • Last active: Apr 29 2011 11:26 PM
  • Joined: 29 Apr 2011
your script is something l'de like to have anyway so thanks.

after I wrote that post, I had a major discovery tho:
my minecraft cant operate with any autohotkey scripts, when MC window is in full-screen mode (F11).
If I manually maximize it, all the scripts (that i downloaded) work.

now i need to try the basic variations that seemed to have failed before.

420dood
  • Members
  • 3 posts
  • Last active: Apr 29 2011 11:26 PM
  • Joined: 29 Apr 2011
i managed to make my script work, using this method i can jump on trees and land just like The Hulk.
if u have any more ideas for scripts about fly-mode. plz share them.

reference: f= fly mode on/off toggle| r=up| e= down

UP::
send {f down}
sleep, 100
send {f up}
send {shift down}
send {r down}
sleep, 250
sendplay {r up}
send {w down}
sleep, 250
send {w up}
send {e down}
sleep, 350
send {e up}
send {shift up}
send {f down}
sleep, 100 
sendplay {f up}
return


OliverWald
  • Guests
  • Last active:
  • Joined: --
;I play and help manage a few MC servers and these are a few commands that are useful if your server allows /jumpto, /home, /pw goto, also if it doesn't there is a loop script that keeps attacking for you. If you want to play on a server try playing on my friends server play.pureminecraft.net its a very friendly atmousphere and we have staff that is willing to work with you and we have the MCMMO plugin and a mumble for voice communication.

;I made these scripts to Teleport to certain areas this is handy because you dont have to type /home or /pw goto home but instead just push an arrow key. you will need to change it for your warps. I also have included a /jump command for the middle click button. Also i have included a script that you can use to auto spam left click if you are fighting


;See notes (;) in red to modify if you are new the other notes were for me to organize.


#NoEnv
SendMode InputThenPlay
SetWorkingDir %A_ScriptDir%

;delaytype, delay, press duration, play
SetKeyDelay -1, -1, Play
SetMouseDelay -1, -1, Play

#IfWinActive Minecraft
#MaxThreadsBuffer On


;jumpto commands
[color=#FF0000];Change to what ever button that is to be pressed to activate the command[/color]
MButton::
[color=#FF0000];these next 2 commands are set so it automatically picks up what you use to go into the server's global chat. 
;Change Send, t to Send, what button or letter you use to enter the chat  unless it is t or enter[/color]
Send, {Enter}
Send, t
[color=#FF0000];how long in miliseconds it waits before typing the next command. i advise you not to change[/color]
Sleep, 100
[color=#FF0000];what ever is typed after the comma and before the enter will be typed[/color]
Send, /jump {Enter}
Return



;home
[color=#FF0000]; button pressed in this case left arrow key[/color]
$left::
[color=#FF0000];Change Send, t to Send, what button or letter you use to enter the chat unless it is t or enter[/color]
Send, {Enter}
Send, t
Sleep, 100
[color=#FF0000];change /home to what ever command you want the left arrow to do /home is used to set a home point to tp to on our server[/color]
Send, /home{Enter}
Return



;grinder
[color=#FF0000]; button pressed in this case up arrow key[/color]
$up::
[color=#FF0000];Change Send, t to Send, what button or letter you use to enter the chat unless it is t or enter[/color]
Send, {Enter}
Send, t
Sleep, 100
[color=#FF0000];change /pw goto grinder to what ever command you want the up arrow[/color]
Send, /pw goto grinder{Enter}
Return



;blazes
[color=#FF0000]; button pressed in this case up arrow key[/color]
$down::
[color=#FF0000];Change Send, t to Send, what button or letter you use to enter the chat unless it is t or enter[/color]
Send, {Enter}
Send, t
Sleep, 100
[color=#FF0000];change /pw goto enchant to what ever command you want the down arrow[/color]
Send, /pw goto enchant{Enter}
Return


;swamp
$right::
[color=#FF0000];Change Send, t to Send, what button or letter you use to enter the chat unless it is t or enter[/color]
Send, {Enter}
Send, t
Sleep, 100
[color=#FF0000];change /pw goto swamp to what ever command you want the right arrow[/color]
Send, /pw goto swamp{Enter}
Return


;Unarmed Skill
[color=#FF0000];when left control is held it will keep left clicking every tenth of a second until released. I found this easier than having to click alot and i had it toggleable but i like this version better[/color]
$LCtrl::
while GetKeyState("LCtrl", "P")
{
Click left
Sleep, 100
Click left
sleep, 100
}
Return

If you have any questions or suggestiongs feel free to email me at waldron.nicholas12@gmail.com

Hello2215
  • Members
  • 106 posts
  • Last active: Oct 07 2016 11:42 AM
  • Joined: 16 Oct 2012
Hey,

I am using minecraft 1.4.2 with the RealLan client and when I start a server I have this script to turn whitelist on and add people to it.

#persistent
#singleinstance
#IfWinActive, Minecraft
Ralt::
Send, /
Sleep, 75
Send, w
Sleep, 75
Send, h
Sleep, 75
Send, i
Sleep, 75
Send, t
Sleep, 75
Send, e
Sleep, 75
Send, l
Sleep, 75
Send, i
Sleep, 75
Send, s
Sleep, 75
Send, t
Sleep, 75
Send, {space}
Sleep, 75
Send, o
Sleep, 75
Send, n
Sleep, 75
Send, {Enter}
Sleep, 75
Send, /
Sleep, 75
Send, w
Sleep, 75
Send, h
Sleep, 75
Send, i
Sleep, 75
Send, t
Sleep, 75
Send, e
Sleep, 75
Send, l
Sleep, 75
Send, i
Sleep, 75
Send, s
Sleep, 75
Send, t
Sleep, 75
Send, {space}
Sleep, 75
Send, a
Sleep, 75
Send, d
Sleep, 75
Send, d
Sleep, 75
Send, {Space}
Sleep, 75
Send, H
Sleep, 75
Send, e
Sleep, 75
Send, l
Sleep, 75
Send, l
Sleep, 75
Send, o
Sleep, 75
Send, 2
Sleep, 75
Send, 2
Sleep, 75
Send, 1
Sleep, 75
Send, 5
Sleep, 75
Send, {Enter}
Sleep, 75
Send, /
Sleep, 75
Send, w
Sleep, 75
Send, h
Sleep, 75
Send, i
Sleep, 75
Send, t
Sleep, 75
Send, e
Sleep, 75
Send, l
Sleep, 75
Send, i
Sleep, 75
Send, s
Sleep, 75
Send, t
Sleep, 75
Send, {space}
Sleep, 75
Send, a
Sleep, 75
Send, d
Sleep, 75
Send, d
Sleep, 75
Send, {Space}
Sleep, 75
Send, A
Sleep, 75
Send, l
Sleep, 75
Send, a
Sleep, 75
Send, s
Sleep, 75
Send, k
Sleep, 75
Send, a
Sleep, 75
Send {Enter}


This script works fine, it adds me and my friend to the whitelist (I add more people this is just shortened for easier help) but as you can see it is far longer than it should be. I have it like this because I need a delay after each "/" to allow the command box to appear.

How can I use SetKeyDelay (or similar function) to work for just the one key

Hello2215

kspade
  • Members
  • 4 posts
  • Last active: Jun 24 2014 08:08 AM
  • Joined: 22 Dec 2013

tconAuto v1.1

 

Readme:

Spoiler

 

Video:

 

Download:

 

Code:

Spoiler


Victory
  • Members
  • 1 posts
  • Last active: May 15 2014 10:35 AM
  • Joined: 12 May 2014

I'd love to use the above mentioned auto-bridge-build script as well as some others. How do I use a script? If I have a code I like, then what? I'm an absolute noob.

 

Do I need additional programs, and if so, which ones? Do I just copy the code in some code-running software, run minecraft press a button and my minecraft-character will start building? 

 

As you can tell, I'm absolutely out of my element, please help ;)