Advertisement
Dr_Turtle

Untitled

Jun 27th, 2021
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. args = {...}
  2. loops = args[1]
  3. delay = args[2]
  4.  
  5.  
  6.  
  7. function turnEnd(direction)
  8. if direction == "R" then
  9. turtle.turnRight()
  10. turtle.forward()
  11. turtle.turnRight()
  12. elseif direction == "L" then
  13. turtle.turnLeft()
  14. turtle.forward()
  15. turtle.turnLeft()
  16. end
  17. end
  18.  
  19. function strip()
  20. turtle.placeDown()
  21. for i = 1,8 do
  22. turtle.forward()
  23. turtle.placeDown()
  24. end
  25. end
  26.  
  27. turtle.select(1)
  28. for j = 1,loops do
  29. for i = 1,4 do
  30. strip()
  31. turnEnd("R")
  32. strip()
  33. turnEnd("L")
  34. end
  35. strip()
  36. turtle.turnLeft()
  37. for i = 1,8 do
  38. turtle.forward()
  39. end
  40. turtle.turnLeft()
  41. for i = 1,8 do
  42. turtle.forward()
  43. end
  44. turtle.turnLeft()
  45. turtle.turnLeft()
  46. sleep(delay)
  47. end
  48.  
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement