Ferruccioboss

Minecraft>BaseButton

Jun 1st, 2015
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. rednet.open("bottom")
  2. while true do
  3.         event, id, text = os.pullEvent()
  4.         if event == "rednet_message" and id == 24 then
  5.             if text == "blue-on" then
  6.             redstone.setOutput("left", true)
  7.         elseif text == "blue-off" then
  8.             redstone.setOutput("left", false)
  9.         elseif text == "orange-off" then
  10.             redstone.setOutput("back", false)
  11.         elseif text == "orange-on" then
  12.             redstone.setOutput("back", true)
  13.         end
  14.         elseif event == "redstone" then
  15.         if redstone.getInput("top") then
  16.             rednet.send(24, "button-blue")
  17.         elseif redstone.getInput("right") then
  18.             rednet.send(24, "button-orange")
  19.         end
  20.     end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment