Advertisement
Guest User

TrashOS

a guest
Dec 28th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.05 KB | None | 0 0
  1.  
  2.  
  3. local function GetScreenSize()
  4.     w, h = term.getSize()
  5. end
  6.  
  7. local function DrawBackground(grootte)
  8.    
  9.     tellerx=w
  10.     tellery=h
  11.     bgcolorteller=1
  12.    
  13.     repeat
  14.    
  15.    
  16.             repeat
  17.                 term.setTextColor(bgcolorteller)
  18.                 term.write("#")
  19.                 tellery=tellery-1
  20.             until tellery==0
  21.            
  22.     tellery=h
  23.     tellerx=tellerx-1
  24.     bgcolorteller=bgcolorteller+1
  25.     until tellerx==0
  26. end
  27.  
  28. local function DrawTitle()
  29.     term.clear()
  30.     term.setBackgroundColor(8)
  31.     term.setTextColor(1)
  32.     term.setCursorPos(0,0)
  33.     term.write("TrashOS")
  34.     GetScreenSize()
  35.     --print ("x:"..w)
  36.     --print ("y:"..h)
  37.    
  38.     print ("----------------")
  39.     print ("| TrashOS v2.0 |")
  40.     print ("----------------")
  41.    
  42. end
  43.  
  44. local function Initialize()
  45.     --DrawBackground()
  46.     DrawTitle()
  47.     term.write(os.time())
  48.    
  49. end
  50.  
  51. local function InitWiredModem(side)
  52.  
  53. --modem=peripheral.wrap(tostring(side))
  54. modem=peripheral.wrap('left')
  55. modem.open(668)
  56. print ("port 668 opened for listening")
  57. modem.transmit(666,668, "OS BOOTED")
  58. print ("message sent over port 666")
  59.  
  60.  
  61.  
  62. end
  63.  
  64.  
  65.  
  66. Initialize()
  67. InitWiredModem('left')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement