Advertisement
leazer245

Untitled

Feb 8th, 2017
109
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. 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.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. function paliwo()
  23. if turtle.getFuelLevel() < 1000 or turtle.getItemCount(w) == 0 then
  24. turtle.turnLeft()
  25. turtle.select(w)
  26. turtle.suck()
  27. turtle.turnRight()
  28. else
  29. if turtle.getFuelLevel() <1000 then
  30. turtle.select(w)
  31. turtle.refuel()
  32. end
  33. end
  34. end
  35. function kop()
  36. turtle.select(s)
  37. if not turtle.compare() then
  38. turtle.dig()
  39. end
  40. end
  41.  
  42. function staw()
  43.  
  44. turtle.select(s)
  45. turtle.place()
  46. end
  47.  
  48. function rozladunek()
  49. if
  50. turtle.getItemCount(i) > 0 then
  51.  
  52. turtle.select(i)
  53. turtle.dropDown()
  54.  
  55. end
  56. end
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. function main()
  64. while true do
  65. paliwo()
  66. stone()
  67. staw()
  68. kop()
  69. rozladunek()
  70. end
  71. end
  72. return main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement