Pinkishu

vertLines

Aug 12th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. vertLines
  2. local tArgs = {...}
  3.  
  4. local x = tonumber(tArgs[1])
  5. local y = tonumber(tArgs[2])
  6. local screen = tArgs[3]
  7.  
  8. local width = 0
  9. for i=1,#screen,1 do
  10.     if string.len(screen[i]) > width then width = string.len(screen[i]) end
  11. end
  12.  
  13.  
  14. for dX = 1, width, 2 do
  15.     for dY = 1, #screen, 1 do
  16.    
  17.         term.setCursorPos(dX+x-1,dY+y-1)
  18.         if dX <= string.len(screen[dY]) then
  19.             term.write(string.sub(screen[dY],dX,dX))
  20.         end
  21.     end
  22.     sleep(.25)
  23. end
  24.  
  25. for dX = 2, width, 2 do
  26.     for dY = 1, #screen, 1 do
  27.  
  28.         term.setCursorPos(dX+x-1,dY+y-1)
  29.         if dX <= string.len(screen[dY]) then
  30.             term.write(string.sub(screen[dY],dX,dX))
  31.         end
  32.        
  33.     end
  34.     sleep(.25)
  35. end
Advertisement
Add Comment
Please, Sign In to add comment