Advertisement
jironpaste

Untitled

Apr 18th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script initializes my seed breeder robot.
  2. -- It will automatically construct any directories required, and populate them with programs for breeding seeds.
  3. -- Put this in Root/startup, and it will execute as soon as the turtle bot turns on.
  4. --   (Note: Holding CTL + R for 3 seconds hard-restarts the computer.)
  5. -- Youtube video demonstrating this: https://www.youtube.com/watch?v=-dN5wSv5SsY
  6. -- URL for main algorithm: http://pastebin.com/V1MQRVQv
  7. -- IMGUR link: http://imgur.com/gallery/gPpK4
  8. -- Matthew K. Crandall.
  9.  
  10. local rootDirectory = "MatthewC"
  11. local agricraftDirectory = rootDirectory.."/Agricraft"
  12. local breedSeedsFileName = agricraftDirectory.."/BreedSeeds"
  13.  
  14. -- If root Directory doesn't exist, create it.
  15. if not fs.exists(rootDirectory) then
  16.     print("Making Directory: "..rootDirectory)
  17.     fs.makeDir(rootDirectory)
  18. end
  19.  
  20. -- If agricraft directory doesn't exist, create it.
  21. if not fs.exists(agricraftDirectory) then
  22.     print("Making Directory: "..agricraftDirectory)
  23.     fs.makeDir(agricraftDirectory)
  24. end
  25.  
  26. -- If breedSeeds exists, delete it.
  27. if (fs.exists(breedSeedsFileName)) then
  28.     print("Deleting: "..breedSeedsFileName)
  29.     fs.delete(breedSeedsFileName)
  30. end
  31.  
  32. -- Download BreedSeeds
  33. shell.run("pastebin", "get", "V1MQRVQv", breedSeedsFileName)
  34. shell.run("MatthewC/Agricraft/BreedSeeds")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement