henoireil

Untitled

Oct 24th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. m = peripheral.wrap("right")
  2. ae = peripheral.wrap("left")
  3. cobble = ae.countOfItemType(4, 0)
  4. m.clear()
  5. m.setCursorPos(1,1)
  6.  
  7. local function centerText(text)
  8. x,y = m.getSize()
  9. x1,y1 = m.getCursorPos()
  10. m.setCursorPos((math.floor(x/2)), y1)
  11. m.write(text)
  12. end
  13.  
  14. --Call function "centerText("")" to set text
  15. --Use m.setCursorPos(1,y) to choose placement on screen
  16.  
  17. y2 = 1
  18.  
  19.  
  20. while true do
  21. m.clear()
  22. m.setCursorPos(1, 1)
  23. m.setTextColor(colors.yellow)
  24. centerText("Cobble :")
  25. m.setCursorPos(1, 2)
  26. centerText("eeeeeeeeeeee")
  27.  
  28. os.sleep(5)
  29. end
Advertisement
Add Comment
Please, Sign In to add comment