Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function empty_all()
- if turtle.drop() then
- for q=1,16 do
- turtle.select(q)
- turtle.drop()
- end
- else
- local one_up = 0
- local cannot_drop = 0
- local could_drop = 0
- print("chest is full!")
- repeat
- repeat
- turtle.up()
- sleep(1)
- if turtle.drop() then
- could_drop = 1
- print("Could drop?")
- end
- one_up = one_up + 1
- print(one_up)
- until could_drop == 1 or one_up == 5
- until could_drop == 1 or one_up == 5
- if one_up ~= 5 then
- for q=1,16 do
- turtle.select(q)
- turtle.drop()
- end
- else
- cannot_drop = 1
- end
- repeat
- turtle.down()
- one_up = one_up - 1
- until one_up == 0
- if cannot_drop == 1 then
- print("no storage!")
- term.write("Enter something if it's fixed")
- read()
- print("gonna try again")
- empty_all()
- end
- end
- end
- empty_all()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement