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 = 3
- local countTik = 0
- print("начало")
- function charging()
- robot.select(2)
- robot.turnRight()
- robot.drop()
- os.sleep(4)
- robot.suck()
- robot.turnLeft()
- end
- while true do
- ---
- countTik = countTik+1
- --if robot.durability()<150 then
- if countTik==10 then
- charging()
- end
- print("---------")
- print(countTik)
- print("---------")
- if robot.count(16) >= 63 then
- for i = 4, 16 do
- robot.select(i)
- robot.dropDown()
- end
- end
- robot.select(1)
- robot.place()
- os.sleep(timeSl)
- for i=1,10 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,maxH do
- robot.down()
- os.sleep(timeSleep)
- end
- os.sleep(timeSl)
- robot.select(3)
- inv.equip()
- robot.select(2)
- inv.equip()
- os.sleep(5)
- ---
- end
- print("работа выполнена")
Add Comment
Please, Sign In to add comment