Created
June 7, 2016 04:08
-
-
Save anonymous/dae9818d30b8b815f1d045ee135205e8 to your computer and use it in GitHub Desktop.
Ben and Cam's CC API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- helper functions | |
function waitFuel(n) | |
n = n or 100 | |
while turtle.getFuelLevel()<n do | |
while not turtle.refuel(1) do | |
turtle.select(turtle.getSelectedSlot()%16+1) | |
end | |
end | |
end | |
function forceForward(n) | |
n = n or 1 | |
for i=1,n do | |
while not turtle.forward() do | |
turtle.dig() | |
os.sleep(0.25) | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment