Advertisement
porkdude

Untitled

Apr 25th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. y,z,x = gps.locate(2)
  2. print("enter x")
  3. j = read()
  4. print("enter depth")
  5. k = read()
  6. print("enter y")
  7. l = read()
  8. print(j)
  9. print(k)
  10. print(l)
  11. J = tonumber(j)
  12. K = tonumber(k)
  13. L = tonumber(l)
  14. while K < z do
  15. turtle.digDown()
  16. turtle.down()
  17. y,z,x = gps.locate(2)
  18. end
  19.  
  20. while K > z do
  21. turtle.digUp()
  22. turtle.up()
  23. y,z,x = gps.locate(2)
  24. end
  25.  
  26. while L < x do
  27. turtle.dig()
  28. turtle.forward()
  29. turtle.digUp()
  30. F = 1
  31. y,z,x = gps.locate(2)
  32. end
  33. end
  34.  
  35. H = x - L
  36. if H > 0 then
  37. turtle.turnRight()
  38. turtle.turnRight()
  39. end
  40. while L > x do
  41. turtle.dig()
  42. turtle.forward()
  43. turtle.digUp()
  44. F = 2
  45. y,z,x = gps.locate(2)
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement