Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtle.select(1)
- turtle.refuel(64)
- local hasChestUnderneath, data = turtle.inspectDown()
- if hasChestUnderneath then
- if string.match(data.name, "chest") == nil then
- hasChestUnderneath = false
- end
- end
- local c = 1
- while true do
- local attacked = false
- if turtle.attack() then
- attacked = true
- end
- turtle.suckUp()
- turtle.suck()
- turtle.suckDown()
- if c == 15 then
- turtle.forward()
- if turtle.attack() then
- attacked = true
- end
- turtle.suckUp()
- turtle.suck()
- turtle.suckDown()
- turtle.back()
- end
- if hasChestUnderneath then
- turtle.dropDown()
- end
- print("tick"..(attacked and " and attacked" or "")..((c == 15) and " and moved" or ""))
- c = ((c < 15) and (c + 1) or (1))
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement