Illprotectjew

ArenaBattle

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