MagmaLP

SMF-PC-Kategory-DE

Aug 25th, 2024 (edited)
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function calc_color(color)
  2.     return math.pow(2, color - 1)
  3. end
  4.  
  5. function msg(gap, line, color, groundb, text)
  6.     term.setBackgroundColor(calc_color(groundb))
  7.     term.setCursorPos(gap,line)
  8.     term.setTextColor(calc_color(color))
  9.     text = term.write(text)
  10. end
  11.  
  12. term.setBackgroundColor(32768)
  13. term.clear()
  14. while true do
  15.     msg(51,01,01,16,"x")
  16.     msg(15,02,09,16,"Bitte Kategorie wählen")
  17.     msg(15,03,09,16,"~~~~~~~~~~~~~~~~~~~~~~")
  18.  
  19.     msg(03,04,01,15,"                      ") msg(28,04,01,15,"                      ")
  20.     msg(03,05,01,15,"  Item-Werte Rechner  ") msg(28,05,01,15,"  SMF-Output Rechner  ")
  21.     msg(03,06,01,15,"                      ") msg(28,06,01,15,"                      ")
  22.  
  23.     msg(03,08,01,15,"                      ") msg(28,08,01,15,"                      ")
  24.     msg(03,09,01,15,"   HV/AE/UU - Tafel   ") msg(28,09,01,15,"   SMF-Dust Rechner   ")
  25.     msg(03,10,01,15,"                      ") msg(28,10,01,15,"                      ")
  26.  
  27.     msg(03,12,01,15,"                      ") msg(28,12,01,15,"                      ")
  28.     msg(03,13,01,15,"          3.          ") msg(28,13,01,15," SMF-Übertakt Rechner ")
  29.     msg(03,14,01,15,"                      ") msg(28,14,01,15,"                      ")
  30.  
  31.     msg(03,16,01,15,"                      ") msg(28,16,01,15,"                      ")
  32.     msg(03,17,01,15,"          4.          ") msg(28,17,01,15,"          8.          ")
  33.     msg(03,18,01,15,"                      ") msg(28,18,01,15,"                      ")
  34.  
  35.     local event, button, X, Y = os.pullEvent("mouse_click")
  36.     if X >= 03 and X <= 24 and Y >= 04 and Y <= 06 then         --Item Wert-Rechner
  37.         shell.run("Itemvalue_DE")
  38.     elseif X >= 03 and X <= 24 and Y >= 08 and Y <= 10 then     --HV-AE-UU-Tafel
  39.         shell.run("HV-AE-UU-DE")
  40.     elseif X >= 03 and X <= 24 and Y >= 12 and Y <= 14 then     --3
  41.         shell.run(" ")
  42.     elseif X >= 03 and X <= 24 and Y >= 16 and Y <= 18 then     --4
  43.         shell.run(" ")
  44.     elseif X >= 28 and X <= 49 and Y >= 04 and Y <= 06 then     --SMF-Output Rechner
  45.         shell.run("SMF-Itemoutputs_DE")
  46.     elseif X >= 28 and X <= 49 and Y >= 08 and Y <= 10 then     --SMF-Dust Rechner
  47.         shell.run("SMF-Dustcalculator_DE")
  48.     elseif X >= 28 and X <= 49 and Y >= 12 and Y <= 14 then     --SMF-Overclock Rechner
  49.         shell.run("SMF-Overclock_DE")
  50.     elseif X >= 28 and X <= 49 and Y >= 14 and Y <= 16 then     --8
  51.         shell.run(" ")
  52.     elseif X == 51 and Y == 01 then                             --x
  53.         os.reboot()
  54.     end
  55.     sleep(0.5)
  56. end
Advertisement
Add Comment
Please, Sign In to add comment