SHOW:
|
|
- or go back to the newest paste.
1 | - | -- Designed for an 8 wide by 5 tall advanced monitor |
1 | + | --[[ |
2 | This program is designed for use with Computercraft | |
3 | - | --This is if the billboard is in my slot machine area, it makes it run a special sign from time to time |
3 | + | This is a legacy version of the billboard program designed for use in Minecraft 1.6.4 |
4 | - | slotHall = 0 |
4 | + | Custom version for: The Condemned Network - Tekkit Main (1.6.4) player mall |
5 | - | --This is if the billboard is the main sign for a mall/shop area. If it is, please change out the sign for your own. |
5 | + | Billboard Specs: 8 blocks wide by 5 blocks tall advanced monitor |
6 | - | mallSign = 0 |
6 | + | |
7 | Programmed by Rolcam | |
8 | You can copy/modify this program as you wish, just please leave the documentation intact | |
9 | - | -- Time variable for how long (in seconds) to display each sign |
9 | + | |
10 | ]]-- | |
11 | - | --Prevents program termination |
11 | + | |
12 | - | os.pullEvent = os.pullEventRaw |
12 | + | -- Adds a casino advert to the sign rotation if set to 1 |
13 | slotHall = 0 | |
14 | --Change this to the side the monitor is on | |
15 | side = "back" | |
16 | -- Time variable for how long (in seconds) to display each advert | |
17 | t = 5 | |
18 | --Redirects setup/install output to monitor (for artistic effect) | |
19 | local monitor = peripheral.wrap(side) | |
20 | if not fs.exists("boot") then | |
21 | term.setTextColor(colors.red) | |
22 | print("Warning: boot image missing!") | |
23 | print("Downloading image...") | |
24 | term.setTextColor(colors.white) | |
25 | shell.run("pastebin get edscQ8zU boot") | |
26 | term.setTextColor(colors.green) | |
27 | print("Main boot image downloaded.") | |
28 | term.setTextColor(colors.white) | |
29 | else | |
30 | term.setTextColor(colors.green) | |
31 | print("boot image found!") | |
32 | term.setTextColor(colors.white) | |
33 | end | |
34 | local img = paintutils.loadImage("boot") | |
35 | term.redirect(monitor) | |
36 | paintutils.drawImage(img, 1,1) | |
37 | term.restore() | |
38 | term.setBackgroundColor(colors.blue) | |
39 | term.setTextColor(colors.orange) | |
40 | term.clear() | |
41 | print("Rolcam's Billboard Program V3") | |
42 | term.setTextColor(colors.white) | |
43 | print(" ") | |
44 | - | print("Warning: beach image missing!") |
44 | + | |
45 | --Checks for missing signs and labels itself | |
46 | print("Checking signs...") | |
47 | if not fs.exists("image") then | |
48 | term.setTextColor(colors.red) | |
49 | print("Warning: advert image missing!") | |
50 | term.setTextColor(colors.white) | |
51 | print("Downloading image...") | |
52 | shell.run("pastebin get EZDcTC35 image") | |
53 | term.setTextColor(colors.green) | |
54 | print("File downloaded") | |
55 | term.setTextColor(colors.white) | |
56 | - | if not fs.exists("night") then |
56 | + | |
57 | term.setTextColor(colors.green) | |
58 | - | print("Warning: night image missing!") |
58 | + | |
59 | term.setTextColor(colors.white) | |
60 | end | |
61 | - | shell.run("pastebin get KizP2jiT night") |
61 | + | |
62 | if not fs.exists("mall") then | |
63 | term.setTextColor(colors.red) | |
64 | print("Warning: Mall sign is missing!") | |
65 | term.setTextColor(colors.white) | |
66 | print("Downloading image...") | |
67 | - | print("night image found!") |
67 | + | shell.run("pastebin get k1dsWddA mall") |
68 | term.setTextColor(colors.green) | |
69 | print("File downloaded") | |
70 | - | if not fs.exists("moon") then |
70 | + | |
71 | else | |
72 | - | print("Warning: moon image missing!") |
72 | + | |
73 | print("Mall sign image found!") | |
74 | term.setTextColor(colors.white) | |
75 | - | shell.run("pastebin get LL7rSBmx moon") |
75 | + | |
76 | ||
77 | --Downloads the slot hall signs if this board is configured for the slot hall | |
78 | if slotHall == 1 then | |
79 | if not fs.exists("Frame1") then | |
80 | term.setTextColor(colors.red) | |
81 | - | print("moon image found!") |
81 | + | print("Warning: Slot frame 1 image missing!") |
82 | term.setTextColor(colors.white) | |
83 | print("Downloading image...") | |
84 | - | if not fs.exists("village") then |
84 | + | shell.run("pastebin get 0jtcj1F4 Frame1") |
85 | term.setTextColor(colors.green) | |
86 | - | print("Warning: village image missing!") |
86 | + | print("File downloaded") |
87 | term.setTextColor(colors.white) | |
88 | else | |
89 | - | shell.run("pastebin get ncJRFq5J village") |
89 | + | term.setTextColor(colors.green) |
90 | print("Slot frame 1 image found!") | |
91 | term.setTextColor(colors.white) | |
92 | end | |
93 | if not fs.exists("Frame2") then | |
94 | term.setTextColor(colors.red) | |
95 | - | print("village image found!") |
95 | + | print("Warning: Slot frame 2 image missing!") |
96 | term.setTextColor(colors.white) | |
97 | print("Downloading image...") | |
98 | - | if not fs.exists("mars") then |
98 | + | shell.run("pastebin get xgqQ1wJ2 Frame2") |
99 | term.setTextColor(colors.green) | |
100 | - | print("Warning: mars image missing!") |
100 | + | print("File downloaded") |
101 | term.setTextColor(colors.white) | |
102 | else | |
103 | - | shell.run("pastebin get Xh9Lnr1u mars") |
103 | + | term.setTextColor(colors.green) |
104 | print("Slot frame 2 image found!") | |
105 | term.setTextColor(colors.white) | |
106 | end | |
107 | if not fs.exists("Frame3") then | |
108 | term.setTextColor(colors.red) | |
109 | - | print("mars image found!") |
109 | + | print("Warning: Slot frame 3 image missing!") |
110 | term.setTextColor(colors.white) | |
111 | print("Downloading image...") | |
112 | shell.run("pastebin get 07eWGpLk Frame3") | |
113 | term.setTextColor(colors.green) | |
114 | - | if not fs.exists("Frame1") then |
114 | + | print("File downloaded") |
115 | - | term.setTextColor(colors.red) |
115 | + | term.setTextColor(colors.white) |
116 | - | print("Warning: Slot frame 1 image missing!") |
116 | + | else |
117 | - | term.setTextColor(colors.white) |
117 | + | term.setTextColor(colors.green) |
118 | - | print("Downloading image...") |
118 | + | print("Slot frame 3 image found!") |
119 | - | shell.run("pastebin get 0jtcj1F4 Frame1") |
119 | + | term.setTextColor(colors.white) |
120 | - | term.setTextColor(colors.green) |
120 | + | end |
121 | - | print("File downloaded") |
121 | + | |
122 | - | term.setTextColor(colors.white) |
122 | + | |
123 | - | else |
123 | + | s = paintutils.loadImage("Frame3") |
124 | - | term.setTextColor(colors.green) |
124 | + | |
125 | - | print("Slot frame 1 image found!") |
125 | + | |
126 | - | term.setTextColor(colors.white) |
126 | + | |
127 | - | end |
127 | + | |
128 | - | if not fs.exists("Frame2") then |
128 | + | |
129 | - | term.setTextColor(colors.red) |
129 | + | |
130 | - | print("Warning: Slot frame 2 image missing!") |
130 | + | |
131 | - | term.setTextColor(colors.white) |
131 | + | |
132 | - | print("Downloading image...") |
132 | + | |
133 | - | shell.run("pastebin get xgqQ1wJ2 Frame2") |
133 | + | os.setComputerLabel("Mall - Billboard") |
134 | - | term.setTextColor(colors.green) |
134 | + | |
135 | - | print("File downloaded") |
135 | + | |
136 | - | term.setTextColor(colors.white) |
136 | + | |
137 | - | else |
137 | + | |
138 | - | term.setTextColor(colors.green) |
138 | + | |
139 | - | print("Slot frame 2 image found!") |
139 | + | |
140 | - | term.setTextColor(colors.white) |
140 | + | |
141 | - | end |
141 | + | |
142 | - | if not fs.exists("Frame3") then |
142 | + | |
143 | - | term.setTextColor(colors.red) |
143 | + | adSign = paintutils.loadImage("image") |
144 | - | print("Warning: Slot frame 3 image missing!") |
144 | + | mallImg = paintutils.loadImage("mall") |
145 | - | term.setTextColor(colors.white) |
145 | + | |
146 | - | print("Downloading image...") |
146 | + | paintutils.drawImage(mallImg, 1, 1) |
147 | - | shell.run("pastebin get 07eWGpLk Frame3") |
147 | + | sleep(10) |
148 | - | term.setTextColor(colors.green) |
148 | + | paintutils.drawImage(adSign, 1, 1) |
149 | - | print("File downloaded") |
149 | + | sleep(t) |
150 | - | term.setTextColor(colors.white) |
150 | + | |
151 | - | else |
151 | + | |
152 | - | term.setTextColor(colors.green) |
152 | + | |
153 | - | print("Slot frame 3 image found!") |
153 | + | |
154 | - | term.setTextColor(colors.white) |
154 | + | |
155 | - | end |
155 | + | |
156 | paintutils.drawImage(p,15,7) | |
157 | term.setCursorPos(21,20) | |
158 | - | s = paintutils.loadImage("Frame3") |
158 | + | |
159 | term.setCursorPos(31,20) | |
160 | - | --Downloads the mall signs if this board is configured for the slot hall |
160 | + | |
161 | - | if mallSign == 1 then |
161 | + | |
162 | - | if not fs.exists("mall") then |
162 | + | |
163 | - | term.setTextColor(colors.red) |
163 | + | |
164 | - | print("Warning: Mall sign is missing!") |
164 | + | |
165 | - | term.setTextColor(colors.white) |
165 | + | |
166 | - | print("Downloading image...") |
166 | + | |
167 | - | shell.run("pastebin get k1dsWddA mall") |
167 | + | |
168 | - | term.setTextColor(colors.green) |
168 | + | |
169 | - | print("File downloaded") |
169 | + | |
170 | - | term.setTextColor(colors.white) |
170 | + | |
171 | - | else |
171 | + | |
172 | - | term.setTextColor(colors.green) |
172 | + | |
173 | - | print("Mall sign image found!") |
173 | + | |
174 | - | term.setTextColor(colors.white) |
174 | + | |
175 | - | end |
175 | + | |
176 | - | mallImg = paintutils.loadImage("mall") |
176 | + | |
177 | print("R") | |
178 | elseif num2 == 3 then | |
179 | print("J") | |
180 | elseif num2 == 4 then | |
181 | print("I") | |
182 | elseif num2 == 5 then | |
183 | print("D") | |
184 | - | os.setComputerLabel("Billboard Comp") |
184 | + | |
185 | print("L") | |
186 | end | |
187 | term.setCursorPos(51,20) | |
188 | if num3 == 1 then | |
189 | print("7") | |
190 | elseif num3 == 2 then | |
191 | print("R") | |
192 | - | sleep(1) |
192 | + | |
193 | print("J") | |
194 | elseif num3 == 4 then | |
195 | - | img2 = paintutils.loadImage("image") |
195 | + | |
196 | - | img3 = paintutils.loadImage("night") |
196 | + | |
197 | - | img4 = paintutils.loadImage("moon") |
197 | + | |
198 | - | img5 = paintutils.loadImage("village") |
198 | + | |
199 | - | img6 = paintutils.loadImage("mars") |
199 | + | |
200 | - | sleep(0.5) |
200 | + | |
201 | - | --x=1 |
201 | + | |
202 | print("<") | |
203 | sleep(1) | |
204 | - | if mallSign == 1 then |
204 | + | |
205 | - | paintutils.drawImage(mallImg, 1, 1) |
205 | + | |
206 | - | sleep(10) |
206 | + | |
207 | - | end |
207 | + | |
208 | - | paintutils.drawImage(img2, 1, 1) |
208 | + | |
209 | - | sleep(t) |
209 | + | |
210 | - | paintutils.drawImage(img3, 1, 1) |
210 | + | |
211 | - | sleep(t) |
211 | + | |
212 | - | paintutils.drawImage(img4, 1, 1) |
212 | + | |
213 | - | sleep(t) |
213 | + | |
214 | - | paintutils.drawImage(img5, 1, 1) |
214 | + | |
215 | - | sleep(t) |
215 | + | |
216 | - | paintutils.drawImage(img6, 1, 1) |
216 | + | |
217 | - | sleep(t) |
217 | + | |
218 | else | |
219 | print("L") | |
220 | end | |
221 | term.setCursorPos(41,20) | |
222 | if num2 == 1 then | |
223 | print("7") | |
224 | - | paintutils.drawImage(p,15,7) |
224 | + | |
225 | print("R") | |
226 | elseif num2 == 3 then | |
227 | print("J") | |
228 | elseif num2 == 4 then | |
229 | print("I") | |
230 | elseif num2 == 5 then | |
231 | print("D") | |
232 | else | |
233 | print("L") | |
234 | end | |
235 | term.setCursorPos(51,20) | |
236 | if num3 == 1 then | |
237 | print("7") | |
238 | elseif num3 == 2 then | |
239 | print("R") | |
240 | elseif num3 == 3 then | |
241 | print("J") | |
242 | elseif num3 == 4 then | |
243 | print("I") | |
244 | elseif num3 == 5 then | |
245 | print("D") | |
246 | else | |
247 | print("L") | |
248 | end | |
249 | term.setCursorPos(61,20) | |
250 | print("<") | |
251 | sleep(0.2) | |
252 | paintutils.drawImage(s,15,7) | |
253 | term.setCursorPos(21,20) | |
254 | print(">") | |
255 | term.setCursorPos(31,20) | |
256 | if num1 == 1 then | |
257 | print("7") | |
258 | elseif num1 == 2 then | |
259 | print("R") | |
260 | elseif num1 == 3 then | |
261 | print("J") | |
262 | elseif num1 == 4 then | |
263 | print("I") | |
264 | elseif num1 == 5 then | |
265 | print("D") | |
266 | else | |
267 | print("L") | |
268 | end | |
269 | term.setCursorPos(41,20) | |
270 | if num2 == 1 then | |
271 | print("7") | |
272 | elseif num2 == 2 then | |
273 | print("R") | |
274 | elseif num2 == 3 then | |
275 | print("J") | |
276 | elseif num2 == 4 then | |
277 | print("I") | |
278 | elseif num2 == 5 then | |
279 | print("D") | |
280 | else | |
281 | print("L") | |
282 | end | |
283 | term.setCursorPos(51,20) | |
284 | if num3 == 1 then | |
285 | print("7") | |
286 | elseif num3 == 2 then | |
287 | print("R") | |
288 | elseif num3 == 3 then | |
289 | print("J") | |
290 | elseif num3 == 4 then | |
291 | print("I") | |
292 | elseif num3 == 5 then | |
293 | print("D") | |
294 | else | |
295 | print("L") | |
296 | end | |
297 | term.setCursorPos(61,20) | |
298 | print("<") | |
299 | sleep(0.2) | |
300 | paintutils.drawImage(q,15,7) | |
301 | term.setCursorPos(21,20) | |
302 | print(">") | |
303 | term.setCursorPos(31,20) | |
304 | if num1 == 1 then | |
305 | print("7") | |
306 | elseif num1 == 2 then | |
307 | print("R") | |
308 | elseif num1 == 3 then | |
309 | print("J") | |
310 | elseif num1 == 4 then | |
311 | print("I") | |
312 | elseif num1 == 5 then | |
313 | print("D") | |
314 | else | |
315 | print("L") | |
316 | end | |
317 | term.setCursorPos(41,20) | |
318 | if num2 == 1 then | |
319 | print("7") | |
320 | elseif num2 == 2 then | |
321 | print("R") | |
322 | elseif num2 == 3 then | |
323 | print("J") | |
324 | elseif num2 == 4 then | |
325 | print("I") | |
326 | elseif num2 == 5 then | |
327 | print("D") | |
328 | else | |
329 | print("L") | |
330 | end | |
331 | term.setCursorPos(51,20) | |
332 | if num3 == 1 then | |
333 | print("7") | |
334 | elseif num3 == 2 then | |
335 | print("R") | |
336 | elseif num3 == 3 then | |
337 | print("J") | |
338 | elseif num3 == 4 then | |
339 | print("I") | |
340 | elseif num3 == 5 then | |
341 | print("D") | |
342 | else | |
343 | print("L") | |
344 | end | |
345 | term.setCursorPos(61,20) | |
346 | print("<") | |
347 | sleep(0.2) | |
348 | paintutils.drawImage(p,15,7) | |
349 | term.setCursorPos(21,20) | |
350 | print(">") | |
351 | term.setCursorPos(31,20) | |
352 | if num1 == 1 then | |
353 | print("7") | |
354 | elseif num1 == 2 then | |
355 | print("R") | |
356 | elseif num1 == 3 then | |
357 | print("J") | |
358 | elseif num1 == 4 then | |
359 | print("I") | |
360 | elseif num1 == 5 then | |
361 | print("D") | |
362 | else | |
363 | print("L") | |
364 | end | |
365 | term.setCursorPos(41,20) | |
366 | if num2 == 1 then | |
367 | print("7") | |
368 | elseif num2 == 2 then | |
369 | print("R") | |
370 | elseif num2 == 3 then | |
371 | print("J") | |
372 | elseif num2 == 4 then | |
373 | print("I") | |
374 | elseif num2 == 5 then | |
375 | print("D") | |
376 | else | |
377 | print("L") | |
378 | end | |
379 | term.setCursorPos(51,20) | |
380 | if num3 == 1 then | |
381 | print("7") | |
382 | elseif num3 == 2 then | |
383 | print("R") | |
384 | elseif num3 == 3 then | |
385 | print("J") | |
386 | elseif num3 == 4 then | |
387 | print("I") | |
388 | elseif num3 == 5 then | |
389 | print("D") | |
390 | else | |
391 | print("L") | |
392 | end | |
393 | term.setCursorPos(61,20) | |
394 | print("<") | |
395 | spinSlots = 1 | |
396 | spin1 = 20 | |
397 | spin2 = 30 | |
398 | spin3 = 40 | |
399 | -- Reel Spin Code | |
400 | while spinSlots == 1 do | |
401 | if spin1 > 0 then | |
402 | num1 = math.random(1,6) | |
403 | spin1 = spin1 - 1 | |
404 | else | |
405 | num1 = 1 | |
406 | end | |
407 | if spin2 > 0 then | |
408 | num2 = math.random(1,6) | |
409 | spin2 = spin2 - 1 | |
410 | else | |
411 | num2 = 1 | |
412 | end | |
413 | if spin3 > 0 then | |
414 | num3 = math.random(1,6) | |
415 | spin3 = spin3 - 1 | |
416 | else | |
417 | num3 = 1 | |
418 | end | |
419 | if (spin1 <= 0) and (spin2 <= 0) and (spin3 <= 0) then | |
420 | spinSlots = 0 | |
421 | end | |
422 | sleep(0.1) | |
423 | term.setCursorPos(21,20) | |
424 | print(">") | |
425 | term.setCursorPos(31,20) | |
426 | if num1 == 1 then | |
427 | print("7") | |
428 | elseif num1 == 2 then | |
429 | print("R") | |
430 | elseif num1 == 3 then | |
431 | print("J") | |
432 | elseif num1 == 4 then | |
433 | print("I") | |
434 | elseif num1 == 5 then | |
435 | print("D") | |
436 | else | |
437 | print("L") | |
438 | end | |
439 | term.setCursorPos(41,20) | |
440 | if num2 == 1 then | |
441 | print("7") | |
442 | elseif num2 == 2 then | |
443 | print("R") | |
444 | elseif num2 == 3 then | |
445 | print("J") | |
446 | elseif num2 == 4 then | |
447 | print("I") | |
448 | elseif num2 == 5 then | |
449 | print("D") | |
450 | else | |
451 | print("L") | |
452 | end | |
453 | term.setCursorPos(51,20) | |
454 | if num3 == 1 then | |
455 | print("7") | |
456 | elseif num3 == 2 then | |
457 | print("R") | |
458 | elseif num3 == 3 then | |
459 | print("J") | |
460 | elseif num3 == 4 then | |
461 | print("I") | |
462 | elseif num3 == 5 then | |
463 | print("D") | |
464 | else | |
465 | print("L") | |
466 | end | |
467 | term.setCursorPos(61,20) | |
468 | print("<") | |
469 | end | |
470 | num3 = 1 | |
471 | term.setCursorPos(21,20) | |
472 | print(">") | |
473 | term.setCursorPos(31,20) | |
474 | if num1 == 1 then | |
475 | print("7") | |
476 | elseif num1 == 2 then | |
477 | print("R") | |
478 | elseif num1 == 3 then | |
479 | print("J") | |
480 | elseif num1 == 4 then | |
481 | print("I") | |
482 | elseif num1 == 5 then | |
483 | print("D") | |
484 | else | |
485 | print("L") | |
486 | end | |
487 | term.setCursorPos(41,20) | |
488 | if num2 == 1 then | |
489 | print("7") | |
490 | elseif num2 == 2 then | |
491 | print("R") | |
492 | elseif num2 == 3 then | |
493 | print("J") | |
494 | elseif num2 == 4 then | |
495 | print("I") | |
496 | elseif num2 == 5 then | |
497 | print("D") | |
498 | else | |
499 | print("L") | |
500 | end | |
501 | term.setCursorPos(51,20) | |
502 | if num3 == 1 then | |
503 | print("7") | |
504 | elseif num3 == 2 then | |
505 | print("R") | |
506 | elseif num3 == 3 then | |
507 | print("J") | |
508 | elseif num3 == 4 then | |
509 | print("I") | |
510 | elseif num3 == 5 then | |
511 | print("D") | |
512 | else | |
513 | print("L") | |
514 | end | |
515 | term.setCursorPos(61,20) | |
516 | print("<") | |
517 | sleep(1) | |
518 | term.setCursorPos(21,30) | |
519 | print("JACKPOT!!!!!") | |
520 | term.setCursorPos(21,33) | |
521 | term.setTextColor(colors.white) | |
522 | print("Rolcam's Casino, NOW OPEN!!!") | |
523 | end | |
524 | sleep(t) | |
525 | end |