View difference between Paste ID: DvGbkhyM and CckE0hpG
SHOW: | | - or go back to the newest paste.
1
-- Variables
2
3
CMO = 0 -- Counter Metal Input
4
CES = 0 -- Counter Empty Smeltery
5
6
-- Button Variable for showing button list!
7
CML = 0 -- Counter Metal List
8
CAL = 0 -- Counter Alloy List
9
CLL = 0 -- Counter Liquid List
10
CBL = 0 -- Counter Block List
11
CMML = 0 -- Counter Menu List
12
-- \Button Variable for showing button list!
13
14
-- Filling Variables
15
CFM = 0 -- Counter Filling Metal
16
CFA = 0 -- Counter Filling Alloy
17
CFL = 0 -- Counter Filling Liquid
18
CFB = 0 -- Counter Filling Block
19
20
-- MouseWidth/Height Variables
21
mouseWidth = 0  -- mouseWidth Variable
22
mouseHeight = 0 -- mouseHeight Variable
23
-- \MouseWidth/Height Variables
24
25
-- \Variables
26
----------------------------------------------------------------------------------------------
27
-- Computercraft Monitor wrapping
28
29
monitor = peripheral.wrap("right") -- insert Monitor position here
30
31
-- \Computercraft Monitor wrapping
32
----------------------------------------------------------------------------------------------
33
-- Monitor Clearing + Background color change and cursor Positioning
34
35
monitor.setBackgroundColour((colors.black)) -- Return to standart color BEFORE clearing the screen
36
monitor.clear() -- Clear Monitor
37
monitor.setCursorPos(1,1) -- Set Cursor to Position 1,1
38
39
-- \Monitor Clearing + Background color change and cursor Positioning
40
----------------------------------------------------------------------------------------------
41
-- Debug text for Display Size
42
43
w,h=monitor.getSize() -- set w to Width of the monitor and h to Height in Pixels
44
45
print(w) -- Print width of monitor
46
print(h) -- print Height of monitor
47
48
-- \Debug text for Display Size
49
----------------------------------------------------------------------------------------------
50
-- Create Buttons for Metals, Alloys etc.
51
52
function listMenu() -- Create function
53
54
	monitor.clear()
55
	monitor.setBackgroundColour((colours.lime)) -- Set monitor Background Color for Button Creation
56
	
57
	monitor.setCursorPos(2,2) -- Set Cursor Position to 2,2
58
	monitor.write("Metals") -- Write "Metals" at Current Cursor Position
59
	
60
	monitor.setCursorPos(2,4)
61
	monitor.write("Alloys")
62
	
63
	monitor.setCursorPos(2,6)
64
	monitor.write("Liquids")
65
	
66
	monitor.setCursorPos(2,8)
67
	monitor.write("Blocks")
68
	
69
	monitor.setBackgroundColour((colors.black)) -- Reset Monitor Background Color back to black
70
71
	CML = 0
72
	CAL = 0
73
	CLL = 0 
74
	CBL = 0
75
	
76
end -- End Function
77
78
--listMenu()
79
80
-- \Create Buttons for Metals, Alloys etc.
81
-----------------------------------------------------------------------------------------------
82
-- Functions for right clicking on monitor and what it is supposed to do.
83
84
function listMetals() -- Metal listing function.
85
86
		monitor.clear() -- Clear Monitor
87
		
88
		monitor.setBackgroundColour((colours.lime)) -- Set Monitor Background color to Lime for button creation
89
		
90
		monitor.setCursorPos(2,2)------------------- row 1
91
		monitor.write("Back")
92
		
93
		monitor.setCursorPos(2,4)
94
		monitor.write("Cobalt")
95
		
96
		monitor.setCursorPos(2,6)
97
		monitor.write("Gold")
98
99
		monitor.setCursorPos(2,8)
100
		monitor.write("Coal")
101
		
102
		monitor.setCursorPos(2,10)
103
		monitor.write("Unstable")
104
105
		monitor.setCursorPos(2,12)
106
		monitor.write("Silver")
107
108
		monitor.setCursorPos(2,14)
109
		monitor.write("Yellorium")
110
111
		monitor.setCursorPos(15,2)------------------- row 2
112
		monitor.write("Aluminium")
113
		
114
		monitor.setCursorPos(15,4)
115
		monitor.write("Copper")
116
		
117
		monitor.setCursorPos(15,6)
118
		monitor.write("Iron")
119
120
		monitor.setCursorPos(15,8)
121
		monitor.write("Emerald")
122
		
123
		monitor.setCursorPos(15,10)
124
		monitor.write("Nickel")
125
126
		monitor.setCursorPos(15,12)
127
		monitor.write("Steel")
128
129
		--monitor.setCursorPos(15,14)
130
		--monitor.write("")
131
		
132
		monitor.setCursorPos(28,2)------------------ row 3
133
		monitor.write("Ardite")
134
		
135
		monitor.setCursorPos(28,4)
136
		monitor.write("Dark Iron")
137
		
138
		monitor.setCursorPos(28,6)
139
		monitor.write("Lead")
140
141
		monitor.setCursorPos(28,8)
142
		monitor.write("Mana Metal")
143
		
144
		monitor.setCursorPos(28,10)
145
		monitor.write("Res Ender")
146
147
		monitor.setCursorPos(28,12)
148
		monitor.write("Tin")
149
150
		--monitor.setCursorPos(28,14)
151
		--monitor.write("")	
152
		
153
		monitor.setCursorPos(41,2)------------------ row 4
154
		monitor.write("Bedrockium")
155
		
156
		monitor.setCursorPos(41,4)
157
		monitor.write("Des Redstone")
158
		
159
		monitor.setCursorPos(41,6)
160
		monitor.write("Redstone")
161
162
		monitor.setCursorPos(41,8)
163
		monitor.write("Mithril")
164
		
165
		monitor.setCursorPos(41,10)
166
		monitor.write("Shiny")
167
168
		monitor.setCursorPos(41,12)
169
		monitor.write("Uranium")
170
171
		--monitor.setCursorPos(41,14)
172
		--monitor.write("")
173
		
174
		monitor.setBackgroundColour((colours.black)) -- Set Background color back to black
175
		
176
		CML = 1 -- Counter Metal List is now 1
177
		CFM = 1 -- Counter Filling Metal is now 1
178
		
179
end -- Ends the function
180
181
function listAlloys() -- Alloy listing function.
182
183
		monitor.clear() -- Clear Monitor
184
		
185
		monitor.setBackgroundColour((colours.lime)) -- Set monitor background color to lime for button creation
186
		
187
		monitor.setCursorPos(2,4)------------------- row 1
188
		monitor.write("Back")
189
		
190
		monitor.setCursorPos(2,6)
191
		monitor.write("Red Alloy")
192
		
193
		monitor.setCursorPos(2,8)
194
		monitor.write("Lumium")
195
196
		--monitor.setCursorPos(2,10)
197
		--monitor.write("")
198
		
199
		--monitor.setCursorPos(2,12)
200
		--monitor.write("")
201
202
		--monitor.setCursorPos(2,14)
203
		--monitor.write("")
204
205
		--monitor.setCursorPos(2,16)
206
		--monitor.write("")
207
208
		monitor.setCursorPos(15,4)------------------- row 2
209
		monitor.write("Alum Brass")
210
		
211
		monitor.setCursorPos(15,6)
212
		monitor.write("Electrum")
213
		
214
		monitor.setCursorPos(15,8)
215
		monitor.write("Manyullyn")
216
217
		--monitor.setCursorPos(15,10)
218
		--monitor.write("")
219
		
220
		--monitor.setCursorPos(15,12)
221
		--monitor.write("")
222
223
		--monitor.setCursorPos(15,14)
224
		--monitor.write("")
225
226
		--monitor.setCursorPos(15,16)
227
		--monitor.write("")
228
		
229
		monitor.setCursorPos(28,4)------------------ row 3
230
		monitor.write("Alumite")
231
		
232
		monitor.setCursorPos(28,6)
233
		monitor.write("Enderium")
234
		
235
		monitor.setCursorPos(28,8)
236
		monitor.write("Pig Iron")
237
238
		--monitor.setCursorPos(28,10)
239
		--monitor.write("")
240
		
241
		--monitor.setCursorPos(28,12)
242
		--monitor.write("")
243
244
		--monitor.setCursorPos(28,14)
245
		--monitor.write("")
246
247
		--monitor.setCursorPos(28,16)
248
		--monitor.write("")	
249
		
250
		monitor.setCursorPos(41,4)------------------ row 4
251
		monitor.write("Bronze")
252
		
253
		monitor.setCursorPos(41,6)
254
		monitor.write("Invar")
255
		
256
		monitor.setCursorPos(41,8)
257
		monitor.write("Signalium")
258
259
		--monitor.setCursorPos(41,10)
260
		--monitor.write("")
261
		
262
		--monitor.setCursorPos(41,12)
263
		--monitor.write("")
264
265
		--monitor.setCursorPos(41,14)
266
		--monitor.write("")
267
268
		--monitor.setCursorPos(41,16)
269
		--monitor.write("")
270
		
271
		monitor.setBackgroundColour((colours.black)) -- Set Background color back to black
272
		
273
		CAL = 1 -- Counter list Alloy is now 1
274
		CFA = 1 -- Counter Filling Alloy is now 1
275
		
276
end -- Ends the function
277
278
function listLiquids() -- Liquid listing function.
279
280
		monitor.clear() -- Clear Monitor
281
		
282
		monitor.setBackgroundColour((colours.lime)) -- Set monitor background color to Lime for button creation
283
		
284
		monitor.setCursorPos(2,6)------------------- row 1
285
		monitor.write("Back")
286
		
287
		monitor.setCursorPos(2,8)
288
		monitor.write("Glue")
289
		
290
		--monitor.setCursorPos(2,10)
291
		--monitor.write("")
292
293
		--monitor.setCursorPos(2,12)
294
		--monitor.write("")
295
		
296
		--monitor.setCursorPos(2,14)
297
		--monitor.write("")
298
299
		--monitor.setCursorPos(2,16)
300
		--monitor.write("")
301
302
		--monitor.setCursorPos(2,18)
303
		--monitor.write("")
304
305
		monitor.setCursorPos(15,6)------------------- row 2
306
		monitor.write("Pyrotheum")
307
		
308
		monitor.setCursorPos(15,8)
309
		monitor.write("Lava")
310
		
311
		--monitor.setCursorPos(15,10)
312
		--monitor.write("")
313
314
		--monitor.setCursorPos(15,12)
315
		--monitor.write("")
316
		
317
		--monitor.setCursorPos(15,14)
318
		--monitor.write("")
319
320
		--monitor.setCursorPos(15,16)
321
		--monitor.write("")
322
323
		--monitor.setCursorPos(15,18)
324
		--monitor.write("")
325
		
326
		monitor.setCursorPos(28,6)------------------ row 3
327
		monitor.write("Blood")
328
		
329
		monitor.setCursorPos(28,8)
330
		monitor.write("Water")
331
		
332
		--monitor.setCursorPos(28,10)
333
		--monitor.write("")
334
335
		--monitor.setCursorPos(28,12)
336
		--monitor.write("")
337
		
338
		--monitor.setCursorPos(28,14)
339
		--monitor.write("")
340
341
		--monitor.setCursorPos(28,16)
342
		--monitor.write("")
343
344
		--monitor.setCursorPos(28,18)
345
		--monitor.write("")	
346
		
347
		monitor.setCursorPos(41,6)------------------ row 4
348
		monitor.write("Cryotheum")
349
		
350
		--monitor.setCursorPos(41,8)
351
		--monitor.write("")
352
		
353
		--monitor.setCursorPos(41,10)
354
		--monitor.write("")
355
356
		--monitor.setCursorPos(41,12)
357
		--monitor.write("")
358
		
359
		--monitor.setCursorPos(41,14)
360
		--monitor.write("")
361
362
		--monitor.setCursorPos(41,16)
363
		--monitor.write("")
364
365
		--monitor.setCursorPos(41,18)
366
		--monitor.write("")
367
		
368
		monitor.setBackgroundColour((colours.black)) -- Set Background color back to black
369
		
370
		CLL = 1 -- Counter list Liquids is now 1
371
		CFL = 1 -- Counter Filling Liquids is now 1
372
		
373
end -- Ends the function
374
375
function listBlocks() -- Block listing function.
376
		
377
		monitor.clear() -- Clear Monitor
378
		
379
		monitor.setBackgroundColour((colours.lime)) -- Set monitor background color to lime for button creation
380
		
381
		monitor.setCursorPos(2,8)------------------- row 1
382
		monitor.write("Back")
383
		
384
		--monitor.setCursorPos(2,10)
385
		--monitor.write("")
386
		
387
		--monitor.setCursorPos(2,12)
388
		--monitor.write("")
389
390
		--monitor.setCursorPos(2,14)
391
		--monitor.write("")
392
		
393
		--monitor.setCursorPos(2,16)
394
		--monitor.write("")
395
396
		--monitor.setCursorPos(2,18)
397
		--monitor.write("")
398
399
		--monitor.setCursorPos(2,20)
400
		--monitor.write("")
401
402
		monitor.setCursorPos(15,8)------------------- row 2
403
		monitor.write("Obsidian")
404
		
405
		--monitor.setCursorPos(15,10)
406
		--monitor.write("")
407
		
408
		--monitor.setCursorPos(15,12)
409
		--monitor.write("")
410
411
		--monitor.setCursorPos(15,14)
412
		--monitor.write("")
413
		
414
		--monitor.setCursorPos(15,16)
415
		--monitor.write("")
416
417
		--monitor.setCursorPos(15,18)
418
		--monitor.write("")
419
420
		--monitor.setCursorPos(15,20)
421
		--monitor.write("")
422
		
423
		monitor.setCursorPos(28,8)------------------ row 3
424
		monitor.write("Seared Stone")
425
		
426
		--monitor.setCursorPos(28,10)
427
		--monitor.write("")
428
		
429
		--monitor.setCursorPos(28,12)
430
		--monitor.write("")
431
432
		--monitor.setCursorPos(28,14)
433
		--monitor.write("")
434
		
435
		--monitor.setCursorPos(28,16)
436
		--monitor.write("")
437
438
		--monitor.setCursorPos(28,18)
439
		--monitor.write("")
440
441
		--monitor.setCursorPos(28,20)
442
		--monitor.write("")	
443
		
444
		monitor.setCursorPos(41,8)------------------ row 4
445
		monitor.write("Glass")
446
		
447
		--monitor.setCursorPos(41,10)
448
		--monitor.write("")
449
		
450
		--monitor.setCursorPos(41,12)
451
		--monitor.write("")
452
453
		--monitor.setCursorPos(41,14)
454
		--monitor.write("")
455
		
456
		--monitor.setCursorPos(41,16)
457
		--monitor.write("")
458
459
		--monitor.setCursorPos(41,18)
460
		--monitor.write("")
461
462
		--monitor.setCursorPos(41,20)
463
		--monitor.write("")
464
		
465
		monitor.setBackgroundColour((colours.black)) -- Set Background color back to black
466
		
467
		CBL = 1 -- Counter list blocks is now 1
468
		CFB = 1 -- Counter Filling blocks is now 1
469
end -- Ends the function
470
471
-- If clicked here then Function
472
473
function checkClickPosition() -- Everything below is a Function.
474
475
	if mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 2 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 0 then
476
		
477
		listMetals()
478
		
479
	elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 2 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 then
480
		
481
		listMenu()
482
	
483
	elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 4 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 0 then
484
		
485
		listAlloys()
486
		
487
	elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 4 and CLL == 0 and CBL == 0 and CAL == 1 and CML == 0 then
488
	
489
		listMenu()
490
	
491
	elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 6 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 0 then
492
		
493
		listLiquids()
494
		
495
	elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 6 and CLL == 1 and CBL == 0 and CAL == 0 and CML == 0 then
496
	
497
		listMenu()
498
	
499
	elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 8 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 0 then
500
		
501
		listBlocks()
502
		
503
	elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 8 and CLL == 0 and CBL == 1 and CAL == 0 and CML == 0 then
504
	
505
		listMenu()
506
	
507
	-- Metal Inputs!
508
	
509
	elseif mouseWidth > 1 and mouseWidth < 11 and mouseHeight == 4 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
510
	
511
		Cobalt()
512
		monitor.setBackgroundColour((colors.red))
513
		monitor.setCursorPos(2,4)
514
		monitor.write("Cobalt")
515
		monitor.setBackgroundColour((colors.black))
516
		
517
	elseif mouseWidth > 1 and mouseWidth < 11 and mouseHeight == 6 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
518
	
519
		Gold()
520
		monitor.setBackgroundColour((colors.red))
521
		monitor.setCursorPos(2,6)
522
		monitor.write("Gold")
523
		monitor.setBackgroundColour((colors.black))
524
		
525
	elseif mouseWidth > 1 and mouseWidth < 11 and mouseHeight == 8 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
526
	
527
		LiquiCoal()
528
		monitor.setBackgroundColour((colors.red))
529
		monitor.setCursorPos(2,8)
530
		monitor.write("Coal")
531
		monitor.setBackgroundColour((colors.black))
532
		
533
	elseif mouseWidth > 1 and mouseWidth < 11 and mouseHeight == 10 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
534
	
535
		Unstable()
536
		monitor.setBackgroundColour((colors.red))
537
		monitor.setCursorPos(2,10)
538
		monitor.write("Unstable")
539
		monitor.setBackgroundColour((colors.black))
540
		
541
	elseif mouseWidth > 1 and mouseWidth < 11 and mouseHeight == 12 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
542
	
543
		Silver()
544
		monitor.setBackgroundColour((colors.red))
545
		monitor.setCursorPos(2,12)
546
		monitor.write("Silver")
547
		monitor.setBackgroundColour((colors.black))
548
		
549
	elseif mouseWidth > 1 and mouseWidth < 11 and mouseHeight == 14 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
550
	
551
		Yellorium()
552
		monitor.setBackgroundColour((colors.red))
553
		monitor.setCursorPos(2,14)
554
		monitor.write("Yellorium")
555
		monitor.setBackgroundColour((colors.black))
556
		
557
	elseif mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 2 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
558
	
559
		Aluminum()
560
		monitor.setBackgroundColour((colors.red))
561
		monitor.setCursorPos(15,2)
562-
		monitor.write("Aluminum")
562+
563
		monitor.setBackgroundColour((colors.black))
564
		
565
	elseif mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 4 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
566
	
567
		Copper()
568
		monitor.setBackgroundColour((colors.red))
569
		monitor.setCursorPos(15,4)
570
		monitor.write("Copper")
571
		monitor.setBackgroundColour((colors.black))
572
		
573
	elseif mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 6 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
574
	
575
		Iron()
576
		monitor.setBackgroundColour((colors.red))
577
		monitor.setCursorPos(15,6)
578
		monitor.write("Iron")
579
		monitor.setBackgroundColour((colors.black))
580
		
581
	elseif mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 8 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
582
	
583
		LiquiEmerald()
584
		monitor.setBackgroundColour((colors.red))
585
		monitor.setCursorPos(15,8)
586
		monitor.write("Emerald")
587
		monitor.setBackgroundColour((colors.black))
588
		
589
	elseif mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 10 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
590
	
591
		Nickel()
592
		monitor.setBackgroundColour((colors.red))
593
		monitor.setCursorPos(15,10)
594
		monitor.write("Nickel")
595
		monitor.setBackgroundColour((colors.black))
596
		
597
	elseif mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 12 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
598
	
599
		Steel()
600
		monitor.setBackgroundColour((colors.red))
601
		monitor.setCursorPos(15,12)
602
		monitor.write("Steel")
603
		monitor.setBackgroundColour((colors.black))
604
		
605
	--elseif mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 14 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
606
	
607
		--xxxx()
608
		--monitor.setBackgroundColour((colors.red))
609
		--monitor.setCursorPos(15,14)
610
		--monitor.write("xxxx")
611
		--monitor.setBackgroundColour((colors.black))
612
		
613
	elseif mouseWidth > 28 and mouseWidth < 39 and mouseHeight == 2 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
614
	
615
		Ardite()
616
		monitor.setBackgroundColour((colors.red))
617
		monitor.setCursorPos(28,2)
618
		monitor.write("Ardite")
619
		monitor.setBackgroundColour((colors.black))
620
		
621
	elseif mouseWidth > 28 and mouseWidth < 39 and mouseHeight == 4 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
622
	
623
		DarkIron()
624
		monitor.setBackgroundColour((colors.red))
625
		monitor.setCursorPos(28,4)
626
		monitor.write("Dark Iron")
627
		monitor.setBackgroundColour((colors.black))
628
		
629
	elseif mouseWidth > 28 and mouseWidth < 39 and mouseHeight == 6 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
630
	
631
		Lead()
632
		monitor.setBackgroundColour((colors.red))
633
		monitor.setCursorPos(28,6)
634
		monitor.write("Lead")
635
		monitor.setBackgroundColour((colors.black))
636
		
637
	elseif mouseWidth > 28 and mouseWidth < 39 and mouseHeight == 8 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
638
	
639
		ManaMetal()
640
		monitor.setBackgroundColour((colors.red))
641
		monitor.setCursorPos(28,8)
642
		monitor.write("Mana Metal")
643
		monitor.setBackgroundColour((colors.black))
644
		
645
	elseif mouseWidth > 28 and mouseWidth < 39 and mouseHeight == 10 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
646
	
647
		ResEnder()
648
		monitor.setBackgroundColour((colors.red))
649
		monitor.setCursorPos(28,10)
650
		monitor.write("Res Ender")
651
		monitor.setBackgroundColour((colors.black))
652
		
653
	elseif mouseWidth > 28 and mouseWidth < 39 and mouseHeight == 12 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
654
	
655
		Tin()
656
		monitor.setBackgroundColour((colors.red))
657
		monitor.setCursorPos(28,12)
658
		monitor.write("Tin")
659
		monitor.setBackgroundColour((colors.black))
660
		
661
	--elseif mouseWidth > 28 and mouseWidth < 39 and mouseHeight == 14 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
662
	
663
		--xxxx()
664
		--monitor.setBackgroundColour((colors.red))
665
		--monitor.setCursorPos(28,14)
666
		--monitor.write("xxxx")
667
		--monitor.setBackgroundColour((colors.black))
668
		
669
	elseif mouseWidth > 41 and mouseWidth < 53 and mouseHeight == 2 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
670
	
671
		Bedrockium()
672
		monitor.setBackgroundColour((colors.red))
673
		monitor.setCursorPos(41,2)
674
		monitor.write("Bedrockium")
675
		monitor.setBackgroundColour((colors.black))
676
		
677
	elseif mouseWidth > 41 and mouseWidth < 53 and mouseHeight == 4 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
678
	
679
		DesRedstone()
680
		monitor.setBackgroundColour((colors.red))
681
		monitor.setCursorPos(41,4)
682
		monitor.write("Des Redstone")
683
		monitor.setBackgroundColour((colors.black))
684
		
685
	elseif mouseWidth > 41 and mouseWidth < 53 and mouseHeight == 6 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
686
	
687
		LiquidRedstone()
688
		monitor.setBackgroundColour((colors.red))
689
		monitor.setCursorPos(41,6)
690
		monitor.write("Redstone")
691
		monitor.setBackgroundColour((colors.black))
692
		
693
	elseif mouseWidth > 41 and mouseWidth < 53 and mouseHeight == 8 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
694
	
695
		Mithril()
696
		monitor.setBackgroundColour((colors.red))
697
		monitor.setCursorPos(41,8)
698
		monitor.write("Mithril")
699
		monitor.setBackgroundColour((colors.black))
700
		
701
	elseif mouseWidth > 41 and mouseWidth < 53 and mouseHeight == 10 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
702
	
703
		Shiny()
704
		monitor.setBackgroundColour((colors.red))
705
		monitor.setCursorPos(41,10)
706
		monitor.write("Shiny")
707
		monitor.setBackgroundColour((colors.black))
708
		
709
	elseif mouseWidth > 41 and mouseWidth < 53 and mouseHeight == 12 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
710
	
711
		Uranium()
712
		monitor.setBackgroundColour((colors.red))
713
		monitor.setCursorPos(41,12)
714
		monitor.write("Uranium")
715
		monitor.setBackgroundColour((colors.black))
716
		
717
	--elseif mouseWidth > 41 and mouseWidth < 53 and mouseHeight == 14 and CLL == 0 and CBL == 0 and CAL == 0 and CML == 1 and CFM == 1 then
718
	
719
		--xxxx()
720
		--monitor.setBackgroundColour((colors.red))
721
		--monitor.setCursorPos(41,14)
722
		--monitor.write("xxxx")
723
		--monitor.setBackgroundColour((colors.black))
724
		
725
	
726
	-- \Metal Inputs!
727
	
728
	
729
	
730
	
731
	end -- end If sentence	
732
	
733
end -- Ends the function
734
735
-- \If clicked here then Function
736
737
-- Function for Metal input
738
739
function Aluminum()
740
741
redstone.setBundledOutput("back", colors.black)
742
743
end
744
745
function Ardite()
746
747
redstone.setBundledOutput("back", colors.gray)
748
749
end
750
751
function Bedrockium()
752
753
redstone.setBundledOutput("back", colors.lightGray)
754
755
end
756
757
function Cobalt()
758
759
redstone.setBundledOutput("back", colors.white)
760
761
end
762
763
function Copper()
764
765
redstone.setBundledOutput("back", colors.green)
766
767
end
768
769
function DarkIron()
770
771
redstone.setBundledOutput("back", colors.lime)
772
773
end
774
775
function DesRedstone()
776
777
redstone.setBundledOutput("left", colors.lightBlue)
778
779
end
780
781
function EnerGlowstone()
782
783
redstone.setBundledOutput("left", colors.cyan)
784
785
end
786
787
function Gold()
788
789
redstone.setBundledOutput("left", colors.lime)
790
791
end
792
793
function Iron()
794
795
redstone.setBundledOutput("left", colors.green)
796
797
end
798
799
function Lead()
800
801
redstone.setBundledOutput("left", colors.white)
802
803
end
804
805
function LiquidRedstone()
806
807
redstone.setBundledOutput("left", colors.lightGray)
808
809
end
810
811
function LiquiCoal()
812
813
redstone.setBundledOutput("left", colors.gray)
814
815
end
816
817
function LiquiEmerald()
818
819
redstone.setBundledOutput("left", colors.black)
820
821
end
822
823
function ManaMetal()
824
825
redstone.setBundledOutput("left", colors.blue)
826
827
end
828
829
function Mithril()
830
831
redstone.setBundledOutput("left", colors.purple)
832
833
end
834
835
function Unstable()
836
837
redstone.setBundledOutput("left", colors.red)
838
839
end
840
841
function Nickel()
842
843
redstone.setBundledOutput("left", colors.magenta)
844
845
end
846
 
847
function ResEnder()
848
849
redstone.setBundledOutput("left", colors.pink)
850
851
end
852
 
853
 function Shiny()
854
855
redstone.setBundledOutput("left", colors.yellow)
856
857
end
858
 
859
 function Silver()
860
861
redstone.setBundledOutput("left", colors.orange)
862
863
end
864
 
865
 function Steel()
866
867
redstone.setBundledOutput("left", colors.brown)
868
869
end
870
 
871
 function Tin()
872
873
redstone.setBundledOutput("right", colors.brown)
874
875
end
876
 
877
 function Uranium()
878
879
redstone.setBundledOutput("right", colors.orange)
880
881
end
882
 
883
 function Yellorium()
884
885
redstone.setBundledOutput("right", colors.yellow)
886
887
end
888
 
889
-- \Function for Metal input
890
891
-- Function for Alloy Input
892
893
function AluminumBrass()
894
	
895
redstone.setBundledOutput("right", colors.pink)
896
897
end
898
899
function Alumite()
900
	
901
redstone.setBundledOutput("right", colors.magenta)
902
903
end
904
905
function Bronze()
906
	
907
redstone.setBundledOutput("right", colors.red)
908
909
end
910
911
function Redalloy()
912
	
913
redstone.setBundledOutput("right", colors.purple)
914
915
end
916
917
function Electrum()
918
	
919
redstone.setBundledOutput("right", colors.blue)
920
921
end
922
923
function Enderium()
924
	
925
redstone.setBundledOutput("right", colors.black)
926
927
end
928
929
function Invar()
930
	
931
redstone.setBundledOutput("right", colors.gray)
932
933
end
934
935
function Lumium()
936
	
937
redstone.setBundledOutput("right", colors.lightGray)
938
939
end
940
941
function Manyullyn()
942
	
943
redstone.setBundledOutput("right", colors.white)
944
945
end
946
947
function PigIron()
948
	
949
redstone.setBundledOutput("right", colors.green)
950
951
end
952
953
function Signalium()
954
	
955
redstone.setBundledOutput("right", colors.lime)
956
957
end
958
959
-- \Function for Alloy input
960
961
-- Function for Fluid Input
962
963
function Pyrotheum()
964
	
965
redstone.setBundledOutput("right", colors.cyan)
966
967
end
968
969
function Blood()
970
	
971
redstone.setBundledOutput("right", colors.lightBlue)
972
973
end
974
975
function Cryotheum()
976
	
977
redstone.setBundledOutput("back", colors.magenta)
978
979
end
980
981
function Glue()
982
	
983
redstone.setBundledOutput("back", colors.red)
984
985
end
986
987
function Lava()
988
	
989
redstone.setBundledOutput("back", colors.purple)
990
991
end
992
993
-- \Function for Fluid Input
994
995
-- Function for Block Input
996
997
function Glass()
998
	
999
redstone.setBundledOutput("back", colors.blue)
1000
1001
end
1002
1003
function Obsidian()
1004
	
1005
redstone.setBundledOutput("back", colors.lightBlue)
1006
1007
end
1008
1009
function Seared()
1010
	
1011
redstone.setBundledOutput("back", colors.cyan)
1012
1013
end
1014
1015
1016
-- \Function for Block Input
1017
-- \Functions for right clicking on monitor and what it is supposed to do.
1018
-----------------------------------------------------------------------------------------------
1019
-- Repeat event for checking if someone Right clicked the Monitor
1020
1021
repeat -- Repeat this:
1022
1023
	event,p1,p2,p3 = os.pullEvent() -- Get Event data: event,p1,p2,p3 from os.pullEvent()
1024
	
1025
		if event == "monitor_touch" then -- When the event monitor_touch is triggered then
1026
		
1027
		mouseWidth = p2 -- sets the number of p2 into the variable mouseWidth.
1028
		mouseHeight = p3 -- same with mouse Height
1029
		checkClickPosition() -- This will run the Function previously created!
1030
		
1031
		-- Debug stuff!
1032
		
1033
		print(mouseWidth)
1034
		print(mouseHeight)
1035
		print("CLL: ", CLL)
1036
		print("CAL: ", CAL)
1037
		print("CML: ", CML)
1038
		print("CBL: ", CBL)
1039
		
1040
		--\ Debug stuff!
1041
		
1042
		end -- end the IF statement.
1043
1044
until event=="char" and p1==("x") -- Repeat until event "char" is activated and "x" is pressed.
1045
1046
-- \Repeat event for checking if someone Right clicked the Monitor