Advertisement
leazer245

Untitled

Oct 18th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 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. turtle.select(13)
  28. turtle.dig()
  29. turtle.select(14)
  30. turtle.place()
  31. turtle.select(1)
  32. turtle.drop()
  33. turtle.select(2)
  34. turtle.drop()
  35. turtle.select(3)
  36. turtle.drop()
  37. turtle.select(4)
  38. turtle.drop()
  39. turtle.select(5)
  40. turtle.drop()
  41. turtle.select(6)
  42. turtle.drop()
  43. turtle.select(7)
  44. turtle.drop()
  45. turtle.select(8)
  46. turtle.drop()
  47. turtle.select(9)
  48. turtle.drop()
  49. turtle.select(10)
  50. turtle.drop()
  51. turtle.select(11)
  52. turtle.drop()
  53. turtle.select(12)
  54. turtle.drop()
  55. turtle.select(14)
  56. turtle.digUp()
  57. turtle.select(13)
  58. turtle.place()
  59. end
  60. end
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. function ruch()
  70. turtle.select(16)
  71. if turtle.compareUp() then
  72. turtle.forward()
  73. turtle.turnLeft()
  74. turtle.turnLeft()
  75. turtle.select(15)
  76. turtle.place()
  77. turtle.turnLeft()
  78. turtle.turnLeft()
  79. end
  80. end
  81.  
  82. function sktret()
  83. turtle.select(16)
  84. print("nawracam")
  85. if turtle.compareUp() and turtle.compare() then
  86. turtle.turnRight()
  87. end
  88. end
  89.  
  90. function main()
  91. while true do
  92. ruch()
  93. sktret()
  94. dol()
  95. rozladunek()
  96. end
  97. end
  98. return main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement