Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- idleTime=60
- updateTime=5
- timeHigh=0.1
- timeLow=0.1
- function FilterChest()
- turtle.suckDown()
- if (turtle.getItemCount(1)>0) then
- if (turtle.compareTo(16)==true) then
- turtle.drop()
- else
- turtle.turnRight()
- turtle.turnRight()
- turtle.drop()
- turtle.turnRight()
- turtle.turnRight()
- end
- FilterChest()
- end
- end
- function SpawnChicken()
- for i=1,150 do
- redstone.setOutput("top",true)
- os.sleep(timeHigh)
- redstone.setOutput("top",false)
- os.sleep(timeLow)
- print(150-i)
- end
- end
- --Loop
- while true do
- FilterChest()
- for i=0,(idleTime/updateTime),1 do
- if (redstone.getInput("left")==true) then
- SpawnChicken()
- i=idleTime/updateTime
- else
- os.sleep(updateTime)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement