Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Bans & Restrictions / 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/FtZM6DGF
- -- ##########################
- -- 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("_._. Bans & Restrictions ._._")
- nl()
- nl()
- monitorWrite(" Restricted:")
- nl()
- monitorWrite(" - CC Computers & Monitors:G1")
- nl()
- monitorWrite(" - Minium Stone:G4+ ")
- nl()
- monitorWrite(" - Auto Spawner:G4+ ")
- nl()
- monitorWrite(" - Portaspawner:G4+ ")
- nl()
- monitorWrite(" - Chunk Loader:Admin ")
- nl()
- monitorWrite(" - Mining Upgrade:G3+ ")
- nl()
- monitorWrite(" - ME Transition Plane: G4+ ")
- nl()
- monitorWrite(" - ME Fluid Transition: G4+ ")
- nl()
- monitorWrite(" - Autonomous activator:G3+ ")
- nl()
- monitorWrite(" - Item & Liquid Router:G4+ ")
- nl()
- monitorWrite(" - Rednet Cable:G2 ")
- nl()
- monitorWrite(" - Rednet Energy Cable:G4+ ")
- nl()
- monitorWrite(" - Floodlight/Carbide:G4")
- nl()
- monitorWrite(" - Modular Force Fields:See Extras ")
- nl()
- nl()
- monitorWrite(" Items Banned: (Due to Exploits)")
- nl()
- monitorWrite(" - Sacred Sapling ")
- nl()
- monitorWrite(" - Matter Cannon / Cannon")
- nl()
- monitorWrite(" - Florbs")
- nl()
- monitorWrite(" - Terrain Smasher")
- nl()
- monitorWrite(" - Block Placer")
- nl()
- monitorWrite(" - SPAMR Launcher")
- nl()
- monitorWrite(" - Drills ")
- nl()
- monitorWrite(" - Uranium ")
- nl()
- monitorWrite(" - Boomerang ")
- nl()
- monitorWrite(" - Needlegun ")
- nl()
- monitorWrite(" - Writing Desk & Ink mixer ")
- nl()
- nl()
- monitorWrite("Extras")
- nl()
- monitorWrite("Modular Force Fields - $10")
- nl()
- monitorWrite("Unlimited Gold - $5 for 5 mins")
- nl()
- monitorWrite("Color Nickname - $1 Each update")
- nl()
- monitorWrite("Shop Plot - Type A : Basic - $2")
- nl()
- monitorWrite("Shop Plot - Type B : Established - $5")
- nl()
- monitorWrite("Shop Plot - Type C : Entrepreneur - $10")
- nl()
- monitorWrite("Creative World - $2 /month ")
- nl()
- monitorWrite("Charging Room Access - $5 /month ")
- nl()
- -- PROGRAM OUTPUT - END
- -- ##########################
- end
- -- FUNCTIONS -- END
- -- ##########################
- -- ############################################################
- -- ############################################################
- -- ##########################
- -- SEQUENCE -- BEGIN
- mInit()
- program()
- -- SEQUENCE -- END
- -- ##########################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement