Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. local i = 0
  2. local turn = true
  3. local h = 0
  4.  
  5. function demitour()
  6. local k = 0
  7. for k=0,1,1 do
  8. turtle.turnLeft()
  9. end
  10. end
  11. function poseTorche()
  12. if i == 10 then
  13. turtle.select(1)
  14. demitour()
  15. turtle.place()
  16. demitour()
  17. i = 0
  18. end
  19. end
  20. function couloir()
  21. if turtle.detect() == true then
  22. turtle.dig()
  23. elseif turtle.detectUp() == true then
  24. turtle.digUp()
  25. elseif turtle.detectDown() == false then
  26. turtle.select(3)
  27. turtle.placeDown()
  28. else
  29. turtle.forward()
  30. i = i + 1
  31. h = h + 1
  32. end
  33. end
  34. function changeCouloir()
  35. if turn == true then
  36. turtle.turnLeft()
  37. for k=h,h+3,1 do
  38. couloir()
  39. end
  40. turtle.turnLeft()
  41. turn = false
  42. elseif turn == false then
  43. turtle.turnRight()
  44. for k=h,h+3,1 do
  45. couloir()
  46. end
  47. turtle.turnRight()
  48. turn = true
  49. end
  50.  
  51. end
  52.  
  53. while true do
  54.  
  55. while h <= 64 do
  56. couloir()
  57. poseTorche()
  58. end
  59. changeCouloir()
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement