Page 1 of 1

Mining aid

PostPosted: Tue Jan 13, 2015 18:50
by Eisenberg
I want to share this script. Its purpose isn't cheating or AFKing, it's just to relieve some tedious and repetitive button pressing. I hurt my hand and this script lets me continue playing. It's really not good for AFK mining, since:
-The cursor's movement isn't exact in practice and you have to manually correct it sometimes to avoid ruining the tunnel
-You still have to manually restock picks/torches
-You have to stop the script to avoid falling in holes/lava
-You can't do anything else on your PC while the script is running

All it does is mine the two blocks in front of you, then the one below where those two were, then makes you walk forward one block, repeat. And it places torches on the floor every 6 steps. So it makes a downward step tunnel. It assumes you have a pick in slot 2 and torches in slot 8, but you can change that.

Press ctrl 1 for stone pick, ctrl 2 for steel and ctrl 3 for mese, and press again to stop the script. This is an Autohotkey script, so you need that program to use it.

PS. pipetron likes griefing strangers, watch out. :)

Copy and paste the following into a .txt file, then open it with autohotkey to use.


Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
torchSlot = 8
pickSlot = 2

PlantTorch()
{
    global torchSlot, pickSlot
    SendInput, %torchSlot%
    MouseMove, 0, 500, 4, R
    Send {RButton}
    MouseMove, 0, -13, 100, R      
    SendInput, %pickSlot%
}

Mine(duration)
{
    Send {LButton down}
    Sleep duration
    Send {LButton up}
}

MoveForward()
{
    Send {W down}
    Sleep 550
    Send {W up}
}

   





#MaxThreadsPerHotkey 3
; Make mine (stone pick)
^1::
#MaxThreadsPerHotkey 1
if KeepWinZRunning 
{
    KeepWinZRunning := false 
    return 
}

KeepWinZRunning := true
Loop
{
    if not KeepWinZRunning 
        break
    PlantTorch()
    if not KeepWinZRunning 
        break

    Loop, 6
    {
   Mine(4500)
        if not KeepWinZRunning 
            break
        MoveForward()
        if not KeepWinZRunning 
            break
    }
}
KeepWinZRunning := false
return







; Make mine (steel pick)
#MaxThreadsPerHotkey 3
^2::
#MaxThreadsPerHotkey 1
if KeepWinZRunning 
{
    KeepWinZRunning := false 
    return 
}

KeepWinZRunning := true
Loop
{
    if not KeepWinZRunning 
        break
    PlantTorch()
    if not KeepWinZRunning 
        break

    Loop, 6
    {
   Mine(1600)
        if not KeepWinZRunning 
            break
        MoveForward()
        if not KeepWinZRunning 
            break
    }
}
KeepWinZRunning := false
return




; Make mine (mese pick)
#MaxThreadsPerHotkey 3
^3::
#MaxThreadsPerHotkey 1
if KeepWinZRunning 
{
    KeepWinZRunning := false 
    return 
}

KeepWinZRunning := true
Loop
{
    if not KeepWinZRunning 
        break
    PlantTorch()
    if not KeepWinZRunning 
        break

    Loop, 6
    {
   Mine(1100)
        if not KeepWinZRunning 
            break
        MoveForward()
        if not KeepWinZRunning 
            break
    }
}
KeepWinZRunning := false
return

Re: Mining aid

PostPosted: Sat Feb 07, 2015 20:44
by Hybrid Dog
What's autohotkey?

Re: Mining aid

PostPosted: Sun Feb 08, 2015 02:19
by Napiophelios
Its a simple scripting language...very handy for Windows users.

http://ahkscript.org/