legg0028

frostmaw_spawn_send

Jul 26th, 2021 (edited)
389
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local modem = peripheral.wrap("bottom")
  2. local tank = peripheral.wrap("left")
  3. modem.open(00001)
  4.  
  5. redstone.setOutput("left", false)
  6. redstone.setOutput("right", true)
  7.  
  8. while true do
  9.     term.clear()
  10.     term.setCursorPos(1,1)
  11.     print("Frostmaw liquification controller")
  12.  
  13.     if tank.tanks()[1] then
  14.         redstone.setOutput("left", true)
  15.         redstone.setOutput("right", false)
  16.         term.setCursorPos(1,3)
  17.         print("Current state: OFF, tank is full.")
  18.         sleep(2)
  19.         modem.transmit(00001,00001,"0")
  20.     else
  21.         modem.transmit(00001,00001,"1")
  22.         redstone.setOutput("left", false)
  23.         redstone.setOutput("right", true)
  24.         term.setCursorPos(1,3)
  25.         print("Current state: ON.")
  26.     end
  27.     sleep(1)
  28. end
RAW Paste Data