Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local robot = require("robot")
- local geo = component.geolyzer
- local ic = component.inventory_controller
- local step = 0
- function placeCross()
- ic.equip()
- robot.useDown(0)
- os.sleep(0.1)
- robot.useDown(0)
- ic.equip()
- end
- while true do
- os.sleep(0.4)
- meta = geo.analyze(0).metadata
- if meta == 7 then
- if step == 0 then
- step=1
- robot.turnLeft()
- robot.forward()
- robot.turnLeft()
- robot.forward()
- robot.swingDown()
- placeCross()
- else
- step=0
- robot.turnLeft()
- robot.forward()
- robot.swingDown()
- placeCross()
- end
- elseif meta > 0 then
- robot.useDown(0,false,0)
- os.sleep(0.2)
- robot.useDown(0,false,0)
- if geo.analyze(0).metadata < meta then
- ic.equip()
- robot.useDown(0,false,0)
- ic.equip()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement