Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- mon = peripheral.wrap("back")
- mon.setTextScale(0.5)
- white = colors.white
- blue = colors.blue
- sbcol = white
- stcol = blue
- welcomeText = "Stadtkarte BLUECITY"
- gx, gy = mon.getSize()
- function cbut(cx,cy,text,bcol,tcol)
- if bcol == nil then
- bcol = sbcol
- end
- if tcol == nil then
- tcol = stcol
- end
- mon.setCursorPos(cx,cy)
- mon.setBackgroundColor(bcol)
- mon.setTextColor(tcol)
- mon.write(text)
- mon.setBackgroundColor(sbcol)
- mon.setTextColor(stcol)
- end
- mon.setBackgroundColor(white)
- mon.setTextColor(blue)
- while true do
- shell.run("clear")
- print("X zum Ändern")
- mon.clear()
- num = string.len(welcomeText) / 2
- cbut((gx/2) - num ,1,welcomeText)
- cbut(gx/2,gy/2,"S",colors.red,colors.black)
- cbut(gx/2,gy/2 + 1,"S",colors.red,colors.black)
- cbut(gx/2,gy/2 + 2,"S",colors.red,colors.black)
- cbut(gx/2,gy/2 - 1,"S",colors.red,colors.black)
- cbut(gx/2-1,gy/2,"S",colors.red,colors.black)
- cbut(gx/2-1,gy/2 + 1,"S",colors.red,colors.black)
- cbut(gx/2-1,gy/2 + 2,"S",colors.red,colors.black)
- cbut(gx/2-1,gy/2 - 1,"S",colors.red,colors.black)
- cbut(gx/2,gy/2 +3,"3",colors.orange,colors.black)
- cbut(gx/2,gy/2 +4,"3",colors.orange,colors.black)
- cbut(gx/2,gy/2 +5,"3",colors.orange,colors.black)
- cbut(gx/2+1,gy/2,"+",colors.lightGray,colors.black)
- cbut(gx/2+1,gy/2+1,"+",colors.lightGray,colors.black)
- cbut(gx/2+1,gy/2+2,"+",colors.lightGray,colors.black)
- cbut(gx/2+1,gy/2-1,"+",colors.lightGray,colors.black)
- cbut(gx/2+4,gy/2,"+",colors.lightGray,colors.black)
- cbut(gx/2+4,gy/2+1,"+",colors.lightGray,colors.black)
- cbut(gx/2+4,gy/2+2,"+",colors.lightGray,colors.black)
- cbut(gx/2+4,gy/2-1,"+",colors.lightGray,colors.black)
- cbut(gx/2+2,gy/2-1,"+",colors.lightGray,colors.black)
- cbut(gx/2+3,gy/2-1,"+",colors.lightGray,colors.black)
- cbut(gx/2+3,gy/2+2,"+",colors.lightGray,colors.black)
- cbut(gx/2+2,gy/2+2,"+",colors.lightGray,colors.black)
- cbut(gx/2+2,gy/2,"M", colors.blue,colors.black)
- cbut(gx/2+3,gy/2,"M", colors.blue,colors.black)
- cbut(gx/2+3,gy/2+1,"M",colors.blue,colors.black)
- cbut(gx/2+2,gy/2+1,"M",colors.blue,colors.black)
- cbut(gx/2+5,gy/2,"5",colors.orange,colors.black)
- cbut(gx/2+5,gy/2+1,"5",colors.orange,colors.black)
- cbut(gx/2+6,gy/2,"5",colors.orange,colors.black)
- cbut(gx/2+6,gy/2+1,"5",colors.orange,colors.black)
- cbut(gx/2+2,gy/2+3,"B",colors.green,colors.black)
- cbut(gx/2+3,gy/2+3,"A",colors.green,colors.black)
- cbut(gx/2+4,gy/2+3,"B",colors.cyan,colors.black)
- cbut(gx/2+6,gy/2+3,"7",colors.orange,colors.black)
- cbut(gx/2+2,gy/2+4,"+",colors.lightGray,colors.black)
- cbut(gx/2+5,gy/2+3,"+",colors.lightGray,colors.black)
- cbut(gx/2+5,gy/2+2,"+",colors.lightGray,colors.black)
- cbut(gx/2+5,gy/2+4,"+",colors.lightGray,colors.black)
- cbut(gx/2+5,gy/2+5,"+",colors.lightGray,colors.black)
- cbut(gx/2+3,gy/2+4,"+",colors.lightGray,colors.black)
- cbut(gx/2+3,gy/2+4,"+",colors.lightGray,colors.black)
- cbut(gx/2+1,gy/2+3,"+",colors.lightGray,colors.black)
- cbut(gx/2+1,gy/2+4,"+",colors.lightGray,colors.black)
- cbut(gx/2+4,gy/2+4,"+",colors.lightGray,colors.black)
- cbut(gx/2+1,gy/2+5,"+",colors.lightGray,colors.black)
- cbut(gx/2+2,gy/2+5,"2",colors.orange,colors.black)
- cbut(gx/2+3,gy/2+5,"2",colors.orange,colors.black)
- cbut(gx/2+4,gy/2+5,"+",colors.lightGray,colors.black)
- cbut(gx/2+5,gy/2+5," ",colors.blue,colors.black)
- cbut(gx/2+3,gy/2-2,"1",colors.orange,colors.black)
- cbut(gx/2+2,gy/2-2,"1",colors.orange,colors.black)
- cbut(gx/2+3,gy/2-3,"1",colors.orange,colors.black)
- cbut(gx/2+2,gy/2-3,"1",colors.orange,colors.black)
- cbut(gx/2+5,gy/2-2,"4",colors.orange,colors.black)
- cbut(gx/2+5,gy/2-3,"4",colors.orange,colors.black)
- cbut(gx/2+6,gy/2-2,"4",colors.orange,colors.black)
- cbut(gx/2+6,gy/2-3,"4",colors.orange,colors.black)
- cbut(gx/2+5,gy/2-1,"+",colors.lightGray,colors.black)
- cbut(gx/2+6,gy/2-1,"+",colors.lightGray,colors.black)
- cbut(gx/2+5,gy/2-4,"+",colors.lightGray,colors.black)
- cbut(gx/2+6,gy/2-4,"+",colors.lightGray,colors.black)
- cbut(gx/2+7,gy/2-1,"+",colors.lightGray,colors.black)
- cbut(gx/2+7,gy/2-2,"+",colors.lightGray,colors.black)
- cbut(gx/2+7,gy/2-3,"+",colors.lightGray,colors.black)
- cbut(gx/2+7,gy/2-4,"+",colors.lightGray,colors.black)
- cbut(gx/2-1,gy/2-2,"6",colors.orange,colors.black)
- cbut(gx/2,gy/2-2,"6",colors.orange,colors.black)
- cbut(gx/2-1,gy/2-3,"6",colors.orange,colors.black)
- cbut(gx/2,gy/2-3,"6",colors.orange,colors.black)
- cbut(gx/2-1,gy/2-4,"+",colors.lightGray,colors.black)
- cbut(gx/2,gy/2-4,"+",colors.lightGray,colors.black)
- cbut(gx/2+1,gy/2-2,"+",colors.lightGray,colors.black)
- cbut(gx/2+1,gy/2-3,"+",colors.lightGray,colors.black)
- cbut(gx/2+1,gy/2-4,"+",colors.lightGray,colors.black)
- cbut(gx/2+4,gy/2-2,"+",colors.lightGray,colors.black)
- cbut(gx/2+4,gy/2-3,"+",colors.lightGray,colors.black)
- cbut(gx/2+4,gy/2-4,"+",colors.lightGray,colors.black)
- cbut(gx/2+2,gy/2-4,"+",colors.lightGray,colors.black)
- cbut(gx/2+3,gy/2-4,"+",colors.lightGray,colors.black)
- cbut(2,2," ",colors.red,colors.black)
- cbut(4,2,"Spawn",colors.white,colors.blue)
- cbut(2,3,"+",colors.lightGray,colors.black)
- cbut(4,3,"Wege",colors.white,colors.blue)
- cbut(2,5,"1",colors.orange,colors.black)
- cbut(2,6,"2",colors.orange,colors.black)
- cbut(2,7,"3",colors.orange,colors.black)
- cbut(2,8,"4",colors.orange,colors.black)
- cbut(2,9,"5",colors.orange,colors.black)
- cbut(2,10,"6",colors.orange,colors.black)
- cbut(2,11,"6",colors.orange,colors.black)
- cbut(4,4,"Grundstücke",colors.white,colors.blue)
- cbut(4,5,"1: Axeeaa (2x2)",colors.white,colors.blue)
- cbut(4,6,"2: Frei (2x1)",colors.white,colors.blue)
- cbut(4,7,"3: Frei (4x1)",colors.white,colors.blue)
- cbut(4,8,"4: Rohholz (2x2)",colors.white,colors.blue)
- cbut(4,9,"5: NightBlue2g (2x2)",colors.white,colors.blue)
- cbut(4,10,"6: Frei (2x2)",colors.white,colors.blue)
- cbut(4,11,"7: MG_Noah (1x1)",colors.white,colors.blue)
- cbut(2,15," ",colors.green,colors.black)
- cbut(4,15,"Eiserne Bank",colors.white,colors.blue)
- cbut(2,16,"M",colors.blue,colors.black)
- cbut(4,16,"Muzze77 Fabrik",colors.white,colors.blue)
- cbut(2,17,"B",colors.cyan,colors.black)
- cbut(4,17,"Baumfarm",colors.white,colors.blue)
- evt, key = os.pullEvent("char")
- if key == "x" then
- shell.run("edit 1")
- else
- print("Nicht Korrekt")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement