Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local computer = require("computer")
- local inv = component.inventory_controller
- local robot = require("robot")
- local term = require("term")
- function resDrop(first) --Дропает предметы из ячейки first до 16 в левую сторону
- for i = first, 16 do
- robot.select(i)
- robot.dropDown()
- end
- robot.select(2)
- end
- --Основной код
- term.clear()
- print(" ")
- print(" ")
- print(" ")
- print(" ")
- print(" [|||||||||||||||||||||||||||||||||||]")
- print(" [|||||||LUMBERBOT V0.5BigTree|||||||]")
- print(" [|||||||||||||||||||||||||||||||||||]")
- print(" [||||||||||||IN ACTION||||||||||||||]")
- print(" [||||||КТО ПРОЧИТАЛ, У ТОГО|||||||||]")
- print(" [|||||||||РОДИТСЯ БАБУШКА|||||||||||]")
- print(" [|||||||||||||||||||||||||||||||||||]")
- while true do --Цикл до тех пор, пока инструмент не сломается. "Не равно нулю" важно если что, ибо есть состояния nil и "No tool..."
- while robot.durability() == 0 do
- computer.beep(2000, 0.1)
- os.sleep(0.2)
- end
- robot.select(1)
- robot.place()
- robot.select(2)
- inv.equip()
- robot.suckUp()
- for i = 1, 10 do --Юзать костную муку/мотыгу 10 раз
- robot.use()
- end
- inv.equip()
- robot.suckUp()
- while robot.detect() == true do --Пока перед ним есть твердый блок - рубать.
- robot.swing()
- end
- robot.suckUp()
- robot.select(1)
- inv.equip()
- os.sleep(17)
- inv.equip()
- robot.select(2)
- robot.suckUp()
- robot.suckUp()
- resDrop(4) --Дропнуть вещи начиная с 5 слота
- robot.suckUp()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement