Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- rules and information / Custom monitor program 0-0-2
- -- Works with: Advanced Computer & Monitor
- -- Environment Tested: Minecraft 1.6.4 Computer Craft version 1.5
- -- By RCMilkshakebunny @ www.rcftb.eu
- -- Download this file here >> http://pastebin.com/
- -- ##########################
- -- DEFINE VARIABLES -- BEGIN
- -- Define peripheral monitor side
- m = peripheral.wrap("top")
- -- DEFINE VARIABLES -- END
- -- ##########################
- -- ##########################
- -- FUNCTIONS - BEGIN
- -- set the cursor position on the monitor ready to write
- -- in this case 1,1 means the first line at the first character. so for western based code that would be TOP,LEFT
- -- 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
- -- in this case the function requires the value to be given in the call
- function cursor(p1,p2)
- m.setCursorPos(p1,p2)
- end
- -- clear any content on the monitor function
- function clearMon()
- m.clear()
- end
- -- set text color function
- function textColor(setTo)
- -- set the color the text will be
- -- in this case blue
- -- the choices: white | orange | magenta | lightBlue | yellow | lime | pink | gray
- -- contd.. | lightGray | cyan | purple | blue | brown | green | red | black
- -- you can also reference colors by a 'decimal value' without the requirement of the use of 'colors'
- -- an example of referencing a color for text by decimal is
- -- m.setTextColor(512) and this would produce the same result as m.setTextColor(colors.cyan)
- -- m.setTextColor(colors.blue) -- << basic usage
- m.setTextColor(setTo)-- << dynamic usage
- end
- -- write to monitor function
- function monitorWrite(txt)
- m.write(txt)
- end
- -- monitor set new line
- function nl()
- local _,cY= m.getCursorPos()
- m.setCursorPos(1,cY+1)
- end
- --initialise monitor function
- function mInit()
- clearMon()
- cursor(1,1)
- textColor(512)
- end
- -- ##########################
- -- TERMINAL FUNCTIONS -- BEGIN
- -- clears terminal
- function clearTerm()
- term.clear()
- end
- -- writes to the terminal
- function writeTerm(termtext)
- term.write(termtext)
- end
- -- set terminal cursor position -- Dynamic
- function termCursor(p1,p2)
- term.setCursorPos(p1,p2)
- end
- -- terminal set new line
- function term_nl()
- local _,cY= term.getCursorPos()
- term.setCursorPos(1,cY+1)
- end
- -- TERMINAL FUNCTIONS -- END
- -- ##########################
- -- the program function
- function program()
- -- ##########################
- -- PROGRAM OUTPUT - BEGIN
- clearTerm()
- termCursor(1,1)
- writeTerm("Program Running")
- term_nl()
- monitorWrite("_._. Rules and Information ._._")
- nl()
- nl()
- monitorWrite("Rules:")
- nl()
- monitorWrite(" - This is a family welcomed server. Please be polite at all times.")
- nl()
- monitorWrite(" - No Griefing at all. (Ban applies)")
- nl()
- monitorWrite(" - No spamming or advertising. (Ban applies) ")
- nl()
- monitorWrite(" - Exploits are logged and those found using them will face ban.")
- nl()
- monitorWrite(" - You can share item freely, selling or giving them away.")
- nl()
- monitorWrite(" - Swearing is prohibited, as is anything deemed offensive by a majority.")
- nl()
- monitorWrite(" - Raiding is not prohibited! To prevent being raided set a claim to protect yourself.")
- nl()
- monitorWrite(" - Inappropriate behaviour, begging, rude buildings or alike. (Ban applies)")
- nl()
- nl()
- monitorWrite(" RC-Helpers are there to help you. Respect them and they will respect you. ")
- nl()
- monitorWrite(" Moderators are Staff. They will help you with matters Helpers are unable to.")
- nl()
- monitorWrite(" Admins are here to ensure the server maintains high a quality fair experience ")
- nl()
- monitorWrite(" for everybody who plays here. Admin's say is final.")
- nl()
- monitorWrite(" ------------------------------------------------------- ")
- nl()
- monitorWrite(" You will be muted for spamming, capital letters, l33t, or foreign languages in public chat ")
- nl()
- monitorWrite(" You may use foreign languages in private chat or group chat only.")
- nl()
- monitorWrite(" If you are aware of any exploits, it is your responsibility to notify staff. Rewards given.")
- nl()
- nl()
- monitorWrite("The Overworld is reset no more than twice per year.")
- nl()
- monitorWrite(" - NOTE: During world regeneration item lockers are provided to keep your items.")
- nl()
- nl()
- monitorWrite(" (: Mine with a smile :) ")
- nl()
- monitorWrite(" - RC-Gamers : @milkshakebunny - ")
- -- PROGRAM OUTPUT - END
- -- ##########################
- end
- -- FUNCTIONS -- END
- -- ##########################
- -- ############################################################
- -- ############################################################
- -- ##########################
- -- SEQUENCE -- BEGIN
- mInit()
- program()
- -- SEQUENCE -- END
- -- ##########################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement