Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local robot = require("robot")
- local sides = require("sides")
- local ic = component.inventory_controller
- local function initialisation()
- -- Items picking
- robot.select(1)
- robot.suckUp(1)
- ic.equip()
- robot.forward()
- robot.suckUp(4)
- robot.turnRight()
- robot.select(2)
- robot.suck(12)
- robot.turnLeft()
- robot.forward()
- -- Place sapplings
- robot.select(1)
- robot.forward()
- robot.place()
- robot.turnLeft()
- robot.forward()
- robot.turnRight()
- robot.place()
- robot.back()
- robot.place()
- robot.turnRight()
- robot.forward()
- robot.turnLeft()
- robot.place()
- -- Bone meal
- robot.select(2)
- robot.place()
- robot.place()
- robot.place()
- robot.place()
- robot.place()
- robot.place()
- robot.place()
- robot.place()
- robot.place()
- robot.place()
- robot.place()
- robot.place()
- -- First layer
- robot.swing()
- robot.forward()
- robot.swing()
- robot.forward()
- robot.turnLeft()
- robot.swing()
- robot.forward()
- robot.turnLeft()
- robot.swing()
- robot.forward()
- robot.turnLeft()
- robot.forward()
- robot.turnLeft()
- end
- local function execution()
- while robot.detectUp() == true do
- robot.swingUp()
- robot.forward()
- robot.swingUp()
- robot.turnLeft()
- robot.forward()
- robot.swingUp()
- robot.turnLeft()
- robot.forward()
- robot.swingUp()
- robot.turnLeft()
- robot.forward()
- robot.turnLeft()
- robot.up()
- end
- end
- local function terminaison()
- -- Redescente
- while robot.detectDown() == false do
- robot.down()
- end
- robot.back()
- robot.back()
- robot.back()
- for k = 1, 16 do
- robot.select(k)
- robot.dropDown()
- end
- robot.select(1)
- ic.equip()
- robot.dropDown()
- end
- while true do
- initialisation()
- execution()
- terminaison()
- os.sleep(15)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement