Advertisement
CelticCoder

import

Nov 13th, 2023 (edited)
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.11 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("c9MuqRhB", "smartBuildTower")
  31.     import("qyemJJGw", "predictSupport")
  32.     import("S34iHEKx", "fillBlock")
  33. end
  34.  
  35. function loadBasicFunctions()
  36.     import("L7fFQb7x", "userInput")
  37.     import("X1ch3aiN", "getTurtleFuel")
  38.     import("er0pq47H", "turtleRefuel")
  39.     import("im9b2czg", "setNorth")
  40. end
  41.  
  42. function loadBasicQuarry()
  43.     import("TUN2J3cN", "predictSimpleQuarry")
  44.     import("172twws3", "simpleQuarry")
  45.     import("FgcnJWmH", "manualQuarry")
  46.     import("yk8MCctB", "manualQuarryShaft")
  47.     import("9FTwRmF1", "turtleForward")
  48.     import("hV6x6tNr", "smartManualQuarry")
  49. end
  50.  
  51.  
  52. function loadBasicMovement()
  53.     import("MdxeX0DF", "predictPath")
  54.     import("j8myFUbq", "turtleToCords")
  55.     import("68wFPyAZ", "turtleManualOneTrip")
  56.     import("HmgeTs3x", "turtleManualRoundTrip")
  57. end
  58.  
  59. function loadUtility()
  60.     import("Qps5qT3b", "turtleChest")
  61.     import("H1w4vh0f", "turtleGetLava")
  62.     import("gba1J02L", "findBlocks")
  63. end
  64.  
  65. function loadCarePackage()
  66.     import("Qps5qT3b", "turtleChest")
  67.     import("MdxeX0DF", "predictPath")
  68.     import("gba1J02L", "findBlocks")
  69.     import("GkQxd6Hm", "turtleOneTrip")
  70.     import("j8myFUbq", "turtleToCords")
  71.     import("L7fFQb7x", "userInput")
  72.     import("X1ch3aiN", "getTurtleFuel")
  73.     import("6scCnqK7", "turtleCarePackage")
  74.     import("im9b2czg", "setNorth")
  75.    
  76. end
  77.  
  78. function loadAll()
  79.     loadBuildFunctions()
  80.     loadBasicFunctions()
  81.     loadBasicQuarry()
  82.     loadBasicMovement()
  83.     loadUtility()
  84.     loadCarePackage()
  85. end
  86.  
  87. function loadRental()
  88.     import("TUN2J3cN", "predictSimpleQuarry")
  89.     import("172twws3", "simpleQuarry")
  90.     import("FgcnJWmH", "manualQuarry")
  91.     import("yk8MCctB", "manualQuarryShaft")
  92.     import("9FTwRmF1", "turtleForward")
  93.     import("jiYE76jD", "turtleRental")
  94.     loadBasicFunctions()
  95.     --also pastebin get fFiABipV startup
  96. end
  97.  
  98. function loadGames()
  99.    
  100.     --suika game:  
  101.     --wget run https://pinestore.cc/d/32
  102.    
  103.     --fruit Ninja:  
  104.     --wget run https://pinestore.cc/d/5
  105.    
  106.     --Rubik's Cube:
  107.     --wget run https://pinestore.cc/d/4
  108.    
  109.     --DOOM:
  110.     --wget run https://pinestore.cc/d/1
  111.    
  112.     --Battleship:
  113.     --wget run https://pinestore.cc/d/36
  114.  
  115.     --Tetris:
  116.     --wget https://github.com/LDDestroier/CC/raw/master/ldris.lua
  117.  
  118. end
  119.  
  120.  
  121.  
  122. loadAll()
  123.  
  124.  
  125.  
  126.     --OS System:
  127.     --pastebin get m342HLd6 startup
  128.  
  129.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement