Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clearScreen() -- Clears the screen
- term.clear()
- term.setCursorPos(1,1)
- end
- function attack()
- while true do
- turtle.attack()
- end
- end
- function attackChest()
- while true do
- theTimer = os.startTimer(5)
- while true do
- event,timerID = os.pullEvent("timer")
- if timerID == theTimer then
- turtle.turnRight()
- turtle.drop()
- turtle.turnLeft()
- break
- end
- end
- end
- end
- function start()
- clearScreen()
- print("Byte Industries SimpleAttack v2.0")
- local pullEvent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- end
- start()
- while true do
- parallel.waitForAny(attack, attackChest)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement