Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1, 1)
- print("This digs a 1x2 tunnel, and places torches!")
- term.clear()
- term.setCursorPos(1, 1)
- local tArgs = { ... }
- local a = 0
- function drop()
- for i=1, 16 do
- turtle.select(i)
- turtle.drop()
- end
- end
- function amount()
- turtle.select(2)
- if turtle.getItemCount(2) == 0 then
- turtle.select(3)
- elseif turtle.getItemCount(3) == 0 then
- turtle.select(4)
- end
- end
- function fill()
- turtle.turnLeft()
- amount()
- turtle.place()
- turtle.placeDown()
- turtle.up()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.placeUp()
- turtle.place()
- turtle.down()
- turtle.place()
- turtle.turnLeft()
- end
- for i = 1,tArgs[1] do
- turtle.dig()
- turtle.digUp()
- fill()
- if turtle.forward() == true then
- a = a + 1
- elseif turtle.forward() == false then
- repeat
- turtle.dig()
- sleep(0.5)
- until turtle.detect() == false
- end
- if a == 5 then
- turtle.select(1)
- turtle.placeUp()
- turtle.forward()
- a = a - 5
- end
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for i=1,tArgs[1] do
- turtle.forward()
- end
- drop()
Advertisement
Add Comment
Please, Sign In to add comment