Guest User

Untitled

a guest
Jul 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. local channel = "";
  2. local user = "";
  3. local x2,y2 = term.getCursorPos()
  4. local function cPrint(text)
  5. local x,y = term.getSize()
  6. x2,y2 = term.getCursorPos()
  7. term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
  8. write(text)
  9. end
  10.  
  11. term.clear()
  12. term.setCursorPos(1,1)
  13.  
  14. function login()
  15. cPrint("NeXuS IRC \n")
  16. cPrint("Nickname: ")
  17. nick = read()
  18. cPrint("Channel: #")
  19. chan = read()
  20.  
  21. channel = "#" ..chan
  22. user = nick
  23. end
  24.  
  25. login()
Add Comment
Please, Sign In to add comment