Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Feel free to copy/change for your needs but please give credit where due
- --Replace PLACEHOLDER with the name of your peripheral. Within quotes
- --Monitor must be on right of computer
- --These Options can also be changed by editing "Config" after running this program for the first time
- --Changing Config through gui may come at a later date
- --Monitor must be 2 wide but can be as high as you like
- background = colours.black
- text = colours.white
- bookstand = "PLACEHOLDER" --You can use a bookstand or book receptacle
- container = "PLACEHOLDER"
- ------------------------Only change above this line
- function Config(c1,c2)
- Config = {}
- Config["COLOUR"] = c1
- Config["TEXT"] = c2
- Config["STANDorRECIPTACLE"] = bookstand
- Config["CONTAINER"] = container
- local config_file = fs.open("Config", "w")
- config_file.write(textutils.serialize(Config))
- config_file.close()
- end
- if fs.exists("Config") then
- print("CONFIG FOUND")
- else Config(background,text)
- end
- if fs.exists("Portal_API") then
- print("API FOUND")
- else shell.run("pastebin", "get", "JmdqiXBZ", "Portal_API")
- end
- os.loadAPI("Portal_API")
- if fs.exists("Active List") then
- print("ACTIVE LIST FOUND")
- else local file = fs.open("Active List", "w")
- file.write("display1")
- file.close()
- end
- fs.delete("Buttons")
- fs.delete("Buttons2")
- List_num = Portal_API.Get_Active_List()
- Portal_API.Start_screen()
- if List_num == "display1" then
- Portal_API.list1()
- elseif List_num == "display2" then
- Portal_API.list2()
- end
- term.clear()
- term.setCursorPos(1,1)
- print("Program is written by Jandras aka Janadin")
- print("Edit Config with peripheral names on first use")
- print("Linkbook Capacity is: "..Portal_API.cap)
- while List_num == "display1" do
- Portal_API.New()
- if fs.exists("Buttons") then
- shell.run("Buttons")
- end
- Portal_API.List1set()
- Portal_API.List2set()
- Portal_API.Get_Active_List()
- end
- while List_num == "display2" do
- Portal_API.New()
- if fs.exists("Buttons2") then
- shell.run("Buttons2")
- end
- Portal_API.List1set()
- Portal_API.List2set()
- Portal_API.Get_Active_List()
- end
Advertisement
Add Comment
Please, Sign In to add comment