Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = turtle
- function detectGravel()
- while t.detect() == true do
- t.dig()
- end
- end
- -- Assumes starting on bottom
- function digThreeByH(height, alreadyInside)
- if alreadyInside == false then
- t.dig()
- detectGravel()
- t.forward()
- end
- t.turnLeft()
- for i=1, height do
- t.dig()
- if i < height then
- t.digUp()
- t.up()
- end
- end
- t.turnRight()
- t.turnRight()
- t.dig()
- for i=1, height-1 do
- t.down()
- t.dig()
- end
- detectGravel()
- t.turnLeft()
- t.turnLeft()
- detectGravel()
- t.turnRight()
- end
- function digTunnel(len, height, alreadyInside)
- for i=1, len do
- if alreadyInside == true and i == 1 then
- digThreeByH(height, true)
- else
- digThreeByH(height, false)
- end
- end
- end
- function digTShape(baseLen, baseHeight, armLen, armHeight, alreadyInside)
- digTunnel(baseLen, baseHeight, alreadyInside)
- for i=1, 2 do
- t.dig()
- detectGravel()
- t.forward()
- end
- t.turnRight()
- for i=1, math.floor(armLen/2) do
- t.dig()
- detectGravel()
- t.forward()
- end
- t.turnLeft()
- t.turnLeft()
- digTunnel(armLen, armHeight, true)
- t.turnLeft()
- t.turnLeft()
- for i=1, math.floor(armLen/2) do
- t.forward()
- end
- t.turnRight()
- for i=1, baseLen+1 do
- t.forward()
- end
- end
- digTShape(9,3,15,4, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement