Advertisement
leazer245

Untitled

Feb 8th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. w = 16
  2. s = 15
  3. k = 14
  4. i = 1
  5. function stone()
  6. if turtle.getItemCount(s) == 0 then
  7. turtle.turnRight()
  8. turtle.select(k)
  9. elseif turtle.compare() then
  10. turtle.select(s)
  11. turtle.suck()
  12. turtle.turnLeft()
  13. end
  14. end
  15. end
  16. function paliwo()
  17. if turtle.getFuelLevel() < 1000 or turtle.getItemCount(w) == 0 then
  18. turtle.turnLeft()
  19. turtle.select(w)
  20. turtle.suck()
  21. turtle.turnRight()
  22. else
  23. if turtle.getFuelLevel() <1000 then
  24. turtle.select(w)
  25. turtle.refuel()
  26. end
  27. end
  28. end
  29. function kop()
  30. turtle.select(s)
  31. if not turtle.compare() then
  32. turtle.dig()
  33. end
  34. end
  35.  
  36. function staw()
  37.  
  38. turtle.select(s)
  39. turtle.place()
  40. end
  41.  
  42. function rozladunek()
  43. if
  44. turtle.getItemCount(i) > 0 then
  45. turtle.turnLeft()
  46. turtle.turnLeft()
  47. turtle.select(i)
  48. turtle.drop()
  49. turtle.turnLeft()
  50. turtle.turnLeft()
  51. end
  52. end
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. function main()
  60. while true do
  61. paliwo()
  62. stone()
  63. staw()
  64. kop()
  65. rozladunek()
  66. end
  67. end
  68. return main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement