- ComputerCraft | Programmable Computers for Minecraft
- → Windows10User's Content
Windows10User's Content
There have been 60 items by Windows10User (Search limited from 29-March 23)
#278897 Minedows Pro OS
Posted by Windows10User on 30 March 2019 - 05:51 PM in Operating Systems
#278755 [beta] chatter | A cross-server chat application!
Posted by Windows10User on 20 January 2019 - 10:51 AM in Programs
Nothy, on 19 January 2019 - 09:29 PM, said:
From January 20th 2019, 00:00 UTC+2, Chatter servers will no longer be available due to low, if next to no usage.
If you wish to get a copy of the server software, feel free to shoot me a DM, I will guide you through the process of setting it up.
nooooooooo
#278337 Opus OS
Posted by Windows10User on 08 October 2018 - 04:15 PM in Operating Systems
It didn't survive startup...
Otherwise, nice OS!
#278336 VedroidOS - Pocket (or maybe more) Computer OS | ● ^ ● |
Posted by Windows10User on 08 October 2018 - 03:47 PM in Operating Systems
#278335 UnusualMinds Survival server [CC 1.12.2]
Posted by Windows10User on 08 October 2018 - 03:42 PM in Servers
EDIT: Technic can't download the modpack 4 whatever reason...
#278312 Unserializing tables doesn't work
Posted by Windows10User on 05 October 2018 - 11:04 AM in Ask a Pro
#278310 Unserializing tables doesn't work
Posted by Windows10User on 04 October 2018 - 06:30 PM in Ask a Pro
SquidDev, on 04 October 2018 - 06:06 PM, said:
This is the table:
{ "myfile.lua" = { name = "myfile.lua", type = "file", contentloc = "90285", }, filecontent = { "90285" = "print(\"Hello!\")", }, }
Everything looks correct to me.
#278308 Unserializing tables doesn't work
Posted by Windows10User on 04 October 2018 - 05:19 PM in Ask a Pro
local tmp = fs.open("filesystem.ufs", "r")
local ufs = textutils.unserialize(tmp.readAll())
tmp.close()
It runs "fine". However, when I try to use the ufs table, it seems to be nil.
I have CC build 5 1.12.2 from http://cc.crzd.me
Why does this happen?
#278307 VedroidOS - Pocket (or maybe more) Computer OS | ● ^ ● |
Posted by Windows10User on 04 October 2018 - 02:49 PM in Operating Systems
#278197 Solar OS(Previously Cactus OS) -Made by Cactus Inc.
Posted by Windows10User on 26 August 2018 - 09:51 AM in Operating Systems
Cdez, on 25 August 2018 - 11:45 PM, said:
I can test Solarium once you issue a usable copy of it.
#278179 Solar OS(Previously Cactus OS) -Made by Cactus Inc.
Posted by Windows10User on 24 August 2018 - 07:38 AM in Operating Systems
P. S. No matter how good your OS is, it just won't succeed if there are no apps for it. So, you have to make it easy to develop apps for it so people do so and make Solarium a success.
2nd P. S. I am already working on an e-mail client & server, so if you want I can include mine when it's done.
#278171 Solar OS(Previously Cactus OS) -Made by Cactus Inc.
Posted by Windows10User on 23 August 2018 - 02:33 PM in Operating Systems
Quote
A'ight, I'm in. Also, I can make you an e-mail client if you want.
#278167 Solar OS(Previously Cactus OS) -Made by Cactus Inc.
Posted by Windows10User on 23 August 2018 - 12:58 PM in Operating Systems
P. S. If you want 1.3.1 to be a success, you must make it from scratch, not from some tutorial...
#278154 Solar OS help! Commands go where?
Posted by Windows10User on 22 August 2018 - 11:11 AM in Ask a Pro
#278153 Solar OS(Previously Cactus OS) -Made by Cactus Inc.
Posted by Windows10User on 22 August 2018 - 11:08 AM in Operating Systems
#277935 Hello World - ComputerCraft Anarchy Server
Posted by Windows10User on 30 July 2018 - 08:14 AM in Servers
#277451 Forcing all OS files to be installed in a specific folder
Posted by Windows10User on 30 May 2018 - 07:33 PM in Ask a Pro
SquidDev, on 30 May 2018 - 02:27 PM, said:
Windows10User, on 30 May 2018 - 01:56 PM, said:
Then what do I do?
#277448 Forcing all OS files to be installed in a specific folder
Posted by Windows10User on 30 May 2018 - 01:56 PM in Ask a Pro
SquidDev, on 30 May 2018 - 01:43 PM, said:
Will overwriting the fs functions to the same things, but adding bios/name to their beginnings work?
#277446 Forcing all OS files to be installed in a specific folder
Posted by Windows10User on 30 May 2018 - 01:12 PM in Ask a Pro
local nOption = 1 function drawMenu() term.clear() term.setCursorPos(1, 1) paintutils.drawFilledBox(0, 0, 51, 19, colors.cyan) term.setCursorPos(1, 1) term.setBackgroundColor(colors.blue) term.setTextColor(colors.white) for i=1, 51 do term.write(" ") end printCentered("BIOS SETUP UTILITY") print("") term.setCursorPos(3, 3) term.setBackgroundColor(colors.cyan) printStayX(nOption == 1 and "[ Set Default OS ]" or "Set Default OS") printStayX("") printStayX(nOption == 2 and "[ Install Pastebin OS ]" or "Install Pastebin OS") printStayX("") printStayX(nOption == 3 and "[ Exit and Reboot ]" or "Exit and Reboot") term.setCursorPos(30, 3) printStayX(textutils.formatTime(os.time())) printStayX("") printStayX("Free Space: "..math.ceil(fs.getFreeSpace("/") / 1024).." KB") end drawMenu() function pasteget(code, file) local response = http.get("https://pastebin.com/raw/"..textutils.urlEncode(code)) if response then local data = response.readAll() response.close() local hfile = fs.open(file, "w") hfile.write(data) hfile.close() return true else return false end end function pastebinMenu() term.setBackgroundColor(colors.black) term.clear() term.setCursorPos(1, 1) print("OS name:") local name = read() print("OS Pastebin code:") local code = read() if pasteget(code, "bios/"..name.."/installer") then print("Installer successfully downloaded, about to install...") local oldpath = shell.path() shell.setPath(oldpath..":bios/"..name) shell.run("bios/"..name.."/installer") shell.setPath(oldpath) end end while true do local event, key, _ = os.pullEvent("key") if key == keys.up then if nOption > 1 then nOption = nOption - 1 drawMenu() end elseif key == keys.down then if nOption < 3 then nOption = nOption + 1 drawMenu() end elseif key == keys.enter then if nOption == 3 then sleep(1) os.reboot() elseif nOption == 2 then pastebinMenu() end end end
When I go install an OS, it installs fine, but even though I used setPath, it copies the files into the root directory.
Is there any way around this?
#277422 BB's Guide to Coroutines
Posted by Windows10User on 26 May 2018 - 02:02 PM in Tutorials
#277407 [SOLVED] Cannot serialize file's contents
Posted by Windows10User on 25 May 2018 - 05:57 PM in Ask a Pro
#277405 [SOLVED] Cannot serialize file's contents
Posted by Windows10User on 25 May 2018 - 05:46 PM in Ask a Pro
I seriously don't know what's wrong here. I'm sure my sound is formatted correctly, I even did a print on type(fs handle here) and it said table, so it indeed should have read the file and formatted it into a table.
Enough of my walls of text and time to see the code for yourself!
Bootloader:
os.loadAPI("DoorOS/apis/logging") os.loadAPI("DoorOS/apis/wavesound") term.clear() term.setCursorPos(1, 1) version = 0.1 cosversion = os.version() if cosversion ~= "CraftOS 1.8" then logging.warn("Not running on COS 1.8, continue?") logging.warn("To continue, press Enter.") logging.warn("To exit, press any other key.") logging.warn("(NOTE: May be very unstable!)") local event, k, held = os.pullEvent("key") if k ~= keys.enter then error() end end logging.info("Running DoorOS v0.1a on "..cosversion) local fcfg = fs.open("Boot/cfg.lua", "r") local cfg = fcfg.readAll() fcfg.close() logging.info("Performing main files check...") local files = { cfg.loader, "DoorOS/desktop.lua", "DoorOS/apis/graphics", "DoorOS/apis/compact", "DoorOS/apis/pastebin", "DoorOS/apis/updcheck", "DoorOS/apis/wavesound", } local missing = nil for i, f in pairs(files) do if not fs.exists(f) then missing = {} table.insert(missing, f) end end if missing then logging.error("Boot-time fail.") logging.error("Missing file(s):") for i, f in pairs(missing) do logging.error(f) end logging.error("DoorOS cannot boot.") error() end logging.info("Files OK.") logging.info("Scanning peripherals...") peripherals = {} for i, s in pairs(rs.getSides()) do if peripheral.getType(s) then if peripheral.getType(s) == "modem" then if peripheral.wrap(s).isWireless() then peripherals["wifi_modem"] = s else peripherals["eth_modem"] = s end else peripherals[peripheral.getType(s)] = s end end end logging.info("Found peripherals:") for i, p in pairs(peripherals) do logging.info(i.." on side "..p) end if peripheral.find("speaker") then local sf = fs.open("DoorOS/sounds/boot.wave", "r") local s = textutils.unserialize(sf.readAll()) sf.close() print(type(s)) local ok, err = wavesound.play(s) if not ok then logging.warn("Could not play bootsound") logging.warn("Error: "..err) end end
Wavesound API:
function play(snd) if type(snd) ~= "table" then return false, "snd is not a table" end local spkr = peripheral.find("speaker") if not spkr then return false, "no speaker found" end for i, s in pairs(snd) do spkr.playNote(s.note, tonumber(s.vol), tonumber(s.pitch)) end return true end
Sound file:
{ { note = "snare", vol = "10", pitch = "1", } { note = "snare", vol = "10", pitch = "1", } { note = "snare", vol = "10", pitch = "1", } { note = "snare", vol = "10", pitch = "1", } { note = "snare", vol = "10", pitch = "1", } { note = "snare", vol = "10", pitch = "1", } { note = "snare", vol = "10", pitch = "1", } { note = "snare", vol = "10", pitch = "1", } { note = "snare", vol = "10", pitch = "1", } { note = "snare", vol = "10", pitch = "1", } }
Any help is appreciated!
#277387 Object dependence in case of a GUI framework
Posted by Windows10User on 24 May 2018 - 05:55 PM in Ask a Pro
#277227 ANOTHER problem with my internet system
Posted by Windows10User on 11 May 2018 - 05:17 AM in Ask a Pro
Bomb Bloke, on 11 May 2018 - 05:13 AM, said:
I know, I can use 65535 if I wanted, but I'm using IDs for security sake, if you understand. And to prevent conflicts between the 3 systems.
#277224 Program that copies a file and replaces specific parts of text.
Posted by Windows10User on 10 May 2018 - 07:21 PM in Ask a Pro
local tArgs = {...} if #tArgs < 2 then error("filereplacer <original file> <destination file>", 0) end local origPath = tArgs[1] local replPath = tArgs[2] local origFile = fs.open(origPath, "r") local replFile = fs.open(replPath, "w") while true do local line = origFile.readLine() if line == nil then break else replFile.writeLine(string.gsub(line, "to be", "was") end replFile.close() print("Success!")
If you don't understand something, ask.
KingofGamesYami, on 02 May 2018 - 05:41 PM, said:
-
string.reverse( fileName ):sub(1,3) == ".rf"
Fix:
string.reverse( fileName ):sub(1,3) == "fr."
- ComputerCraft | Programmable Computers for Minecraft
- → Windows10User's Content