Posted 29 February 2012 - 02:45 PM
If you didn't already understand that this is for the turtle, it is.
the title says what it does, it mines a 3x3 hole the way its facing for as long as you set it to. (long = blocks, not a timer)
i did a rewrite of the whole script using functions and more loops.
should be a bit better now i think :unsure:/>/>/>
now it can handle more sand and gravel too, and returns to starting position when done
video:
[media]http://youtu.be/_Gq-7UW6ldw[/media]
the new script:
http://pastebin.com/vSWz3kdk
the old script (DON'T USE!):
Hope you like it!
the title says what it does, it mines a 3x3 hole the way its facing for as long as you set it to. (long = blocks, not a timer)
i did a rewrite of the whole script using functions and more loops.
should be a bit better now i think :unsure:/>/>/>
now it can handle more sand and gravel too, and returns to starting position when done
video:
Spoiler
[media]http://youtu.be/_Gq-7UW6ldw[/media]
the new script:
http://pastebin.com/vSWz3kdk
the old script (DON'T USE!):
Spoiler
print "input lenght of the 3X3 tunnel"
n2 = io.read()
n1 = 0
n2 = tonumber(n2)
n3 = 0
shell.run("clear")
while true do
shell.run("clear")
print ("turtle will stop when the number reaches zero: "..n2)
print ""
print "or if theres no more space in turtle's inventory"
turtle.dig()
turtle.dig()
turtle.dig()
turtle.dig()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digUp()
turtle.digUp()
turtle.digDown()
turtle.turnRight()
turtle.dig()
turtle.dig()
turtle.dig()
turtle.dig()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digUp()
turtle.digUp()
turtle.digUp()
turtle.digDown()
turtle.turnLeft()
turtle.turnLeft()
turtle.forward()
turtle.dig()
turtle.dig()
turtle.dig()
turtle.dig()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digUp()
turtle.digUp()
turtle.digUp()
turtle.digDown()
turtle.turnRight()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
n3 = n3 + 1
n2 = n2 - 1
shell.run("clear")
print (n2)
if n1 == n2 then
break
elseif turtle.getItemCount(9) ~= 0 then
break
end
end
repeat
shell.run("clear")
print "returning to start position"
turtle.back()
n3 = n3 - 1
until n3 == 0
print "DONE!"
Hope you like it!