Advertisement
Guest User

buranti

a guest
Jul 26th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.15 KB | None | 0 0
  1. mining = 10
  2.  
  3. local minefuel = mining*2+2
  4.  
  5. function fuelcheck()
  6.  print("NowFuel")
  7.  print(turtle.getFuelLevel())
  8.  print("mining")
  9.  print(mining)
  10.  print("requiredFuel")
  11.  print(minefuel)
  12. end
  13.  
  14. fuelcheck()
  15. print("Refuel")
  16. for refuel=1,16 do
  17.  turtle.select(refuel)
  18.  turtle.refuel()
  19. end
  20. fuelcheck()
  21.  
  22. if minefuel > turtle.getFuelLevel() then
  23.  error('Not enough Fuel',turtle.getFuelLevel(),'/',minefuel)
  24. else
  25.  print('currnet/required = ',turtle.getFuelLevel(),'/',minefuel)
  26. end
  27.  
  28. fuelcheck()
  29. print("start")
  30. turtle.select(1)
  31. for totalmine=1,mining do
  32.  turtle.dig()
  33.  turtle.forward()
  34.  turtle.placeDown()
  35.  turtle.turnRight()
  36.  turtle.place()
  37.  turtle.turnLeft()
  38.  turtle.turnLeft()
  39.  turtle.place()
  40.  turtle.turnRight()
  41.  turtle.digUp()
  42. end
  43. turtle.place()
  44. turtle.up()
  45. turtle.place()
  46. turtle.placeUp()
  47. turtle.turnLeft()
  48. turtle.place()
  49. turtle.turnRight()
  50. turtle.turnRight()
  51. turtle.place()
  52. turtle.turnRight()
  53.  
  54. for mineback=2,mining do
  55.  turtle.forward()
  56.  turtle.turnLeft()
  57.  turtle.place()
  58.  turtle.turnRight()
  59.  turtle.turnRight()
  60.  turtle.place()
  61.  turtle.turnLeft()
  62.  turtle.placeUp()
  63. end
  64. turtle.down()
  65. turtle.turnRight()
  66. turtle.turnRight()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement