Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local sides = require("sides")
- local robot = require("robot")
- local g = component.generator
- g.insert()
- print(g.count())
- robotMovedBlock = 0
- for i = 200,1,-1
- if (rmb == 175) then robot.turnRight()
- elseif (rmb == 172) then robot.turnRight()
- elseif (rmb == 147) then robot.turnLeft()
- elseif (rmb == 144) then robot.turnLeft()
- elseif (rmb == 119) then robot.turnRight()
- elseif (rmb == 116) then robot.turnRight()
- elseif (rmb == 100) then
- robot.dropDown()
- robot.swingDown()
- robot.select(3)
- robot.useDown()
- robot.up()
- for i = 2,32,1 do
- robot.select(i)
- if robot.compareTo(1) == true then
- robot.drop()
- end
- end
- select(3)
- robot.down()
- robot.useDown()
- robot.up()
- select(1)
- elseif (rmb == 91) then robot.turnLeft()
- elseif (rmb == 88) then robot.turnLeft()
- elseif (rmb == 63) then robot.turnRight()
- elseif (rmb == 60) then robot.turnRight()
- elseif (rmb == 35) then robot.turnLeft()
- elseif (rmb == 32) then robot.turnLeft()
- elseif (rmb == 7) then robot.turnRight()
- end
- do
- if robot.detect() == true
- then
- robot.swing(sides.front)
- robot.forward(1)
- print(robotMovedBlock)
- else
- robot.forward(1)
- print(rmb)
- end
- rmb = rmb + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement