npexception

Quarry Chunk Minion

Apr 14th, 2020 (edited)
2,942
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. local version = 1.2
  2.  
  3. --  +------------------------+  --
  4. --  |-->  INITIALIZATION  <--|  --
  5. --  +------------------------+  --
  6. if not turtle then
  7.   print("This program can only be")
  8.   print("  executed by a turtle!")
  9.   return
  10. end
  11.  
  12. -- UPDATE HANDLING --
  13. if _UD and _UD.su(version, "5pFNPRZv", {...}) then return end
  14.  
  15. local requiredFiles = {
  16.   quarryFile = {"quarry.lua", "HqXCPzCg", false},
  17.   oreDictConfigFile = {"oredict.config", "iPPApNHk", true},
  18.   ignoreListFile = {"ignore.list", "ymBVBbt1", true},
  19. }
  20.  
  21. -- ensure all files needed are installed
  22. for k,fileInfo in pairs(requiredFiles) do
  23.   local name = fileInfo[1]
  24.   local pbKey = fileInfo[2]
  25.   local forceDownload = fileInfo[3]
  26.   if not fs.exists(name) or forceDownload then
  27.     fs.delete(name)
  28.     shell.run("pastebin get "..pbKey.." "..name)
  29.     if not fs.exists(name) then
  30.       print("Unable to download "..name)
  31.       return
  32.     end
  33.   end
  34. end
  35.  
  36. shell.run("quarry l:16 w:16  offh:2 oredict remember-blocks")
Add Comment
Please, Sign In to add comment