Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local a=require("component")if not a.isAvailable("redstone")then print("Для работы программы нужна красная карта.")os.exit()end;local b=a.redstone;local c=require("robot")local d=0;local e;local f=c.inventorySize()local g,h=0,2;c.select(1)if c.count()==0 then print("Для работы поместите в первый слот\nробота образец предмета в кол-во 1 шт.\nНапример в первом слоте лежит 1 большой подарок.")end;while true do while not c.suck()do end;if c.count()>=2 then if e then if g>=64 then h=h+1;if h>f then print("Произошла критическая ошибка!\nНедостаточно места в инвентаре.")os.exit()end end;local i=c.count()-1;if not c.transferTo(h,i)then if not c.transferTo(h+1,i)then print("Произошла критическая ошибка!\nНедостаточно места в инвентаре.")os.exit()end end;g=h+i else if not c.dropUp(c.count()-1)then print("Произошла ошибка, сундук сверху не найден.\nИспользую внутренний инвентарь.")e=true end end;b.setOutput(0,10)d=d+1;print("Выполнено "..d.." платных входов")os.sleep(5)b.setOutput(0,0)end end
Add Comment
Please, Sign In to add comment