Advertisement
Guest User

myDig

a guest
Sep 22nd, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. local e=0 -- rotations --
  2. local x=0 --X-coordinates --
  3. local y=0 --Y-coordinates --
  4. local z=0 --Z-coordinates --
  5. local i=0 -- progress --
  6. local r=0 -- rotation set --
  7. local f=0 -- movement set --
  8. local u=0 -- vertical movement set --
  9.  
  10. while true do
  11.  
  12.   while i~=50 do
  13.     turtle.refuel()
  14.    
  15.     if turtle.detect() then
  16.       turtle.dig()
  17.       turtle.forward()
  18.       x=x+1
  19.     else
  20.       while not turtle.detect() do
  21.         turtle.turnRight()  
  22.     end
  23.    
  24.     if turtle.detectUp() then
  25.       turtle.digUp()
  26.     end
  27.    
  28.     i=i+1
  29.   end
  30. end
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement