Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sleep(5)
- shell.run("dvere")
- sleep(2)
- while(true) do
- m = peripheral.wrap("top")
- if rs.testBundledInput("bottom", colors.lightBlue) then
- rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.white))
- blazeDef=true
- print("Spawning Blaze vypnut dle AE")
- end
- if rs.testBundledInput("bottom", colors.yellow) then
- rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.orange))
- enderDef=true
- print("Spawning Enderman vypnut dle AE")
- end
- if rs.testBundledInput("bottom", colors.lime) then
- rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.magenta))
- pigmanDef=true
- print("Spawning Pigman vypnut dle AE")
- end
- m.clear()
- --NADPIS
- m.setTextScale(1)
- m.setCursorPos(19,1)
- m.setBackgroundColor(colors.yellow)
- m.setTextColor(1024)
- m.write(" Stav spawneru ")
- --Blaze
- m.setCursorPos(1,2)
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.white)
- m.write("*")
- m.setTextColor(colors.orange)
- m.write("Blaze")
- m.setTextColor(colors.white)
- m.write(": ")
- m.setCursorPos(24,2)
- if rs.testBundledInput("bottom", colors.white) then
- m.setTextColor(colors.red)
- m.write("Vypnuto")
- else
- m.setTextColor(colors.lime)
- m.write("Zapnuto")
- end
- if blazeDef then
- m.setTextColor(colors.white)
- m.write("(")
- m.setTextColor(colors.red)
- m.write("Vyp")
- m.setTextColor(colors.white)
- m.write(")")
- else
- m.setTextColor(colors.white)
- m.write("(")
- m.setTextColor(colors.lime)
- m.write("Zap")
- m.setTextColor(colors.white)
- m.write(")")
- end
- --Enderman
- m.setCursorPos(1,4)
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.orange)
- m.write("*")
- m.setTextColor(colors.blue)
- m.write("Enderman")
- m.setTextColor(colors.white)
- m.write(": ")
- m.setCursorPos(24,4)
- if rs.testBundledInput("bottom", colors.orange) then
- m.setTextColor(colors.red)
- m.write("Vypnuto")
- else
- m.setTextColor(colors.lime)
- m.write("Zapnuto")
- end
- if enderDef then
- m.setTextColor(colors.white)
- m.write("(")
- m.setTextColor(colors.red)
- m.write("Vyp")
- m.setTextColor(colors.white)
- m.write(")")
- else
- m.setTextColor(colors.white)
- m.write("(")
- m.setTextColor(colors.lime)
- m.write("Zap")
- m.setTextColor(colors.white)
- m.write(")")
- end
- --Pigman
- m.setCursorPos(1,6)
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.magenta)
- m.write("*")
- m.setTextColor(colors.pink)
- m.write("Pigman")
- m.setTextColor(colors.white)
- m.write(": ")
- m.setCursorPos(24,6)
- if rs.testBundledInput("bottom", colors.magenta) then
- m.setTextColor(colors.red)
- m.write("Vypnuto")
- else
- m.setTextColor(colors.lime)
- m.write("Zapnuto")
- end
- if pigmanDef then
- m.setTextColor(colors.white)
- m.write("(")
- m.setTextColor(colors.red)
- m.write("Vyp")
- m.setTextColor(colors.white)
- m.write(")")
- else
- m.setTextColor(colors.white)
- m.write("(")
- m.setTextColor(colors.lime)
- m.write("Zap")
- m.setTextColor(colors.white)
- m.write(")")
- end
- --MobEssence
- m.setCursorPos(1,8)
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.red)
- m.write("*")
- m.setTextColor(colors.green)
- m.write("MobEssence")
- m.setTextColor(colors.white)
- m.write(": ")
- m.setCursorPos(24,8)
- if rs.testBundledInput("bottom", colors.red) then
- m.setTextColor(colors.red)
- m.write("Vypnuto")
- else
- m.setTextColor(colors.lime)
- m.write("Zapnuto")
- end
- --Dvere
- m.setCursorPos(1,10)
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.black)
- m.write("*")
- m.setTextColor(colors.gray)
- m.write("Dvere")
- m.setTextColor(colors.white)
- m.write(": ")
- m.setCursorPos(24,10)
- if rs.testBundledInput("bottom", colors.black) then
- m.setTextColor(colors.lime)
- m.write("Zavreny")
- else
- m.setTextColor(colors.red)
- m.write("Otevreny")
- end
- m.setTextColor(colors.lightGray)
- m.setCursorPos(24,12)
- m.write("Obnovit")
- event, side, x, y = os.pullEvent()
- if event == "monitor_touch" then
- if x > 1 and x < 12 and y == 8 then
- shell.run("clear")
- shell.run("svetla")
- sleep(2)
- end
- if x > 1 and x < 7 and y == 10 then
- shell.run("clear")
- shell.run("dvere")
- sleep(2)
- end
- if x > 1 and x < 7 and y == 2 then
- if rs.testBundledInput("bottom", colors.white)==false then
- rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.white))
- else
- rs.setBundledOutput("bottom", rs.getBundledInput("bottom")-1)
- end
- end
- if x > 1 and x < 10 and y == 4 then
- if rs.testBundledInput("bottom", colors.orange)==false then
- rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.orange))
- else
- rs.setBundledOutput("bottom", rs.getBundledInput("bottom")-2)
- end
- end
- if x > 1 and x < 7 and y == 6 then
- if rs.testBundledInput("bottom", colors.magenta)==false then
- rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.magenta))
- else
- rs.setBundledOutput("bottom", rs.getBundledInput("bottom")-4)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement