Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. function turnright()
  2. turtle.turnRight()
  3. moveforward()
  4. turtle.turnRight()
  5. end
  6.  
  7. function turnleft()
  8. turtle.turnLeft()
  9. moveforward()
  10. turtle.turnLeft()
  11. end
  12.  
  13. function checkblockcount()
  14. if turtle.getItemCount(curslot) == 0 then
  15. selnextslot()
  16. end
  17. end
  18.  
  19. function selnextslot()
  20. curslot = curslot + 1
  21. if curslot > 16 then
  22. print("Out of blocks, terminating")
  23. error()
  24. end
  25. turtle.select(curslot)
  26. end
  27.  
  28. function place()
  29. checkblockcount()
  30. turtle.placeDown()
  31. turtle.forward()
  32. end
  33.  
  34.  
  35. function returntostart()
  36. if orient == true then
  37. turtle.turnRight()
  38. for i = 1, width - 1 do
  39. moveforward()
  40. end
  41. turtle.turnRight()
  42. moveback()
  43. elseif orient == false then
  44. turtle.turnLeft()
  45. for i = 1, width - 1 do
  46. moveforward()
  47. end
  48. turtle.turnRight()
  49. for i = 1, length do
  50. turtle.back()
  51. end
  52. end
  53. end
  54. ----------
  55.  
  56. for i=1, 3 do
  57. place()
  58. end
  59. turnright()
  60. for i=1, 3 do
  61. place()
  62. end
  63. turnleft()
  64. for i=1, 3 do
  65. place()
  66. end
  67. returntostart()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement