Advertisement
milkshake

Bans & Restrictions 1

Jun 22nd, 2015
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.84 KB | None | 0 0
  1. -- Bans & Restrictions /  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/FtZM6DGF
  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("_._. Bans & Restrictions ._._")
  103.   nl()
  104.   nl()
  105.   monitorWrite(" Restricted:")
  106.   nl()
  107.   monitorWrite(" - CC Computers & Monitors:G1")
  108.   nl()
  109.   monitorWrite(" - Minium Stone:G4+ ")
  110.   nl()
  111.   monitorWrite(" - Auto Spawner:G4+ ")
  112.   nl()
  113.   monitorWrite(" - Portaspawner:G4+  ")
  114.   nl()
  115.   monitorWrite(" - Chunk Loader:Admin ")
  116.   nl()
  117.   monitorWrite(" - Mining Upgrade:G3+ ")
  118.   nl()
  119.   monitorWrite(" - ME Transition Plane: G4+ ")
  120.   nl()
  121.   monitorWrite(" - ME Fluid Transition: G4+ ")
  122.   nl()
  123.   monitorWrite(" - Autonomous activator:G3+ ")
  124.   nl()
  125.   monitorWrite(" - Item & Liquid Router:G4+ ")
  126.   nl()
  127.   monitorWrite(" - Rednet Cable:G2 ")
  128.   nl()
  129.   monitorWrite(" - Rednet Energy Cable:G4+ ")
  130.   nl()
  131.   monitorWrite(" - Floodlight/Carbide:G4")
  132.   nl()
  133.   monitorWrite(" - Modular Force Fields:See Extras ")
  134.   nl()
  135.   nl()
  136.   monitorWrite(" Items Banned: (Due to Exploits)")
  137.   nl()
  138.   monitorWrite(" - Sacred Sapling ")
  139.   nl()
  140.   monitorWrite(" - Matter Cannon / Cannon")
  141.   nl()
  142.   monitorWrite(" - Florbs")
  143.   nl()
  144.   monitorWrite(" - Terrain Smasher")
  145.   nl()
  146.   monitorWrite(" - Block Placer")
  147.   nl()  
  148.   monitorWrite(" - SPAMR Launcher")
  149.   nl()
  150.   monitorWrite(" - Drills ")
  151.   nl()
  152.   monitorWrite(" - Uranium ")
  153.   nl()
  154.   monitorWrite(" - Boomerang ")
  155.   nl()  
  156.   monitorWrite(" - Needlegun ")
  157.   nl()
  158.   monitorWrite(" - Writing Desk & Ink mixer ")
  159.   nl()
  160.   nl()
  161.   monitorWrite("Extras")
  162.   nl()
  163.   monitorWrite("Modular Force Fields - $10")
  164.   nl()
  165.   monitorWrite("Unlimited Gold - $5 for 5 mins")
  166.   nl()
  167.   monitorWrite("Color Nickname - $1 Each update")
  168.   nl()
  169.   monitorWrite("Shop Plot - Type A : Basic - $2")
  170.   nl()
  171.   monitorWrite("Shop Plot - Type B : Established - $5")
  172.   nl()  
  173.   monitorWrite("Shop Plot - Type C : Entrepreneur - $10")
  174.   nl()
  175.   monitorWrite("Creative World - $2 /month ")
  176.   nl()
  177.   monitorWrite("Charging Room Access - $5 /month ")
  178.   nl()
  179.  
  180. -- PROGRAM OUTPUT - END
  181. -- ##########################
  182. end
  183.  
  184. -- FUNCTIONS -- END
  185. -- ##########################
  186.  
  187. -- ############################################################
  188. -- ############################################################
  189.  
  190. -- ##########################
  191. -- SEQUENCE -- BEGIN
  192.  
  193. mInit()
  194. program()
  195.  
  196. -- SEQUENCE -- END
  197. -- ##########################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement