Advertisement
rithrin

send

Aug 7th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 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. for i = 1,6 do
  8. rednet.open("back")
  9. end
  10. while true do
  11. event, p1 = os.pullEvent()
  12. if event == "redstone" then
  13. 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
  14. rednet.broadcast("WirelessRS"..tostring(input))
  15. end
  16. 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
  17. rednet.broadcast("WirelessRS0")
  18. rednet.broadcast("WirelessRS"..input)
  19. end end end end end end
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement