Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f,num,k,T=1,0,0,2
- local function check()
- if turtle.getFuelLevel()<10 then
- turtle.select(f)
- turtle.refuel(1)
- end
- term.clear()
- term.setCursorPos(1,1)
- term.write("f Level")
- term.setCursorPos(1,2)
- term.write("||"..turtle.getFuelLevel().."||")
- end
- check()
- local function dig(x)
- if x=="A" then turtle.digUp() turtle.dig() turtle.digDown() end
- if x=="U" then turtle.digUp() end
- if x=="F" then turtle.dig() end
- if x=="D" then turtle.digDown() end
- check()
- end
- local function go(y)
- if y=="F" then if not turtle.forward() then dig("F") go("F") end end
- if y=="R" then turtle.turnRight() end
- if y=="L" then turtle.turnRight() end
- if y=="B"then turtle.back() end
- if y=="U" then if not turtle.up() then dig("U") go("U") end end
- if y=="D" then turtle.down() end
- end
- term.clear()
- term.setCursorPos(1,1)
- print("Type a number of spaces to move 1x2 hole.")
- print("---------------------------------------")
- term.write("Number: ")
- num=read()
- go("U")
- for i=1,num do
- k=k+1
- dig("A")
- if k==8 then turtle.select(T) turtle.placeDown() k=0 end
- go("F")
- end
- dig("D")
- dig("U")
- go("U")
- for i=1,num do
- go("B")
- end
- go("D")
- go("D")
- go("B")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement