Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clearCol()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- end
- function selectItem(query)
- for slot = 1, 16, 1 do
- turtle.select(slot)
- if turtle.getItemDetail() then
- if turtle.getItemDetail().name == query then
- return true
- end
- if slot == 16 then
- return false
- end
- end
- end
- end
- function placeTorch()
- currentSlot = turtle.getSelectedSlot()
- if selectItem("minecraft:torch") then
- turtle.placeDown()
- end
- turtle.select(currentSlot)
- end
- TORCH_FREQ = 8
- DISTANCE = tonumber(arg[1])
- for i = 0, DISTANCE, 1 do
- clearCol()
- if i % TORCH_FREQ == 0 then
- placeTorch()
- end
- if turtle.getFuelLevel() < (DISTANCE - i) then
- shell.run("refuel")
- end
- end
Add Comment
Please, Sign In to add comment