deathpax

road

Jul 10th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. local length = 0
  2.  
  3. function roadBuild()
  4.     for i = 1, length + 1, 1 do
  5.       turtle.digDown()
  6.       turtle.placeDown()
  7.       if i <= length then
  8.         turtle.forward()
  9.       end
  10.     end
  11. end
  12. function goLeft()
  13.     turtle.turnLeft()
  14.     turtle.forward()
  15.     turtle.turnLeft()
  16. end
  17. function goRight()
  18.     turtle.turnRight()
  19.     turtle.forward()
  20.     turtle.turnRight()
  21. end
  22.  
  23. while turtle.forward() do
  24.   length = length + 1
  25. end
  26.  
  27. for i = 1, length, 1 do
  28.   turtle.back()
  29. end
  30.  
  31. turtle.turnLeft()
  32. turtle.forward()
  33. turtle.turnRight()
  34.  
  35. roadBuild()
  36. goRight()
  37. roadBuild()
  38. goLeft()
  39. roadBuild()
Add Comment
Please, Sign In to add comment