Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local x = tonumber(args[1])
- local function checkFuel()
- while turtle.getFuelLevel() < 10 do
- turtle.select(1)
- if turtle.getItemCount(1) < 1 then
- print "Add fuel to slot 1."
- while turtle.getItemCount(1) < 1 do
- end
- end
- turtle.refuel(1)
- end
- end
- local function digForward()
- checkFuel()
- turtle.dig()
- turtle.forward()
- end
- local function digUpDown()
- turtle.digUp()
- turtle.digDown()
- end
- local function placeBlock()
- turtle.select(2)
- if turtle.getItemCount(2) < 1 then
- print "Please place more blocks in slot 2."
- while turtle.getItemCount(2) < 1 do
- end
- end
- turtle.placeDown()
- end
- local function startup()
- print "Please place fuel in slot 1."
- print "Please place block in slot 2."
- print "Press any key when setup is compele."
- read()
- end
- startup()
- for i=1, x do
- digForward()
- digUpDown()
- placeBlock()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement