Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --RailServ Version 1.0 5/1/2017
- repeat
- print("RAILSERV:")
- local command = read()
- string.lower(command) --Gets a command
- rednet.open("bottom") --Opens rednet client
- if command == "route" then
- print("Enter Departure ID:")
- local depID = read() --Gets Departure ID
- print("Enter Arrival ID:")
- local arrID = read() -- Gets Arrival ID
- if stationID == 1 then
- if stationID == 2 then
- rednet.send(4,"open1")
- rednet.send(6,"close")
- end
- end
- end
- if command == "open" then --Open some stuff
- print("Enter Switch ID:")
- local switchID = read()
- string.lower(switchID)
- --ENTER SWITCH ID PATCH BAY
- if switchID == "all" then
- rednet.send(4,"open1")
- rednet.send(6,"open")
- rednet.send(4,"open2")
- end
- if switchID == "a10" then
- rednet.send(4,"open1")
- end
- if switchID == "a20" then
- rednet.send(4,"open2")
- end
- if switchID == "a15" then
- rednet.send(6,"open")
- end
- end
- if command == "close" then --Close some stuff
- print("Enter Switch ID:")
- local switchID = read()
- string.lower(switchID)
- --ENTER SWITCH ID PATCH BAY
- if switchID == "all" then
- rednet.send(4,"close1")
- rednet.send(6,"close")
- rednet.send(4,"close2")
- end
- if switchID == "a10" then
- rednet.send(4,"close1")
- end
- if switchID == "a20" then
- rednet.send(4,"close2")
- end
- if switchID == "a15" then
- rednet.send(6,"close")
- end
- end
- until command == "rickroll"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement