lewile1

Untitled

Jan 21st, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. local x1, y1, z1 = gps.locate(5)
  2. turtle.forward()
  3. local x2, y2, z2 = gps.locate(5)
  4.  
  5. if x1 > x2 then
  6.    turtle.turnRight()
  7. elseif x1 == x2 then
  8.    if z1 > z2 then
  9.       --we're ok
  10.    else
  11.       turtle.turnRight()
  12.       turtle.turnRight()
  13.    end
  14. else
  15.    turtle.turnRight()
  16.    turtle.turnRight()
  17.    turtle.turnRight()
  18. end
Advertisement
Add Comment
Please, Sign In to add comment