Advertisement
milkshake

TekMain-Ranklist1

Jun 22nd, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.45 KB | None | 0 0
  1. -- ranklist /  Custom monitor program 0-0-2
  2. -- Works with: Advanced Computer & Monitor
  3. -- Environment Tested: Minecraft 1.6.4 Computer Craft version 1.5
  4. -- By RCMilkshakebunny @ www.rcftb.eu
  5. -- Download this file here >> http://pastebin.com/XL59sEqU
  6.  
  7. -- ##########################
  8. -- DEFINE VARIABLES -- BEGIN
  9.  
  10. -- Define peripheral monitor side
  11. m = peripheral.wrap("top")
  12.  
  13. -- DEFINE VARIABLES -- END
  14. -- ##########################
  15.  
  16. -- ##########################
  17. -- FUNCTIONS - BEGIN
  18.  
  19. -- set the cursor position on the monitor ready to write
  20. -- in this case 1,1 means the first line at the first character. so for western based code that would be TOP,LEFT
  21. -- if we were to put (5,10) then the cursor would begin at the 5th line down and the 10th character position in from the left
  22. -- in this case the function requires the value to be given in the call
  23. function cursor(p1,p2)
  24.   m.setCursorPos(p1,p2)
  25. end
  26.  
  27. -- clear any content on the monitor function
  28. function clearMon()
  29.   m.clear()
  30. end
  31.  
  32. -- set text color function
  33. function textColor(setTo)
  34. -- set the color the text will be
  35. -- in this case blue
  36. -- the choices: white | orange | magenta | lightBlue | yellow | lime | pink | gray
  37. --   contd.. | lightGray | cyan | purple | blue | brown | green | red | black
  38. -- you can also reference colors by a 'decimal value' without the requirement of the use of 'colors'
  39. -- an example of referencing a color for text by decimal is
  40. -- m.setTextColor(512) and this would produce the same result as m.setTextColor(colors.cyan)
  41. -- m.setTextColor(colors.blue) -- << basic usage
  42.   m.setTextColor(setTo)-- << dynamic usage
  43. end
  44.  
  45. -- write to monitor function
  46. function monitorWrite(txt)
  47.   m.write(txt)
  48. end
  49.  
  50. -- monitor set new line
  51. function nl()
  52.   local _,cY= m.getCursorPos()
  53.   m.setCursorPos(1,cY+1)
  54. end
  55.  
  56. --initialise monitor function
  57. function mInit()
  58.   clearMon()
  59.   cursor(1,1)
  60.   textColor(512)
  61. end
  62.  
  63. -- ##########################
  64. -- TERMINAL FUNCTIONS -- BEGIN
  65.  
  66. -- clears terminal
  67. function clearTerm()
  68.   term.clear()
  69. end
  70.  
  71. -- writes to the terminal
  72. function writeTerm(termtext)
  73.   term.write(termtext)
  74. end
  75.  
  76. -- set terminal cursor position -- Dynamic
  77. function termCursor(p1,p2)
  78.   term.setCursorPos(p1,p2)
  79. end
  80.  
  81. -- terminal set new line
  82. function term_nl()
  83.   local _,cY= term.getCursorPos()
  84.   term.setCursorPos(1,cY+1)
  85. end
  86.  
  87. -- TERMINAL FUNCTIONS -- END
  88. -- ##########################
  89.  
  90. -- the program function
  91. function program()
  92.  
  93. -- ##########################
  94. -- PROGRAM OUTPUT - BEGIN
  95.  
  96.   clearTerm()
  97.   termCursor(1,1)
  98.   writeTerm("Program Running")
  99.   term_nl()
  100.  
  101.  
  102.   monitorWrite("_._. Ranks & Commands ._._")
  103.   nl()
  104.   nl()
  105.   monitorWrite("Newb:")
  106.   nl()
  107.   monitorWrite(" - /back /home /bal /baltop /pay /help /msg /tpa")
  108.   nl()
  109.   monitorWrite(" - /sethome(3) /warp [workshops,mining,survival]")
  110.   nl()
  111.   nl()
  112.   monitorWrite("G1 - $5")
  113.   nl()
  114.   monitorWrite(" - /feed /mail /realname /seen /back(ondeath) ")
  115.   nl()
  116.   nl()
  117.   monitorWrite("G2 - $10")
  118.   nl()
  119.   monitorWrite(" - All of G1 + /fly /heal")
  120.   nl()
  121.   nl()
  122.   monitorWrite("G3 - $20")
  123.   nl()
  124.   monitorWrite(" - All of G1 & G2 + /repair(armour) /msg(color)")
  125.   nl()
  126.   nl()
  127.   monitorWrite("G4 - $30 ")
  128.   nl()
  129.   monitorWrite(" - All of G1 & G2 & G3 + /skull /tree /god")
  130.   nl()
  131.   monitorWrite(" - /workbench /repair(*) /near /nick keepXP(on death)")
  132.   nl()
  133.   nl()
  134.   monitorWrite("RC-Helper")
  135.   nl()
  136.   monitorWrite(" - All of the above + /feed & heal(others)")
  137.   nl()
  138.   monitorWrite(" - /skull(others,modify) /afk /invsee /jump ")
  139.   nl()
  140.   monitorWrite(" - near(others) /top /home(others) /me")
  141.   nl()
  142.   nl()
  143.   monitorWrite("Mod Level 1")
  144.   nl()
  145.   monitorWrite(" - All above + /rp(other) /nick(others,magic) /jails")
  146.   nl()  
  147.   monitorWrite(" - /mute /kick /togglejail /weather /vanish /tp")
  148.   nl()
  149.   monitorWrite(" - /tpaall /tppos /warp(list) ")
  150.   nl()
  151.   nl()
  152.   monitorWrite("Mod Level 2")
  153.   nl()
  154.   monitorWrite(" - All above +  /broadcast /tempban /spawnmob /warp(others)")
  155.   nl()
  156.   nl()  
  157.   monitorWrite("Admin Level 1, 2 & 3")
  158.   nl()
  159.   monitorWrite(" - See Admin Manual  ")
  160.   nl()
  161.   nl()
  162. -- PROGRAM OUTPUT - END
  163. -- ##########################
  164. end
  165.  
  166. -- FUNCTIONS -- END
  167. -- ##########################
  168.  
  169. -- ############################################################
  170. -- ############################################################
  171.  
  172. -- ##########################
  173. -- SEQUENCE -- BEGIN
  174.  
  175. mInit()
  176. program()
  177.  
  178. -- SEQUENCE -- END
  179. -- ##########################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement