Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Dustpuppy

  1. And me again. I take also port 148 for internal usage of my gui, that is more and more getting a managed window system and port 4662 for short messages. Think, that i will need more, as longer i am coding on the gui
  2. OK, now i am fully lost. That's too much for my little brain at the moment. Don't you think it is too complicated for the normal user? Most people using lua in OC are beginners , not coders. Even it is complicated to me, i am talking about the normal player, who just want to put some information on his screen.
  3. The export of local functions i've solved. Functions can be changed on every element. Now a kind of custom element can be set by using the new element function directly. So, it's possible to make multiline label, taht acts like a button. But i have no clue about OOP. Never used it. Started coding when i used OC the first time ;-)
  4. Someone allready taken a look at the new gui? I need feedback :-)
  5. The door controller under the security door.
  6. Looks like, i will leave it, like it is now. Have started a new gui, because this one is not flexible enough If someone want to test the new one, it's here https://pastebin.com/J4SXwzHa Dokumentation is on top of the file. At the moment it only has 2 elements, a button and a label, but i am working on more. When i've finished it, i will make a new threat.
  7. I will start reworking it 2morro. Hope i get it done over the weekend. Depends on the weather outside.
  8. I will remake it completely, if i find the time or it will rain outside. Have some more ideas, but at the moment i have to train a horse first as my major time shedule. If you have any ideas for a nice security system, let me know and i will see, what i can do.
  9. Have done some work on the gui. Most internal, but also put in a vertical slider, a chart and some other elements. Download link is the same as allways. Here's an overview of all functions. I will do a proper documentation, if i find the time, but i think my code is good enough to understand it.
  10. It's because ur using MC 1.10.2 The names of the blocks are changed in Open security, compared to MC 1.7.10. I will redo the programs with the new names for MC 1.20.2 if i find the time. At the moment i am working on my gui.
  11. During coding a transporter system for RF Tools i found a little error in the list part. Corrected it and uploaded again. Same Pastebin then before.
  12. Do u have a link to the github, where i can find your code?
  13. You can connect a button to the bottom side of the computer. It checks if a redstone signal is changed and toggles the door then.
  14. I've updated the pastebin download.
  15. Will check this, when i have time. Do you have the code of your program?
  16. I have updated the lib. Now it has charts and some file handling for saving tables. The documentation for the functions i do later. At the moment i am moving house and i have not that much time. Download link is still the same. To see all features i've made a program to control passive reactors with up to 25 rods. http://pastebin.com/2xEFeZC9
  17. What kind of bug? Can't find, what you mean.
  18. Good idea. At the moment i don't have time to play or for coding. If you want, make the lib bigger, or make some extentions. As soon as i have time again, i will see, what i can do :-)
  19. Here's the code of the screenshot. local component = require("component") local gpu = component.gpu local gui = require("gui") local prgName = "Gui-lib v" local version = gui.Version() function exitButtonCallback(guiID, id) local result = gui.getYesNo("", "Do you really want to exit?", "") if result == true then gui.exit() end gui.displayGui(myGui) end myGui = gui.newGui(2, 2, 78, 23, true) exitbutton = gui.newButton(myGui, "center", 21, "exit", exitButtonCallback) label1 = gui.newLabel(myGui, 2, 1, "A label") label2 = gui.newLabel(myGui, 2, 3, "A colored label", 0xFF0000, 0xFFFF00) frame = gui.newFrame(myGui, 2, 5, 40, 6, "A frame") checkbox1 = gui.newCheckbox(myGui, 3, 7, false) cbLabel1 = gui.newLabel(myGui, 7, 7, "Checkbox") checkbox2 = gui.newCheckbox(myGui, 3, 8, true) cbLabel2 = gui.newLabel(myGui, 7, 8, "Second checkbox") text = gui.newText(myGui, 2, 12, 25, "Text input") progress = gui.newProgress(myGui, 2, 16, 35, 100, 0, nil, true) list = gui.newList(myGui, 50, 3, 25, 10, {"Entry 1", "Entry two", "Number 3", "44444"}, nil, "A List") vprogress1 = gui.newVProgress(myGui, 44, 3, 10, 100, 0, nil) vprogress2 = gui.newVProgress(myGui, 46, 3, 10, 100, 0, nil, 1) radioframe = gui.newFrame(myGui, 48, 14, 25, 6) radio1 = gui.newRadio(myGui, 50, 15) radio2 = gui.newRadio(myGui, 50, 16) radio3 = gui.newRadio(myGui, 50, 17) radio4 = gui.newRadio(myGui, 50, 18) radioLabel1 = gui.newLabel(myGui, 54, 15, "Radio button 1") radioLabel2 = gui.newLabel(myGui, 54, 16, "Radio button 2") radioLabel3 = gui.newLabel(myGui, 54, 17, "Radio button 3") radioLabel4 = gui.newLabel(myGui, 54, 18, "Radio button 4") hline = gui.newHLine(myGui, 5, 20, 40) gui.clearScreen() gui.setTop(prgName .. version) local counter = 0 while true do gui.runGui(myGui) counter = counter + 1 if counter <= 100 then gui.setValue(myGui, progress, counter) gui.setValue(myGui, vprogress1, counter) gui.setValue(myGui, vprogress2, counter) end if counter > 110 then counter = 0 end end
  20. 1. Minimum is t1, if you use normal network cards. Only the userdb system needs a tier2 screen, because of the gui. 2. You can use it where ever you want, if you will not make money with it. ;-)
  21. It displays the address of the sender:port:action:info
  22. Was not as complicated as i thought. TheCryptek, here is your request :-) Just replace the mag card reader with a rfid reader and use this script. local accessLevel = 2 local cryptKey = {1, 2, 3, 4, 5} local modemPort = 199 local scanRange = 4 local component = require("component") local gpu = component.gpu local event = require("event") local ser = require("serialization") local term = require("term") local door = component.os_door local rfidreader = component.os_rfidreader local modem = component.modem local function convert( chars, dist, inv ) return string.char( ( string.byte( chars ) - 32 + ( inv and -dist or dist ) ) % 95 + 32 ) end local function crypt(str,k,inv) local enc= ""; for i=1,#str do if(#str-k[5] >= i or not inv)then for inc=0,3 do if(i%4 == inc)then enc = enc .. convert(string.sub(str,i,i),k[inc+1],inv); break; end end end end if(not inv)then for i=1,k[5] do enc = enc .. string.char(math.random(32,126)); end end return enc; end function splitString(str, sep) local sep, fields = sep or ":", {} local pattern = string.format("([^%s]+)", sep) str:gsub(pattern, function(c) fields[#fields+1] = c end) return fields end term.clear() print("Security door Access level : " .. tostring(accessLevel)) print("---------------------------------------------------------------------------") if modem.isOpen(modemPort) == false then modem.open(modemPort) end data = crypt(tostring(accessLevel), cryptKey) modem.broadcast(modemPort, "setlevel", data) while true do output = rfidreader.scan(scanRange) if output[1] ~= nil then local data = crypt(output[1].data, cryptKey, true) local tmpTable = splitString(data," ") term.write(tmpTable[3] .. ":") if modem.isOpen(modemPort) == false then modem.open(modemPort) end data = crypt(tmpTable[3], cryptKey) modem.broadcast(modemPort, "checkuser", data) local e, _, from, port, _, msg = event.pull(1, "modem_message") if e then data = crypt(msg, cryptKey, true) -- print(data) if data == "true" then term.write("Access granted\n") door.toggle() os.sleep(2) door.toggle() else term.write("Access denied\n") end else term.write("server timeout\n") end os.sleep(3) else os.sleep(0.5) end end
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.