Advertisement
leazer245

Untitled

Oct 18th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. function dol()
  2.  
  3. if turtle.detectDown() == true and not turtle.digDown() then
  4. print("nie da sie")
  5. powrot()
  6.  
  7. else
  8. print("da sie")
  9. turtle.digDown()
  10. turtle.down()
  11. end
  12. end
  13.  
  14. function powrot()
  15.  
  16. while turtle.detectUp() == false do
  17. print("wracam")
  18. turtle.up()
  19. end
  20. end
  21.  
  22. function rozladunek()
  23. turtle.select(12)
  24. if turtle.getItemCount(12) >= 1 then
  25.  
  26.  
  27.  
  28. turtle.select(14)
  29. turtle.placeUp()
  30. turtle.select(1)
  31. turtle.dropUp()
  32. turtle.select(2)
  33. turtle.dropUp()
  34. turtle.select(3)
  35. turtle.dropUp()
  36. turtle.select(4)
  37. turtle.dropUp()
  38. turtle.select(5)
  39. turtle.dropUp()
  40. turtle.select(6)
  41. turtle.dropUp()
  42. turtle.select(7)
  43. turtle.dropUp()
  44. turtle.select(8)
  45. turtle.dropUp()
  46. turtle.select(9)
  47. turtle.dropUp()
  48. turtle.select(10)
  49. turtle.dropUp()
  50. turtle.select(11)
  51. turtle.dropUp()
  52. turtle.select(12)
  53. turtle.dropUp()
  54. turtle.select(14)
  55. turtle.digUp()
  56.  
  57. end
  58. end
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. function ruch()
  68. turtle.select(16)
  69. if turtle.compareUp() then
  70. turtle.forward()
  71. turtle.turnLeft()
  72. turtle.turnLeft()
  73. turtle.select(15)
  74. turtle.place()
  75. turtle.turnLeft()
  76. turtle.turnLeft()
  77. end
  78. end
  79.  
  80. function sktret()
  81. turtle.select(16)
  82. print("nawracam")
  83. if turtle.compareUp() and turtle.compare() then
  84. turtle.turnRight()
  85. end
  86. end
  87.  
  88. function main()
  89. while true do
  90. ruch()
  91. sktret()
  92. dol()
  93. rozladunek()
  94. end
  95. end
  96. return main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement