Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --== CONFIG ==--
- beginSlot = 1
- endSlot = 2
- --== END OF CONFIG ==--
- local waiting = true
- function attackLoop()
- while true do
- turtle.attack()
- end
- end
- function sleeper()
- sleep(25)
- end
- turtle.select(beginSlot)
- while true do
- while waiting do
- event = os.pullEvent("redstone")
- if event == "redstone" then
- waiting = false
- else
- print("Redstone signal not turned on! Continuing to wait.")
- end
- end
- parallel.waitForAny(attackLoop, sleeper)
- shell.run("go", "down", "4")
- turtle.attack()
- shell.run("go", "up", "4")
- for i = beginSlot, endSlot do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(beginSlot)
- waiting = true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement