Advertisement
CelticCoder

import

Nov 13th, 2023 (edited)
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.07 KB | None | 0 0
  1. -- code used to import all (or select choice) libraries to complete a job
  2. function import(ID, name)
  3.     local pastebinID = ID
  4.     local scriptFileName = name .. ".lua"  -- Change this to the desired filename
  5.  
  6.     -- Download the script from Pastebin
  7.     local response = http.get("https://pastebin.com/raw/" .. pastebinID)
  8.  
  9.     -- Check if the download was successful
  10.     if response then
  11.         -- Read the contents of the script
  12.         local scriptContent = response.readAll()
  13.         response.close()
  14.  
  15.         -- Open a file on the turtle's file system and write the script content to it
  16.         local file = fs.open(scriptFileName, "w")
  17.         file.write(scriptContent)
  18.         file.close()
  19.  
  20.         print("Script downloaded and saved as " .. scriptFileName)
  21.     else
  22.         print("Failed to download script from Pastebin")
  23.     end
  24. end
  25.  
  26. function loadBuildFunctions()
  27.     import("9msrt82j", "createConcrete")
  28.     import("zCJGjK4q", "buildSupport")
  29.     import("n5jujFA1", "buildTower")
  30.     import("qyemJJGw", "predictSupport")
  31.     import("S34iHEKx", "fillBlock")
  32. end
  33.  
  34. function loadBasicFunctions()
  35.     import("L7fFQb7x", "userInput")
  36.     import("X1ch3aiN", "getTurtleFuel")
  37.     import("er0pq47H", "turtleRefuel")
  38.     import("im9b2czg", "setNorth")
  39. end
  40.  
  41. function loadBasicQuarry()
  42.     import("TUN2J3cN", "predictSimpleQuarry")
  43.     import("172twws3", "simpleQuarry")
  44.     import("FgcnJWmH", "manualQuarry")
  45.     import("yk8MCctB", "manualQuarryShaft")
  46.     import("9FTwRmF1", "turtleForward")
  47.     import("hV6x6tNr", "smartManualQuarry")
  48. end
  49.  
  50.  
  51. function loadBasicMovement()
  52.     import("MdxeX0DF", "predictPath")
  53.     import("j8myFUbq", "turtleToCords")
  54.     import("68wFPyAZ", "turtleManualOneTrip")
  55.     import("HmgeTs3x", "turtleManualRoundTrip")
  56. end
  57.  
  58. function loadUtility()
  59.     import("Qps5qT3b", "turtleChest")
  60.     import("H1w4vh0f", "turtleGetLava")
  61.     import("gba1J02L", "findBlocks")
  62. end
  63.  
  64. function loadCarePackage()
  65.     import("Qps5qT3b", "turtleChest")
  66.     import("MdxeX0DF", "predictPath")
  67.     import("gba1J02L", "findBlocks")
  68.     import("GkQxd6Hm", "turtleOneTrip")
  69.     import("j8myFUbq", "turtleToCords")
  70.     import("L7fFQb7x", "userInput")
  71.     import("X1ch3aiN", "getTurtleFuel")
  72.     import("6scCnqK7", "turtleCarePackage")
  73.     import("im9b2czg", "setNorth")
  74.    
  75. end
  76.  
  77. function loadAll()
  78.     loadBuildFunctions()
  79.     loadBasicFunctions()
  80.     loadBasicQuarry()
  81.     loadBasicMovement()
  82.     loadUtility()
  83.     loadCarePackage()
  84. end
  85.  
  86. function loadRental()
  87.     import("TUN2J3cN", "predictSimpleQuarry")
  88.     import("172twws3", "simpleQuarry")
  89.     import("FgcnJWmH", "manualQuarry")
  90.     import("yk8MCctB", "manualQuarryShaft")
  91.     import("9FTwRmF1", "turtleForward")
  92.     import("jiYE76jD", "turtleRental")
  93.     loadBasicFunctions()
  94.     --also pastebin get fFiABipV startup
  95. end
  96.  
  97. function loadGames()
  98.    
  99.     --suika game:  
  100.     --wget run https://pinestore.cc/d/32
  101.    
  102.     --fruit Ninja:  
  103.     --wget run https://pinestore.cc/d/5
  104.    
  105.     --Rubik's Cube:
  106.     --wget run https://pinestore.cc/d/4
  107.    
  108.     --DOOM:
  109.     --wget run https://pinestore.cc/d/1
  110.    
  111.     --Battleship:
  112.     --wget run https://pinestore.cc/d/36
  113.  
  114.     --Tetris:
  115.     --wget https://github.com/LDDestroier/CC/raw/master/ldris.lua
  116.  
  117. end
  118.  
  119.  
  120.  
  121. loadAll()
  122.  
  123.  
  124.  
  125.     --OS System:
  126.     --pastebin get m342HLd6 startup
  127.  
  128.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement