Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- pastebin get FqHuPkqd lib
- local direction = {
- ["forw"] =1;
- ["right"] =2;
- ["back"] =3;
- ["left"] =4;
- }
- local pos = {
- ["x"]=0;
- ["y"]=0;
- }
- local function inventoryEmpty(a, b)
- for n=a,b do
- if turtle.getItemCount(n) ~= 0 then
- return false
- end
- end
- print( "Inventory empty." )
- return true
- end
- local function getFullSlot(a, b)
- for n=a,b do
- if turtle.getItemCount(n) ~= 0 then
- return n
- end
- end
- return 0
- end
- local function selectFullSlot(a, b)
- while inventoryEmpty(a, b) do
- os.sleep(1)
- end
- turtle.select(getFullSlot(a,b))
- end
Advertisement
Add Comment
Please, Sign In to add comment