Advertisement
KroNixZ

Infinite Path

Aug 10th, 2022 (edited)
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. while true do
  2.  
  3.  
  4.  
  5.     function check()
  6.         turtle.select(1)
  7.         if turtle.getItemCount() == 0 then
  8.             turtle.select(16)
  9.             turtle.place()
  10.             turtle.select(1)
  11.             turtle.suck()
  12.             turtle.select(16)
  13.             turtle.dig()
  14.             turtle.select(1)
  15.         end
  16.         if turtle.getFuelLevel() == 0 then
  17.             turtle.select(15)
  18.             turtle.place()
  19.             turtle.select(2)
  20.             turtle.suck()
  21.             turtle.select(15)
  22.             turtle.dig()
  23.             turtle.select(2)
  24.             turtle.refuel()
  25.         end
  26.     end
  27.  
  28.     check()
  29.     turtle.select(1)
  30.     turtle.placeDown()
  31.     turtle.forward()
  32.  
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement