Advertisement
milkshake

TekMain Rules & Info 1

Jun 22nd, 2015
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.87 KB | None | 0 0
  1. -- rules and information /  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/
  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("_._. Rules and Information ._._")
  103.   nl()
  104.   nl()
  105.   monitorWrite("Rules:")
  106.   nl()
  107.   monitorWrite(" - This is a family welcomed server. Please be polite at all times.")
  108.   nl()
  109.   monitorWrite(" - No Griefing at all. (Ban applies)")
  110.   nl()
  111.   monitorWrite(" - No spamming or advertising. (Ban applies) ")
  112.   nl()
  113.   monitorWrite(" - Exploits are logged and those found using them will face ban.")
  114.   nl()
  115.   monitorWrite(" - You can share item freely, selling or giving them away.")
  116.   nl()
  117.   monitorWrite(" - Swearing is prohibited, as is anything deemed offensive by a majority.")
  118.   nl()
  119.   monitorWrite(" - Raiding is not prohibited! To prevent being raided set a claim to protect yourself.")
  120.   nl()
  121.   monitorWrite(" - Inappropriate behaviour, begging, rude buildings or alike. (Ban applies)")
  122.   nl()
  123.   nl()
  124.   monitorWrite(" RC-Helpers are there to help you. Respect them and they will respect you. ")
  125.   nl()
  126.   monitorWrite(" Moderators are Staff. They will help you with matters Helpers are unable to.")
  127.   nl()
  128.   monitorWrite(" Admins are here to ensure the server maintains high a quality fair experience ")
  129.   nl()
  130.   monitorWrite(" for everybody who plays here. Admin's say is final.")
  131.   nl()
  132.   monitorWrite(" ------------------------------------------------------- ")
  133.   nl()
  134.   monitorWrite(" You will be muted for spamming, capital letters, l33t, or foreign languages in public chat ")
  135.   nl()
  136.   monitorWrite(" You may use foreign languages in private chat or group chat only.")
  137.   nl()
  138.   monitorWrite(" If you are aware of any exploits, it is your responsibility to notify staff. Rewards given.")
  139.   nl()
  140.   nl()
  141.   monitorWrite("The Overworld is reset no more than twice per year.")
  142.   nl()
  143.   monitorWrite(" - NOTE: During world regeneration item lockers are provided to keep your items.")
  144.   nl()  
  145.   nl()
  146.   monitorWrite(" (: Mine with a smile :) ")
  147.   nl()  
  148.   monitorWrite(" - RC-Gamers : @milkshakebunny - ")
  149.  
  150. -- PROGRAM OUTPUT - END
  151. -- ##########################
  152. end
  153.  
  154. -- FUNCTIONS -- END
  155. -- ##########################
  156.  
  157. -- ############################################################
  158. -- ############################################################
  159.  
  160. -- ##########################
  161. -- SEQUENCE -- BEGIN
  162.  
  163. mInit()
  164. program()
  165.  
  166. -- SEQUENCE -- END
  167. -- ##########################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement