Advertisement
MagmaLP

Starter-Informations

May 30th, 2024
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.06 KB | None | 0 0
  1. mon = peripheral.wrap("top")
  2. mon.setTextScale(1)
  3. mon.setBackgroundColor(32768)
  4. mon.setCursorPos(1,1)
  5. mon.clear()
  6.  
  7. function calc_color(color)
  8.     return math.pow(2, color - 1)
  9. end
  10.  
  11. function msg(gap, line, color, groundb, text)
  12.     mon.setBackgroundColor(calc_color(groundb))
  13.     mon.setCursorPos(gap,line)
  14.     mon.setTextColor(calc_color(color))
  15.     text = mon.write(text)
  16. end
  17.  
  18. function Clear()
  19.     mon.setBackgroundColor(32768)
  20.     for i = 1,16 do
  21.         msg(01,i,16,16,"                                                             ")
  22.     end
  23. end
  24.  
  25. function LangSelectDE()
  26.     msg(01,17,16,04,"           ") msg(48,17,16,04,"       ") msg(56,17,16,04,"       ")
  27.     msg(01,18,16,04,"  Deutsch  ") msg(48,18,16,04,"  <--  ") msg(56,18,16,04,"  -->  ")
  28.     msg(01,19,16,04,"           ") msg(48,19,16,04,"       ") msg(56,19,16,04,"       ")
  29. end
  30.  
  31. function LangSelectEN()
  32.     msg(01,17,16,04,"           ") msg(48,17,16,04,"       ") msg(56,17,16,04,"       ")
  33.     msg(01,18,16,04,"  English  ") msg(48,18,16,04,"  <--  ") msg(56,18,16,04,"  -->  ")
  34.     msg(01,19,16,04,"           ") msg(48,19,16,04,"       ") msg(56,19,16,04,"       ")
  35. end
  36.  
  37. function Main1DE()
  38.     Clear()
  39.     msg(24,02,04,16," Wichtige Befehle")    msg(53,01,09,16,"Seite 1/2")
  40.     msg(02,04,04,16," /regeln")             msg(15,04,09,16," - Server-Regeln bitte lesen!")
  41.     msg(02,05,04,16," /banneditems")        msg(15,05,09,16," - Liste aller gebannten Items")
  42.     msg(02,06,04,16," /recipes")            msg(15,06,09,16," - Server eigene Crafting-Rezepte")
  43.     msg(02,08,04,16," /counter")            msg(15,08,09,16," - Liste begrenzt setzbarer Blöcke ")
  44.     msg(02,09,04,16," /shop")               msg(15,09,09,16," - Adminshop für Rechte/Ränge/Spawner")
  45.     msg(02,10,04,16," /perks")              msg(15,10,09,16," - Spezielle Zusatzrechte freischalten")
  46.     msg(02,12,04,16," /team")               msg(15,12,09,16," - Welche Team-Mitglieder sind online")
  47.     msg(02,13,04,16," /kits")               msg(15,13,09,16," - Liste kostenloser Kits")
  48.     msg(02,14,04,16," /warps")              msg(15,14,09,16," - Warppunkte und Weltenliste")
  49. end
  50.  
  51. function Main2DE()
  52.     Clear()
  53.     msg(24,02,04,16," Wichtige Befehle")    msg(53,01,09,16,"Seite 2/2")
  54.     msg(02,04,04,16," /claims")             msg(15,04,09,16," - Liste deiner Grundstücke (Teleport möglich)")
  55.     msg(02,05,04,16," /tpa [name]")         msg(15,05,09,16," - Teleportier-Anfrage")
  56.     msg(02,06,04,16," /back")               msg(15,06,09,16," - Zum letzten Punkt zurück Teleportieren")
  57.     msg(02,08,04,16," /weekly")             msg(15,08,09,16," - Wöchentliche Aufgaben mit Belohnungen")
  58.     msg(02,09,04,16," /lvt start")          msg(15,09,09,16," - Starte einen Tag-Vote")
  59.     msg(02,10,04,16," /performance")        msg(15,10,09,16," - Wer verursacht die meiste Serverlast")
  60.     msg(02,12,04,16," /stammi")             msg(15,12,09,16," - Erklärung des Stammi(+) Rangs")
  61.     msg(02,13,04,16," ")            msg(15,13,09,16," - ")
  62.     msg(02,14,04,16," ")            msg(15,14,09,16," - ")
  63. end
  64.  
  65. function Main1EN()
  66.     Clear()
  67.     msg(24,02,04,16," Important commands")  msg(53,01,09,16," Page 1/2")
  68.     msg(02,04,04,16," /rules")              msg(15,04,09,16," - Server-Rules please read!")
  69.     msg(02,05,04,16," /banneditems")        msg(15,05,09,16," - List of all banned items")
  70.     msg(02,06,04,16," /recipes")            msg(15,06,09,16," - Server own crafting recipes")
  71.     msg(02,08,04,16," /counter")            msg(15,08,09,16," - List of limited placeable blocks")
  72.     msg(02,09,04,16," /shop")               msg(15,09,09,16," - Adminshop for Perms/Ranks/Spawners")
  73.     msg(02,10,04,16," /perks")              msg(15,10,09,16," - Unlock special additional permissions")
  74.     msg(02,12,04,16," /team")               msg(15,12,09,16," - Which team members are online")
  75.     msg(02,13,04,16," /kits")               msg(15,13,09,16," - List of free kits")
  76.     msg(02,14,04,16," /warps")              msg(15,14,09,16," - Warp points and world list")
  77. end
  78.  
  79. function Main2EN()
  80.     Clear()
  81.     msg(24,02,04,16," Important commands")  msg(53,01,09,16," Page 2/2")
  82.     msg(02,04,04,16," /claims")             msg(15,04,09,16," - List of your properties (teleport possible)")
  83.     msg(02,05,04,16," /tpa [name]")         msg(15,05,09,16," - Teleport request")
  84.     msg(02,06,04,16," /back")               msg(15,06,09,16," - Teleport back to last point")
  85.     msg(02,08,04,16," /weekly")             msg(15,08,09,16," - Weekly tasks with rewards")
  86.     msg(02,09,04,16," /lvt start")          msg(15,09,09,16," - Start a Day-Vote")
  87.     msg(02,10,04,16," /performance")        msg(15,10,09,16," - Who causes the most server load")
  88.     msg(02,12,04,16," /stammi")             msg(15,12,09,16," - Explanation of Stammi(+) Rank")
  89.     msg(02,13,04,16," ")            msg(15,13,09,16," - ")
  90.     msg(02,14,04,16," ")            msg(15,14,09,16," - ")
  91. end
  92.  
  93. Language = 1    --Deutsch
  94. Language = 2    --English
  95. Page = 1
  96.  
  97. while true do
  98.     if Language == 2 then  
  99.         if Page == 1 then
  100.             Main1EN()
  101.             LangSelectDE()
  102.         elseif Page == 2 then
  103.             Main2EN()
  104.             LangSelectDE()
  105.         end
  106.     elseif Language == 1 then
  107.         if Page == 1 then
  108.             Main1DE()
  109.             LangSelectEN()
  110.         elseif Page == 2 then
  111.             Main2DE()
  112.             LangSelectEN()
  113.         end
  114.     end
  115.  
  116.     event, side, x, y = os.pullEvent("monitor_touch")
  117.     if x >= 1 and x <= 11 and y >= 17 and y <= 19 then
  118.         if Language == 2 then
  119.             Language = 1
  120.             if Page == 1 then
  121.                 Main1DE()
  122.             elseif Page == 2 then
  123.                 Main2DE()
  124.             end
  125.         elseif Language == 1 then
  126.             Language = 2
  127.             if Page == 1 then
  128.                 Main1EN()
  129.             elseif Page == 2 then
  130.                 Main2EN()
  131.             end
  132.         end
  133.     elseif x >= 48 and x <= 53 and y >= 17 and y <= 19 and Page == 2 then
  134.         Page = 1
  135.         if Language == 2 then
  136.             Main1EN()
  137.         elseif Language == 1 then
  138.             Main1DE()
  139.         end
  140.     elseif x >= 56 and x <= 61 and y >= 17 and y <= 19 and Page == 1 then
  141.         Page = 2
  142.         if Language == 2 then
  143.             Main2EN()
  144.         elseif Language == 1 then
  145.             Main2DE()
  146.         end
  147.     end
  148.     sleep(0.5)
  149. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement