Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- local component = require("component")
- local inv = component.inventory_controller
- local MIN_TOOL_CHARGE = 0.8
- print 'Разработано корпорацией "Triple Zu #Ziabl_Inside#" (c) ziabl from TM#2-Orion'
- while true do
- for i = 1, 10 do
- robot.select(2)
- inv.equip()
- robot.use()
- inv.equip()
- o,t = robot.detect()
- while t == 'passable' do
- robot.use()
- o,t = robot.detect()
- end
- robot.select(1)
- inv.equip()
- robot.swing()
- inv.equip()
- os.sleep(15)
- robot.select(2)
- robot.suckUp()
- for n = 4, 15 do
- robot.suckUp()
- end
- end
- for n = 4, 15 do
- robot.select(n)
- robot.dropDown()
- end
- if robot.durability() < MIN_TOOL_CHARGE then
- robot.select(4)
- inv.equip()
- robot.dropDown()
- os.sleep(1)
- while robot.compareTo(5) ~= false do
- os.sleep(1)
- end
- inv.equip()
- end
- end
RAW Paste Data