SHARE
TWEET

light

xmann110 Feb 8th, 2020 (edited) 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function refuel()
  2.     if turtle.getFuelLevel() < 10 then
  3.         get_item(1)
  4.         turtle.refuel(1)
  5.     end
  6. end
  7.  
  8. function get_item(start_slot)
  9.     for v=start_slot, 16 do
  10.         turtle.select(v)
  11.         if turtle.getItemCount() > 0 then
  12.             return
  13.         end
  14.     end
  15.     print("ran out of items")
  16. end
  17.  
  18. for a=1, 15 do
  19.     for i=0, 128 do
  20.         refuel()
  21.         if not turtle.back() then
  22.             turtle.turnLeft()
  23.             turtle.turnLeft()
  24.             turtle.dig()
  25.             turtle.turnLeft()
  26.             turtle.turnLeft()
  27.             turtle.back()
  28.         end
  29.         if i % 11 == 0 then
  30.             get_item(9)
  31.             turtle.place()
  32.         end
  33.     end
  34.     turtle.turnRight()
  35.     turtle.forward()
  36.     turtle.forward()
  37.     turtle.forward()
  38.     turtle.forward()
  39.     turtle.forward()
  40.     turtle.forward()
  41.     turtle.turnLeft()
  42.     for i=0, 128 do
  43.         refuel()
  44.         turtle.dig()
  45.         turtle.forward()
  46.     end
  47. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top