Advertisement
milkshake

Tekmain Rank Quota

Jun 22nd, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.12 KB | None | 0 0
  1. -- rank quota /  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/iGQKUHxj
  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("_._. Rank Quota & Restrictions ._._")
  103.   nl()
  104.   nl()
  105.   monitorWrite("Newb:")
  106.   nl()
  107.   monitorWrite(" - Homes x 3")
  108.   nl()
  109.   monitorWrite(" - 250 Claim blocks + more each day ")
  110.   nl()
  111.   monitorWrite(" - /kit newb")
  112.   nl()
  113.   monitorWrite("G1 - $5")
  114.   nl()
  115.   monitorWrite("- Homes x 10 ")
  116.   nl()
  117.   monitorWrite("- /kit g1")
  118.   nl()
  119.   monitorWrite("G2 - $10")
  120.   nl()
  121.   monitorWrite("- Homes x 20")
  122.   nl()
  123.   monitorWrite("- /kit g2")
  124.   nl()
  125.   monitorWrite("G3 - $20")
  126.   nl()
  127.   monitorWrite("- Homes x 50 ")
  128.   nl()
  129.   monitorWrite("- /kit g3")
  130.   nl()
  131.   monitorWrite("G4 - $30 ")
  132.   nl()
  133.   monitorWrite("- Homes x 100 ")
  134.   nl()
  135.   monitorWrite("- /kit g4 ")
  136.   nl()
  137.   nl()
  138.   monitorWrite("RC-Helper")
  139.   nl()
  140.   monitorWrite("- Homes x 200 ")
  141.   nl()
  142.   monitorWrite("- /kit helper  ")
  143.   nl()
  144.   monitorWrite(" ")
  145.   nl()
  146.   nl()
  147.   monitorWrite("Mod Level 1")
  148.   nl()
  149.   monitorWrite("- Homes x unlimited ")
  150.   nl()  
  151.   monitorWrite("- /kit mod1 ")
  152.   nl()
  153.   monitorWrite(" -  ")
  154.   nl()
  155.   nl()
  156.   monitorWrite("Mod Level 2")
  157.   nl()
  158.   monitorWrite("- /kit mod2 ")
  159.   nl()
  160.   nl()  
  161.   monitorWrite(" - ")
  162.   nl()
  163.   monitorWrite(" - ")
  164.   nl()
  165.   nl()
  166. -- PROGRAM OUTPUT - END
  167. -- ##########################
  168. end
  169.  
  170. -- FUNCTIONS -- END
  171. -- ##########################
  172.  
  173. -- ############################################################
  174. -- ############################################################
  175.  
  176. -- ##########################
  177. -- SEQUENCE -- BEGIN
  178.  
  179. mInit()
  180. program()
  181.  
  182. -- SEQUENCE -- END
  183. -- ##########################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement