Advertisement
zipyzapyus

base

Dec 7th, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. f,num=1,0
  2.  
  3. local function check()
  4. if turtle.getFuelLevel()<10 then
  5. turtle.select(f)
  6. turtle.refuel(1)
  7. end
  8. term.clear()
  9. term.setCursorPos(1,1)
  10. term.write("f Level")
  11. term.setCursorPos(1,2)
  12. term.write("||"..turtle.getFuelLevel().."||")
  13. end
  14.  
  15. check()
  16.  
  17. local function dig(x)
  18. if x=="A" then turtle.digUp() turtle.dig() turtle.digDown() end
  19. if x=="U" then turtle.digUp() end
  20. if x=="F" then turtle.dig() end
  21. if x=="D" then turtle.digDown() end
  22. end
  23.  
  24. local function go(y)
  25. check()
  26. if y=="F" then if not turtle.forward() then dig("F") go("F") end end
  27. if y=="R" then turtle.turnRight() end
  28. if y=="L" then turtle.turnRight() end
  29. if y=="B"then turtle.back() end
  30. if y=="U" then if not turtle.up() then dig("U") go("U") end end
  31. if y=="D" then turtle.down() end
  32. end
  33.  
  34. term.clear()
  35. term.setCursorPos(1,1)
  36. --print("Type a number of spaces to move 3x3 hole.")
  37. --print("-----------------------------------------")
  38. --term.write("Number: ")
  39. --num=read()
  40.  
  41.  
  42.  
  43. for i=1,num do
  44.  
  45. end
  46.  
  47. for i=1,num do
  48.  
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement