Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local initScriptID = "RLq0E2TP"
- local scripts = {}
- --[[
- Register scripts as scripts[<pastebin_code>]="<name>"
- Run:
- pastebin get RLq0E2TP init
- ]]
- scripts["hwZXFWRE"] = "t"
- scripts["V46V5dSW"] = "json"
- scripts["GnFzX6HF"] = "area"
- scripts["0hejcfq6"] = "room"
- scripts["w2fFVnAi"] = "platform"
- scripts["gkz5sgZ8"] = "OCM"
- scripts["ctDZxPUy"] = "go"
- scripts["2nVVg7Ak"] = "treefarm"
- scripts["j8cdrVFf"] = "quarry"
- scripts["VDEU15qB"] = "fly"
- scripts["S5gHj9vN"] = "oreHUD"
- scripts["HMfxKQT1"] = "quarry2"
- scripts["Fd3hEPbk"] = "autocraft"
- -- no touchey from here
- local args = {...}
- -- load function
- function loadScript(code, name)
- if fs.exists(name) == true then
- shell.run("rm", name)
- end
- shell.run("pastebin","get",code,name)
- end
- -- get
- if args[1] == "get" then
- if args[2] ~= nil then
- -- get single
- found = false
- for code, name in pairs(scripts) do
- if name == args[2] then
- found = true
- term.clear()
- term.setCursorPos(0,0)
- print("\nLoading Script ["..name.."]")
- pcall(loadScript, code, name)
- break
- end
- end
- if not found then
- print("\nFailed to load script ["..name.."]")
- return
- end
- else
- -- load scripts
- local progress = 0
- local qty = 0
- for k in pairs(scripts) do
- qty = qty + 1
- end
- for code, name in pairs(scripts) do
- progress = progress + 1
- term.clear()
- term.setCursorPos(0,0)
- print("\nLoading Scripts: [ "..progress.." of "..qty.." ]")
- pcall(loadScript, code, name)
- end
- end
- -- end
- print("\nCreeChyCode Intialised! :)")
- else
- -- update self
- term.clear()
- term.setCursorPos(0,0)
- print("\nUpdating Self ...")
- pcall(loadScript, initScriptID, "init")
- shell.run("init", "get")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement