thatparadox

FFcontrol

Oct 28th, 2015
160
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for k,v in pairs(rs.getSides()) do
  2.   if peripheral.getType(v) == "modem" then
  3.    rednet.open(v)
  4.   end
  5. end
  6.  
  7.  
  8. if fs.exists("redState") then
  9.   file = fs.open("redState", "r")
  10.   redState = file.readAll()
  11.   file.close()
  12.   setRS = redState == "true"
  13.   rs.setOutput("bottom", setRS)
  14. else
  15.   redstate = false
  16. end
  17. while true do
  18.   ID, message = rednet.receive(33)
  19.   if message == "BuildWither" then
  20.     rs.setOutput("bottom", false)
  21.     redState = false
  22.   elseif message == "WitherBuilt" then
  23.     rs.setOutput("bottom", true)
  24.     redState = true
  25.   end
  26.   file = fs.open("redState", "w")
  27.   file.write(redState)
  28.   file.close()
  29. end
RAW Paste Data