View difference between Paste ID: 0aHEen03 and r7trCqBq
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-
side = "back"
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+
side = "right"
13
-- Time variable for how long (in seconds) to display each advert
14
t = 5
15
--Redirects setup/install output to monitor (for artistic effect)
16
local monitor = peripheral.wrap(side)
17
if not fs.exists("boot") then
18
    term.setTextColor(colors.red)
19
    print("Warning: boot image missing!")
20
    print("Downloading image...")
21
    term.setTextColor(colors.white)
22
    shell.run("pastebin get edscQ8zU boot")
23
    term.setTextColor(colors.green)
24
    print("Main boot image downloaded.")
25
    term.setTextColor(colors.white)
26
else
27
    term.setTextColor(colors.green)
28
    print("boot image found!")
29
    term.setTextColor(colors.white)
30
end
31
local img = paintutils.loadImage("boot")
32
term.redirect(monitor)
33
paintutils.drawImage(img, 1,1)
34
term.restore()
35
term.setBackgroundColor(colors.blue)
36
term.setTextColor(colors.orange)
37
term.clear()
38
print("Rolcam's Billboard Program V3")
39
term.setTextColor(colors.white)
40
print(" ")
41
print("Beginning system check...")
42
--Checks for missing signs and labels itself
43
print("Checking signs...")
44-
    print("Warning: beach image missing!")
44+
45
    term.setTextColor(colors.red)
46
    print("Warning: advert image missing!")
47
    term.setTextColor(colors.white)
48
    print("Downloading image...")
49
    shell.run("pastebin get EZDcTC35 image")
50
    term.setTextColor(colors.green)
51
    print("File downloaded")
52
    term.setTextColor(colors.white)
53
else
54
    term.setTextColor(colors.green)
55
    print("beach image found!")
56-
if not fs.exists("night") then
56+
57
end
58-
    print("Warning: night image missing!")
58+
59
if not fs.exists("timnoot") then
60
    term.setTextColor(colors.red)
61-
    shell.run("pastebin get KizP2jiT night")
61+
    print("Warning: timnoot's advert missing!")
62
    term.setTextColor(colors.white)
63
    print("Downloading image...")
64
    shell.run("pastebin get f0u7ttWn timnoot")
65
    term.setTextColor(colors.green)
66
    print("File downloaded")
67-
    print("night image found!")
67+
68
else
69
    term.setTextColor(colors.green)
70-
if not fs.exists("moon") then
70+
    print("timnoot's advert found!")
71
    term.setTextColor(colors.white)
72-
    print("Warning: moon image missing!")
72+
73
74
if not fs.exists("XpqUUpqX") then
75-
    shell.run("pastebin get LL7rSBmx moon")
75+
76
    print("Warning: XpqUUpqX's advert missing!")
77
    term.setTextColor(colors.white)
78
    print("Downloading image...")
79
    shell.run("pastebin get fk2QQhw4 XpqUUpqX")
80
    term.setTextColor(colors.green)
81-
    print("moon image found!")
81+
82
    term.setTextColor(colors.white)
83
else
84-
if not fs.exists("village") then
84+
85
    print("XpqUUpqX's advert found!")
86-
    print("Warning: village image missing!")
86+
87
end
88
89-
    shell.run("pastebin get ncJRFq5J village")
89+
if not fs.exists("mall") then
90
    term.setTextColor(colors.red)
91
    print("Warning: Mall sign is missing!")
92
    term.setTextColor(colors.white)
93
    print("Downloading image...")
94
    shell.run("pastebin get k1dsWddA mall")
95-
    print("village image found!")
95+
96
    print("File downloaded")
97
    term.setTextColor(colors.white)
98-
if not fs.exists("mars") then
98+
99
    term.setTextColor(colors.green)
100-
    print("Warning: mars image missing!")
100+
    print("Mall sign image found!")
101
    term.setTextColor(colors.white)
102
end
103-
    shell.run("pastebin get Xh9Lnr1u mars")
103+
mallImg = paintutils.loadImage("mall")
104
105
print("Sign check completed!")
106
print("Checking for computer label")
107
if os.getComputerLabel() == nil then
108
    term.setTextColor(colors.red)
109-
    print("mars image found!")
109+
110
    term.setTextColor(colors.white)
111
    print("Labelling Computer")
112-
--Downloads the slot hall signs if this board is configured for the slot hall
112+
    os.setComputerLabel("Mall - Billboard")
113-
if slotHall == 1 then
113+
114-
	if not fs.exists("Frame1") then
114+
115-
	    term.setTextColor(colors.red)
115+
116-
	    print("Warning: Slot frame 1 image missing!")
116+
117-
	    term.setTextColor(colors.white)
117+
118-
	    print("Downloading image...")
118+
119-
	    shell.run("pastebin get 0jtcj1F4 Frame1")
119+
120-
	    term.setTextColor(colors.green)
120+
121-
	    print("File downloaded")
121+
122-
	    term.setTextColor(colors.white)
122+
adSign = paintutils.loadImage("image")
123-
	else
123+
tnAd = paintutils.loadImage("timnoot")
124-
	    term.setTextColor(colors.green)
124+
XpqAd = paintutils.loadImage("XpqUUpqX")
125-
	    print("Slot frame 1 image found!")
125+
126-
	    term.setTextColor(colors.white)
126+
	paintutils.drawImage(mallImg, 1, 1)
127-
	end
127+
    sleep(10)
128-
	if not fs.exists("Frame2") then
128+
    paintutils.drawImage(adSign, 1, 1)
129-
	    term.setTextColor(colors.red)
129+
    sleep(t)
130-
	    print("Warning: Slot frame 2 image missing!")
130+
    paintutils.drawImage(mallImg, 1, 1)
131-
	    term.setTextColor(colors.white)
131+
    sleep(10)
132-
	    print("Downloading image...")
132+
    paintutils.drawImage(tnAd, 1, 1)
133-
	    shell.run("pastebin get xgqQ1wJ2 Frame2")
133+
    sleep(t)
134-
	    term.setTextColor(colors.green)
134+
    paintutils.drawImage(mallImg, 1, 1)
135-
	    print("File downloaded")
135+
    sleep(10)
136-
	    term.setTextColor(colors.white)
136+
    paintutils.drawImage(XpqAd, 1, 1)
137-
	else
137+
    sleep(t)
138-
	    term.setTextColor(colors.green)
138+
139-
	    print("Slot frame 2 image found!")
139+