Advertisement
MagmaLP

Lycodon Regel Änderung

Jan 28th, 2023 (edited)
884
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.83 KB | None | 0 0
  1. side = ("top") --Monitor Seite für Buttonabfrage
  2. mon = peripheral.wrap("top")
  3. mon.setBackgroundColor(colors.black)
  4. mon.setTextScale(1.5)
  5. mon.setCursorPos(1,1)
  6. mon.clear()
  7.  
  8. function msg(gap, line, text)
  9.     mon.setCursorPos(gap,line)
  10.     text = mon.write(text)
  11. end
  12.  
  13. function deutsch()
  14.     a = 1
  15.     mon.setBackgroundColor(colors.black)
  16.     mon.setCursorPos(1,1)
  17.     mon.clear()
  18.     sleep(0.5)
  19.     mon.setTextColor(colors.yellow)
  20.     msg(01,1,"Regeländerung ab dem 01.02.2023  ")
  21.     msg(01,2,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ")
  22.  
  23.     mon.setTextColor(colors.lightGray)
  24.     msg(01,3,"Die Abbaufläche einer TBM, egal  ")
  25.     msg(01,4,"in welcher Form, beträgt nun     ")
  26.     msg(01,5,"30 Blöcke.                       ")
  27.     msg(01,6,"Es ist nur eine TBM pro Spieler  ")
  28.     msg(01,7,"erlaubt.                         ")
  29.  
  30.     mon.setTextColor(colors.black)
  31.     mon.setBackgroundColor(colors.white)
  32.     msg(25,8," english ")
  33. end
  34.  
  35. function english()
  36.     a = 2
  37.     mon.setBackgroundColor(colors.black)
  38.     mon.setCursorPos(1,1)
  39.     mon.clear()
  40.     sleep(0.5)
  41.     mon.setTextColor(colors.yellow)
  42.     msg(01,1,"Rule change from 02/01/2023      ")
  43.     msg(01,2,"~~~~~~~~~~~~~~~~~~~~~~~~~~~      ")
  44.  
  45.     mon.setTextColor(colors.lightGray)
  46.     msg(01,3,"The excavation area of a TBM, no ")
  47.     msg(01,4,"matter what type of construction ")
  48.     msg(01,5,"is now 30 blocks.                ")
  49.     msg(01,6,"Only one TBM per player is       ")
  50.     msg(01,7,"allowed.                         ")
  51.  
  52.     mon.setTextColor(colors.black)
  53.     mon.setBackgroundColor(colors.white)
  54.     msg(25,8," deutsch ")
  55. end
  56.  
  57.  
  58.  
  59. --programm start
  60.  
  61. english()
  62.  
  63. while true do
  64.     local event, side, X, Y = os.pullEvent("monitor_touch")
  65.     if X >= 1 and Y >= 01 and side == side and a == 2 then
  66.         deutsch()
  67.     elseif X >= 1 and Y >= 01 and side == side and a == 1 then
  68.         english()
  69.     end
  70.     sleep(0.5)
  71. end
  72.  
  73.    
  74.  
  75.  
  76.  
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement