Guest User

MStairs2

a guest
Mar 25th, 2015
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. -- This program digs a 5 x 5 stairwell
  2. -- down to bedrock
  3.  
  4. function cut(blocks)
  5.   for z = 1, blocks do
  6.   turtle.dig()
  7.   turtle.forward()
  8.   end
  9.   end
  10.    
  11. size = 5
  12.  
  13. for a = 1, size do
  14.   turtle.digDown()
  15.   turtle.down()
  16.   cut(size - a)
  17.     if (size - (a + 1)) > 0 then
  18.       for b = 1, (size - (a + 1)) do
  19.       turtle.back()
  20.       end
  21.     end
  22.   end
  23.  
  24. turtle.turnRight()
  25.  
  26. for c = 1, (size - 1) do
  27.    turtle.dig()
  28.    turtle.forward()
  29.    turtle.digUp()
  30.    turtle.up()
  31.    turtle.digUp()
  32.    turtle.down()
  33.    turtle.digDown()
  34.    turtle.down()
  35.    turtle.digDown()
  36.    turtle.down()
  37.    end
Advertisement
Add Comment
Please, Sign In to add comment