Guest User

Vega.alpha

a guest
May 14th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. os.loadAPI("facilityMap")
  2.  
  3. mon = peripheral.wrap("top")
  4.  
  5. function introVega()
  6.   mon.setBackgroundColor(colors.white)
  7.   mon.clear()
  8.   mon.setCursorPos(6, 5)
  9.   mon.setTextScale(4)
  10.   mon.setTextColor(colors.red)
  11.   mon.write("Hello!")
  12.   sleep(2)
  13.   mon.clear()
  14.  
  15.   mon.setCursorPos(4, 5)
  16.   mon.write("I am Vega.")
  17.   sleep(3)
  18.  
  19.   mon.clear()
  20.   mon.setTextScale(2)
  21.   mon.setCursorPos(3, 4)
  22.   mon.write("I am the artificial")
  23.   sleep(1)
  24.   mon.setCursorPos(3, 5)
  25.   mon.write("intelligence assigned")
  26.   sleep(2)
  27.   mon.setCursorPos(3, 6)
  28.   mon.write("to this facility")
  29.   sleep(3)
  30.   mon.clear()
  31. end
  32.  
  33. while true do
  34.   mon.setBackgroundColor(colors.white)
  35.   mon.clear()
  36.   mon.setTextScale(5)
  37.   mon.setCursorPos(5, 1)
  38.   mon.setTextColor(colors.green)
  39.   mon.write("Vega")
  40.   sleep(2)
  41.  
  42.   mon.setTextScale(2)
  43.  
  44.   mon.setCursorPos(1, 7)
  45.   mon.write("Who is Vega")
  46.  
  47.   mon.setCursorPos(17, 7)
  48.   mon.write("Facility Map")
  49.  
  50.   event, side, x, y = os.pullEvent("monitor_touch")
  51.   if x > 1 and x < 12 and y == 7 then
  52.    introVega()
  53.     else if x > 17 and x < 29 and y == 7 then
  54.     facilityMap.drawMap()
  55.   end
  56. end
  57.  
  58. end
Advertisement
Add Comment
Please, Sign In to add comment