Mining aid

Eisenberg
New member
 
Posts: 1
Joined: Tue Jan 13, 2015 18:24

Mining aid

by Eisenberg » Tue Jan 13, 2015 18:50

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
Last edited by Eisenberg on Tue Jan 13, 2015 19:01, edited 2 times in total.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Mining aid

by Hybrid Dog » Sat Feb 07, 2015 20:44

What's autohotkey?
 

User avatar
Napiophelios
Member
 
Posts: 752
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: Mining aid

by Napiophelios » Sun Feb 08, 2015 02:19

Its a simple scripting language...very handy for Windows users.

http://ahkscript.org/
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 7 guests

cron