Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --The robot might not work if you change the code
- -- Mining params
- -- Make sure miner has enough fuel
- -- location depends on his starting location, positive X will be his forward and positive Z on his Right and positive Y under him
- io.write("SizeForward ?")
- local x = tonumber(io.read())
- io.write("Size Depth ?")
- local y = tonumber(io.read())
- io.write("Size Right ?")
- local z = tonumber(io.read())
- local blockleft = 0
- local cx = 0
- local cy = 0
- local cz = 0
- function hole(depth)
- for d = 1, depth,1 do
- turtle.digDown()
- while turtle.down() == false do turtle.digDown() end
- blockleft = blockleft - 1
- refreshInfo()
- end
- for d = 1, depth,1 do
- while turtle.up() == false do turtle.digUp() end
- end
- end
- function rack(sizeforward,depth)
- for d = 1, sizeforward,1 do
- turtle.dig()
- while turtle.forward() == false do turtle.dig() end
- hole(depth)
- end
- for d = 1, sizeforward,1 do
- turtle.back()
- end
- end
- function refreshInfo()
- term.clear()
- term.setCursorPos(1,1)
- print("==-- Miner #3265 --==\n")
- print("block left to mine: " .. blockleft)
- print("\ncurrent fuel level: " .. turtle.getFuelLevel())
- end
- function quarry(sizeside,sizeforward,depth)
- blockleft = sizeside*sizeforward*depth
- for i = 0, sizeside - 1, 1 do
- rack(sizeforward,depth)
- turtle.turnRight()
- turtle.dig()
- while turtle.forward() == false do turtle.dig() end
- turtle.turnLeft()
- end
- turtle.turnLeft()
- for j = 0, sizeside - 1,1 do
- turtle.forward()
- end
- turtle.turnRight()
- end
- quarry(z,x,y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement