Advertisement
Mackan90096

Untitled

Jun 18th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. m = peripheral.wrap("left")
  2. local state = 0
  3.  
  4. local color = {"black"=0x000000, "blue"=0x0000CC}
  5.  
  6. function text()
  7. m.clear()
  8. m.addText(1,1, "This is your commander",color.black)
  9. m.addText(1,10, "I'll give you updates and stuff here", 0x000000)
  10. m.addText(1,20, "Type $$clear to clear the screen", 0x000000)
  11. end
  12. text()
  13.  
  14.  
  15. while true do
  16. e, p1, p2, p3 = os.pullEvent()
  17. if e == "chat_command" then
  18. if p1 == "clear" then
  19. m.clear()
  20. elseif p1 == "update" then
  21. text()
  22. end
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement