Advertisement
leazer245

Untitled

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