Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- local computer = require("computer")
- local sides = require("sides")
- local component = require("component")
- local ser = require("serialization")
- local c = component.crafting
- local inventory = component.inventory_controller
- local left = robot.turnLeft()
- local right = robot.turnRight()
- local TURN = robot.turnAround()
- local d = robot.detect()
- local dUp = robot.detectUp()
- local dDown = robot.detectDown()
- print(robot.detect())
- local function goUp()
- while dUp do
- robot.swingUp()
- os.sleep(2)
- end
- robot.up()
- os.sleep(0.8)
- end
- local function goDown()
- while dDown do
- robot.swingDown()
- os.sleep(2)
- end
- robot.down()
- os.sleep(0.8)
- end
- local function go()
- while d do
- robot.swing()
- os.sleep(2)
- end
- robot.forward()
- os.sleep(0.8)
- end
- -- Place Blocks with Dev/ Null
- local function Bf()
- if d then
- robot.select(13)
- robot.place()
- end
- end
- local function Bd()
- if dDown then
- robot.select(13)
- robot.placeDown()
- end
- end
- local function Bu()
- if dUp then
- robot.select(13)
- robot.placeUp()
- end
- end
- -- Movement script
- local function Movement()
- Bd ; go()
- Bd ; left ; go() ; Bf ; Bd ; TURN ; go() ; go() ;Bd ; Bf; goUp()
- Bf ; TURN ; go() ; go() ; Bf ; goUp()
- Bf ; Bu ; TURN ; go() ; Bu ; go() ; Bf ; Bu
- TURN ; go() ; goDown() ; goDown() ; right
- Movement()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement