Advertisement
MagmaLP

Printer

Jul 12th, 2024 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. local printer = peripheral.wrap("top")
  2.  
  3. function calc_color(color)
  4.     return math.pow(2, color - 1)
  5. end
  6.  
  7. function msg(gap, line, text)
  8.     printer.setCursorPos(gap,line)
  9.     text = printer.write(text)
  10. end
  11.  
  12. if printer.newPage() then           --")
  13.     msg(1,01,"MagmaLP:                ")
  14.     msg(1,02,"~~~~~~~~                ")
  15.     msg(1,03,"")
  16.     msg(1,04,"1x")
  17.     msg(1,05,"MV Solar Panel.....1000$")
  18.     msg(1,06,"1x")
  19.     msg(1,07,"LV Solar Panel......150$")
  20.     msg(1,08,"2x")
  21.     msg(1,09,"ME Controller.......500$")
  22.     msg(1,10,"1x")
  23.     msg(1,11,"LV Solar Panel......150$")
  24.     msg(1,12,"2x")
  25.     msg(1,13,"ME Controller.......500$")
  26.     msg(1,14,"1x")
  27.     msg(1,15,"LV Solar Panel......150$")
  28.     msg(1,16,"2x")
  29.     msg(1,17,"ME Controller.......500$")
  30.     msg(1,18,"1x")
  31.     msg(1,19,"LV Solar Panel......150$")    
  32.     msg(1,20,"")
  33.     msg(1,21,"21:52 Uhr     12.07.2024")
  34.        
  35.     printer.setPageTitle("Bill")
  36.     printer.endPage()
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement