Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- local inv = require("component").inventory_controller
- function right()
- robot.turnRight()
- robot.forward()
- robot.turnLeft()
- end
- function left()
- robot.turnLeft()
- robot.forward()
- robot.turnRight()
- end
- function changeTool(i)
- robot.select(i)
- inv.equip()
- end
- function goToStart()
- right()
- robot.down()
- robot.down()
- end
- function place()
- robot.use()
- end
- function createIs()
- place()
- robot.up()
- left()
- place()
- right()
- place()
- right()
- place()
- robot.up()
- changeTool(3)
- place()
- left()
- place()
- left()
- place()
- changeTool(3)
- end
- function killIs()
- changeTool(1)
- while robot.swing() do
- robot.swing()
- end
- changeTool(1)
- end
- function dropInv()
- --robot.suckUp()
- robot.up()
- left()
- for i = 4, 16 do
- robot.select(i)
- robot.dropDown()
- end
- right()
- robot.down()
- end
- while true do
- while robot.count(3) > 2 do
- --print("начало")
- createIs()
- goToStart()
- os.sleep(5)
- killIs()
- os.sleep(1)
- if robot.count(4) > 0 then
- dropInv()
- end
- --print("конец")
- end
- end
Add Comment
Please, Sign In to add comment