Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Checking fuel")
- if turtle.getFuelLevel() < 250 then
- print("Refueling......")
- turtle.refuel(1)
- else print("Getting ready")
- end
- local Sx, Sy, Sz = gps.locate()
- print("Detected starting point ("..Sx..","..Sy..","..Sz..")")
- local home = ("("..Sx..", "..Sy..", "..Sz..")")
- local yTarget = -60
- function goTo(Sx, yTarget ,Sz)
- while yTarget < Sy do
- turtle.digDown()
- turtle.down()
- end
- while yTarget > Sy do
- turtle.digUp()
- turtle.up()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement