Advertisement
Guest User

chat

a guest
Nov 25th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.45 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. fraze = " IS PARTAY-ING HARD!"
  7. posx = 1
  8. posy = 2
  9. colour = 1
  10. m.setBackgroundColour(1)
  11. m.clear()
  12. coloursM = { 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 }
  13. m.clear()
  14. m.setCursorPos(1, 1)
  15. m.setTextColour(32768)
  16. m.write("        Chat:")
  17. while true do
  18.   if posy > 25 then
  19.     posy = 2
  20.     m.clear()
  21.     m.setCursorPos(1, 1)
  22.     m.setTextColour(32768)
  23.     m.write("         Chat:")
  24.   end
  25.   --if colour > 8 then
  26.   --  colour = 1
  27.   --end
  28.   --m.setTextColour(colours[colour])
  29.   --colour = colour + 1
  30.   evt, player, mess = os.pullEvent()
  31.   if evt == "chat" then
  32.   if player == "Darth_Ben17" then
  33.     col = 512
  34.     player = "Darth"
  35.   elseif player == "MrBlueCreepers" then
  36.     col = 2048
  37.     player = "MrBlue"
  38.   elseif player == "fotherr" then
  39.     col = 16384
  40.     player = "[Owner]Fother_Gets_The_Girls_Like_No_Other"
  41.   elseif player == "TheNinjaGraffe" then
  42.     col = 1024
  43.     player = "Giraffi"
  44.   elseif player == "Grox18" then
  45.     col = 512
  46.     player = "[Admin]SexyGrox"
  47.   elseif player == "skrymir69" then
  48.     col = 2
  49.     player = "Skrymir"
  50.   elseif player == "FishFinger360" then
  51.     col = 32
  52.     player = "Fishy"
  53.   elseif player == "bobin01" then
  54.     col = 16384
  55.     player = "[VIP]Bob"
  56.   elseif player == "iParmetries" then
  57.     col = 1024
  58.     player = "[Admin]Parmigiana"
  59.   elseif player == "NikleKing" then
  60.     col = 32
  61.     player = "PickleKing"
  62.   elseif player == "CivicCoin2608" then
  63.     col = 32
  64.     player = "Gymph"
  65.   elseif player == "funkeymonkey9899" then
  66.     col = 256
  67.     player = "Funk"
  68.   elseif player == "BlueCreeper600" then
  69.     col = 2
  70.     player = "Imposter"
  71.   elseif player == "Darkarms420" then
  72.     col = 32768
  73.     player = "Darkarms"
  74.    -- mess = " ****Message Deleted****  :"
  75.   else
  76.     col = 32768
  77.   end
  78.   if mess == "badass pancakes" then
  79.     m.setTextColour(2)
  80.     m.setCursorPos(posx, posy)
  81.     m.write(player)
  82.     m.write(fraze)
  83.     posy = posy + 1
  84.   end
  85.   m.setTextColour(col)
  86.  
  87.   m.setCursorPos(posx, posy)
  88.   m.write(player..": "..mess)
  89.   posy = posy + 1
  90.   elseif evt == "player" then
  91.     m.setCursorPos(posx, posy)
  92.     m.setTextColour(coloursM[math.random(1, #coloursM)])
  93.     m.write(player.." says hi!")
  94.     posy = posy + 1
  95.   end
  96. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement