Paste: Mass Fab Helper Turtle
Author: | bwochinski |
Mode: | lua |
Date: | Sat, 3 Aug 2013 03:57:57 |
Plain Text |
scrapSlots = 12
curSlot = nil
emptySlot = scrapSlots + 1
curEmpty = nil
while true do
curSlot = nil
for i=1,scrapSlots do
if turtle.getItemCount(i) > 0 then
curSlot = i
break
end
end
if curSlot == nil then
print("No more scrapboxes remaining! Refill the first " .. scrapSlots .." slots!")
else
turtle.select(curSlot)
turtle.drop(turtle.getItemCount(curSlot))
end
curEmpty = nil
for k=emptySlot,16 do
if turtle.getItemSpace(k) > 0 then
curEmpty = k
break
end
end
if curEmpty == nil then
print("No space left for UU matter! Empty the last " .. emptySlot .. " slots!")
sleep(30)
else
turtle.suck()
end
sleep(5)
end
New Annotation