CapsAdmin

Untitled

Jun 13th, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.44 KB | None | 0 0
  1. --  ヽ(´□`。)ノ  -【 ”What’s the point..!!” 】 #
  2.  
  3. http.Get("http://www.japaneseemoticons.net/all-japanese-emoticons/", "",
  4.     function(content)
  5.         local emotes = {}
  6.        
  7.         for emote in content:gmatch("<td>(.-)</td>.-\n") do
  8.             if #emote > 2 then
  9.                 table.insert(emotes, emote)
  10.             end
  11.         end
  12.        
  13.         hook.Add("OnPlayerChat", "jemotes",
  14.             function(ply, str)
  15.                 local tbl = chat.AddTimeStamp({})
  16.                 table.insert(tbl, ply)
  17.                 table.insert(tbl, color_white)
  18.                 table.insert(tbl, ": ")
  19.                
  20.                 str = str:gsub("^.", function(c) return c:upper() end)
  21.                 str = str:gsub("%l", function(c) return string.char(239, 189, 130 + (c:byte() - 98)) end)
  22.                 str = str:gsub("%u", function(c) return string.char(239, 188, 161 + (c:byte() - 65)) end)
  23.                
  24.                 if math.random() > 0.5 then
  25.                     str = str .. ".."
  26.                    
  27.                     if math.random() > 0.5 then
  28.                         str = str .. "!!"
  29.                         str = str:upper()
  30.                     end
  31.                 end
  32.                
  33.                 if math.random() > 0.5 then
  34.                     str = str .. "~"
  35.                 end
  36.                
  37.                 str = "【 ” " .. str .. " ” 】"
  38.                
  39.                 if math.random() > 0.5 then
  40.                     table.insert(tbl, table.Random(emotes))
  41.                     table.insert(tbl, " - ")
  42.                     table.insert(tbl, str)
  43.                 else
  44.                     table.insert(tbl, str)
  45.                     table.insert(tbl, " - ")
  46.                     table.insert(tbl, table.Random(emotes))
  47.                 end
  48.                
  49.                 chat.AddText(unpack(tbl))
  50.                
  51.                 return false
  52.             end
  53.         )
  54.     end
  55. )
Advertisement
Add Comment
Please, Sign In to add comment