Advertisement
Guest User

Untitled

a guest
Jun 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. write("Width: ")
  2. width = tonumber(read())
  3. write("Length: ")
  4. length = tonumber(read())
  5. write("Height: ")
  6. height = tonumber(read())
  7.  
  8. orientation = "north"
  9.  
  10. print("Digging in a "..width.."x"..length.."x"..height.." area")
  11.  
  12. digRight()
  13. function digRight()
  14. if orientation == "north" then
  15. turtle.dig()
  16. turtle.forward()
  17. turtle.turnRight()
  18. end
  19. elseif orientation == "south" then
  20. turtle.turnLeft()
  21. turtle.turnLeft()
  22. turtle.dig()
  23. turtle.turnRight()
  24. turtle.turnRight()
  25. end
  26. elseif orientation == "west" then
  27. turtle.turnRight()
  28. turtle.dig()
  29. turtle.forward()
  30. turtle.turnRight()
  31. end
  32. --for i = 1,width,1 do
  33. --turtle.dig()
  34. --turtle.forward()
  35. --end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement