cecell icon

TurtleClear

cecell | PRO | 12/23/20 05:21:26 AM UTC (Edited) | 0 ⭐ | 956 👁️ | Never ⏰ | []
Lua |

400 B

|

None

|

0 👍

/

0 👎

local tArgs = { ... }
local checkForEndOfRun = tArgs[1]
 
continu = 1
endOfRun = 0
 
while continu do
 
  if not turtle.detect() then
    turtle.forward()
    endOfRun = endOfRun + 1
    if (endOfRun > 4 and not checkForEndOfRun) then break end
    if endOfRun > 100 then break end
  else
    if not turtle.compare() then break end
    endOfRun = 0
    turtle.dig()
    turtle.forward()
  end
 
end

Comments