Craft4Cube

Untitled

Jun 28th, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. local gColors = {}
  2.  
  3. gColors.red = 0xff3333
  4. gColors.blue = 0x7dd2e4
  5. gColors.yellow = 0xffff4d
  6. gColors.green = 0x4dff4d
  7. gColors.gray = 0xe0e0e0
  8. gColors.textGray = 0x818181
  9. gColors.text = 0x5a5a5a
  10. gColors.rain = 0x2e679f
  11. gColors.white = 0xffffff
  12. gColors.black = 0x000000
  13.  
  14. glass = peripheral.wrap("left")
  15. glass.clear()
  16. glass.addText(5, 20, "Initialising...", gColors.blue)
  17. print("Initialising...")
  18. os.sleep(2)
  19. print("READY")
  20. glass.clear()
  21.  
  22. while true do
  23. e, c, p = os.pullEvent("chat_command")
  24. if c == "sync" then
  25. print("Sync Request")
  26. print("Sync Failed")
  27. elseif c == "clear" then
  28. print("Clear Request")
  29. glass.clear()
  30. print("Clear Successfully")
  31. else
  32. print(c)
  33. ln1 = string.sub(c, 0, 25)
  34. ln2 = string.sub(c, 26, 50)
  35. ln3 = string.sub(c, 51, 75)
  36. ln4 = string.sub(c, 76, 100)
  37. ln5 = string.sub(c, 101, 125)
  38.  
  39. glass.clear()
  40. glass.addText(2, 20, p, gColors.red)
  41. glass.addText(2, 30, ln1, gColors.blue)
  42. glass.addText(2, 40, ln2, gColors.blue)
  43. glass.addText(2, 50, ln3, gColors.blue)
  44. glass.addText(2, 60, ln4, gColors.blue)
  45. glass.addText(2, 70, ln5, gColors.blue)
  46. end
  47. end
Advertisement
Add Comment
Please, Sign In to add comment