Advertisement
lonkidely

ClearTree v0.3

Feb 21st, 2020
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.18 KB | None | 0 0
  1. function forward(count)
  2.   for i = 1, count do
  3.     turtle.forward()
  4.   end
  5. end
  6.  
  7. function turnLeft(count)
  8.   for i = 1, count do
  9.     turtle.turnLeft()
  10.   end
  11. end
  12.  
  13. function turnRight(count)
  14.   for i = 1, count do
  15.     turtle.turnRight()
  16.   end
  17. end
  18.  
  19. function cl()
  20.   for i = 1, 7 do
  21.     turtle.digDown()
  22.     turtle.down()
  23.     turtle.turnLeft()
  24.     turtle.turnLeft()
  25.     turtle.dig()
  26.     turtle.turnLeft()
  27.     turtle.turnLeft()
  28.   end
  29.   for i = 1, 7 do
  30.     turtle.up()
  31.   end
  32. end
  33.  
  34. function one()
  35.   for j = 1, 4 do
  36.     cl()
  37.     turtle.turnLeft()
  38.     turtle.forward()
  39.     turtle.turnRight()
  40.     turtle.forward()
  41.     turtle.turnRight()
  42.   end
  43. end
  44.  
  45. function row()
  46.   for i = 1, 4 do
  47.     one()
  48.     turnRight(1)
  49.     forward(3)
  50.     turnLeft(1)
  51.   end
  52.   one()
  53. end
  54.  
  55. function main()
  56.   for i = 1, 9 do
  57.     turtle.digUp()
  58.     turtle.up()
  59.   end
  60.   for i = 1, 4 do
  61.     row()
  62.     turnLeft(1)
  63.     forward(13)
  64.     turnRight(1)
  65.     forward(3)
  66.     turnRight(1)
  67.     forward(1)
  68.     turnLeft(1)
  69.   end
  70.   row()
  71.   turnLeft(1)
  72.   forward(13)
  73.   turnLeft(1)
  74.   forward(12)
  75.   turnLeft(1)
  76.   forward(1)
  77.   turnLeft(1)
  78.   for i = 1, 9 do
  79.     turtle.down()
  80.   end
  81. end
  82.  
  83. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement