Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- CobbleStone Generator by Laine_prikol
- local robot = require("robot")
- local term = require("term")
- local os = require("os")
- cobblestone = 0
- if robot.durability() == nil then
- print("НЕТ ИНСТРУМЕНТА!")
- end
- print("ВНИМАНИЕ: ПОСТАВЬТЕ СУНДУК НАД РОБОТОМ!")
- while true do
- os.sleep(1)
- if robot.detectDown() then
- robot.swingDown()
- cobblestone = cobblestone + 1
- term.clear()
- print("Прочность инструмента: "..robot.durability())
- print("Собранно булыжника: "..cobblestone)
- end
- if robot.count() then
- robot.dropUp()
- end
- if robot.durability() == 0 then
- print("Инструмент сломан!")
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement