Advertisement
funnybunnyofdoom

Minecolumn

Dec 8th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. --This program will make a turtle
  2. --dig down to preset number, and
  3. --then mine again for X times
  4.  
  5. X = 0 --Shafts to dig
  6. H = 0 --height
  7. S = false --direction the turtle will move next
  8.  
  9. print("How many shafts would you like to dig?")
  10. X = tonumber(read())
  11. print("What is the height(Z) of the turtle?")
  12. H = tonumber(read())
  13.  
  14. for k,X do
  15. for i,H do
  16. for j,4 do
  17. turtle.dig()
  18. turtle.turnRight()
  19. end
  20. turtle.digDown()
  21. turtle.down()
  22. end
  23. for l,H do
  24. turtle.up()
  25. end
  26. turtle.forward()
  27. turtle.forward()
  28. if S = false then
  29. turtle.turnRight()
  30. turtle.forward()
  31. turtle.turnLeft()
  32. S = true
  33. else
  34. turtle.turnLeft()
  35. turtle.forward()
  36. turtle.turnRight()
  37. S = false
  38. end
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement