Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --pastebin run RLLE5i43
- local traveled = 0
- io.write("How far bigman ")
- local taskdist = tonumber(io.read())
- local startfuel = turtle.getFuelLevel()
- turtle.up()
- local continueforward = true
- local torchdistcount = 0
- while ((traveled < taskdist) and continueforward) do
- turtle.dig()
- turtle.digUp()
- turtle.digDown()
- torchdistcount = torchdistcount + 1
- if (torchdistcount == 8) then
- turtle.placeDown()
- torchdistcount = 0
- end
- turtle.forward()
- local currentfuel = turtle.getFuelLevel()
- if (currentfuel < startfuel/2) then
- continueforward = false
- end
- traveled = traveled + 1
- local i = 0
- while (i < 15) do
- if (turtle.getItemDetail(i+1)) then
- local item = turtle.getItemDetail(i+1)
- if (not (item == nil)) then
- if (item["name"] == "minecraft:cobblestone") then
- turtle.select(i+1)
- turtle.dropDown()
- turtle.select(1)
- end
- end
- end
- i = i + 1
- end
- end
- local backtraveled = 0
- turtle.turnLeft()
- turtle.turnLeft()
- while (backtraveled < traveled) do
- turtle.forward()
- backtraveled = backtraveled + 1
- end
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.down()
- os.reboot()
Add Comment
Please, Sign In to add comment