Advertisement
DustinRosebery

platform

May 23rd, 2016
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. left = true
  2. slot = 1
  3.  
  4. -- Startup prompt
  5. io.write("Hello World.")
  6.  
  7.  
  8. -- Checks for Empty slot and switches if empty
  9.  
  10. local function slotCheck()
  11. if turtle.getItemCount() == 0 then
  12. slot = slot + 1
  13. end
  14. turtle.select(slot)
  15. end
  16.  
  17.  
  18. -- Start of turtle movement
  19.  
  20. for i = 1, 25 do -- Set for width
  21.  
  22. for j = 1, 9 do -- Set for depth
  23.  
  24. slotCheck()
  25. turtle.placeDown()
  26. turtle.forward()
  27.  
  28. end
  29.  
  30. if left == true then
  31. turtle.turnLeft()
  32. turtle.forward()
  33. turtle.turnLeft()
  34. turtle.forward()
  35. left = false
  36. else
  37. turtle.turnRight()
  38. turtle.forward()
  39. turtle.turnRight()
  40. turtle.forward()
  41. left = true
  42.  
  43. end
  44.  
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement