Advertisement
chopstyix

Untitled

Dec 31st, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. local tArgs = { ... }
  2. local dis = tonumber(tArgs[1])
  3.  
  4. g = 1
  5. st = 5
  6. cobble = 9
  7.  
  8.  
  9. -- Functions
  10.  
  11. function turnaround()
  12. turtle.turnRight()
  13. turtle.turnRight()
  14. end
  15.  
  16. function placedown(item)
  17. turtle.detect()
  18. if (turtle.detectDown() == true) then
  19. turtle.digDown()
  20. end
  21. turtle.select(item)
  22. turtle.placeDown()
  23. end
  24.  
  25. function placefront(item)
  26. turtle.detect()
  27. if (turtle.detect() == true) then
  28. turtle.dig()
  29. end
  30. turtle.select(item)
  31. turtle.place()
  32. end
  33.  
  34. function placerow()
  35. placefront(st)
  36. placedown(gr)
  37. turnaround()
  38. turtle.forward()
  39. placedown(gr)
  40. turtle.forward()
  41. placedown(gr)
  42. placefront(st)
  43. turnaround()
  44. turtle.forward()
  45. turtle.turnRight()
  46. end
  47.  
  48. function detectright()
  49. turtle.turnRight()
  50. turtle.forward()
  51. if (turtle.forward() == true) then
  52. turtle.digForward()
  53. end
  54. turtle.forward()
  55. end
  56.  
  57. -- Main Script
  58.  
  59. local i = 1
  60. repeat
  61. print(i)
  62. i = i + 1
  63. until i == 5
  64.  
  65. turtle.forward()
  66. turtle.turnRight()
  67. turtle.forward()
  68. placerow()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement