Advertisement
ecco7777

chat control

Mar 13th, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. c = peripheral.wrap("top")
  2. redstone.setOutput("top", true)
  3. redstone.setOutput("left", true)
  4. redstone.setOutput("right", true)
  5. while true do
  6.  
  7. e,player,message = os.pullEvent("chat")
  8.   print ( player .. ":" .. message )
  9. x = player .. ":" .. message
  10.  
  11. if player == "Mr_XXXL" then
  12.  if message == "peter spawner 1 aus" then
  13.   redstone.setOutput("top", true)
  14.  end
  15.  if message == "peter spawner 1 an" then
  16.   redstone.setOutput("top", false)
  17.  end
  18.  
  19.  if message == "peter spawner 2 aus" then
  20.   redstone.setOutput("left", true)
  21.  end
  22.  if message == "peter spawner 2 an" then
  23.   redstone.setOutput("left", false)
  24.  end
  25.  
  26.  if message == "peter spawner 3 aus" then
  27.   redstone.setOutput("right", true)
  28.  end
  29.  if message == "peter spawner 3 an" then
  30.   redstone.setOutput("right", false)
  31.  end
  32. end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement