Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --sleep(2)
- local arg = { ... }
- if not arg[2] then
- currentBPTV = ""
- else
- currentBPTV = arg[2]
- end
- --rednet.open("back") -- This was deleted, because it caused incompability with turtles.
- --sleep(0.1)
- if not arg[5] then
- write("Connecting to CraftScripts.com...")
- end
- h = http.get("http://www.craftscripts.com/binOS/"..currentBPTV)
- if h then
- term.setTextColor(colors.green)
- if not arg[5] then
- print("Success.")
- end
- term.setTextColor(colors.blue)
- if not arg[5] then
- print("Connected, file "..arg[3].." downloaded successful.")
- end
- --print("Connected.")
- --sleep(1)
- if arg[1] == "show" then
- if arg[3] == "clear" then
- term.clear()
- term.setCursorPos(1,1)
- --print("Your files, found on server:")
- end
- print(h.readAll())
- else
- local file = fs.open(arg[3], "w")
- file.write(h.readAll())
- --print("Downloading file...")
- --sleep(0.5)
- --print("Finished.")
- file.close()
- h.close()
- end
- else
- term.setTextColor(colors.red)
- -- print("Failed.")
- -- print("Something is going wrong.")
- end
- term.setTextColor(colors.blue)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement