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

Card Swipe Security database (Made specifically for SCP) (Updated and improved version of Dustpuppy's system)

Recommended Posts

IMAGES COMING SOON Hello! This is my security doorcontrol system I built. It used to be the code from Dustpuppy's program, but I learned off of it and built it up to be more advanced and better!

 

So backstory: I was getting into Open computers when I discovered the open security mod, but I didn't know lua. so I looked on this website and found Dustpuppy's program. It was perfect! But my needs grew, and I added on more functions to the cards (Armory access level, departments, goi and mtf buttons and such), and I even upgraded the actual door system. In total: this is what this new system supports:

  • Two different card database types: One that works on normal open os, and a ported version for MineOS.
  • Settings for Staff, GOI, MTF, Level, Armory Level, Department, Blocked, Intercom, and Security
  • Two door control types: One is for a single door and supports normal redstone, rolldoor, bundled redstone, and doorcontrol, and a Multidoor, that can control any amount of doors from a single computer
  • An automatic setup command that works by running a pastebin command (will be down below)
  • Auto Update system! (you have to send a network message through another computer to update all doors. Prolly not necessary)
  • Easy setting edits: It saves all settings in a .txt file in the same drive, so you can edit it after install by typing edit doorSettings.txt (or something like that)

 

Video tutorial. NOTICE: This is before some of the extra stuff I added, like the automatic door setup command. You can send me any questions you have in the comments.

 

----Server: This has to be running all the time, as it receives the door signals and tells them to open or not to. The server has to be on when editing card settings, or the server will not receive them. Needs a modem and an internet card to run, and a minimum of tier 2 computer.

    server.lua: https://pastebin.com/0DC4wQVU

----Database: This is where you edit the accounts and write the cards. There are 2 types, so make sure you choose the correct one!!! Requires a modem and card writer connected to it, and a tier 3 computer and highest specs if you can! I recommend putting MineOS one on a server rack with 4 tier 3.5 memory modules, but the OpenOS one is lighter.

    OpenOS: You need to add both these programs to the drive. Name the GUI one gui.lua

        database.lua: https://pastebin.com/SYQEWNpg (Fixed code)

        gui.lua: https://pastebin.com/sSprBkir

     MineOS: Much sleeker and faster and basically better in every way. The database is available in the AppStore of MineOS and installs all necessary dependencies for you, but if you do it manually, you will still have to install the serialization library by user cadergator10 on there. Its just the OpenOS serialization library. but if you need it, here is the link to it

        database.lua: https://pastebin.com/XFfaFjEA

----Door Control: All the doorcontrol scripts. Can be very low spec honestly, but at least one 3.5 tier ram is probably safe :) Requires a Modem, redstone tier 2 card, and internet card only the first time you run the pastebin command.

    All you have to do is run the command "pastebin run X8M664ew" and follow the prompts. For multidoor, you will have to use an analyzer to copy the ids of the magstrip readers and rolldoor/doorcontrol blocks, while you dont with the single door one. However, if you want to look at the code, here are the dropbox links. HOWEVER, the programs do require a library to work, which the autorun command does for you, so I recommend just doing the above command.

    Single Door: https://pastebin.com/QxnRYA3B

    Multi Door: https://pastebin.com/sHfsrt2M

 

Thats it :) Please don't hesitate to ask any questions and report any bugs! Once again, thank you to @Dustpuppy for the base security program I built off of! You can check it out here:

 

Edited by cadergator10
Fixed OpenOS database
Link to post
Share on other sites
23 hours ago, BrisingrAerowing said:

The OpenOS and MineOS Database links have identical content. I think you uploaded the MineOS one for both.

Fixed the OpenOS database! Not sure if it will work first time however, as I lost some of the newer code for it. I think it works now tho

 

Link to post
Share on other sites

Loading these files in VS Code shows a large number of syntax errors. I'm using the Lua Language server from sumneko. Some of these errors can be ignored (e.g. os.sleep isn't in base Lua), but a few break the code (e.g. line 129 of the multi door controller is missing quotes around the second io.open parameter).

Link to post
Share on other sites
On 9/5/2021 at 5:49 PM, BrisingrAerowing said:

Loading these files in VS Code shows a large number of syntax errors. I'm using the Lua Language server from sumneko. Some of these errors can be ignored (e.g. os.sleep isn't in base Lua), but a few break the code (e.g. line 129 of the multi door controller is missing quotes around the second io.open parameter).

The code uses the Open Computers serialization library. I'm not sure if there is a regular lua serialization library or not, but the code works in the game, so I'm not quite sure.

Link to post
Share on other sites
5 hours ago, BrisingrAerowing said:

I'm not talking about that. You have io.open with the second parameter not being in quotes, which breaks things as Lua thinks you're passing a variable.


local fill = io.open("doorSettings.txt", r)

The r needs quotes. Both door controller scripts have this issue.

Ah I see. Thank you for that! I wonder why it never errored

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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