Advertisement
Guest User

startup

a guest
Aug 1st, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. p = peripheral.wrap("bottom")
  2. m = peripheral.wrap("monitor_4")
  3. x,y = m.getSize()
  4. while true do
  5.   if p.getStackInSlot(1) ~= nil then
  6.     name = p.getStackInSlot(1).destination
  7.     if string.len(name) > x then
  8.       name = string.sub(name,1,x-1)
  9.     end
  10.     m.clear()
  11.     m.setTextScale(1)
  12.     m.setCursorPos((x-string.len(name))/2,y/2)
  13.     m.write(name)
  14.     sleep(1)
  15.   end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement