TheDieselPunk

testing

Mar 3rd, 2021 (edited)
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. box = peripheral.wrap("right")
  2. -- box is the connected Chat Box
  3.  
  4. local open = rs.getInput("left") -- boolean, if the door is open
  5. local wall = rs.getInput("right") -- boolean, if the wall is builded
  6.  
  7. while true do
  8.  
  9. -- with param1, you can check if the message is anything you like.
  10. -- with param2, you can check if the player's name is your name
  11. local event, param1, param2 = os.pullEvent("chatEvent") -- the chunk of the chat box needs to be loaded
  12.     if(param2 == "Test") then -- param2 is the message and param1 is the player's name
  13. --        if(open == false) then
  14.             -- send a message and activate the signal, if the door is closed
  15.         redstone.setAnalogOutput("left", 15)
  16.         os.sleep( 10 )
  17.         redstone.setAnalogOutput("left", 0)
  18. --        else
  19. --        end
  20.     end
  21.    
  22. end
Add Comment
Please, Sign In to add comment