Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtle.refuel()
- local running = true
- print("Tower Time!")
- local slot = 2
- function forward()
- checkSlot()
- turtle.forward()
- turtle.placeDown()
- end
- function left()
- checkSlot()
- turtle.turnLeft()
- turtle.forward()
- turtle.placeDown()
- end
- function right()
- checkSlot()
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- end
- function checkSlot()
- if (not turtle.getItemDetail()) and slot == 16 then
- print("Out of Items")
- running = false
- elseif (not turtle.getItemDetail()) then
- slot = slot + 1
- if (not turtle.getItemDetail()) then
- running = false
- print('Next slot empty, quitting')
- end
- end
- end
- while running and not (turtle.detect() and turtle.detectUp()) do
- print("Curr Slot: ", slot)
- turtle.select(slot)
- checkSlot()
- turtle.up()
- turtle.placeDown()
- for i = 1, 4 do
- forward()
- forward()
- forward()
- right()
- left()
- forward()
- right()
- left()
- right()
- left()
- right()
- left()
- right()
- left()
- right()
- forward()
- left()
- right()
- forward()
- forward()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement