assasin172

digforward

Dec 26th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. function digF()
  2.         while not turtle.forward() do
  3.                 turtle.dig()
  4.         end
  5. end
  6.  
  7. function moveF()
  8.     while not turtle.dig() do
  9.         turtle.forward()
  10.     end
  11. end
  12.  
  13. function tF()
  14.         while turtle.getFuelLevel()==0  do
  15.                 turtle.refuel()
  16.         end
  17. end
  18.  
  19. print("Enter lenght vaule of corridor")
  20. local lenght=read()/2
  21.  
  22. for i=1,lenght do
  23. tF()
  24. digF()
  25. moveF()
  26. end
Advertisement
Add Comment
Please, Sign In to add comment