Advertisement
Phlimy

Circuit

Aug 5th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. print("Starting circuit...")
  2. while true do
  3. turtle.select(1)
  4. function compare()
  5. if turtle.compareDown() == true then
  6. turtle.forward()
  7. else
  8. turtle.select(2)
  9. if turtle.compareDown() == true then
  10. turtle.turnLeft()
  11. turtle.forward()
  12. else
  13. turtle.select(3)
  14. if turtle.compareDown() == true then
  15. turtle.turnRight()
  16. turtle.forward()
  17. else
  18. turtle.select(4)
  19. if turtle.compareDown() == true then
  20. turtle.turnRight()
  21. turtle.turnRight()
  22. turtle.forward()
  23. else
  24. os.shutdown()
  25. end
  26. end
  27. end
  28. end
  29. end
  30. compare()
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement