Advertisement
Guest User

chat1

a guest
Nov 25th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.71 KB | None | 0 0
  1. colours = { colours.red, colours.orange, colours.yellow, colours.green, colours.cyan, colours.blue, colours.pink, colours.purple }
  2. c = peripheral.wrap("bottom")
  3. m = peripheral.wrap("right")
  4. m.clear()
  5. m.setCursorPos(1, 1)
  6. posx = 1
  7. posy = 1
  8. colour = 1
  9. m.setBackgroundColour(1)
  10. m.clear()
  11. coloursM = { 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 }
  12. while true do
  13.   if posy > 26 then
  14.     posy = 1
  15.     m.clear()
  16.   end
  17.   --if colour > 8 then
  18.   --  colour = 1
  19.   --end
  20.   --m.setTextColour(colours[colour])
  21.   --colour = colour + 1
  22.   evt, player, mess = os.pullEvent()
  23.   if evt == "chat" then
  24.   if player == "Darth_Ben17" then
  25.     col = 512
  26.     player = "Darth"
  27.   elseif player == "MrBlueCreepers" then
  28.     col = 2048
  29.     player = "MrBlue"
  30.   elseif player == "TheNinjaGraffe" then
  31.     col = 1024
  32.     player = "Giraffi"
  33.   elseif player == "skrymir69" then
  34.     col = 2
  35.   elseif player == "bobin01" then
  36.     col = 16384
  37.     player = "Bob"
  38.   elseif player == "iParmetries" then
  39.     col = 1024
  40.     player = "Parmigiana"
  41.   elseif player == "NikleKing" then
  42.     col = 32
  43.     player = "PickleKing"
  44.   elseif player == "CivicCoin2608" then
  45.     col = 32
  46.     player = "Gymph"
  47.   elseif player == "BlueCreeper600" then
  48.     col = 2
  49.     player = "Imposter"
  50.   elseif player == "Darkarms420" then
  51.     col = 32768
  52.     player = " "
  53.     mess = " ****Message Deleted****  :"
  54.   else
  55.     col = 32768
  56.   end
  57.   m.setTextColour(col)
  58.  
  59.   m.setCursorPos(posx, posy)
  60.   m.write(player..": "..mess)
  61.   posy = posy + 1
  62.   elseif evt == "player" then
  63.     m.setCursorPos(posx, posy)
  64.     m.setTextColour(coloursM[math.random(1, #coloursM)])
  65.     m.write(player.." says hi!")
  66.     posy = posy + 1
  67.   end
  68. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement