Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local name = "AE";
- local isCell = true;
- local side = "bottom";
- rednet.open("front");
- print("Server running ... Name : "..name);
- while true do
- local sId, message = rednet.receive();
- print("Message : "..message.." ("..sId..")");
- if message == "name" then
- rednet.send(sId,name);
- elseif message == "close" then
- if not isCell then
- redstone.setOutput(side,true);
- end
- elseif message == "open" then
- if not isCell then
- redstone.setOutput(side, false);
- end
- elseif message == "cellLevel" then
- if isCell then
- rednet.send(sId,"10");
- end
- elseif message == "type" then
- if isCell then
- rednet.send(sId,"cell");
- else
- rednet.send(sId,"cable");
- end
- else
- print("Unknow ...");
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement