Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local time = 9
- local dropCount = 1
- -------------------
- function check(a)
- cnt = turtle.getItemCount(a)
- return cnt
- end
- function empty()
- for i=1, 16, 1 do
- if check(i) == 0 then
- return true
- end
- return false
- end
- end
- function drop()
- curSlot = turtle.getSelectedSlot()
- while check(curSlot) == 0 do
- if curSlot == 16 then
- curSlot = 0
- end
- turtle.select(curSlot + 1)
- curSlot = turtle.getSelectedSlot()
- end
- turtle.dropDown(dropCount)
- end
- function msg()
- while empty() == true do
- shell.run("clear")
- print("Bitte Nahrung auffuellen!")
- sleep(1)
- end
- end
- while true do
- msg()
- for i=time, 0, -1 do
- shell.run("clear")
- print("Running")
- print("Next drop in "..i.." seconds.")
- msg()
- sleep(1)
- if i==0 then
- sleep(1)
- drop()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment