Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- local length = tArgs[1]
- local height = tArgs[2]
- local currentSlot = 1
- local running = true
- function fuel()
- if turtle.getFuelLevel() < 10 then
- turtle.select(16)
- turtle.refuel(1)
- turtle.select(currentSlot)
- end
- end
- function checkSlots()
- if turtle.getItemCount(turtle.getSelectedSlot()) < 1 then
- currentSlot = currentSlot + 1
- if currentSlot < 15 then
- turtle.select(currentSlot)
- else
- running = false
- print("HAVE RUN OUT OF ITEMS")
- end
- end
- end
- function run()
- fuel()
- turtle.up()
- checkSlots()
- for y = 1, height do
- for x = 1, length do
- checkSlots()
- fuel()
- turtle.placeDown()
- if x < tonumber(length) then
- turtle.forward()
- end
- end
- fuel()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.up()
- end
- end
- run()
Add Comment
Please, Sign In to add comment