Advertisement
Feddis08

MiningTurtle for ComputerCraft

Jul 29th, 2021 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. print("Miner By Feddis08")
  2. print("Starting Mining")
  3.  
  4. count = 0
  5. impulse = true
  6.  
  7. turtle.refuel(1)
  8.  
  9. function dig()
  10.     if turtle.detect() then
  11.         turtle.dig()
  12.     end
  13.     turtle.forward()
  14.     if turtle.detectUp() then
  15.         turtle.digUp()
  16.     end
  17. end
  18. function filter()
  19. itemslot = 0
  20. while itemslot == 16 do
  21.     itemslot = itemslot + 1
  22.     if turtle.getItemDetail(itemslot) == "cobblestone" then
  23.        turtle.drop(itemslot)
  24.     end
  25. end
  26. end
  27. while(true) do
  28.     if count == 16 then
  29.         turtle.turnLeft()
  30.         dig()
  31.         dig()
  32.         dig()
  33.         dig()
  34.         turtle.turnLeft()
  35.     end
  36.     if count == 32 then
  37.         turtle.turnRight()
  38.         dig()
  39.         dig()
  40.         dig()
  41.         dig()
  42.         turtle.turnRight()
  43.         count = 0
  44.     end
  45.     dig()
  46.     filter()
  47.     count = count + 1
  48. end
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement