Guest User

cont

a guest
Mar 16th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. local cwire = {colors.white, colors.blue, colors.purple, colors.grey}
  2. local wires = {}
  3. local wiresout = 0
  4. rednet.open("left")
  5. while true do
  6.    local id, name, d = rednet.receive()
  7.    if id == 45 then
  8.       local id2, bool, d2 = rednet.receive()
  9.       wires[name] = bool
  10.       for i = 1,10 do
  11.          if wires[i] then
  12.             wiresout = wiresout + cwire[i]
  13.          end
  14.          if wires[i] == false then
  15.             wiresout = wiresout - cwire[i]
  16.          end
  17.       end
  18.       redstone.setBundledOutput("back", wiresout)
  19.    end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment