Advertisement
Muzze77

ManarolaUserScreen

Mar 25th, 2017
634
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.55 KB | None | 0 0
  1. shell.run("clear")
  2.  
  3. mon = peripheral.wrap("back")
  4.  
  5. white = colors.white
  6. blue = colors.blue
  7. sbcol = white
  8. stcol = blue
  9. welcomeText = "Willkommen in BLUECITY"
  10. gx, gy = mon.getSize()
  11.  
  12. function cbut(cx,cy,text,bcol,tcol)
  13. if bcol == nil then
  14. bcol = sbcol
  15. end
  16. if tcol == nil then
  17. tcol = stcol
  18. end
  19.  
  20. mon.setCursorPos(cx,cy)
  21. mon.setBackgroundColor(bcol)
  22. mon.setTextColor(tcol)
  23. mon.write(text)
  24. mon.setBackgroundColor(sbcol)
  25. mon.setTextColor(stcol)
  26.  
  27. end
  28.  
  29. function cRule(rule)
  30. cbut(x,y,rule)
  31. y = y + 1
  32. end
  33. bewohner = {"Muzze77","Axeeaa","HodorxD","MG_Noah","Dromzy","Rohholz","NightBlue2g"}
  34. mon.setBackgroundColor(white)
  35. mon.setTextColor(blue)
  36. while true do
  37. x = 2
  38. y = 2
  39.  
  40. shell.run("clear")
  41. print("X zum Ändern")
  42. mon.clear()
  43. cbut((gx/2) - (string.len(welcomeText) / 2),1,welcomeText)
  44.  
  45. cRule("Um User dieser Stadt zu werden /mail send Muzze77 Beitritt")
  46. cRule("Es gibt in dieser Stadt kein Stadtstrom")
  47. cRule("Es gibt eine Rubberfarm sowie eine Baumfarm")
  48. cRule("Jedes Grundstück wird auf Fehler / Verbesserungen gepfrüft")
  49. y = y + 1
  50. cRule("Geplante Projekte:")
  51. y = y + 1
  52. cRule("Weitere Grundstücke anlegen,Rubberfarm")
  53. y = y + 1
  54. cRule("Derzeitige Bewohner:")
  55.  
  56. y = 12
  57. x = 2
  58. for i = 1, table.maxn(bewohner) do
  59. if bewohner[i] == "Muzze77" then
  60. cbut(x,y,bewohner[i],colors.white,colors.red)
  61. else
  62. cbut(x,y,bewohner[i],colors.white,colors.brown)
  63. end
  64. if x >= 60 then
  65. x = 2
  66. y = y + 1
  67. else
  68. x = x + 12
  69. end
  70.  
  71.  
  72.  
  73. end
  74. evt, key = os.pullEvent("char")
  75. if key == "x" then
  76.     shell.run("edit 1")
  77. else
  78.     print("Nicht Korrekt")
  79. end
  80.  
  81. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement