Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- box = peripheral.wrap("right")
- -- box is the connected Chat Box
- local open = rs.getInput("left") -- boolean, if the door is open
- local wall = rs.getInput("right") -- boolean, if the wall is builded
- while true do
- -- with param1, you can check if the message is anything you like.
- -- with param2, you can check if the player's name is your name
- local event, param1, param2 = os.pullEvent("chatEvent") -- the chunk of the chat box needs to be loaded
- if(param2 == "Test") then -- param2 is the message and param1 is the player's name
- -- if(open == false) then
- -- send a message and activate the signal, if the door is closed
- redstone.setAnalogOutput("left", 15)
- os.sleep( 10 )
- redstone.setAnalogOutput("left", 0)
- -- else
- -- end
- end
- end
Add Comment
Please, Sign In to add comment