View difference between Paste ID: nDgdqid8 and 6yX4ai6i
SHOW: | | - or go back to the newest paste.
1
--[[ 
2
This program is designed for use with Computercraft
3-
This is a modern version of the billboard program designed for newer versions of Minecraft (above 1.6.4)
3+
This is a modern version of the kiosk program designed for use in Minecraft versions newer than 1.6.4
4
Custom version for: The Condemned Network - The 1.12 Pack player mall
5-
Billboard Specs: 8 blocks wide by 5 blocks tall advanced monitor 
5+
Kiosk Specs: 2 blocks wide by 3 blocks tall advanced monitor 
6
7
Programmed by Rolcam
8
You can copy/modify this program as you wish, just please leave the documentation intact
9
10
]]--
11
-- Mall Location Variable (mLoc) - This determines what text based sign the kiosk is to display when it cycles back to its main screen
12
-- Default Locations: 0 - Ad Agency Demo | 1 - Rolcam's Bar & Grill | 2 - McDonalds Kiosk 
13
mLoc = 0
14
-- Time variable for how long (in seconds) to display each sign
15
t = 5
16
17
oldTerm = term.current()
18
19
--Redirects setup/install output to monitor (for artistic effect)
20
tSides = {"left","right","bottom","top","front","back"}
21
 
22
for i = 1, #tSides do
23
  monitor = peripheral.wrap(tSides[i])
24
  if monitor then
25
        side = tSides[i]
26
        break
27
  end
28-
local currentTerm = term.current()
28+
29
30
31
--Prevents program termination
32-
    term.setTextColor(colors.orange)
32+
33-
    term.setBackgroundColor(colors.black)
33+
34-
    term.setCursorPos(2,19)
34+
35-
    term.write("       Your Ad Here!       ")
35+
36-
    term.setCursorPos(2,20)
36+
37-
    term.write("Contact Rolcam for details!")
37+
38
    term.setTextColor(colors.white)
39-
    term.setCursorPos(1,1)
39+
    shell.run("pastebin get JUKMFJSe boot")
40
    term.setTextColor(colors.green)
41
    print("Kiosk boot image downloaded.")
42
    term.setTextColor(colors.white)
43
else
44
    term.setTextColor(colors.green)
45
    print("boot image found!")
46
    term.setTextColor(colors.white)
47-
    shell.run("pastebin get edscQ8zU boot")
47+
48
local img = paintutils.loadImage("boot")
49-
    print("Boot image downloaded.")
49+
50
paintutils.drawImage(img, 1,1)
51
term.redirect(oldTerm)
52
term.setBackgroundColor(colors.blue)
53
term.setTextColor(colors.orange)
54
term.clear()
55
print("Rolcam's Kiosk Program V1")
56-
img = paintutils.loadImage("boot")
56+
57
print(" ")
58
print("Beginning system check...")
59
--Checks for missing signs and labels itself
60-
term.redirect(currentTerm)
60+
61
if not fs.exists("image") then
62
    term.setTextColor(colors.red)
63
    print("Warning: advert image missing!")
64-
print("Rolcam's Billboard Program V3")
64+
65
    print("Downloading image...")
66
    shell.run("pastebin get fDigRNmG image")
67
    term.setTextColor(colors.green)
68
    print("File downloaded")
69
    term.setTextColor(colors.white)
70
else
71
    term.setTextColor(colors.green)
72
    print("beach image found!")
73
    term.setTextColor(colors.white)
74
end
75
76-
    shell.run("pastebin get EZDcTC35 image")
76+
if not fs.exists("ad2") then
77
    term.setTextColor(colors.red)
78
	print("Warning: Kiosk advert sign is missing!")
79
	term.setTextColor(colors.white)
80
	print("Downloading image...")
81
	shell.run("pastebin get WwMDuBuY ad2")
82
	term.setTextColor(colors.green)
83
	print("File downloaded")
84
	term.setTextColor(colors.white)
85
else
86
    term.setTextColor(colors.green)
87-
if not fs.exists("mall") then
87+
    print("Kiosk advert sign image found!")
88
    term.setTextColor(colors.white)
89-
    print("Warning: Mall sign is missing!")
89+
90
adSign2 = paintutils.loadImage("ad2")
91
92-
    shell.run("pastebin get k1dsWddA mall")
92+
if mLoc == 2 then
93
    if not fs.exists("McDonalds") then
94
    	term.setTextColor(colors.red)
95
		print("Warning: Kiosk McDonalds sign is missing!")
96
		term.setTextColor(colors.white)
97
		print("Downloading image...")
98-
    print("Mall sign image found!")
98+
		shell.run("pastebin get J3PTn6ze McDonalds")
99
		term.setTextColor(colors.green)
100
		print("File downloaded")
101-
if not fs.exists("bar") then
101+
		term.setTextColor(colors.white)
102-
  	term.setTextColor(colors.red)
102+
	else
103-
   	print("Warning: bar image missing!")
103+
    	term.setTextColor(colors.green)
104-
   	term.setTextColor(colors.white)
104+
    	print("Kiosk McDonalds sign found!")
105-
   	print("Downloading image...")
105+
    	term.setTextColor(colors.white)
106-
   	shell.run("pastebin get T2r2qxNj bar")
106+
	end
107-
   	term.setTextColor(colors.green)
107+
108-
   	print("File downloaded")
108+
McDon = paintutils.loadImage("McDonalds")
109-
   	term.setTextColor(colors.white)
109+
110
        
111-
   	term.setTextColor(colors.green)
111+
112-
   	print("bar image found!")
112+
113-
   	term.setTextColor(colors.white)
113+
114
print("Sign check completed!")
115-
bar = paintutils.loadImage("bar")
115+
116-
mallImg = paintutils.loadImage("mall")
116+
117
    term.setTextColor(colors.red)
118
    print("Warning: Computer is not labeled!")
119
    print("Labelling Computer")
120
    os.setComputerLabel("Mall - Advert Kiosk")
121
    term.setTextColor(colors.white)
122
else
123
    term.setTextColor(colors.green)
124-
    os.setComputerLabel("Billboard Comp")
124+
125
    term.setTextColor(colors.white)
126
end
127
print("System Check Completed!")
128
sleep(1)
129
print("Starting Kiosk!")
130
131
-- Displays text overlay over images - Modify this to fit your needs
132
function adText()
133-
print("Starting Billboard!")
133+
    if mLoc == 0 then
134
        term.setBackgroundColor(colors.black)
135
 		term.clear()
136-
mallImg = paintutils.loadImage("mall")
136+
        term.setCursorPos(1,1)
137
        term.setTextColor(colors.orange)
138
        print("  Condemned Mall  ")
139-
	paintutils.drawImage(mallImg, 1, 1)        
139+
        print("Advertising Agency")
140-
    sleep(15)
140+
        print("    Demo Kiosk    ")
141-
    paintutils.drawImage(adSign, 1, 1)        
141+
        print(" ")
142
        term.setTextColor(colors.yellow)
143-
    paintutils.drawImage(bar, 1, 1)
143+
        sleep(0.5)
144
        print("Pricing Rates --->")
145
        print(" ")
146
  		sleep(0.5)
147
        print("<--- Example Text ")
148
        sleep(0.5)
149
        print(" Example Text --->")
150
    elseif mLoc == 1 then
151
        term.setBackgroundColor(colors.black)
152
        term.clear()
153
        term.setTextColor(colors.orange)
154
        term.setCursorPos(1,1)
155
        print("    Welcome to    ")
156
        print("     Rolcam's     ")
157
        print("   Bar & Grill!   ")
158
        print(" ")
159
        print("    Food Menu:    ")
160
        print("Cheese Wheels: $25")
161
        print("Venison Burg: $20")
162
        print("Paradise Burg: $10")
163
        print("Deluxe Nachos: $10")
164
        print("Onion Rings: $5  ")
165
        print("Fries: $5")
166
        print(" ")
167
        print("   Drinks Menu:   ")
168
		print("Kumis: $10")
169
        print("Mead: $10")
170
        print("Cider: TBD")
171
        print("Cider [Intox]: TBD")
172
        print("Ale: TBD")
173
        print("Lager: TBD")
174
    elseif mLoc == 2 then
175
            term.clear()
176
            paintutils.drawImage(McDon, 1, 1)
177
            term.setTextColor(colors.yellow)
178
            term.setCursorPos(1,10)
179
            print("    Welcome to     ")
180
            print("     McDonalds     ")
181
            print("                   ")
182
            print("    Order Here!    ")
183
    else
184
    	term.setTextColor(colors.orange)
185
		term.setBackgroundColor(colors.black)
186
    	term.setCursorPos(2,14)
187
    	term.write(" Your Ad Here! ")
188
    	term.setCursorPos(2,15)
189
    	print(" Contact Rolcam ")
190
        term.setCursorPos(2,16)
191
        print(" for details! ")
192
    	term.setTextColor(colors.white)
193
    	term.setCursorPos(1,1)
194
    end
195
end
196
197
198
199
mLoc2 = mLoc
200
201
term.redirect(monitor)
202
adSign = paintutils.loadImage("image")
203
while redstone.getInput("left") == true do
204
    sleep(1)
205
end
206
while true do
207
    mLoc = mLoc2
208
    adText()
209
    sleep(10)
210
	mLoc = 999
211
    paintutils.drawImage(adSign, 1, 1)
212
    adText()
213
    sleep(t)
214
    mLoc = mLoc2
215
    adText()
216
    sleep(10)
217
	mLoc = 999
218
    paintutils.drawImage(adSign2, 1, 1)
219
    adText()
220
    sleep(t)
221
end