Advertisement
vyacheslavmikh

mine1

Feb 25th, 2024
609
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1. refuel()
  2. digOnce()
  3.  
  4. function digOnce()
  5.   turtle.dig()
  6.   turtle.forward()
  7.   turtle.digUp()
  8.   turtle.up()
  9.   turtle.digUp()
  10.   turtle.up()
  11.  
  12.   turtle.turnLeft()
  13.   turtle.dig()
  14.   turtle.forward()
  15.   turtle.digDown()
  16.   turtle.down()
  17.   turtle.digDown()
  18.   turtle.down()
  19.  
  20.   turtle.dig()
  21.   turtle.forward()
  22.   turtle.digUp()
  23.   turtle.up()
  24.   turtle.digUp()
  25.   turtle.up()
  26.  
  27.   turtle.turnRight()
  28.  
  29.   turtle.dig()
  30.   turtle.forward()
  31.   turtle.digDown()
  32.   turtle.down()
  33.   turtle.digDown()
  34.   turtle.down()
  35.  
  36.   turtle.turnRight()
  37.   turtle.dig()
  38.   turtle.forward()
  39.   turtle.digUp()
  40.   turtle.up()
  41.   turtle.digUp()
  42.   turtle.up()
  43.  
  44.   turtle.dig()
  45.   turtle.forward()
  46.   turtle.digDown()
  47.   turtle.down()
  48.   turtle.digDown()
  49.   turtle.down()
  50.  
  51.   turtle.turnLeft()
  52. end
  53.  
  54. function refuel()
  55.   if turtle.getFuelLevel() < 6 then
  56.     for i = 1,16 do
  57.       if turtle.getItemCount(i) > 0 then
  58.         turtle.select(i)
  59.         if turtle.refuel(1) then
  60.           break
  61.         end
  62.       end
  63.     end
  64.   end
  65.   turtle.select(1)
  66. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement