Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. function checkfuelrefuel()
  2. if turtle.GetFuelLevel() < 5 then
  3. for i = 1,16,1 do
  4. if turtle.getItemDetail(i).name == "Coal" then
  5. turtle.refuel(1)
  6. end
  7. end
  8. end
  9. end
  10.  
  11. function checkinventory()
  12. for o=1,16,1 do
  13. if (turtle.suck(o) == true) and (turtle.suckUp(o) == true) and (turtle.suckDown(o) == true)
  14. full = false
  15. else
  16. full = true
  17. end
  18. end
  19. if full = true then
  20. return true
  21. else
  22. return false
  23. end
  24. end
  25.  
  26. function succa()
  27. turtle.suck()
  28. turtle.suckUp()
  29. turtle.suckDown()
  30. end
  31. function autoscavapussy(altezza, larghezza)
  32. for i=1,altezza,1 do
  33. checkfuelrefuel()
  34. if checkinventory() == true
  35. for x=1,larghezza,1 do
  36. turtle.digDown()
  37. succa()
  38. turtle.forward()
  39. end
  40. end
  41. turtle.turnRight()
  42. end
  43. end
  44.  
  45. autoscavapussy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement