Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Bundled Wire an die rechte Seite des PCs
- -- Bildschirm Oben drauf
- redstone.setBundledOutput("right", 0)
- mon = peripheral.wrap("top")
- mon.setTextScale(1.5)
- mon.setBackgroundColor(colors.black)
- mon.clear()
- function msg(gap, line, color, groundb, text)
- if color == 1 then
- color = 1
- elseif color == 02 then
- color = 2
- elseif color == 03 then
- color = 4
- elseif color == 04 then
- color = 8
- elseif color == 05 then
- color = 16
- elseif color == 06 then
- color = 32
- elseif color == 07 then
- color = 64
- elseif color == 08 then
- color = 128
- elseif color == 09 then
- color = 256
- elseif color == 10 then
- color = 512
- elseif color == 11 then
- color = 1024
- elseif color == 12 then
- color = 2048
- elseif color == 13 then
- color = 4096
- elseif color == 14 then
- color = 8192
- elseif color == 15 then
- color = 16384
- elseif color == 16 then
- color = 32768
- end
- if groundb == 1 then
- groundb = 1
- elseif groundb == 02 then
- groundb = 2
- elseif groundb == 03 then
- groundb = 4
- elseif groundb == 04 then
- groundb = 8
- elseif groundb == 05 then
- groundb = 16
- elseif groundb == 06 then
- groundb = 32
- elseif groundb == 07 then
- groundb = 64
- elseif groundb == 08 then
- groundb = 128
- elseif groundb == 09 then
- groundb = 256
- elseif groundb == 10 then
- groundb = 512
- elseif groundb == 11 then
- groundb = 1024
- elseif groundb == 12 then
- groundb = 2048
- elseif groundb == 13 then
- groundb = 4096
- elseif groundb == 14 then
- groundb = 8192
- elseif groundb == 15 then
- groundb = 16384
- elseif groundb == 16 then
- groundb = 32768
- end
- mon.setBackgroundColor(groundb)
- mon.setCursorPos(gap,line)
- mon.setTextColor(color)
- text = mon.write(text)
- end
- ------------------------------------
- function Iaus()
- msg(2,02,1,15," ")
- msg(2,03,1,15," Zombiefarm ") --
- msg(2,04,1,15," ")
- end
- function IIaus()
- msg(2,06,1,15," ")
- msg(2,07,1,15," Mobfarm 2 ") --
- msg(2,08,1,15," ")
- end
- function IIIaus()
- msg(2,10,1,15," ")
- msg(2,11,1,15," Mobfarm 3 ") --
- msg(2,12,1,15," ")
- end
- function IVaus()
- msg(2,14,1,15," ")
- msg(2,15,1,15," Mobfarm 4 ") --
- msg(2,16,1,15," ")
- end
- function Vaus()
- msg(2,18,1,15," ")
- msg(2,19,1,15," Mobfarm 5 ") --
- msg(2,20,1,15," ")
- end
- ------------------------------------
- function Ian()
- msg(2,02,1,06," ")
- msg(2,03,1,06," Zombiefarm ") --
- msg(2,04,1,06," ")
- end
- function IIan()
- msg(2,06,1,06," ")
- msg(2,07,1,06," Mobfarm 2 ") --
- msg(2,08,1,06," ")
- end
- function IIIan()
- msg(2,10,1,06," ")
- msg(2,11,1,06," Mobfarm 3 ") --
- msg(2,12,1,06," ")
- end
- function IVan()
- msg(2,14,1,06," ")
- msg(2,15,1,06," Mobfarm 4 ") --
- msg(2,16,1,06," ")
- end
- function Van()
- msg(2,18,1,06," ")
- msg(2,19,1,06," Mobfarm 5 ") --
- msg(2,20,1,06," ")
- end
- ------------------------------------
- file = fs.open("log1", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- Ian()
- sleep(0.5)
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.yellow))
- sleep(0.5)
- elseif inhalt == "aus" then
- Iaus()
- sleep(0.5)
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.yellow))
- sleep(0.5)
- end
- file = fs.open("log2", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- IIan()
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.blue))
- sleep(0.5)
- elseif inhalt == "aus" then
- IIaus()
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.blue))
- sleep(0.5)
- end
- file = fs.open("log3", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- IIIan()
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.white))
- sleep(0.5)
- elseif inhalt == "aus" then
- IIIaus()
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.white))
- sleep(0.5)
- end
- file = fs.open("log4", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- IVan()
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.red))
- sleep(0.5)
- elseif inhalt == "aus" then
- IVaus()
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.red))
- sleep(0.5)
- end
- file = fs.open("log5", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- Van()
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.green))
- sleep(0.5)
- elseif inhalt == "aus" then
- Vaus()
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.green))
- sleep(0.5)
- end
- while true do
- local event, side, X, Y = os.pullEvent("monitor_touch")
- if X >= 1 and X <= 17 and Y >= 2 and Y <= 4 and side == "top" then
- file = fs.open("log1", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- Iaus()
- file = fs.open("log1", "w")
- file.write("aus")
- file.close()
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.yellow))
- sleep(0.5)
- elseif inhalt == "aus" then
- Ian()
- file = fs.open("log1", "w")
- file.write("an")
- file.close()
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.yellow))
- sleep(0.5)
- end
- elseif X >= 1 and X <= 17 and Y >= 6 and Y <= 8 and side == "top" then
- file = fs.open("log2", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- IIaus()
- file = fs.open("log2", "w")
- file.write("aus")
- file.close()
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.blue))
- sleep(0.5)
- elseif inhalt == "aus" then
- IIan()
- file = fs.open("log2", "w")
- file.write("an")
- file.close()
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.blue))
- sleep(0.5)
- end
- elseif X >= 1 and X <= 17 and Y >= 10 and Y <= 12 and side == "top" then
- file = fs.open("log3", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- IIIaus()
- file = fs.open("log3", "w")
- file.write("aus")
- file.close()
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.white))
- sleep(0.5)
- elseif inhalt == "aus" then
- IIIan()
- file = fs.open("log3", "w")
- file.write("an")
- file.close()
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.white))
- sleep(0.5)
- end
- elseif X >= 1 and X <= 17 and Y >= 14 and Y <= 16 and side == "top" then
- file = fs.open("log4", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- IVaus()
- file = fs.open("log4", "w")
- file.write("aus")
- file.close()
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.red))
- sleep(0.5)
- elseif inhalt == "aus" then
- IVan()
- file = fs.open("log4", "w")
- file.write("an")
- file.close()
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.red))
- sleep(0.5)
- end
- elseif X >= 1 and X <= 17 and Y >= 18 and Y <= 20 and side == "top" then
- file = fs.open("log5", "r")
- local inhalt = file.readLine()
- file.close()
- print(inhalt)
- if inhalt == "an" then
- Vaus()
- file = fs.open("log5", "w")
- file.write("aus")
- file.close()
- redstone.setBundledOutput("right",colors.subtract(redstone.getBundledOutput("right"), colors.green))
- sleep(0.5)
- elseif inhalt == "aus" then
- Van()
- file = fs.open("log5", "w")
- file.write("an")
- file.close()
- redstone.setBundledOutput("right",colors.combine(redstone.getBundledOutput("right"), colors.green))
- sleep(0.5)
- end
- end
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement