Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local args = {...}
  2.  
  3. function Mine()
  4. for i=1,50 do
  5.     if turtle.getFuelLevel() < 1 then
  6.         turtle.refuel(1)
  7.     end
  8.    
  9.     local success, data = turtle.inspect()
  10.    
  11.     if success then
  12.         turtle.dig()
  13.     end
  14.    
  15.     turtle.forward()
  16.    
  17.     local success, data = turtle.inspectUp()
  18.    
  19.     if success then
  20.         turtle.digUp()
  21.     end
  22. end
  23.  
  24. for i=1,50 do
  25.     if turtle.getFuelLevel() < 1 then
  26.         turtle.refuel(1)
  27.     end
  28.     turtle.back()
  29. end
  30. turtle.turnLeft()
  31. turtle.forward()
  32. turtle.forward()
  33. turtle.forward()
  34. turtle.turnRight()
  35. end
  36.  
  37. if args[1] then
  38.     for i=1,args[1] do
  39.         Mine()
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement