s3ptum

Atomic science control

Jan 22nd, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Reactor is always on
  2. --hot = on
  3. --rs.setOutput("back", true) is hot/on
  4.  
  5. mon = peripheral.wrap("top")
  6.  
  7. h1500()
  8.   if rs.getInput("left", true) then --if therm one is hot
  9.     sleep(1)
  10.     rs.setOutput("back", true)--make sure reactor is on
  11.     sleep(10)--wait
  12.     rs.setOutput("back", false) else--turn off reactor
  13.     rs.setOutput("back", true)--if therm one is not hot turn on
  14.   end
  15. end
  16.  
  17.  
  18.  h1800()
  19.   if rs.getInput("right", true) then --if therm 2 is hot
  20.     sleep(1)
  21.     rs.setOutput("back", true)--make sure reactor is on
  22.     sleep(10)--wait
  23.     rs.setOutput("back", false) else--turn off reactor
  24.     rs.setOutput("back", true)--if therm 2 is not hot and turn on
  25.   end
  26. end
  27.  
  28. mainOperator() --if reactor is on then run h1500/h1800 if reactor is off sleep
  29.   if re.getInput("back", true) then
  30.    while true do
  31.    h1500()
  32.    h1800() else
  33.    sleep(1)
  34.    end
  35. end
  36.  
  37.    
  38.    while true do
  39.    mainOperator()
  40. end
Advertisement
Add Comment
Please, Sign In to add comment