MagmaLP

Only on this Server

May 31st, 2024 (edited)
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.46 KB | None | 0 0
  1. mon = peripheral.wrap("top")
  2. k = 5
  3. mon.setTextScale(1)
  4. mon.setBackgroundColor(32768)
  5. mon.setCursorPos(1,1)
  6. mon.clear()
  7.  
  8. function calc_color(color)
  9.     return math.pow(2, color - 1)
  10. end
  11.  
  12. function msg(gap, line, color, groundb, text)
  13.     mon.setBackgroundColor(calc_color(groundb))
  14.     mon.setCursorPos(gap,line)
  15.     mon.setTextColor(calc_color(color))
  16.     text = mon.write(text)
  17. end
  18.  
  19. function Clear()
  20.     mon.setBackgroundColor(32768)
  21.     for i = 1,16 do
  22.         msg(01,i,16,16,"                                                             ")
  23.     end
  24. end
  25.  
  26. function LangSelect()
  27.     msg(01,17,16,k,"                   ") msg(48,17,16,k,"       ") msg(56,17,16,k,"       ")
  28.     msg(01,18,16,k,"  change language  ") msg(48,18,16,k,"  <--  ") msg(56,18,16,k,"  -->  ")
  29.     msg(01,19,16,k,"                   ") msg(48,19,16,k,"       ") msg(56,19,16,k,"       ")
  30. end
  31.  
  32. function Main1DE()
  33.     Clear()
  34.     msg(18,02,k,16,"NEU - Nur auf diesem Server")   msg(53,01,09,16,"Seite 1/2")
  35.     msg(02,04,k,16,"Erfolge:  (/ach)")
  36.     msg(02,05,09,16,"Erledige Aufgaben und bekomme tolle Belohnungen,")            
  37.     msg(02,06,09,16,"wie Geld, XP, Coupones, seltene Spawner, spezielle")              
  38.     msg(02,07,09,16,"Rechte, Ränge und Erfolgspunkte.")                       
  39.     msg(02,09,k,16,"Perks:  (/perks)")             
  40.     msg(02,10,09,16,"Hier kannst du deine Erfolgspunkte gegen")            
  41.     msg(02,11,09,16,"Spezial-Rechte und Erweiterungen tauschen, wie")              
  42.     msg(02,12,09,16,"mehr Schaden, höhere Dropraten, Ultimative Spitzhacke.")
  43.     msg(02,14,k,16,"Tik Tak Toe:  (/ttt)")
  44.     msg(02,15,09,16,"Spiele mit anderen zusammen Tik Tak Toe.")
  45. end
  46.  
  47. function Main2DE()
  48.     Clear()
  49.     msg(18,02,k,16,"NEU - Nur auf diesem Server")   msg(53,01,09,16,"Seite 2/2")
  50.     msg(02,04,k,16,"Craftingrezepte:  (/recipes)")
  51.     msg(02,05,09,16,"Neue Crafting/Ofen Rezepte für Spezielle Items")         
  52.     msg(02,06,09,16," ")  
  53.     msg(02,07,k,16,"Wöchentliche Erfolge:  (/weekly)")
  54.     msg(02,08,09,16,"3 Erfolge für die du eine Woche Zeit hast, wenn das")        
  55.     msg(02,09,09,16,"Serverweite Ziel Erreicht wurde gibt es extra Belohnungen.")          
  56.     msg(02,10,09,16," ")
  57.     msg(02,11,k,16,"Super Mass Fabricator:  (SMF)")
  58.     msg(02,12,09,16,"Unter /smf wir der SMF genau erklärt.")        
  59.     msg(02,13,09,16," ")       
  60.     msg(02,14,k,16,"Gruppen erstellen:  (/group help)")
  61.     msg(02,15,09,16,"In einer Gruppe, bekommen alle Spieler die gleichen Erfolge.")
  62. end
  63.  
  64. function Main1EN()
  65.     Clear()
  66.     msg(18,02,k,16,"NEW - Only on this Server") msg(53,01,09,16," Page 1/2")
  67.     msg(02,04,k,16,"Neue Craftingrezepte:  (/recipes)")
  68.     msg(02,04,k,16,"Achievments:  (/ach)")
  69.     msg(02,05,09,16,"Complete tasks and get great rewards,")           
  70.     msg(02,06,09,16,"like money, XP, coupons, rare spawners, special")             
  71.     msg(02,07,09,16,"Rights, ranks and achievement points.")                       
  72.     msg(02,09,k,16,"Perks:  (/perks)")             
  73.     msg(02,10,09,16,"Here you can exchange your achievement points for")           
  74.     msg(02,11,09,16,"special permissions and extensions, such as")             
  75.     msg(02,12,09,16,"more damage, higher drop rates, Ultimate-Pickaxe.")
  76.     msg(02,14,k,16,"Tik Tak Toe:  (/ttt)")
  77.     msg(02,15,09,16,"Play Tic Tac Toe with others.")  
  78. end
  79.  
  80. function Main2EN()
  81.     Clear()
  82.     msg(18,02,k,16,"NEW - Only on this Server") msg(53,01,09,16," Page 2/2")
  83.     msg(02,04,k,16,"Craftingrecipes:  (/recipes)")
  84.     msg(02,05,09,16,"New crafting/oven recipes for special items")         
  85.     msg(02,06,09,16," ")  
  86.     msg(02,07,k,16,"Weekly Achievments:  (/weekly)")
  87.     msg(02,08,09,16,"3 achievements for which you have one week, if the")          
  88.     msg(02,09,09,16,"server-wide goal is reached there are extra rewards.")        
  89.     msg(02,10,09,16," ")
  90.     msg(02,11,k,16,"Super Mass Fabricator:  (SMF)")
  91.     msg(02,12,09,16,"The SMF is explained in detail under /smf.")        
  92.     msg(02,13,09,16," ")       
  93.     msg(02,14,k,16,"Gruppen erstellen:  (/group help)")
  94.     msg(02,15,09,16,"In a group, all players get the same achievements.")
  95. end
  96.  
  97. Language = 1    --Deutsch
  98. Language = 2    --English
  99. Page = 1
  100.  
  101. while true do
  102.     if Language == 2 then  
  103.         if Page == 1 then
  104.             Main1EN()
  105.             LangSelect()
  106.         elseif Page == 2 then
  107.             Main2EN()
  108.             LangSelect()
  109.         end
  110.     elseif Language == 1 then
  111.         if Page == 1 then
  112.             Main1DE()
  113.             LangSelect()
  114.         elseif Page == 2 then
  115.             Main2DE()
  116.             LangSelect()
  117.         end
  118.     end
  119.  
  120.     event, side, x, y = os.pullEvent("monitor_touch")
  121.     if x >= 1 and x <= 19 and y >= 17 and y <= 19 then
  122.         if Language == 2 then
  123.             Language = 1
  124.             if Page == 1 then
  125.                 Main1DE()
  126.             elseif Page == 2 then
  127.                 Main2DE()
  128.             end
  129.         elseif Language == 1 then
  130.             Language = 2
  131.             if Page == 1 then
  132.                 Main1EN()
  133.             elseif Page == 2 then
  134.                 Main2EN()
  135.             end
  136.         end
  137.     elseif x >= 48 and x <= 53 and y >= 17 and y <= 19 and Page == 2 then
  138.         Page = 1
  139.         if Language == 2 then
  140.             Main1EN()
  141.         elseif Language == 1 then
  142.             Main1DE()
  143.         end
  144.     elseif x >= 56 and x <= 61 and y >= 17 and y <= 19 and Page == 1 then
  145.         Page = 2
  146.         if Language == 2 then
  147.             Main2EN()
  148.         elseif Language == 1 then
  149.             Main2DE()
  150.         end
  151.     end
  152.     sleep(0.5)
  153. end
  154.  
  155.                
Advertisement
Add Comment
Please, Sign In to add comment