Advertisement
Wired2coffee

Wireless Redstone Broadcaster

Mar 25th, 2012
1,859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. local tArgs = { ... }
  2. if #tArgs == 0 then
  3. print( "Usage: WRB <frequency>" )
  4. return
  5. end
  6. local input = shell.resolve( tArgs[1] )
  7. local lol = {"front","back","top","bottom","left","right"}
  8. for i = 1,6 do
  9. rednet.open(lol[i])
  10. end
  11. while true do
  12. event, p1 = os.pullEvent()
  13. if event == "redstone" then
  14. if rs.getInput("right") or rs.getInput("left") or rs.getInput("top") or rs.getInput("bottom") or rs.getInput("back") or rs.getInput("front") == true then
  15. rednet.broadcast("WirelessRS"..tostring(input))
  16. end
  17. if rs.getInput("front") ~= true then if rs.getInput("back") ~= true then if rs.getInput("right") ~= true then if rs.getInput("left") ~= true then if rs.getInput("top") ~= true then if rs.getInput("bottom") ~= true then
  18. rednet.broadcast("WirelessRS0")
  19. rednet.broadcast("WirelessRS"..input)
  20. end end end end end end
  21. end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement