Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- function mineInteration()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- end
- function moveBack()
- for i = 1, tArgs[1] do
- turtle.back()
- end
- end
- function nextTunnel()
- turtle.turnRight()
- mineInteration()
- mineInteration()
- mineInteration()
- turtle.turnLeft()
- end
- if tArgs[1] == nil then tArgs[1] = 1 end
- if tArgs[2] == nil then tArgs[2] = 1 end
- tunnels = tonumber(tArgs[2])
- for i = 1, tArgs[2] do
- print("This is Tunnel " ..tostring(i).. ".")
- for i = 1, tArgs[1] do
- mineInteration()
- end
- moveBack()
- if i < tunnels then nextTunnel() end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement