Advertisement
nate90909

Untitled

Apr 24th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Locals
  2.  
  3. local powersys
  4. local shield
  5.  
  6. -- orange powers shield
  7. -- white powers power
  8. -- green activates shield
  9. -- yellow acivates power
  10.  
  11.  
  12.  
  13.  
  14. monitor = peripheral.wrap("monitor_1")
  15.  
  16. monitor.setTextScale(0.5)
  17. monitor.setBackgroundColor(colors.black)
  18.  
  19. while true do
  20.  
  21. monitor.clear()
  22. monitor.setCursorPos(1,1)
  23. monitor.setTextColor(colors.white)
  24. monitor.write('Shield System')
  25.  
  26. if redstone.testBundledInput("back", colors.yellow) then
  27. monitor.setTextColor(colors.green)
  28. monitor.setCursorPos(1,3)
  29. monitor.write('Shield Power')
  30. monitor.setCursorPos(1,4)
  31. monitor.write('Active')
  32. redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),colors.white))
  33. else
  34. monitor.setTextColor(colors.red)
  35. monitor.setCursorPos(1,3)
  36. monitor.write('Shield Power')
  37. monitor.setCursorPos(1,4)
  38. monitor.write('Active')
  39. redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.white))
  40. end
  41.  
  42. if redstone.testBundledInput("back", colors.green) then
  43. monitor.setTextColor(colors.green)
  44. monitor.setCursorPos(1,6)
  45. monitor.write('Projector')
  46. monitor.setCursorPos(1,7)
  47. monitor.write('Active')
  48. redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),colors.orange))
  49. else
  50. monitor.setTextColor(colors.red)
  51. monitor.setCursorPos(1,6)
  52. monitor.write('Projector')
  53. monitor.setCursorPos(1,7)
  54. monitor.write('Inactive')
  55. redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.orange))
  56. end
  57. sleep(1)
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement