Guest User

test

a guest
Aug 24th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.22 KB | None | 0 0
  1. m = peripheral.wrap("left")
  2. printed = false
  3.  
  4. function Run()
  5.   term.redirect(m)
  6.   m.setCursorPos(42,2)
  7.   print(textutils.formatTime(os.time(), false))
  8.   term.restore()
  9.   end
  10.  function printStuff()
  11.   term.redirect(m)
  12.   m.setBackgroundColor(colors.black)
  13.   m.setCursorPos(3,1)
  14.   m.setTextScale(1)
  15.   m.setTextColor(colors.blue)
  16.     textutils.slowPrint("WELCOME", 3)
  17.     term.restore()
  18.    m.setCursorPos(2.5,3)
  19.  --  m.setTextScale(4.4)
  20.  m.setTextColor(colors.green)
  21.    m.write("GO!")
  22.  --  m.setTextScale(3.3)
  23.    m.setTextColor(colors.yellow)
  24.    m.setCursorPos(7,3)
  25.    m.write("or")
  26.   -- m.setTextScale(4)
  27.    m.setTextColor(colors.red)
  28.    m.setCursorPos(11.5,3)
  29.    m.write("NO?")
  30.   printed = true
  31.  
  32.   end
  33.    --function run()
  34.    
  35.     while true do
  36.     check()
  37.    
  38.       event,side, xPos, yPos = os.pullEvent("monitor_touch")
  39.      --  m.clear()
  40.        print(event .. " => Side: " .. tostring(side) .. ", " ..
  41.       "X: " .. tostring(xPos) .. ", " ..
  42.       "Y: " .. tostring(yPos))
  43.      
  44.       end
  45.      
  46.       function check()
  47.         if printed == false then
  48.       printStuff()
  49.       else
  50.       Run()
  51.       os.sleep(1)
  52.       end
  53.    end
  54. --peripheral.call("left", "setTextScale", 3)
  55. --m.("hello world")
Advertisement
Add Comment
Please, Sign In to add comment