Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- atmid = 13210
- while true do
- id, anzahl = rednet.receive()
- item = 0
- slot = 1
- slot2 = 1
- if id == atmid then
- for i = 1,15 do
- turtle.select(i)
- plus = turtle.getItemCount(i)
- item = item + plus
- end
- if item >= tonumber(anzahl) then
- while tonumber(anzahl) > 0 do
- if tonumber(anzahl) > 64 then
- turtle.select(slot)
- turtle.dropUp(64)
- anzahl = anzahl - 64
- slot = slot + 1
- end
- if tonumber(anzahl) <= 64 then
- turtle.select(slot)
- turtle.dropUp(tonumber(anzahl))
- anzahl = 0
- end
- end
- rednet.send(atmid,"5")
- end
- for i = 1,15 do
- turtle.select(i)
- turtle.drop()
- end
- rednet.send(1,"5")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement