Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Tekkit Rank Command Main Program 0-0-1
- -- Works with: Advanced Computer & Monitor
- -- Environment Tested: Minecraft 1.6.4 Computer Craft version 1.5
- -- Modified By RC-Scorpionfien, Created By Lyqyd
- -- Requires TouchPoint API to work, download at pastebin.com/pFHeia96
- -- Download this file >> http://www.pastebin.com/6anDmXCC
- --Loads the API, straightforward
- os.loadAPI("touchpoint")
- --LIST OF RANKS
- --establish "pages" of buttons
- local page1 = touchpoint.new("top")
- --one variable to put each page into in order to simplify switching
- local t
- --Button Functions
- function doNothing()
- sleep(1)
- end
- function rcMain()
- page1:flash("Main")
- sleep(1)
- shell.run("main")
- end
- function rcNewb()
- page1:flash("Newb")
- sleep(1)
- shell.run("ncommands")
- end
- function rcGa()
- page1:flash("G1")
- sleep(1)
- shell.run("g1commands")
- end
- function rcGb()
- page1:flash("G2")
- sleep(1)
- shell.run("g2commands")
- end
- function rcGc()
- page1:flash("G3")
- sleep(1)
- shell.run("g3commands")
- end
- function rcGd()
- page1:flash("G4")
- sleep(1)
- shell.run("g4commands")
- end
- ---Main Menu
- function mainTable()
- t = page1
- end
- --Set Up Pages
- do
- page1:add("--..--..--..--..--..--..--..--..--..--..--..--..--..--..--..--..--", doNothing, 1, 1, 60, 1, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add(" _______ ______ _ __ _ __ _____ _______ ", doNothing, 1, 2, 60, 2, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add(" |__ __|| ____|| |/ /| |/ /|_ _||__ __| ", doNothing, 1, 3, 60, 3, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add(" | | | |__ | ' / | ' / | | | | ", doNothing, 1, 4, 60, 4, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add(" | | | __| | < | < | | | | ", doNothing, 1, 5, 60, 5, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add(" | | | |____ | . \\ | . \\ _| |_ | | ", doNothing, 1, 6, 60, 6, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add(" |_| |______||_|\\_\\|_|\\_\\|_____| |_| ", doNothing, 1, 7, 60, 7, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add("--''--''--''--''--''--''--''--''--''--''--''--''--''--''--''--''--", doNothing, 1, 8, 60, 8, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add("RC-Tekkit Ranks:", doNothing, 1, 9, 60, 9, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add("...............", doNothing, 1, 10, 60, 10, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add("Newb", rcNewb, 4, 13, 10, 19, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
- page1:add("G1", rcGa, 14, 13, 20, 19, colors.black, colors.lime, colors.lightBlue, colors.black)
- page1:add("G2", rcGb, 24, 13, 30, 19, colors.black, colors.lime, colors.lightBlue, colors.black)
- page1:add("G3", rcGc, 34, 13, 40, 19, colors.black, colors.lime, colors.lightBlue, colors.black)
- page1:add("G4", rcGd, 44, 13, 50, 19, colors.black, colors.lime, colors.lightBlue, colors.black)
- page1:add("Main", rcMain, 20, 21, 30, 22, colors.black, colors.lime, colors.lightBlue, colors.black)
- end
- --Starts with the main Table, then checks for buttons clicked, toggles them, and runs the program it has with my modified t:run2()
- mainTable()
- while true do
- t:draw()
- -- local event, p1, p2, p3 = os.pullEvent() ---monitor_touch, side, xpos, ypos
- local event, p1 = t:handleEvents(os.pullEvent()) ---button_click, name
- if event == "button_click" then
- --remove toggling and simplify button running
- t.buttonList[p1].func()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment