Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --prints true if inventory is full, else false
- function isFull()
- for i=3, 16 do
- if turtle.getItemCount(i) == 0 then
- return false
- elseif i == 16 then
- return true
- end
- end
- end
- --uses all fuel in inventory, up to 48 items
- function betterRefuel()
- for i = 3, 16 do
- turtle.select(i)
- turtle.refuel(48)
- end
- turtle.select(2)
- end
- --moves forward but also digs
- function betterMove()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- end
- function farmLine(n)
- for i=1, n do
- betterMove()
- end
- end
- function right()
- turtle.turnRight()
- betterMove()
- turtle.turnRight()
- end
- function left()
- turtle.turnLeft()
- betterMove()
- turtle.turnLeft()
- end
- function placeLoaderUp()
- turtle.digUp()
- turtle.select(1)
- turtle.placeUp()
- end
- function placeLoader()
- turtle.dig()
- turtle.select(1)
- turtle.place()
- end
- function firstThreeLines()
- farmLine(15)
- placeLoaderUp()
- turtle.turnRight()
- farmLine(15)
- turtle.turnRight()
- farmLine(15)
- end
- function remainingLines()
- for i = 1, 14 do
- if i%2 == 1 then
- right()
- else
- left()
- end
- end
- end
- function reAlign()
- turtle.turnRight()
- betterMove()
- turtle.turnRight()
- for i=1, 15 do
- turtle.forward()
- end
- end
- function transition()
- turtle.turnRight()
- placeLoader()
- turtle.turnLeft()
- turtle.digUp()
- turtle.up()
- turtle.dig()
- placeLoader()
- turtle.down()
- turtle.forward()
- turtle.turnRight()
- betterMove()
- turtle.turnRight()
- turtle.dig()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- --firstThreeLines()
- --remainingLines()
- --reAlign()
- --transition()
- print(isFull())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement