Advertisement
Guest User

clear.lua

a guest
Aug 23rd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. function forward(stp)
  2.  for c=1,stp do
  3.   while turtle.detect() do
  4.   turtle.dig()
  5.   sleep(1)
  6.   end
  7.  turtle.forward()
  8.  turtle.digUp()
  9.  turtle.digDown()
  10.  end
  11. end
  12.  
  13. function tleft(stp)
  14.  for c=1,stp do
  15.  turtle.turnLeft()
  16.  end
  17. end
  18.  
  19. function tright(stp)
  20.  for c=1,stp do
  21.  turtle.turnRight()
  22.  end
  23. end
  24.  
  25.  
  26. function room()
  27.  forward(6)
  28.  tleft(1)
  29.  forward(2)
  30.  tleft(1)
  31.  forward(4)
  32.  tleft(1)
  33.  forward(4)
  34.  tleft(1)
  35.  forward(4)
  36.  tleft(1)
  37.  forward(3)
  38.  tleft(1)
  39.  forward(3)
  40.  tleft(1)
  41.  forward(2)
  42.  tleft(1)
  43.  forward(2)
  44.  tleft(1)
  45.  forward(1)
  46.  tright(1)
  47.  forward(1)
  48. end
  49.  
  50. for c=1,5 do
  51.  room()
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement