Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function left(vx, vy)
  2. return vy*-1, vx
  3. end
  4.  
  5. function right(vx, vy)
  6. return vy, vx*-1
  7. end
  8.  
  9. function turnLeft(vx, vy)
  10. turtle.turnLeft()
  11. return left()
  12. end
  13.  
  14. function turnRight(vx, vy)
  15. turtle.turnRight()
  16. return right()
  17. end
  18.  
  19. function currentSlotEmpty()
  20. return turtle.getItemCount(turtle.getSelectedSlot())==0
  21. end
  22.  
  23. function reSelect()
  24. for i=1,16 do
  25. if turtle.getItemCount(i) > 0 then
  26. turtle.select(i)
  27. return
  28. end
  29. end
  30. -- exit the program early
  31. error()
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement