Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function moveToStart()
- turtle.turnRight()
- turtle.turnRight()
- for _ = 1, 10 do
- turtle.forward()
- end
- turtle.turnLeft()
- for _ = 1, 10 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- local function moveForward()
- while not turtle.forward() do
- turtle.dig()
- end
- end
- local function moveToNextLayer()
- turtle.turnRight()
- moveForward()
- turtle.turnLeft()
- end
- local function mineLayer()
- for y = 1, 10 do
- for x = 1, 10 do
- dig()
- refuel()
- if x < 10 then
- moveForward()
- end
- end
- if y < 10 then
- if y % 2 == 1 then
- turtle.turnRight()
- moveForward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- moveForward()
- turtle.turnLeft()
- end
- end
- end
- end
- local function mineDownAndUp()
- for i = 1, 30 do
- mineLayer()
- if i % 10 == 0 then
- findChestAndEmptyInventory()
- moveToStart()
- end
- if i < 30 then
- moveDown()
- moveToNextLayer()
- end
- end
- for _ = 1, 30 do
- moveUp()
- end
- end
- initialRefuel()
- print("Zahajuji tezbu tunelu 10x10x30...")
- mineDownAndUp()
- print("Tezba tunelu dokoncena.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement