Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- upmode=0
- downmode=1
- turtle.select(2)
- turtle.placeUp()
- turtle.select(1)
- print(turtle.getFuelLevel())
- while true do
- if turtle.getFuelLevel()==0 then
- turtle.refuel()
- end
- if downmode==1 then
- turtle.digDown()
- if turtle.detectDown()==true then
- upmode=1
- downmode=0
- end
- turtle.down()
- end
- if upmode==1 then
- turtle.up()
- if turtle.detectUp()==true then
- turtle.digUp()
- upmode=0
- end
- end
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement