SHOW:
|
|
- or go back to the newest paste.
1 | sleep(5) | |
2 | shell.run("dvere") | |
3 | sleep(2) | |
4 | while(true) do | |
5 | m = peripheral.wrap("top") | |
6 | ||
7 | if rs.testBundledInput("bottom", colors.lightBlue) then | |
8 | rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.white)) | |
9 | blazeDef=true | |
10 | print("Spawning Blaze vypnut dle AE") | |
11 | end | |
12 | if rs.testBundledInput("bottom", colors.yellow) then | |
13 | rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.orange)) | |
14 | enderDef=true | |
15 | print("Spawning Enderman vypnut dle AE") | |
16 | end | |
17 | if rs.testBundledInput("bottom", colors.lime) then | |
18 | rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.magenta)) | |
19 | pigmanDef=true | |
20 | print("Spawning Pigman vypnut dle AE") | |
21 | end | |
22 | ||
23 | m.clear() | |
24 | --NADPIS | |
25 | m.setTextScale(1) | |
26 | m.setCursorPos(19,1) | |
27 | m.setBackgroundColor(colors.yellow) | |
28 | m.setTextColor(1024) | |
29 | m.write(" Stav spawneru ") | |
30 | --Blaze | |
31 | m.setCursorPos(1,2) | |
32 | m.setBackgroundColor(colors.black) | |
33 | m.setTextColor(colors.white) | |
34 | m.write("*") | |
35 | m.setTextColor(colors.orange) | |
36 | m.write("Blaze") | |
37 | m.setTextColor(colors.white) | |
38 | m.write(": ") | |
39 | m.setCursorPos(24,2) | |
40 | if rs.testBundledInput("bottom", colors.white) then | |
41 | m.setTextColor(colors.red) | |
42 | m.write("Vypnuto") | |
43 | else | |
44 | m.setTextColor(colors.lime) | |
45 | m.write("Zapnuto") | |
46 | end | |
47 | if blazeDef then | |
48 | m.setTextColor(colors.white) | |
49 | m.write("(") | |
50 | m.setTextColor(colors.red) | |
51 | m.write("Vyp") | |
52 | m.setTextColor(colors.white) | |
53 | m.write(")") | |
54 | else | |
55 | m.setTextColor(colors.white) | |
56 | m.write("(") | |
57 | m.setTextColor(colors.lime) | |
58 | m.write("Zap") | |
59 | m.setTextColor(colors.white) | |
60 | m.write(")") | |
61 | end | |
62 | --Enderman | |
63 | m.setCursorPos(1,4) | |
64 | m.setBackgroundColor(colors.black) | |
65 | m.setTextColor(colors.orange) | |
66 | m.write("*") | |
67 | m.setTextColor(colors.blue) | |
68 | m.write("Enderman") | |
69 | m.setTextColor(colors.white) | |
70 | m.write(": ") | |
71 | m.setCursorPos(24,4) | |
72 | if rs.testBundledInput("bottom", colors.orange) then | |
73 | m.setTextColor(colors.red) | |
74 | m.write("Vypnuto") | |
75 | else | |
76 | m.setTextColor(colors.lime) | |
77 | m.write("Zapnuto") | |
78 | end | |
79 | if enderDef then | |
80 | m.setTextColor(colors.white) | |
81 | m.write("(") | |
82 | m.setTextColor(colors.red) | |
83 | m.write("Vyp") | |
84 | m.setTextColor(colors.white) | |
85 | m.write(")") | |
86 | else | |
87 | m.setTextColor(colors.white) | |
88 | m.write("(") | |
89 | m.setTextColor(colors.lime) | |
90 | m.write("Zap") | |
91 | m.setTextColor(colors.white) | |
92 | m.write(")") | |
93 | end | |
94 | --Pigman | |
95 | m.setCursorPos(1,6) | |
96 | m.setBackgroundColor(colors.black) | |
97 | m.setTextColor(colors.magenta) | |
98 | m.write("*") | |
99 | m.setTextColor(colors.pink) | |
100 | m.write("Pigman") | |
101 | m.setTextColor(colors.white) | |
102 | m.write(": ") | |
103 | m.setCursorPos(24,6) | |
104 | if rs.testBundledInput("bottom", colors.magenta) then | |
105 | m.setTextColor(colors.red) | |
106 | m.write("Vypnuto") | |
107 | else | |
108 | m.setTextColor(colors.lime) | |
109 | m.write("Zapnuto") | |
110 | end | |
111 | if pigmanDef then | |
112 | m.setTextColor(colors.white) | |
113 | m.write("(") | |
114 | m.setTextColor(colors.red) | |
115 | m.write("Vyp") | |
116 | m.setTextColor(colors.white) | |
117 | m.write(")") | |
118 | else | |
119 | m.setTextColor(colors.white) | |
120 | m.write("(") | |
121 | m.setTextColor(colors.lime) | |
122 | m.write("Zap") | |
123 | m.setTextColor(colors.white) | |
124 | m.write(")") | |
125 | end | |
126 | --MobEssence | |
127 | m.setCursorPos(1,8) | |
128 | m.setBackgroundColor(colors.black) | |
129 | m.setTextColor(colors.red) | |
130 | m.write("*") | |
131 | m.setTextColor(colors.green) | |
132 | m.write("MobEssence") | |
133 | m.setTextColor(colors.white) | |
134 | m.write(": ") | |
135 | m.setCursorPos(24,8) | |
136 | if rs.testBundledInput("bottom", colors.red) then | |
137 | m.setTextColor(colors.red) | |
138 | m.write("Vypnuto") | |
139 | else | |
140 | m.setTextColor(colors.lime) | |
141 | m.write("Zapnuto") | |
142 | end | |
143 | --Dvere | |
144 | m.setCursorPos(1,10) | |
145 | m.setBackgroundColor(colors.black) | |
146 | m.setTextColor(colors.black) | |
147 | m.write("*") | |
148 | m.setTextColor(colors.gray) | |
149 | m.write("Dvere") | |
150 | m.setTextColor(colors.white) | |
151 | m.write(": ") | |
152 | m.setCursorPos(24,10) | |
153 | if rs.testBundledInput("bottom", colors.black) then | |
154 | m.setTextColor(colors.lime) | |
155 | m.write("Zavreny") | |
156 | else | |
157 | m.setTextColor(colors.red) | |
158 | m.write("Otevreny") | |
159 | end | |
160 | - | event, side, x, y = os.pullEvent("monitor_touch") |
160 | + | |
161 | m.setCursorPos(24,12) | |
162 | m.write("Obnovit") | |
163 | ||
164 | event, side, x, y = os.pullEvent() | |
165 | if event == "monitor_touch" then | |
166 | if x > 1 and x < 12 and y == 8 then | |
167 | shell.run("clear") | |
168 | shell.run("svetla") | |
169 | sleep(2) | |
170 | end | |
171 | if x > 1 and x < 7 and y == 10 then | |
172 | shell.run("clear") | |
173 | shell.run("dvere") | |
174 | sleep(2) | |
175 | end | |
176 | if x > 1 and x < 7 and y == 2 then | |
177 | if rs.testBundledInput("bottom", colors.white)==false then | |
178 | rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.white)) | |
179 | else | |
180 | rs.setBundledOutput("bottom", rs.getBundledInput("bottom")-1) | |
181 | end | |
182 | end | |
183 | if x > 1 and x < 10 and y == 4 then | |
184 | if rs.testBundledInput("bottom", colors.orange)==false then | |
185 | rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.orange)) | |
186 | else | |
187 | rs.setBundledOutput("bottom", rs.getBundledInput("bottom")-2) | |
188 | end | |
189 | end | |
190 | if x > 1 and x < 7 and y == 6 then | |
191 | if rs.testBundledInput("bottom", colors.magenta)==false then | |
192 | rs.setBundledOutput("bottom", colors.combine(rs.getBundledInput("bottom"), colors.magenta)) | |
193 | else | |
194 | rs.setBundledOutput("bottom", rs.getBundledInput("bottom")-4) | |
195 | end | |
196 | end | |
197 | end | |
198 | end |