Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function bankRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- function bankLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- function plant()
- turtle.digDown()
- turtle.select(1)
- turtle.placeDown(1)
- end
- local numberInSlot
- function allButOne(slotNum)
- turtle.select(slotNum)
- numberInSlot = turtle.getItemCount(slotNum)
- turtle.dropDown(numberInSlot - 1)
- end
- local slotsDone
- function pootis()
- print("Putting wheat away")
- for slotsDone = 9, 16 do
- allButOne(slotsDone)
- sleep(1)
- end
- turtle.turnRight()
- turtle.up()
- turtle.up()
- turtle.forward()
- turtle.forward()
- print("Putting seeds away... lol")
- for slotsDone = 1, 8 do
- allButOne(slotsDone)
- sleep(1)
- end
- turtle.back()
- turtle.back()
- turtle.down()
- turtle.down()
- turtle.turnLeft()
- end
- function stackSeeds()
- for seedSlot = 1, 8 do
- turtle.select(seedSlot)
- turtle.transferTo(8)
- sleep(1)
- end
- end
- function stackWheat()
- for wheatSlot = 9, 16 do
- turtle.select(wheatSlot)
- turtle.transferTo(16)
- sleep(1)
- end
- end
- function unStackSeeds()
- for seedSlot = 1, 8 do
- turtle.select(8)
- turtle.transferTo(seedSlot, 1)
- sleep(1)
- end
- end
- function unStackWheat()
- for wheatSlot = 9, 16 do
- turtle.select(16)
- turtle.transferTo(wheatSlot, 1)
- sleep(1)
- end
- end
- function jobDone()
- turtle.forward()
- turtle.turnLeft()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- pootis()
- turtle.back()
- turtle.turnRight()
- turtle.back()
- turtle.turnLeft()
- print("Cleaning up inventory")
- stackSeeds()
- stackWheat()
- turtle.select(1)
- end
- print("Farmin'")
- unStackSeeds()
- unStackWheat()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- for row = 1, 8 do
- plant()
- turtle.forward()
- end
- plant()
- bankRight()
- for row = 1, 8 do
- plant()
- turtle.forward()
- end
- plant()
- bankLeft()
- for row = 1, 8 do
- plant()
- turtle.forward()
- end
- plant()
- bankRight()
- for row = 1, 8 do
- plant()
- turtle.forward()
- end
- plant()
- bankLeft()
- for row = 1, 8 do
- plant()
- turtle.forward()
- end
- plant()
- bankRight()
- for row = 1, 8 do
- plant()
- turtle.forward()
- end
- plant()
- jobDone()
- print("Done farming.")
- sleep(4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement