Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. local component = require("component")
  2. local sides = require("sides")
  3. local robot = require("robot")
  4.  
  5. local g = component.generator
  6. g.insert()
  7. print(g.count())
  8.  
  9. robotMovedBlock = 0
  10.  
  11. for i = 200,1,-1
  12. if (rmb == 175) then robot.turnRight()
  13. elseif (rmb == 172) then robot.turnRight()
  14. elseif (rmb == 147) then robot.turnLeft()
  15. elseif (rmb == 144) then robot.turnLeft()
  16. elseif (rmb == 119) then robot.turnRight()
  17. elseif (rmb == 116) then robot.turnRight()
  18. elseif (rmb == 100) then
  19. robot.dropDown()
  20. robot.swingDown()
  21. robot.select(3)
  22. robot.useDown()
  23. robot.up()
  24. for i = 2,32,1 do
  25. robot.select(i)
  26.  
  27. if robot.compareTo(1) == true then
  28. robot.drop()
  29. end
  30. end
  31. select(3)
  32. robot.down()
  33. robot.useDown()
  34. robot.up()
  35. select(1)
  36.  
  37. elseif (rmb == 91) then robot.turnLeft()
  38. elseif (rmb == 88) then robot.turnLeft()
  39. elseif (rmb == 63) then robot.turnRight()
  40. elseif (rmb == 60) then robot.turnRight()
  41. elseif (rmb == 35) then robot.turnLeft()
  42. elseif (rmb == 32) then robot.turnLeft()
  43. elseif (rmb == 7) then robot.turnRight()
  44. end
  45.  
  46. do
  47. if robot.detect() == true
  48. then
  49. robot.swing(sides.front)
  50. robot.forward(1)
  51. print(robotMovedBlock)
  52. else
  53. robot.forward(1)
  54. print(rmb)
  55. end
  56. rmb = rmb + 1
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement