Advertisement
leazer245

Untitled

Feb 3rd, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 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.refuel()
  21. end
  22. end
  23. end
  24. function kop()
  25. turtle.select(s)
  26. if not turtle.compare() then
  27. turtle.dig()
  28. end
  29. end
  30.  
  31. function staw()
  32. turtle.select(s)
  33. turtle.place()
  34. end
  35.  
  36. function rozladunek()
  37. if
  38. turtle.getItemCount(i) > 0 then
  39. turtle.turnLeft()
  40. turtle.turnLeft()
  41. turtle.select(i)
  42. turtle.drop()
  43. turtle.turnLeft()
  44. turtle.turnLeft()
  45. end
  46. end
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. function main()
  54. while true do
  55. paliwo()
  56. stone()
  57. staw()
  58. kop()
  59. rozladunek()
  60. end
  61. end
  62. return main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement