Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- >---------------------->
- -- > Bahnhof-System >
- -- >---------------------->
- local mon = peripheral.wrap("right")
- function Stadtion()
- term.setCursorPos(16,1)
- term.setTextColor(colors.lime)
- print("Bahnhof Stadion")
- term.setCursorPos(2,4)
- term.setTextColor(colors.brown)
- print("Colibrie Haus")
- term.setCursorPos(30,24)
- term.setTextColor(colors.lightGray)
- print("Zurucksetzen")
- term.setTextColor(colors.orange)
- term.setCursorPos(2,6)
- print("Haupthaus")
- term.setTextColor(colors.lightBlue)
- term.setCursorPos(2,8)
- print("Magic Haus")
- term.setCursorPos(2,24)
- term.setTextColor(colors.gray)
- print("Hauptmenu")
- end
- function turnOff(side, color)
- rs.setBundledOutput(side, colors.subtract(rs.getBundledOutput(side), color))
- end
- function turnOn(side, color)
- rs.setBundledOutput(side, colors.combine(rs.getBundledOutput(side), color))
- end
- Stadtion()
- while (true) do
- event,side,x,y = os.pullEvent()
- if event == "monitor_touch" then
- if x > 2 and x < 18 and y == 4 then
- rs.setBundledOutput("left",rs.getBundledOutput("left") + colors.brown)
- sleep(2)
- end
- if x > 2 and x < 10 and y == 6 then
- rs.setBundledOutput("left", rs.getBundledOutput("left") + colors.orange)
- end
- if x > 2 and x < 11 and y == 8 then
- rs.setBundledOutput("left",rs.getBundledOutput("left") + colors.lightBlue)
- end
- if x > 23 and x < 33 and y == 24 then
- rs.setBundledOutput("left",rs.getBundledOutput("left") + colors.black)
- sleep(2)
- end
- -- Hauptmenu
- if x > 2 and x < 11 and y == 24 then
- shell.run("clear")
- shell.run("Bahnhofanzeige")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement