Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- local inv = require("component").inventory_controller
- local comp = require("computer")
- local s = require("sides")
- local timeSleep = 0.1
- local timeSl = 0.5
- local maxH = 5
- local countTik = 0
- function charging()
- robot.select(2)
- inv.equip()
- robot.turnRight()
- robot.drop()
- os.sleep(7)
- robot.suck()
- robot.turnLeft()
- end
- print("начало")
- while true do
- ---
- robot.select(1)
- robot.place()
- countTik =countTik+1
- if countTik==3 then
- charging()
- end
- print(countTik)
- if robot.count(16) >= 63 then
- for i = 5, 16 do
- robot.select(i)
- robot.dropDown()
- end
- end
- robot.suckUp()
- robot.select(1)
- robot.place()
- --os.sleep(timeSl)
- for i=1,20 do
- robot.use()
- end
- --os.sleep(timeSl)
- robot.select(2)
- --os.sleep(timeSl)
- inv.equip()
- --os.sleep(timeSl)
- robot.swing()
- --os.sleep(timeSl)
- robot.select(3)
- --os.sleep(timeSl)
- inv.equip()
- --os.sleep(timeSl)
- for i=1,maxH do
- robot.up()
- robot.swingUp()
- os.sleep(timeSleep)
- end
- for i=1,10 do
- robot.down()
- os.sleep(timeSleep)
- end
- --os.sleep(timeSl)
- robot.select(3)
- inv.equip()
- robot.select(2)
- inv.equip()
- --os.sleep(10)
- ---
- end
- print("работа выполнена")
Advertisement
Add Comment
Please, Sign In to add comment