Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("turtleLib/fuel")
- os.loadAPI("turtleLib/nav")
- local total = 0
- function w(x)
- for i = 1,x do
- fuel.refuel(1)
- local didMove = turtle.forward(1)
- if didMove == true then
- else
- end
- end
- end
- function a(x)
- turtle.turnLeft()
- move.w(x)
- end
- function s(x)
- turtle.turnRight()
- turtle.turnRight()
- move.w(x)
- end
- function d(x)
- turtle.turnRight()
- move.w(x)
- end
- function strafeLeft(x)
- if x == "" then
- x = 1
- end
- move.a(x)
- turtle.turnRight()
- end
- function strafeRight(x)
- if x == "" then
- x = 1
- end
- move.d(x)
- turtle.turnLeft()
- end
- function odometer()
- return total
- end
- function resetOdometer()
- total = 0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement