SHARE
TWEET

Untitled

a guest May 20th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function turnBack()
  2.   turtle.turnRight()
  3.   turtle.turnRight()
  4. end
  5. function turnForward()
  6.   turtle.turnLeft()
  7.   turtle.turnLeft()
  8. end
  9. while true do
  10.  
  11.     if turtle.getFuelLevel() < 100 then
  12.       print("Needing refuel in slot 16")
  13.       turtle.select(16)
  14.       turtle.refuel()
  15.       turtle.select(1)
  16.       print("New fuel level: "..turtle.getFuelLevel())
  17.     end
  18.     if turtle.getItemCount(15) > 0 then
  19.       turnBack()
  20.       for i = 1, 15 do
  21.         turtle.select(i)
  22.         turtle.drop()
  23.       end
  24.       turtle.select(1)
  25.       turnForward()
  26.     end
  27.     if turtle.detect() then
  28.       turtle.dig()
  29.     end
  30.  
  31. 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