Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local computer = require("computer")
- local robot = require("robot")
- local shell = require("shell")
- local sides = require("sides")
- function placeRail()
- robot.down()
- if robot.detectDown() then
- robot.up()
- robot.select(1)
- robot.placeDown()
- end
- end
- function placeTorch()
- robot.swing()
- robot.forward()
- if robot.detect() then
- robot.back()
- robot.select(5)
- robot.place()
- end
- end
- while(true) do
- robot.swing()
- robot.forward()
- robot.swingUp()
- robot.swingDown()
- robot.turnRight()
- robot.swing()
- robot.forward()
- robot.swingUp()
- robot.swingDown()
- placeRail()
- robot.swing()
- robot.forward()
- robot.swingUp()
- robot.swingDown()
- robot.turnLeft()
- robot.swing()
- robot.forward()
- robot.swingUp()
- robot.swingDown()
- robot.turnLeft()
- robot.swing()
- robot.forward()
- robot.swingUp()
- robot.swingDown()
- placeRail()
- robot.swing()
- robot.forward()
- robot.swingUp()
- robot.swingDown()
- placeTorch()
- robot.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement