Advertisement
JOBGG

Untitled

Sep 20th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. selectedSlot = 0
  2. lastturn = 0
  3. turn = {1=turtle.turnLeft(),2 = turtle.turnRight()}
  4. while true do
  5.     while turtle.forward() do
  6.         turtle.digDown()
  7.         while not turtle.placeDown() do
  8.             selectedSlot = selectedSlot % 16 + 1
  9.             turtle.select(selectedSlot)
  10.         end
  11.     end
  12.     while turtle.getFuelLevel() == 0 do
  13.         turtle.select(1)
  14.         turtle.refuel(64)
  15.     end
  16.     if turtle.detect() then
  17.         turn[lastturn]
  18.         turtle.forward()
  19.         turn[lastturn]
  20.         lastturn = lastturn % 2 + 1
  21.     end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement