Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function forward() turtle.forward() end
- function up() turtle.up() end
- function down() turtle.down() end
- function left() turtle.turnLeft() end
- function right() turtle.turnRight() end
- function left2()
- for
- m = 1, 2, 1 do
- left()
- end
- end
- function right2()
- for
- m = 1, 2, 1 do
- right()
- end
- end
- function digDown()
- if
- turtle.detectDown() == true then
- turtle.select(2)
- if
- turtle.compare() == true then
- turtle.digDown(right)
- elseif
- turtle.select(3)
- turtle.compareDown() == true then
- turtle.digDown(right)
- else
- turtle.digDown(left)
- end
- end
- end
- function dig()
- if
- turtle.detect() == true then
- turtle.select(2)
- if
- turtle.compare() == true then
- turtle.dig(right)
- elseif
- turtle.select(3)
- turtle.compare() == true then
- turtle.dig(right)
- else
- turtle.dig(left)
- end
- end
- end
- function digUp()
- if
- turtle.detectUp() == true then
- turtle.select(2)
- if
- turtle.compareUp() == true then
- turtle.digUp(right)
- elseif
- turtle.select(3)
- turtle.compare() == true then
- turtle.digUp(right)
- else
- turtle.digUp(left)
- end
- end
- end
- function detectDown()
- if
- turtle.detectDown() == false then
- turtle.select(1)
- turtle.placeDown()
- end
- end
- function detect()
- if
- turtle.detect() == false then
- turtle.select(1)
- turtle.place()
- end
- end
- function detectUp()
- if
- turtle.detectUp() == false then
- turtle.select(1)
- turtle.placeUp()
- end
- end
- dig()
- --[[
- -- left side of 3x3 tunnel
- dig()
- forward()
- left()
- detectDown()
- detect()
- digUp()
- up()
- detect()
- digUp()
- up()
- detect()
- detectUp()
- right2()
- -- top side of 3x3 tunnel
- dig()
- forward()
- detectUp()
- digDown()
- dig()
- forward()
- detectUp()
- detect()
- -- right side of 3x3 tunnel
- digDown()
- down()
- detect()
- digDown()
- down()
- detect()
- detectDown()
- left2()
- -- bottom side of 3x3 tunnel
- dig()
- forward()
- detectDown()
- forward()
- right()
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement