Advertisement
Jeyjey0

For Computer Craft users Cobble generator Program

Jan 3rd, 2017
734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. print("Diging Cobblestone")
  2.  
  3. function dig()
  4. while true do
  5. turtle.dig()
  6. sleep(0.2)
  7. end
  8. end
  9.  
  10. function refuel()
  11. while true do
  12. shell.run("refuel all")
  13. sleep(0.1)
  14. end
  15. end
  16. function drop()
  17. drop = 0
  18. while true do
  19. for i = 1,16 do
  20.  
  21. drop = drop + 1
  22. if drop == 17 then
  23. drop = 1
  24. end
  25. turtle.select(drop)
  26. icount = turtle.getItemCount()
  27. if icount >= 1 == true then
  28. local item = turtle.getItemDetail()
  29. if item.name == "minecraft:coal" == false then
  30. turtle.drop()
  31. end
  32. end
  33. end
  34. end
  35. end
  36.  
  37.  
  38. parallel.waitForAll(dig,drop,refuel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement