Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----[[ File Save/Loade ]]-----
- installedFile = "data/RsBundled.cfg"
- crashFile = "data/crash.log"
- tw, th = term.getSize()
- side = "back"
- srs1 = colors.purple
- srs2 = colors.blue
- srs3 = colors.brown
- srs4 = colors.green
- srs5 = colors.red
- srs6 = colors.gray
- srs7 = colors.cyan
- srs8 = colors.yellow
- srs9 = colors.magenta
- srs10 = colors.orange
- srs11 = colors.pink
- srs12 = colors.lime
- srs13 = colors.lightGray
- srs14 = colors.lightBlue
- srs15 = colors.white
- srs16 = colors.black
- function cls()
- term.clear()
- term.setCursorPos(1,1)
- end
- function Help()
- cls()
- PrintC("Hamarosan")
- sleep(3)
- end
- function PrintC(sText)
- local w, h = term.getSize()
- local x, y = term.getCursorPos()
- x = math.max(math.floor((w / 2) - (#sText / 2)), 0)
- term.setCursorPos(x, y)
- print(sText)
- end
- function PrintC2(sText)
- local w, h = term.getSize()
- local x, y = term.getCursorPos()
- x = math.max(math.floor((w / 2) - 6), 0)
- term.setCursorPos(x, y)
- print(sText)
- end
- function installFile()
- cls()
- for i=1, 100 do
- term.setCursorPos( tw/2-4, 2 )
- write("Installing")
- term.setCursorPos( tw/2-1, 4 )
- write(i .. " %")
- term.setCursorPos( tw/2-(12)+i/4, 5 )
- write("#")
- sleep(.01)
- end
- local rs1 = colors.black
- local rs2 = colors.black
- local rs3 = colors.black
- local rs4 = colors.black
- local rs5 = colors.black
- local rs6 = colors.black
- local rs7 = colors.black
- local rs8 = colors.black
- local rs9 = colors.black
- local rs10 = colors.black
- local rs11 = colors.black
- local rs12 = colors.black
- local rs13 = colors.black
- local rs14 = colors.black
- local rs15 = colors.black
- local rs16 = colors.black
- local sPurName = "NoName"
- local sBluName = "NoName"
- local sBroName = "NoName"
- local sGreName = "NoName"
- local sRedName = "NoName"
- local sGraName = "NoName"
- local sCyaName = "NoName"
- local sYelName = "NoName"
- local sMagName = "NoName"
- local sOraName = "NoName"
- local sPinName = "NoName"
- local sLimName = "NoName"
- local sLgrName = "NoName"
- local sLblName = "NoName"
- local sWhiName = "NoName"
- fs.makeDir("data")
- local file = fs.open(installedFile, "w")
- file.writeLine("purple")
- file.writeLine(" Name: = " .. sPurName)
- file.writeLine(" Set: = " .. rs1)
- file.writeLine("blue")
- file.writeLine(" Name: = " .. sBluName)
- file.writeLine(" Set: = " .. rs2)
- file.writeLine("brown")
- file.writeLine(" Name: = " .. sBroName)
- file.writeLine(" Set: = " .. rs3)
- file.writeLine("green")
- file.writeLine(" Name: = " .. sGreName)
- file.writeLine(" Set: = " .. rs4)
- file.writeLine("red")
- file.writeLine(" Name: = " .. sRedName)
- file.writeLine(" Set: = " .. rs5)
- file.close()
- local file = fs.open(installedFile, "a")
- file.writeLine("gray")
- file.writeLine(" Name: = " .. sGraName)
- file.writeLine(" Set: = " .. rs6)
- file.writeLine("cyan")
- file.writeLine(" Name: = " .. sCyaName)
- file.writeLine(" Set: = " .. rs7)
- file.writeLine("yellow")
- file.writeLine(" Name: = " .. sYelName)
- file.writeLine(" Set: = " .. rs8)
- file.writeLine("magenta")
- file.writeLine(" Name: = " .. sMagName)
- file.writeLine(" Set: = " .. rs9)
- file.writeLine("orange")
- file.writeLine(" Name: = " .. sOraName)
- file.writeLine(" Set: = " .. rs10)
- file.close()
- local file = fs.open(installedFile, "a")
- file.writeLine("pink")
- file.writeLine(" Name: = " .. sPinName)
- file.writeLine(" Set: = " .. rs11)
- file.writeLine("lime")
- file.writeLine(" Name: = " .. sLimName)
- file.writeLine(" Set: = " .. rs12)
- file.writeLine("L_Gray")
- file.writeLine(" Name: = " .. sLgrName)
- file.writeLine(" Set: = " .. rs13)
- file.writeLine("L_Blue")
- file.writeLine(" Name: = " .. sLblName)
- file.writeLine(" Set: = " .. rs14)
- file.writeLine("white")
- file.writeLine(" Name: = " .. sWhiName)
- file.writeLine(" Set: = " .. rs15)
- file.close()
- cls()
- term.setCursorPos(1, (th/2)-1)
- PrintC("***************")
- PrintC("* Installed *")
- PrintC("***************")
- sleep(2)
- end
- function fileInstall()
- if not fs.exists(installedFile) then
- installFile()
- end
- end
- function saveData()
- if fs.exists(installedFile) then
- cls()
- local szaz = 3
- for i=1, 5 do
- term.setCursorPos( tw/2-1, 2 )
- write(math.floor(i*6) .. " %")
- term.setCursorPos( 14+i+szaz, 3 )
- write("#")
- sleep(.001)
- end
- local file = fs.open(installedFile, "w")
- file.writeLine("purple")
- file.writeLine(" Name: = " .. sPurName)
- file.writeLine(" Set: = " .. rs1)
- file.writeLine("blue")
- file.writeLine(" Name: = " .. sBluName)
- file.writeLine(" Set: = " .. rs2)
- file.writeLine("brown")
- file.writeLine(" Name: = " .. sBroName)
- file.writeLine(" Set: = " .. rs3)
- file.writeLine("green")
- file.writeLine(" Name: = " .. sGreName)
- file.writeLine(" Set: = " .. rs4)
- file.writeLine("red")
- file.writeLine(" Name: = " .. sRedName)
- file.writeLine(" Set: = " .. rs5)
- file.close()
- local szaz = szaz+30
- for i=1,5 do
- term.setCursorPos( tw/2-1, 2 )
- write(math.floor(i*6+szaz) .. " %")
- term.setCursorPos( 14+i+szaz/4, 3 )
- print("#")
- end
- local file = fs.open(installedFile, "a")
- file.writeLine("gray")
- file.writeLine(" Name: = " .. sGraName)
- file.writeLine(" Set: = " .. rs6)
- file.writeLine("cyan")
- file.writeLine(" Name: = " .. sCyaName)
- file.writeLine(" Set: = " .. rs7)
- file.writeLine("yellow")
- file.writeLine(" Name: = " .. sYelName)
- file.writeLine(" Set: = " .. rs8)
- file.writeLine("magenta")
- file.writeLine(" Name: = " .. sMagName)
- file.writeLine(" Set: = " .. rs9)
- file.writeLine("orange")
- file.writeLine(" Name: = " .. sOraName)
- file.writeLine(" Set: = " .. rs10)
- file.close()
- local szaz = 69
- for i=1, 5 do
- term.setCursorPos( tw/2-1, 2 )
- write(math.floor(i*6+szaz+1) .. " %")
- term.setCursorPos( 14+i+szaz/4-4, 3 )
- -- term.setCursorPos( tw/2-(11)+szaz/3+(i*5/3)-9, 3 )
- print("#")
- end
- local file = fs.open(installedFile, "a")
- file.writeLine("pink")
- file.writeLine(" Name: = " .. sPinName)
- file.writeLine(" Set: = " .. rs11)
- file.writeLine("lime")
- file.writeLine(" Name: = " .. sLimName)
- file.writeLine(" Set: = " .. rs12)
- file.writeLine("L_Gray")
- file.writeLine(" Name: = " .. sLgrName)
- file.writeLine(" Set: = " .. rs13)
- file.writeLine("L_Blue")
- file.writeLine(" Name: = " .. sLblName)
- file.writeLine(" Set: = " .. rs14)
- file.writeLine("white")
- file.writeLine(" Name: = " .. sWhiName)
- file.writeLine(" Set: = " .. rs15)
- file.close()
- term.setCursorPos(1, (th/2)-1)
- PrintC("************")
- PrintC("* Done *")
- PrintC("************")
- sleep(1)
- end
- end
- function loadData()
- if fs.exists(installedFile) then
- local file = fs.open(installedFile, "r")
- if not file then
- local crashfile = fs.open(crashFile, "a")
- file.writeLine("File olvasasi hiba")
- file.writeLine("File: " .. file )
- file.writeLine()
- file.close()
- sleep(1)
- print("File olvasasi hiba, tobb informacio a data/crash.log file-ba")
- local ido = 6
- while not ido == 0 do
- local ido = ido - 1
- sleep(1)
- cls()
- print(ido)
- end
- os.reboot()
- end
- file.readLine()
- lPur = file.readLine() --Purple
- s1 = lPur:find("=")
- sPurName = lPur:sub(s1+2)
- lPurset = file.readLine()
- s1 = lPurset:find("=")
- rs1 = lPurset:sub(s1+2)
- file.readLine()
- lBlu = file.readLine() --Blue
- s1 = lBlu:find("=")
- sBluName = lBlu:sub(s1+2)
- lBluset = file.readLine()
- s1 = lBluset:find("=")
- rs2 = lBluset:sub(s1+2)
- file.readLine()
- lbro = file.readLine() --brown
- s1 = lbro:find("=")
- sBroName = lbro:sub(s1+2)
- lbroset = file.readLine()
- s1 = lbroset:find("=")
- rs3 = lbroset:sub(s1+2)
- file.readLine()
- lgre = file.readLine() --green
- s1 = lgre:find("=")
- sGreName = lgre:sub(s1+2)
- lgreset = file.readLine()
- s1 = lgreset:find("=")
- rs4 = lgreset:sub(s1+2)
- file.readLine()
- lred = file.readLine() --red
- s1 = lred:find("=")
- sRedName = lred:sub(s1+2)
- lredset = file.readLine()
- s1 = lredset:find("=")
- rs5 = lredset:sub(s1+2)
- file.readLine()
- lgra = file.readLine() --gray
- s1 = lgra:find("=")
- sGraName = lgra:sub(s1+2)
- lgraset = file.readLine()
- s1 = lgraset:find("=")
- rs6 = lgraset:sub(s1+2)
- file.readLine()
- lcya = file.readLine() --cyan
- s1 = lcya:find("=")
- sCyaName = lcya:sub(s1+2)
- lcyaset = file.readLine()
- s1 = lcyaset:find("=")
- rs7 = lcyaset:sub(s1+2)
- file.readLine()
- lyel = file.readLine() --yellow
- s1 = lyel:find("=")
- sYelName = lyel:sub(s1+2)
- lyelset = file.readLine()
- s1 = lyelset:find("=")
- rs8 = lyelset:sub(s1+2)
- file.readLine()
- lmag = file.readLine() --magenta
- s1 = lmag:find("=")
- sMagName = lmag:sub(s1+2)
- lmagset = file.readLine()
- s1 = lmagset:find("=")
- rs9 = lmagset:sub(s1+2)
- file.readLine()
- lora = file.readLine() --orange
- s1 = lora:find("=")
- sOraName = lora:sub(s1+2)
- loraset = file.readLine()
- s1 = loraset:find("=")
- rs10 = loraset:sub(s1+2)
- file.readLine()
- lpin = file.readLine() --pink
- s1 = lpin:find("=")
- sPinName = lpin:sub(s1+2)
- lpinset = file.readLine()
- s1 = lpinset:find("=")
- rs11 = lpinset:sub(s1+2)
- file.readLine()
- llim = file.readLine() --lime
- s1 = llim:find("=")
- sLimName = llim:sub(s1+2)
- llimset = file.readLine()
- s1 = llimset:find("=")
- rs12 = llimset:sub(s1+2)
- file.readLine()
- lLgr = file.readLine() --L_Gray
- s1 = lLgr:find("=")
- sLgrName = lLgr:sub(s1+2)
- lLgrset = file.readLine()
- s1 = lLgrset:find("=")
- rs13 = lLgrset:sub(s1+2)
- file.readLine()
- lLbl = file.readLine() --L_Blue
- s1 = lLbl:find("=")
- sLblName = lLbl:sub(s1+2)
- lLblset = file.readLine()
- s1 = lLblset:find("=")
- rs14 = lLblset:sub(s1+2)
- file.readLine()
- lwhi = file.readLine() --white
- s1 = lwhi:find("=")
- sWhiName = lwhi:sub(s1+2)
- lwhiset = file.readLine()
- s1 = lwhiset:find("=")
- rs15 = lwhiset:sub(s1+2)
- redstone.setBundledOutput(side, rs1+rs2+rs3+rs4+rs5+rs6+rs7+rs8+rs9+rs10+rs11+rs12+rs13+rs14+rs15)
- end
- end
- -----[[ Menu system ]]-----
- --[[ Local variables ]]--
- local termWidth, termHeight = term.getSize()
- local selectedItem = 1
- local inMainMenu = true
- local inOtherMenu = false
- --[[ Menu Methods ]]--
- function purple()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "purple"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function blue()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "blue"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function brown()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "brown"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function green()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "green"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function red()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "red"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function gray()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "gray"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function cyan()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "cyan"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function yellow()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "yellow"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function magenta()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "magenta"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function orange()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "orange"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function pink()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "pink"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function lime()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "lime"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function LGray()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "LGray"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function LBlue()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "LBlue"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function white()
- inOtherMenu = true
- selectedItem = 1
- Bcolor = "white"
- while inOtherMenu do
- term.clear()
- term.setCursorPos(1,1)
- printMenu2(otherMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, otherMenu)
- end
- end
- function alloff()
- rs1 = srs16
- rs2 = srs16
- rs3 = srs16
- rs4 = srs16
- rs5 = srs16
- rs6 = srs16
- rs7 = srs16
- rs8 = srs16
- rs9 = srs16
- rs10 = srs16
- rs11 = srs16
- rs12 = srs16
- rs13 = srs16
- rs14 = srs16
- rs15 = srs16
- saveData()
- OnOff()
- end
- function allon()
- rs1 = srs1
- rs2 = srs2
- rs3 = srs3
- rs4 = srs4
- rs5 = srs5
- rs6 = srs6
- rs7 = srs7
- rs8 = srs8
- rs9 = srs9
- rs10 = srs10
- rs11 = srs11
- rs12 = srs12
- rs13 = srs13
- rs14 = srs14
- rs15 = srs15
- saveData()
- OnOff()
- end
- function Back()
- selectedItem = 1
- inOtherMenu = false
- end
- function Exit()
- inMainMenu = false
- end
- function Reboot()
- os.reboot()
- end
- function On()
- if Bcolor == "purple" then rs1 = srs1 end
- if Bcolor == "blue" then rs2 = srs2 end
- if Bcolor == "brown" then rs3 = srs3 end
- if Bcolor == "green" then rs4 = srs4 end
- if Bcolor == "red" then rs5 = srs5 end
- if Bcolor == "gray" then rs6 = srs6 end
- if Bcolor == "cyan" then rs7 = srs7 end
- if Bcolor == "yellow" then rs8 = srs8 end
- if Bcolor == "magenta" then rs9 = srs9 end
- if Bcolor == "orange" then rs10 = srs10 end
- if Bcolor == "pink" then rs11 = srs11 end
- if Bcolor == "lime" then rs12 = srs12 end
- if Bcolor == "LGray" then rs13 = srs13 end
- if Bcolor == "LBlue" then rs14 = srs14 end
- if Bcolor == "white" then rs15 = srs15 end
- saveData()
- OnOff()
- selectedItem = 1
- inOtherMenu = false
- end
- function Off()
- if Bcolor == "purple" then rs1 = srs16 end
- if Bcolor == "blue" then rs2 = srs16 end
- if Bcolor == "brown" then rs3 = srs16 end
- if Bcolor == "green" then rs4 = srs16 end
- if Bcolor == "red" then rs5 = srs16 end
- if Bcolor == "gray" then rs6 = srs16 end
- if Bcolor == "cyan" then rs7 = srs16 end
- if Bcolor == "yellow" then rs8 = srs16 end
- if Bcolor == "magenta" then rs9 = srs16 end
- if Bcolor == "orange" then rs10 = srs16 end
- if Bcolor == "pink" then rs11 = srs16 end
- if Bcolor == "lime" then rs12 = srs16 end
- if Bcolor == "LGray" then rs13 = srs16 end
- if Bcolor == "LBlue" then rs14 = srs16 end
- if Bcolor == "white" then rs15 = srs16 end
- saveData()
- OnOff()
- selectedItem = 1
- inOtherMenu = false
- end
- function SetName()
- term.setCursorPos(tw/2-5, th/2)
- if Bcolor == "purple" then sPurName = read() end
- if Bcolor == "blue" then sBluName = read() end
- if Bcolor == "brown" then sBroName = read() end
- if Bcolor == "green" then sGreName = read() end
- if Bcolor == "red" then sRedName = read() end
- if Bcolor == "gray" then sGraName = read() end
- if Bcolor == "cyan" then sCyaName = read() end
- if Bcolor == "yellow" then sYelName = read() end
- if Bcolor == "magenta" then sMagName = read() end
- if Bcolor == "orange" then sOraName = read() end
- if Bcolor == "pink" then sPinName = read() end
- if Bcolor == "lime" then sLimName = read() end
- if Bcolor == "LGray" then sLgrName = read() end
- if Bcolor == "LBlue" then sLblName = read() end
- if Bcolor == "white" then sWhiName = read() end
- saveData()
- OnOff()
- selectedItem = 1
- inOtherMenu = false
- end
- --[[ Menu Definitions ]]--
- mainMenu = {
- [1] = { text = "Purple: ", handler = purple }, --Purple
- [2] = { text = "Blue: ", handler = blue },
- [3] = { text = "Brown: ", handler = brown },
- [4] = { text = "Green: ", handler = green },
- [5] = { text = "Red: ", handler = red },
- [6] = { text = "Gray: ", handler = gray },
- [7] = { text = "Cyan: ", handler = cyan },
- [8] = { text = "Yellow: ", handler = yellow },
- [9] = { text = "Magenta: ", handler = magenta },
- [10] = { text = "Orange: ", handler = orange },
- [11] = { text = "Pink: ", handler = pink },
- [12] = { text = "Lime: ", handler = lime },
- [13] = { text = "L_Gray: ", handler = LGray },
- [14] = { text = "L_Blue: ", handler = LBlue },
- [15] = { text = "White: ", handler = white },
- [16] = { text = "All Off", handler = alloff },
- [17] = { text = "All On", handler = allon },
- [18] = { text = "Exit", handler = Exit }
- }
- otherMenu = {
- [1] = { text = "On", handler = On },
- [2] = { text = "Off", handler = Off },
- [3] = { text = "SetName", handler = SetName },
- [4] = { text = "Back", handler = Back }
- }
- --[[ Printing Methods ]]--
- function printMenu2(menu)
- term.setCursorPos(1,5)
- for i=1,#menu do
- if i == selectedItem then
- PrintC2(">> "..menu[i].text)
- else
- PrintC2(" "..menu[i].text)
- end
- end
- end
- function printMenu(menu)
- for i=1,#menu do
- if i == selectedItem then
- print(">> "..menu[i].text)
- else
- print(" "..menu[i].text)
- end
- end
- end
- --[[ Handler Methods ]]--
- function onKeyPressed( key, menu )
- if key == keys.enter then
- onItemSelected(menu)
- elseif key == keys.up then
- if selectedItem > 1 then
- selectedItem = selectedItem - 1
- end
- elseif key == keys.down then
- if selectedItem < #menu then
- selectedItem = selectedItem +1
- end
- elseif key == 207 then
- cls()
- term.setCursorPos(tw/2-4, th/2)
- print("Rebooting")
- sleep(2)
- os.reboot()
- elseif key == 23 then
- installFile()
- elseif key == 59 then
- Help()
- end
- end
- function onItemSelected(menu)
- menu[selectedItem].handler()
- end
- --[[ Main Method ]]--
- function main()
- while inMainMenu do
- term.clear()
- term.setCursorPos(13,1)
- print(sPurName .. ", " .. rs1Set)
- term.setCursorPos(13,2)
- print(sBluName .. ", " .. rs2Set)
- term.setCursorPos(13,3)
- print(sBroName .. ", " .. rs3Set)
- term.setCursorPos(13,4)
- print(sGreName .. ", " .. rs4Set)
- term.setCursorPos(13,5)
- print(sRedName .. ", " .. rs5Set)
- term.setCursorPos(13,6)
- print(sGraName .. ", " .. rs6Set)
- term.setCursorPos(13,7)
- print(sCyaName .. ", " .. rs7Set)
- term.setCursorPos(13,8)
- print(sYelName .. ", " .. rs8Set)
- term.setCursorPos(13,9)
- print(sMagName .. ", " .. rs9Set)
- term.setCursorPos(13,10)
- print(sOraName .. ", " .. rs10Set)
- term.setCursorPos(13,11)
- print(sPinName .. ", " .. rs11Set)
- term.setCursorPos(13,12)
- print(sLimName .. ", " .. rs12Set)
- term.setCursorPos(13,13)
- print(sLgrName .. ", " .. rs13Set)
- term.setCursorPos(13,14)
- print(sLblName .. ", " .. rs14Set)
- term.setCursorPos(13,15)
- print(sWhiName .. ", " .. rs15Set)
- term.setCursorPos(1,1)
- printMenu(mainMenu)
- event, key = os.pullEvent("key")
- onKeyPressed(key, mainMenu)
- end
- end
- function OnOff()
- loadData()
- if rs1 == "1024" then rs1Set = "On" else rs1Set = "Off" end
- if rs2 == "2048" then rs2Set = "On" else rs2Set = "Off" end
- if rs3 == "4096" then rs3Set = "On" else rs3Set = "Off" end
- if rs4 == "8192" then rs4Set = "On" else rs4Set = "Off" end
- if rs5 == "16384" then rs5Set = "On" else rs5Set = "Off" end
- if rs6 == "128" then rs6Set = "On" else rs6Set = "Off" end
- if rs7 == "512" then rs7Set = "On" else rs7Set = "Off" end
- if rs8 == "16" then rs8Set = "On" else rs8Set = "Off" end
- if rs9 == "4" then rs9Set = "On" else rs9Set = "Off" end
- if rs10 == "2" then rs10Set = "On" else rs10Set = "Off" end
- if rs11 == "64" then rs11Set = "On" else rs11Set = "Off" end
- if rs12 == "32" then rs12Set = "On" else rs12Set = "Off" end
- if rs13 == "256" then rs13Set = "On" else rs13Set = "Off" end
- if rs14 == "8" then rs14Set = "On" else rs14Set = "Off" end
- if rs15 == "1" then rs15Set = "On" else rs15Set = "Off" end
- end
- -----[[ MainProgram ]]-----
- fileInstall()
- OnOff()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement