Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. local component = require("component")
  2. local computer = require("computer")
  3. local robot = require("robot")
  4. local shell = require("shell")
  5. local sides = require("sides")
  6.  
  7. function placeRail()
  8. robot.down()
  9. if robot.detectDown() then
  10. if robot.compareTo(robot.select() + 1) then
  11. robot.placeDown()
  12. else
  13. robot.select(robot.select() + 1)
  14. robot.placeDown()
  15. end
  16.  
  17. while(true) do
  18. robot.swing()
  19. robot.forward()
  20. robot.swingUp()
  21. robot.swingDown()
  22. robot.turnRight()
  23. robot.swing()
  24. robot.forward()
  25. robot.swingUp()
  26. robot.swingDown()
  27. robot.swing()
  28. robot.forward()
  29. robot.swingUp()
  30. robot.swingDown()
  31. robot.turnLeft()
  32. robot.swing()
  33. robot.forward()
  34. robot.swingUp()
  35. robot.swingDown()
  36. robot.turnLeft()
  37. robot.swing()
  38. robot.forward()
  39. robot.swingUp()
  40. robot.swingDown()
  41. robot.swing()
  42. placeRail()
  43. robot.forward()
  44. robot.swingUp()
  45. robot.swingDown()
  46. robot.turnRight()
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement