Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script initializes my seed breeder robot.
- -- It will automatically construct any directories required, and populate them with programs for breeding seeds.
- -- Put this in Root/startup, and it will execute as soon as the turtle bot turns on.
- -- (Note: Holding CTL + R for 3 seconds hard-restarts the computer.)
- -- Youtube video demonstrating this: https://www.youtube.com/watch?v=-dN5wSv5SsY
- -- URL for main algorithm: http://pastebin.com/V1MQRVQv
- -- IMGUR link: http://imgur.com/gallery/gPpK4
- -- Matthew K. Crandall.
- local rootDirectory = "MatthewC"
- local agricraftDirectory = rootDirectory.."/Agricraft"
- local breedSeedsFileName = agricraftDirectory.."/BreedSeeds"
- -- If root Directory doesn't exist, create it.
- if not fs.exists(rootDirectory) then
- print("Making Directory: "..rootDirectory)
- fs.makeDir(rootDirectory)
- end
- -- If agricraft directory doesn't exist, create it.
- if not fs.exists(agricraftDirectory) then
- print("Making Directory: "..agricraftDirectory)
- fs.makeDir(agricraftDirectory)
- end
- -- If breedSeeds exists, delete it.
- if (fs.exists(breedSeedsFileName)) then
- print("Deleting: "..breedSeedsFileName)
- fs.delete(breedSeedsFileName)
- end
- -- Download BreedSeeds
- shell.run("pastebin", "get", "V1MQRVQv", breedSeedsFileName)
- shell.run("MatthewC/Agricraft/BreedSeeds")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement