cecell

TurtleClear

Dec 22nd, 2020 (edited)
1,000
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local tArgs = { ... }
  2. local checkForEndOfRun = tArgs[1]
  3.  
  4. continu = 1
  5. endOfRun = 0
  6.  
  7. while continu do
  8.  
  9.   if not turtle.detect() then
  10.     turtle.forward()
  11.     endOfRun = endOfRun + 1
  12.     if (endOfRun > 4 and not checkForEndOfRun) then break end
  13.     if endOfRun > 100 then break end
  14.   else
  15.     if not turtle.compare() then break end
  16.     endOfRun = 0
  17.     turtle.dig()
  18.     turtle.forward()
  19.   end
  20.  
  21. end
Advertisement
Add Comment
Please, Sign In to add comment