Scorpionfien

Tekkit Rank Command

Jun 22nd, 2015
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. -- Tekkit Rank Command Main Program 0-0-1
  2. -- Works with: Advanced Computer & Monitor
  3. -- Environment Tested: Minecraft 1.6.4 Computer Craft version 1.5
  4. -- Modified By RC-Scorpionfien, Created By Lyqyd
  5. -- Requires TouchPoint API to work, download at pastebin.com/pFHeia96
  6. -- Download this file >> http://www.pastebin.com/6anDmXCC
  7.  
  8. --Loads the API, straightforward
  9. os.loadAPI("touchpoint")
  10.  
  11. --LIST OF RANKS
  12.  
  13. --establish "pages" of buttons
  14. local page1 = touchpoint.new("top")
  15.  
  16. --one variable to put each page into in order to simplify switching
  17. local t
  18.  
  19. --Button Functions
  20.  
  21. function doNothing()
  22. sleep(1)
  23. end
  24.  
  25. function rcMain()
  26. page1:flash("Main")
  27. sleep(1)
  28. shell.run("main")
  29. end
  30.  
  31. function rcNewb()
  32. page1:flash("Newb")
  33. sleep(1)
  34. shell.run("ncommands")
  35. end
  36.  
  37. function rcGa()
  38. page1:flash("G1")
  39. sleep(1)
  40. shell.run("g1commands")
  41. end
  42.  
  43. function rcGb()
  44. page1:flash("G2")
  45. sleep(1)
  46. shell.run("g2commands")
  47. end
  48.  
  49. function rcGc()
  50. page1:flash("G3")
  51. sleep(1)
  52. shell.run("g3commands")
  53. end
  54.  
  55. function rcGd()
  56. page1:flash("G4")
  57. sleep(1)
  58. shell.run("g4commands")
  59. end
  60.  
  61. ---Main Menu
  62. function mainTable()
  63. t = page1
  64. end
  65.  
  66. --Set Up Pages
  67. do
  68. page1:add("--..--..--..--..--..--..--..--..--..--..--..--..--..--..--..--..--", doNothing, 1, 1, 60, 1, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  69. page1:add(" _______ ______ _ __ _ __ _____ _______ ", doNothing, 1, 2, 60, 2, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  70. page1:add(" |__ __|| ____|| |/ /| |/ /|_ _||__ __| ", doNothing, 1, 3, 60, 3, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  71. page1:add(" | | | |__ | ' / | ' / | | | | ", doNothing, 1, 4, 60, 4, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  72. page1:add(" | | | __| | < | < | | | | ", doNothing, 1, 5, 60, 5, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  73. page1:add(" | | | |____ | . \\ | . \\ _| |_ | | ", doNothing, 1, 6, 60, 6, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  74. page1:add(" |_| |______||_|\\_\\|_|\\_\\|_____| |_| ", doNothing, 1, 7, 60, 7, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  75. page1:add("--''--''--''--''--''--''--''--''--''--''--''--''--''--''--''--''--", doNothing, 1, 8, 60, 8, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  76. page1:add("RC-Tekkit Ranks:", doNothing, 1, 9, 60, 9, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  77. page1:add("...............", doNothing, 1, 10, 60, 10, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  78. page1:add("Newb", rcNewb, 4, 13, 10, 19, colors.black, colors.black, colors.lightBlue, colors.lightBlue)
  79. page1:add("G1", rcGa, 14, 13, 20, 19, colors.black, colors.lime, colors.lightBlue, colors.black)
  80. page1:add("G2", rcGb, 24, 13, 30, 19, colors.black, colors.lime, colors.lightBlue, colors.black)
  81. page1:add("G3", rcGc, 34, 13, 40, 19, colors.black, colors.lime, colors.lightBlue, colors.black)
  82. page1:add("G4", rcGd, 44, 13, 50, 19, colors.black, colors.lime, colors.lightBlue, colors.black)
  83. page1:add("Main", rcMain, 20, 21, 30, 22, colors.black, colors.lime, colors.lightBlue, colors.black)
  84.  
  85. end
  86.  
  87. --Starts with the main Table, then checks for buttons clicked, toggles them, and runs the program it has with my modified t:run2()
  88. mainTable()
  89. while true do
  90. t:draw()
  91. -- local event, p1, p2, p3 = os.pullEvent() ---monitor_touch, side, xpos, ypos
  92. local event, p1 = t:handleEvents(os.pullEvent()) ---button_click, name
  93. if event == "button_click" then
  94. --remove toggling and simplify button running
  95. t.buttonList[p1].func()
  96. end
  97. end
Advertisement
Add Comment
Please, Sign In to add comment