Advertisement
Guest User

toDo

a guest
Apr 9th, 2020
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. m = peripheral.wrap("left")
  2.  
  3. local pos = {}
  4. pos["x"] = 1
  5. pos["y"] = 1
  6.  
  7. local function newLine()
  8.   pos.x = 1
  9.   pos.y = pos.y + 1
  10.   m.setCursorPos(pos.x,pos.y)
  11. end
  12.  
  13. local function gotoLine(n)
  14.   pos.x = 1
  15.   pos.y = n
  16. end
  17.  
  18. m.setTextScale(1)
  19. m.setBackgroundColor(colors.white)
  20. m.setTextColor(colors.black)
  21. m.clear()
  22. m.setCursorPos(1,1)
  23.  
  24.  
  25. for i = 1,50 do
  26.   m.write(tostring(i))
  27.   m.write(". ")
  28.   newLine()
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement