SHARE
TWEET

Untitled

a guest Jul 17th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local target = read()
  2. local distance = 0
  3. for i = 1, target do
  4.    for j = 1, 16 do
  5.       turtle.select(j)
  6.       if turtle.refuel(0) then
  7.           print("Slot "..j.." is valid fuel")
  8.           turtle.refuel()
  9.           print("The fuel level is: "..turtle.getFuelLevel())
  10.         end
  11.     end
  12.     while turtle.detect() do
  13.         turtle.dig()
  14.     end
  15.     for j = 1, 5 do
  16.         while turtle.detectUp() do
  17.             turtle.digUp()
  18.         end
  19.         turtle.up()
  20.         while turtle.detect() do
  21.             turtle.dig()
  22.         end
  23.     end
  24.     for j = 1, 5 do
  25.         turtle.down()
  26.     end
  27.     for 0, distance do
  28.         turtle.back()
  29.     end
  30.     for j = 1, 16 do
  31.     turtle.select(j)
  32.         if turtle.refuel(0) then
  33.             print("Slot "..j.." is valid fuel")
  34.             turtle.refuel()
  35.             print("The fuel level is: "..turtle.getFuelLevel())
  36.         end
  37.     end
  38.     turtle.turnLeft
  39.     turtle.turnLeft
  40.     for j = 1, 16 do
  41.         turtle.select(j)
  42.         turtle.drop()
  43.     end
  44.     turtle.turnLeft
  45.     turtle.turnLeft
  46.     for 0, distance do
  47.         turtle.forward()
  48.     end
  49.     distance = distance + 1
  50. end
RAW Paste Data
Top