- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Dustpuppy
-
Content Count
75 -
Joined
-
Last visited
-
Days Won
19
Posts posted by Dustpuppy
-
-
-
I's ok. Find out that i am an idiot. Solved it :-)
-
How do i access the player or the world object?
If i do :
local component = require("component") print(component.debug.getPlayer("Dusty"))
all i get is li.cil.oc.server.component.DebugCard$WorldValue@329065a
No Idea how to work with the debug card in the right way to get players coordinates.
-
Hi,
does anyone know, how i can locate a player?
The problem (or challange) is, that the position of everything will change it self. It's for a Advance Rocketry warp ship and the absolute coordinates in the world (space) will change, as soon as the ship moves. That means, that really everything on the ship will change it's position. Also every scanner, sensor and the computers.
Working with absolute coordinates is not possible.
-
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.
-
Nice. Thanks
-
Do u have a link to the github, where i can find your code?
-
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.
-
-
-
Will check this, when i have time.
Do you have the code of your program?
-
-
Checked "my code" now 10 times and it works.
-
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.
-
On 19.12.2016 at 0:50 PM, Enykey said:
Bug in relaunch gui app. You need set property "displayed = false" with each launch gui app
What kind of bug? Can't find, what you mean.
-
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 :-)
-
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
-
The charger needs power too.
-
I am working on a new Version. Can take a bit time.
-
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. ;-)
-
It displays the address of the sender:port:action:info
-
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
-
Okay, after screwing around with your program, I thought of something. What if there was a log that was kept on the "Door" system, but unlike the output that is shown, it's a file that can be sent over the port other computers so that you (or whoever is Head Chief of Security) can read it on their own time.There should actually be two files in my opinion. One that is all successful attempts and one that is all failed. Both should be the same of course, showing the name of the player, the name of the card, the "password" on the card, and finally if it was locked when written or not.
I made a little program thinking about it: http://pastebin.com/4pqh0L7J
The problem is the fact that the data is everywhere. If you could figure out a way to fix it and incorporate it, I would be thankful.
I am not sure, what you mean. You can see at the server screen all infos. If access is granted, or denied and why.
Would you be willing to get this working with the RFID Chip and readers, I want the doors to automatically open when say a level 10 access person walks up to a level 10 access door
I will have a look, when i find the time.
-
My gui (Now with visual editor)
in Libraries & API's
Posted
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.