Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. function Step()
  2. while turtle.detect() do
  3. turtle.dig()
  4. os.sleep(.5)
  5. end
  6. turtle.forward()
  7. while turtle.detectDown() or turtle.detectUp() do
  8. turtle.digUp()
  9. turtle.digDown()
  10. end
  11. turtle.down()
  12. if !turtle.detectDown()
  13. then
  14. select(16)
  15. placeDown()
  16. end
  17. end
  18.  
  19. local size = 0
  20. local depth = 0
  21. print("Please print size. (Bottom Left Corner)")
  22. size = read()
  23. print("Please print turn number.")
  24. depth = read()
  25.  
  26. for i=1, depth do
  27. for j=2, size do
  28. print(depth+1-i)
  29. Step()
  30. end
  31. turtle.turnRight()
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement