Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local lastTurn = "Left"
- local itemNumber = 1231
- local width = 7
- local length = 7
- local areaOfFarm = width * length
- print("Running")
- while true do
- for i = 0,width -1 do
- for x = 0, length -1 do
- local success, data = turtle.inspectDown()
- if success then
- if data.metadata == 7 then
- turtle.digDown()
- end
- end
- if turtle.inspectDown() ~= itemNumber then
- turtle.select(1)
- turtle.placeDown()
- end
- turtle.forward()
- end
- if lastTurn == "Left" and i ~= 6 then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- lastTurn = "Right"
- local success, data = turtle.inspectDown()
- if success then
- if data.metadata == 7 then
- turtle.digDown()
- end
- end
- if turtle.inspectDown() ~= itemNumber then
- turtle.select(1)
- turtle.placeDown()
- end
- elseif lastTurn == "Right" and i ~= 6 then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- lastTurn = "Left"
- local success, data = turtle.inspectDown()
- if success then
- if data.metadata == 7 then
- turtle.digDown()
- end
- end
- if turtle.inspectDown() ~= itemNumber then
- turtle.select(1)
- turtle.placeDown()
- end
- end
- end
- for y=0, length -1 do
- turtle.back()
- end
- turtle.turnLeft()
- for y = 0, width -2 do
- turtle.forward()
- end
- for t = 1, 16 do
- turtle.select(t)
- turtle.drop()
- end
- turtle.turnLeft()
- turtle.select(1)
- turtle.suck(areaOfFarm)
- if turtle.getFuelLevel() < 200 then
- turtle.suckUp(16)
- turtle.refuel()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- --print("Yay")
- sleep(120)
- --print("More yay")
- turtle.select(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement