Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. steve = peripheral.wrap("BigReactors-Reactor_0")
  2. display = peripheral.wrap("right")
  3. display.setBackgroundColor(colors.blue)
  4.  
  5. while true do
  6. display.clear()
  7. power = steve.getEnergyStored()
  8. fuel = steve.getFuelAmount()
  9. max = steve.getFuelAmountMax()
  10.  
  11. display.setCursorPos(1,1)
  12. display.write("Power: ")
  13. display.setCursorPos(8,1)
  14. display.write(power)
  15. display.setCursorPos(1,4)
  16. display.write("Fuel % "
  17. display.setCursorPos(8,4)
  18. display.write(math.floor((fuel/max)*100))
  19.  
  20. if power >= 9000000 then
  21. steve.setActive(false)
  22. end
  23.  
  24. if power <= 2500000 then
  25. steve.setActive(true)
  26. end
  27.  
  28. sleep(10)
  29.  
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement