Advertisement
chopstyix

Untitled

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