Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Auto mob farm
- -- WInston Durand
- canOutput = false
- count = 0
- function farm()
- canOutput = true
- while true do
- turtle.select(1)
- turtle.suck()
- if turtle.attack() then
- turtle.suck()
- if turtle.getItemCount(16) > 0 then
- canOutput = false
- turtle.turnLeft()
- for i = 1, 16 do
- count = count + turtle.getItemCount(i)
- turtle.select(i)
- turtle.drop()
- end
- turtle.select(1)
- turtle.turnRight()
- canOutput= true
- print(tostring(count) .. " items farmed")
- end
- else
- sleep(0.1)
- end
- end
- end
- function timer()
- while true do
- while not canOutput do
- sleep(0.1)
- end
- redstone.setOutput("back", true)
- sleep(0.5)
- redstone.setOutput("back", false)
- while not canOutput do
- sleep(0.1)
- end
- sleep(60)
- end
- end
- parallel.waitForAll(farm, timer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement