Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monSide = "back"
- bSide = "left"
- Etage1 = {2,2,colors.white,"Erdgeschoss"}
- Etage2 = {2,4,colors.magenta,"1.UG"}
- Etage3 = {2,6,colors.yellow,"Technik"}
- Etage4 = {2,8,colors.pink,"Crafting"}
- Etage5 = {23,2,colors.lightGray,"Thaumcraft"}
- Etagen = {Etage1,Etage2,Etage3,Etage4,Etage5}
- mon = peripheral.wrap(monSide)
- mon.setTextScale(.5)
- xMax,yMax = mon.getSize()
- function Background()
- mon.setBackgroundColor(colors.black)
- for xPos = 1,xMax do
- for yPos = 1,yMax do
- mon.setCursorPos(xPos,yPos)
- mon.write(" ")
- end
- end
- end
- function overlay()
- for E = 1,#Etagen do
- mon.setBackgroundColor(colors.gray)
- mon.setCursorPos(Etagen[E][1],Etagen[E][2])
- mon.write("Etage"..E)
- mon.setBackgroundColor(colors.black)
- mon.write(" "..Etagen[E][4])
- end
- end
- function check()
- event,side,xPos,yPos = os.pullEvent("monitor_touch")
- for E = 1,#Etagen do
- if Etagen[E][1] <= xPos and Etagen[E][1]+6 >= xPos
- and Etagen[E][2] <= yPos and Etagen[E][2]+1 >= yPos then
- rs.setBundledOutput(bSide,Etagen[E][3])
- mon.setCursorPos(1,yMax)
- mon.write("Ziel: Etage"..E)
- sleep(0.5)
- rs.setBundledOutput(bSide,0)
- sleep(2)
- mon.setCursorPos(1,yMax)
- mon.write(" ")
- end
- end
- end
- while true do
- Background()
- overlay()
- check()
- end
Advertisement
Add Comment
Please, Sign In to add comment