Advertisement
leazer245

Untitled

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