This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
FiMinePlayer's profile picture

Door system

Started by FiMinePlayer, 04 October 2016 - 06:48 PM
FiMinePlayer #1
Posted 04 October 2016 - 08:48 PM
I need someone to do computercraft code.

This would be Door system.
Multiple doors which communicates with server computer.
using wireless modem.

Key to system is Pocket Computer

Also i need one computer which has disk drive next to it.
This computer handles writing the "access file" to Pocket computer and sends the same data to server.

All this needs to be wireless.

Fiverr job 5$ reply here
Edited on 05 October 2016 - 03:34 AM
Lyqyd #2
Posted 04 October 2016 - 10:23 PM
That's really not what we do here. You might check out oeed's Ultimate Door Lock, it's in the ballpark of what you're looking for.
Bomb Bloke #3
Posted 05 October 2016 - 01:48 AM
As in, we don't generally write scripts by request - you may sometimes find a taker, but in any case, please stick to questions in Ask a Pro.
Lupus590 #4
Posted 05 October 2016 - 10:17 AM
Specifically, ask a pro questions should be asking for help with using and/or writing code (primarily the latter). Requests for programs always should go in general.
FiMinePlayer #5
Posted 05 October 2016 - 12:31 PM
That's really not what we do here. You might check out oeed's Ultimate Door Lock, it's in the ballpark of what you're looking for.

Ultimate Door lock is nice but i don't want to run all the doors to put PDA on the disk drive.


Specifically, ask a pro questions should be asking for help with using and/or writing code (primarily the latter). Requests for programs always should go in general.

Mod can move this thread to general discussion.
houseofkraft #6
Posted 12 October 2016 - 03:33 PM
I will give you a start code that you can add-on:

PC next to door lock:

local modemside = "top" -- Change this to what side your modem is on
local rsside = "right" -- Change this to what side your door is on
rednet.open(modemside) 
id, message = rednet.receive()
if message == "open" then
  rs.setOutput(rsside, true)
  os.sleep(1)
  rs.setOutput(rsside, false)
end

Pocket PC:

--Code here
rednet.open("back")
rednet.broadcast("open")
rednet.close()

Hopefully i helped, this is not the full code but it is a start that you can add-on and change.
- House
Larry84 #7
Posted 12 October 2016 - 05:04 PM
I will give you a start code that you can add-on:

PC next to door lock:

local modemside = "top" -- Change this to what side your modem is on
local rsside = "right" -- Change this to what side your door is on
rednet.open(modemside)
id, message = rednet.receive()
if message == "open" then
  rs.setOutput(rsside, true)
  os.sleep(1)
  rs.setOutput(rsside, false)
end

Pocket PC:

--Code here
rednet.open("back")
rednet.broadcast("open")
rednet.close()

Hopefully i helped, this is not the full code but it is a start that you can add-on and change.
- House

You may also want to add protocols (a parameter in rednet.receive and rednet.broadcast) so that if you setup multiple doors, you are able to open them individually.
KingofGamesYami #8
Posted 12 October 2016 - 06:23 PM
The problem with houseofkraft's solution is that anyone in the world with an ender modem can notice you sending "open" and then send it themselves. It would be relatively simple to write a program that broadcasts open once a second, keeping your doors open almost all the time.

That being said, it's perfectly fine for a non-multiplayer environment.