SHOW:
|
|
- or go back to the newest paste.
1 | os.loadAPI("col") | |
2 | col.setBackground(colors.black) | |
3 | rednet.open("bottom") | |
4 | col.clear() | |
5 | ||
6 | function alloff() | |
7 | col.msg(02," &8+-------------+") | |
8 | col.msg(03," &8|&7Zombie-Pigmen&8| &cAUS") | |
9 | col.msg(04," &8+-------------+") | |
10 | ||
11 | col.msg(05," &8+-------------+") | |
12 | col.msg(06," &8| &7Zombie &8| &cAUS") | |
13 | col.msg(07," &8+-------------+") | |
14 | ||
15 | col.msg(08," &8+-------------+") | |
16 | col.msg(09," &8| &7Spider &8| &cAUS") | |
17 | col.msg(10," &8+-------------+") | |
18 | ||
19 | col.msg(11," &8+-------------+") | |
20 | col.msg(12," &8| &7free &8| &cAUS") | |
21 | col.msg(13," &8+-------------+") | |
22 | ||
23 | col.msg(14," &8+-------------+") | |
24 | col.msg(15," &8| &7Cow &8| &cAUS") | |
25 | col.msg(16," &8+-------------+") | |
26 | end | |
27 | ||
28 | ||
29 | function pigmenAN() | |
30 | col.msg(03," &8|&7Zombie-Pigmen&8| ") | |
31 | sleep(0.1) | |
32 | col.msg(03," &8|&fZombie-Pigmen&8| &aAN ") | |
33 | end | |
34 | ||
35 | function zombieAN() | |
36 | col.msg(06," &8| &7Zombie &8| ") | |
37 | sleep(0.1) | |
38 | col.msg(06," &8| &fZombie &8| &aAN ") | |
39 | end | |
40 | ||
41 | function spiderAN() | |
42 | col.msg(09," &8| &7Spider &8| ") | |
43 | sleep(0.1) | |
44 | col.msg(09," &8| &fSpider &8| &aAN ") | |
45 | end | |
46 | ||
47 | function freeAN() | |
48 | col.msg(12," &8| &7free &8| ") | |
49 | sleep(0.1) | |
50 | col.msg(12," &8| &ffree &8| &aAN ") | |
51 | end | |
52 | ||
53 | function cowAN() | |
54 | col.msg(15," &8| &7Cow &8| ") | |
55 | sleep(0.1) | |
56 | col.msg(15," &8| &fCow &8| &aAN ") | |
57 | end | |
58 | ||
59 | ||
60 | function pigmenAUS() | |
61 | col.msg(03," &8|&fZombie-Pigmen&8| ") | |
62 | sleep(0.1) | |
63 | col.msg(03," &8|&7Zombie-Pigmen&8| &cAUS") | |
64 | end | |
65 | ||
66 | function zombieAUS() | |
67 | col.msg(06," &8| &7Zombie &8| ") | |
68 | sleep(0.1) | |
69 | col.msg(06," &8| &7Zombie &8| &cAUS") | |
70 | end | |
71 | ||
72 | function spiderAUS() | |
73 | col.msg(09," &8| &7Spider &8| ") | |
74 | sleep(0.1) | |
75 | col.msg(09," &8| &7Spider &8| &cAUS") | |
76 | end | |
77 | ||
78 | function freeAUS() | |
79 | col.msg(12," &8| &7free &8| ") | |
80 | sleep(0.1) | |
81 | col.msg(12," &8| &7free &8| &cAUS") | |
82 | end | |
83 | ||
84 | function cowAUS() | |
85 | col.msg(15," &8| &7Cow &8| ") | |
86 | sleep(0.1) | |
87 | col.msg(15," &8| &7Cow &8| &cAUS") | |
88 | end | |
89 | ||
90 | ||
91 | --Programm | |
92 | ||
93 | file = fs.open("info/logs", "r") | |
94 | inhalt = file.readLine() | |
95 | file.close() | |
96 | ||
97 | print(inhalt) | |
98 | ||
99 | alloff() | |
100 | - | if inhalt == 1.0 then |
100 | + | if inhalt == "1.0" then |
101 | - | sleep(0,5) |
101 | + | print(inhalt1) |
102 | - | pigmenAN() |
102 | + | pigmenAN() |
103 | - | elseif inhalt == 2.0 then |
103 | + | elseif inhalt == "2.0" then |
104 | - | sleep(0.5) |
104 | + | print(inhalt2) |
105 | zombieAN() | |
106 | - | elseif inhalt == 3.0 then |
106 | + | elseif inhalt == "3.0" then |
107 | - | sleep(0.5) |
107 | + | print(inhalt3) |
108 | spiderAN() | |
109 | - | elseif inhalt == 4.0 then |
109 | + | elseif inhalt == "4.0" then |
110 | - | sleep(0.5) |
110 | + | print(inhalt4) |
111 | freeAN() | |
112 | - | elseif inhalt == 5.0 then |
112 | + | elseif inhalt == "5.0" then |
113 | - | sleep(0.5) |
113 | + | print(inhalt5) |
114 | cowAN() | |
115 | else | |
116 | print("hm...") | |
117 | end | |
118 | ||
119 | v = 0 | |
120 | while true do | |
121 | local event, side, X, Y = os.pullEvent("monitor_touch") | |
122 | ||
123 | if v == 0 and X >= 2 and X <= 16 and Y == 03 and side == "top" then | |
124 | alloff() | |
125 | pigmenAN() | |
126 | y = 1 | |
127 | v = 1 | |
128 | rednet.send(5881,y) | |
129 | ||
130 | local file = fs.open("info/logs", "w") | |
131 | file.write(1) | |
132 | file.close() | |
133 | ||
134 | sleep(0.5) | |
135 | end | |
136 | if v == 1 and X >= 20 and X <= 24 and Y == 03 and side == "top" then | |
137 | pigmenAUS() | |
138 | v = 0 | |
139 | sleep(0.5) | |
140 | end | |
141 | ||
142 | ||
143 | ||
144 | ||
145 | ||
146 | if v == 0 and X >= 2 and X <= 16 and Y == 06 and side == "top" then | |
147 | alloff() | |
148 | zombieAN() | |
149 | y = 2 | |
150 | v = 2 | |
151 | rednet.send(5881,y) | |
152 | ||
153 | local file = fs.open("info/logs", "w") | |
154 | file.write(2) | |
155 | file.close() | |
156 | ||
157 | sleep(0.5) | |
158 | end | |
159 | if v == 2 and X >= 20 and X <= 24 and Y == 06 and side == "top" then | |
160 | zombieAUS() | |
161 | v = 0 | |
162 | sleep(0.5) | |
163 | end | |
164 | ||
165 | ||
166 | ||
167 | ||
168 | ||
169 | if v == 0 and X >= 2 and X <= 16 and Y == 09 and side == "top" then | |
170 | alloff() | |
171 | spiderAN() | |
172 | y = 3 | |
173 | v = 3 | |
174 | rednet.send(5881,y) | |
175 | ||
176 | local file = fs.open("info/logs", "w") | |
177 | file.write(3) | |
178 | file.close() | |
179 | ||
180 | sleep(0.5) | |
181 | end | |
182 | if v == 3 and X >= 20 and X <= 24 and Y == 09 and side == "top" then | |
183 | spiderAUS() | |
184 | v = 0 | |
185 | sleep(0.5) | |
186 | end | |
187 | ||
188 | ||
189 | ||
190 | ||
191 | ||
192 | if v == 0 and X >= 2 and X <= 16 and Y == 12 and side == "top" then | |
193 | alloff() | |
194 | freeAN() | |
195 | y = 4 | |
196 | v = 4 | |
197 | rednet.send(5881,y) | |
198 | ||
199 | local file = fs.open("info/logs", "w") | |
200 | file.write(4) | |
201 | file.close() | |
202 | ||
203 | sleep(0.5) | |
204 | end | |
205 | if v == 4 and X >= 20 and X <= 24 and Y == 12 and side == "top" then | |
206 | freeAUS() | |
207 | v = 0 | |
208 | sleep(0.5) | |
209 | end | |
210 | ||
211 | ||
212 | ||
213 | ||
214 | ||
215 | if v == 0 and X >= 2 and X <= 16 and Y == 15 and side == "top" then | |
216 | alloff() | |
217 | cowAN() | |
218 | y = 5 | |
219 | v = 5 | |
220 | rednet.send(5881,y) | |
221 | ||
222 | local file = fs.open("info/logs", "w") | |
223 | file.write(5) | |
224 | file.close() | |
225 | ||
226 | sleep(0.5) | |
227 | end | |
228 | if v == 5 and X >= 20 and X <= 24 and Y == 15 and side == "top" then | |
229 | freeAUS() | |
230 | v = 0 | |
231 | sleep(0.5) | |
232 | end | |
233 | ||
234 | ||
235 | sleep(1) | |
236 | end |