Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- harvest ender pearls
- -- pastebin -f get V9rtGYcM pearls
- local robot=require("robot")
- local computer=require("computer")
- local function harvest()
- robot.swingDown()
- robot.select(1)
- robot.placeDown()
- robot.forward()
- end
- local function row()
- for i = 1, 16 do
- harvest()
- end
- end
- -- assume robot is place on ground level and needs to go up one
- -- and move over first enderlily
- robot.up()
- robot.forward()
- -- do first row
- row()
- -- position for 2nd row
- robot.turnLeft()
- robot.forward()
- robot.turnLeft()
- robot.forward()
- -- harvest 2nd row
- row()
- -- position for 3rd row
- robot.turnRight()
- robot.forward()
- robot.forward()
- robot.turnRight()
- robot.forward()
- -- harvest 3rd row
- row()
- -- position for 4th row
- robot.turnLeft()
- robot.forward()
- robot.turnLeft()
- robot.forward()
- -- harvest 4th row
- row()
- -- need to add a deposit routine
- -- rtb
- robot.down()
- robot.turnLeft()
- robot.forward()
- robot.forward()
- robot.forward()
- robot.forward()
- -- robot. turnLeft()
- -- refuel & shutdown
- for i = 1, 10 do
- robot.forward()
- end
- os.sleep(5)
- robot.turnLeft()
- robot.turnLeft()
- for v = 1, 10 do
- robot.forward()
- end
- robot.turnRight()
- computer.shutdown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement