xavierlebel

power

Mar 2nd, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mon = peripheral.wrap("top")
  2. cel = peripheral.wrap("left")
  3.  
  4. while true do
  5. mon.setTextScale(2)
  6. energy = cel.getEnergyStored("left")
  7.   if cel.getEnergyStored("left") < 10000000 then
  8.     rs.setOutput("back", true)
  9.     mon.setTextColor(colors.red)
  10.     mon.write("LOW ENERGY")
  11.     mon.setCursorPos(1,2)
  12.     mon.write("RF:" ..energy)
  13.     mon.setCursorPos(1,4)
  14.     mon.setTextColor(colors.yellow)
  15.     mon.write("SPAWNING WITHER")
  16.     sleep(5)
  17.   else
  18.     rs.setOutput("back", false)
  19.     mon.setTextColor(colors.green)
  20.     mon.write("ENERGY OK")
  21.     mon.setCursorPos(1,2)
  22.     mon.write("RF:" ..energy)
  23.     sleep(5)
  24.   end
  25. mon.clear()
  26. mon.setCursorPos(1,1)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment