Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local x1, y1, z1 = gps.locate(5)
- turtle.forward()
- local x2, y2, z2 = gps.locate(5)
- if x1 > x2 then
- turtle.turnRight()
- elseif x1 == x2 then
- if z1 > z2 then
- --we're ok
- else
- turtle.turnRight()
- turtle.turnRight()
- end
- else
- turtle.turnRight()
- turtle.turnRight()
- turtle.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment