Advertisement
Guest User

test

a guest
Nov 22nd, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local args = {...}
  2. local mon = peripheral.wrap(args[1])
  3. local xmax,ymax = mon.getSize()
  4. local linexpos = 1
  5. local borderline = string.rep("=",xmax)
  6. local scrollx = xmax
  7.  
  8. while true do
  9.  mon.clear()
  10.  
  11.  mon.setCursorPos(1,1)
  12.  mon.write(borderline)
  13.  mon.setCursorPos(1,ymax)
  14.  mon.write(borderline)
  15.  
  16.  mon.setCursorPos(scrollx,(ymax+1)/2)
  17.  mon.write(args[2])
  18.  scrollx = scrollx-1
  19.  if scrollx == -10-string.len(args[2]) then
  20.   scrollx = xmax
  21.  end
  22.  
  23.  sleep(0.2)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement