Margresse404

coloursTryout

Jun 15th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1.  
  2. local monitors
  3. monitors = peripheral.wrap("right")
  4.  
  5. function newLine()
  6. local x
  7. local y
  8. x, y = monitors.getCursorPos()
  9. y = y + 1
  10. monitors.setCursorPos(1,y)
  11. end
  12.  
  13. function resetColors()
  14. monitors.setTextColor(colors.white)
  15. monitors.setBackgroundColor(colors.black)
  16. end
  17.  
  18. function writeToScreen(text)
  19. monitors.clear()
  20. monitors.setCursorPos(1,1)
  21. monitors.setBackgroundColor(colors.red)
  22. monitors.write("********************************")
  23. newLine()
  24. monitors.write(" AE2 Monitoring program ")
  25. newLine()
  26. monitors.write("********************************")
  27. newLine()
  28. monitors.setBackgroundColor(colors.black)
  29. monitors.setTextColor(colors.magenta)
  30. monitors.write("Written by Merlione404")
  31. resetColors()
  32. newLine()
  33. newLine()
  34. monitors.write("Mining coal at: 67 per minute")
  35. newLine()
  36. monitors.write("Average of the last 10 minutes: plip per minute")
  37. newLine()
  38. monitors.write(text)
  39. end
  40.  
  41.  
  42. writeToScreen("Hallo")
Advertisement
Add Comment
Please, Sign In to add comment