Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("right")
- rednet.open("top")
- tBarC = 8
- tBartC = 1
- backColor = 32768
- function titlebar()
- term.setCursorPos(1,1)
- term.setBackgroundColor(tBarC)
- term.setTextColor(tBartC)
- term.clearLine()
- term.setCursorPos(3,1)
- print("[Select which apiary]")
- term.setCursorPos(39,19)
- print("[Start]")
- end
- function background()
- term.setBackgroundColor(backColor)
- term.clear()
- bground = paintutils.loadImage(".gui")
- paintutils.drawImage(bground,1,1)
- end
- function one()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 1")
- rednet.send(474, "1")
- end
- function two()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 2")
- rednet.send(474, "2")
- end
- function three()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 3")
- rednet.send(474, "3")
- end
- function four()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 4")
- rednet.send(474, "4")
- end
- function five()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 5")
- rednet.send(474, "5")
- end
- function six()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 6")
- rednet.send(474, "6")
- end
- function seven()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 7")
- rednet.send(474, "7")
- end
- function eight()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 8")
- rednet.send(474, "8")
- end
- function nine()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 9")
- rednet.send(474, "9")
- end
- function ten()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 10")
- rednet.send(474, "10")
- end
- function eleven()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 11")
- rednet.send(474, "11")
- end
- function tweleve()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 12")
- rednet.send(474, "12")
- end
- function thirteen()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 13")
- rednet.send(474, "13")
- end
- function fourteen()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 14")
- rednet.send(474, "14")
- end
- function fithteen()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 15")
- rednet.send(474, "15")
- end
- function sixteen()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 16")
- rednet.send(474, "16")
- end
- function seventeen()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 17")
- rednet.send(474, "17")
- end
- function eighteen()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 18")
- rednet.send(474, "18")
- end
- function nineteen()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 19")
- rednet.send(474, "19")
- end
- function twenty()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 20")
- rednet.send(474, "20")
- end
- function twentyone()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 21")
- rednet.send(474, "21")
- end
- function twentytwo()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 22")
- rednet.send(474, "22")
- end
- function twentythree()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 23")
- rednet.send(474, "23")
- end
- function twentyfour()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 24")
- rednet.send(474, "24")
- end
- function twentyfive()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 25")
- rednet.send(474, "25")
- end
- function twentysix()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 26")
- rednet.send(474, "26")
- end
- function twentyseven()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 27")
- rednet.send(474, "27")
- end
- function twentyeight()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 28")
- rednet.send(474, "28")
- end
- function twentynine()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 29")
- rednet.send(474, "29")
- end
- function thirty()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 30")
- rednet.send(474, "30")
- end
- function thirtyone()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 31")
- rednet.send(474, "31")
- end
- function thirtytwo()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 32")
- rednet.send(474, "32")
- end
- function thirtythree()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 33")
- rednet.send(474, "33")
- end
- function thirtyfour()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 34")
- rednet.send(474, "34")
- end
- function thirtyfive()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 35")
- rednet.send(474, "35")
- end
- function thirtysix()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 36")
- rednet.send(474, "36")
- end
- function thirtyseven()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 37")
- rednet.send(474, "37")
- end
- function thirtyeight()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 38")
- rednet.send(474, "38")
- end
- function thirtynine()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 39")
- rednet.send(474, "39")
- end
- function fourty()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 40")
- rednet.send(474, "40")
- end
- function fourtyone()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 41")
- rednet.send(474, "41")
- end
- function fourtytwo()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 42")
- rednet.send(474, "42")
- end
- function fourtythree()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 43")
- rednet.send(474, "43")
- end
- function fourtyfour()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 44")
- rednet.send(474, "44")
- end
- function fourtyfive()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 45")
- rednet.send(474, "45")
- end
- function fourtysix()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 46")
- rednet.send(474, "46")
- end
- function fourtyseven()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 47")
- rednet.send(474, "47")
- end
- function fourtyeight()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 48")
- rednet.send(474, "48")
- end
- function fourtynine()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 49")
- rednet.send(474, "49")
- end
- function fifty()
- term.setCursorPos(2,18)
- term.setBackgroundColor(32768)
- print("apairy 50")
- rednet.send(474, "50")
- end
- function fail()
- term.setCursorPos(2,18)
- print("Error")
- term.setCursorPos(8,18)
- print(X..", "..Y)
- end
- -- print(table.concat({os.pullEventRaw()}, ","))
- function main()
- while true do
- event, button, X, Y = os.pullEvent("mouse_click")
- X = tonumber(X)
- Y = tonumber(Y)
- if X == 5 and Y == 15 then
- one()
- break
- elseif X == 9 and Y == 15 then
- two()
- break
- elseif X == 13 and Y == 15 then
- three()
- break
- elseif X == 17 and Y == 15 then
- four()
- break
- elseif X == 21 and Y == 15 then
- five()
- break
- elseif X == 25 and Y == 15 then
- six()
- break
- elseif X == 29 and Y == 15 then
- seven()
- break
- elseif X == 33 and Y == 15 then
- eight()
- break
- elseif X == 37 and Y == 15 then
- nine()
- break
- elseif X == 41 and Y == 15 then
- ten()
- break
- elseif X == 5 and Y == 12 then
- eleven()
- break
- elseif X == 9 and Y == 12 then
- tweleve()
- break
- elseif X == 13 and Y == 12 then
- thirteen()
- break
- elseif X == 17 and Y == 12 then
- fourteen()
- break
- elseif X == 21 and Y == 12 then
- fithteen()
- break
- elseif X == 25 and Y == 12 then
- sixteen()
- break
- elseif X == 29 and Y == 12 then
- seventeen()
- break
- elseif X == 33 and Y == 12 then
- eighteen()
- break
- elseif X == 37 and Y == 12 then
- nineteen()
- break
- elseif X == 41 and Y == 12 then
- twenty()
- break
- elseif X == 5 and Y == 9 then
- twentyone()
- break
- elseif X == 9 and Y == 9 then
- twentytwo()
- break
- elseif X == 13 and Y == 9 then
- twentythree()
- break
- elseif X == 17 and Y == 9 then
- twentyfour()
- break
- elseif X == 21 and Y == 9 then
- twentyfive()
- break
- elseif X == 25 and Y == 9 then
- twentysix()
- break
- elseif X == 29 and Y == 9 then
- twentyseven()
- break
- elseif X == 33 and Y == 9 then
- twentyeight()
- break
- elseif X == 37 and Y == 9 then
- twentynine()
- break
- elseif X == 41 and Y == 9 then
- thirty()
- break
- elseif X == 5 and Y == 6 then
- thirtyone()
- break
- elseif X == 9 and Y == 6 then
- thirtytwo()
- break
- elseif X == 13 and Y == 6 then
- thirtythree()
- break
- elseif X == 17 and Y == 6 then
- thirtyfour()
- break
- elseif X == 21 and Y == 6 then
- thirtyfive()
- break
- elseif X == 25 and Y == 6 then
- thirtysix()
- break
- elseif X == 29 and Y == 6 then
- thirtyseven()
- break
- elseif X == 33 and Y == 6 then
- thirtyeight()
- break
- elseif X == 37 and Y == 6 then
- thirtynine()
- break
- elseif X == 41 and Y == 6 then
- fourty()
- break
- elseif X == 5 and Y == 3 then
- fourtyone()
- break
- elseif X == 9 and Y == 3 then
- fourtytwo()
- break
- elseif X == 13 and Y == 3 then
- fourtythree()
- break
- elseif X == 17 and Y == 3 then
- fourtyfour()
- break
- elseif X == 21 and Y == 3 then
- fourtyfive()
- break
- elseif X == 25 and Y == 3 then
- fourtysix()
- break
- elseif X == 29 and Y == 3 then
- fourtyseven()
- break
- elseif X == 33 and Y == 3 then
- fourtyeight()
- break
- elseif X == 37 and Y == 3 then
- fourtynine()
- break
- elseif X == 41 and Y == 3 then
- fifty()
- break
- else
- fail()
- break
- end
- end
- end
- while true do
- background()
- main()
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement