View difference between Paste ID: 6ajk32g1 and PvSjQBJr
SHOW: | | - or go back to the newest paste.
1
m = peripheral.wrap("right")
2
 
3
slc = 0
4
tBarC = 8
5
tBartC = 1
6
backColor = 1
7
 
8
function titlebar()
9
  term.setCursorPos(1,1)
10
  term.setBackgroundColor(tBarC)
11
  term.setTextColor(tBartC)
12
  term.clearLine()
13
  term.setCursorPos(3,1)
14
  print("[Select which apiary]")
15
  term.setCursorPos(39,19)
16
  print("[Start]")
17
end
18
 
19
function background()
20
  term.setBackgroundColor(backColor)
21
  term.clear()
22
  bground = paintutils.loadImage(".gui")
23
  paintutils.drawImage(bground,1,1)
24
end
25
 
26
function one()
27
  term.clear()
28
  term.setCursorPos(1,1)
29
  term.setBackgroundColor(32768)
30
  print("apairy 1")
31
end
32
 
33
function two()
34
  term.clear()
35
  term.setCursorPos(1,1)
36
  term.setBackgroundColor(32768)
37
  print("apairy 2")
38
  end
39
 
40
function three()
41
  term.clear()
42
  term.setCursorPos(1,1)
43-
  term.setBackgoundColor(32768)
43+
44
  print("apairy 3")
45
  end
46
 
47
function four()
48
  term.clear()
49
  term.setCursorPos(1,1)
50-
  term.setBackgoundColor(32768)
50+
51
  print("apairy 4")
52
  end
53
 
54
function five()
55
  term.clear()
56
  term.setCursorPos(1,1)
57-
  term.setBackgoundColor(32768)
57+
58
  print("apairy 5")
59
  end
60
 
61
function six()
62
  term.clear()
63
  term.setCursorPos(1,1)
64-
  term.setBackgoundColor(32768)
64+
65
  print("apairy 6")
66
end
67
 
68
function seven()
69
  term.clear()
70
  term.setCursorPos(1,1)
71-
  term.setBackgoundColor(32768)
71+
72
  print("apairy 7")
73
end
74
 
75
function eight()
76
  term.clear()
77
  term.setCursorPos(1,1)
78-
  term.setBackgoundColor(32768)
78+
79
  print("apairy 8")
80
end
81
 
82
function nine()
83
  term.clear()
84
  term.setCursorPos(1,1)
85-
  term.setBackgoundColor(32768)
85+
86
  print("apairy 9")
87
end  
88
 
89
function ten()
90
  term.clear()
91
  term.setCursorPos(1,1)
92-
  term.setBackgoundColor(32768)
92+
93
  print("apairy 3")
94
end
95
 
96
background()
97
-- print(table.concat({os.pullEventRaw()}, ","))
98
 
99
while true do
100
event, X, Y = os.pullEvent("mouse_click")
101
102
X = tonumber(X)
103
Y = tonumber(Y)
104
105-
  if X == 1 and Y = 5 then
105+
  if X == 5 and Y == 3 then
106
    one()
107-
    elseif X == 1 and Y == 9 then
107+
    elseif X == 9 and Y == 3 then
108
    two()
109-
    elseif X == 1 and Y == 13 then
109+
    elseif X == 13 and Y == 3 then
110
    three()
111-
    elseif X == 1 and Y == 17 then
111+
    elseif X == 17 and Y == 3 then
112
    four()
113-
    elseif X == 1 and Y == 21 then
113+
    elseif X == 21 and Y == 3 then
114
    five()
115-
    elseif X == 1 and  Y == 25 then
115+
    elseif X == 25 and  Y == 3 then
116
    six()
117-
    elseif X == 1 and Y == 29 then
117+
    elseif X == 29 and Y == 3 then
118
    seven()
119-
    elseif X == 1 and Y == 33 then
119+
    elseif X == 33 and Y == 3 then
120
    eight()
121-
    elseif X == 1 and Y == 37 then
121+
    elseif X == 37 and Y == 3 then
122
    nine()
123-
    elseif X == 1 and Y == 41 then
123+
    elseif X == 41 and Y == 3 then
124
    ten()
125
    else
126
    print(X..", "..Y)
127
    
128
  end
129
end