Advertisement
Quazaka

Banned Items

Jun 19th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.42 KB | None | 0 0
  1. -- Change "top" to whatever side the monitor is on.
  2. local m = peripheral.wrap("top")
  3.  
  4. local BackgroundColor = colors.black
  5. -- Startup stuff
  6. m.setCursorBlink(false)
  7. m.setBackgroundColor(BackgroundColor)
  8. m.clear()
  9.  
  10. -- Simple function to write text at a position, with a color
  11. local function Write(str, color, x, y, bgcolor)
  12.         m.setTextColor(color)
  13.         if bgcolor ~= nil then        
  14.                 m.setBackgroundColor(bgcolor)
  15.         end
  16.        
  17.         m.setCursorPos(x,y)
  18.         m.write(str)
  19.        
  20.         if bgcolor ~= nil then
  21.                 m.setBackgroundColor(BackgroundColor)
  22.         end    
  23. end
  24.  
  25. local flashRules = true
  26. local function PrintWelcome()
  27.         -- Clear out the previous monitor text. We'll be writing to it instantly, so there's no tearing effects.
  28.         m.clear()
  29.         Write("Banned Items", colors.lime, 9, 2)
  30.         Write("Portal Guns", colors.white, 7, 4)
  31.         Write("Gravity Guns", colors.white, 7, 6)
  32.         Write("Canvas Bags", colors.white, 7, 8)
  33.         Write("Bookbinders", colors.white, 7, 10)
  34.         Write("All Forestry bags", colors.white, 7, 12)
  35.         Write("All Chunkloders", colors.white, 7, 14)
  36.         Write("Mining Laser", colors.white, 7, 16)
  37.         Write("Wand of Excavation", colors.white, 7, 18)
  38. end
  39.  
  40. while true do
  41.         PrintWelcome()
  42.         sleep(0.5) -- 0.5 to update the "flashing" text often enough to be able to read it.
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement