MMOCoin

Likes Likes:  0
Results 1 to 9 of 9
  1. #1
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103

    [LUA] Global Chat System

    Again, I was browsing through my LUA folder when I found this..

    Simple chat system, allows both Horde & Alliance to chat with each other on a "channel". Like trade, but you don't have an option to leave. You can edit the Command for the Chat System to anything, however it can't be ".s" as those functions are client based, not server side. e.g. #chat, #c, #cc, #ch etc.

    Chat System - Pastebin

    Code:
    local ChatMsg = "#chat" -- Command for use of chat system
    
    --[[ EDIT THE BELOW SCRIPT AT YOUR OWN RISK ]]--
    function ChatSystem (event, player, message, type, language)
        if (message:find(ChatMsg.." ") == 1) then
            local text = message:gsub(ChatMsg.." ", "") 
                    local plrs = GetPlayersInWorld()
                    for k, v in pairs(plrs) do
                if (player:GetTeam() == 0) then -- Alliance
                local GMrank = player:GetGmRank()
                if (GMrank == 'az') then
                    v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cFFFFA500[Admin] |cffffff00["..player:GetName().."]: |cff00ff00"..text.."") -- Admin Tag
                elseif (GMrank == 'a') then
                    v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cFFFFA500[GM] |cffffff00["..player:GetName().."]: |cff00ff00"..text.."") -- GM Tag
                else 
                    v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cff00ff00[Alliance] |cffffff00["..player:GetName().."]: |cff00ff00"..text.."") -- Ally Tag
                end
                elseif (player:GetTeam() == 1) then -- Horde
                local GMrank = player:GetGmRank()
                if (GMrank == 'az') then
                    v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cFFFFA500[Admin] |cffffff00["..player:GetName().."]: |cffff0000"..text.."") -- Admin Tag
                elseif (GMrank == 'a') then
                    v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cFFFFA500[GM] |cffffff00["..player:GetName().."]: |cffff0000"..text.."") -- GM Tag
                else 
                    v:SendBroadcastMessage("|cFF00FFFF[LMS-Chat] |cffff0000[Horde] |cffffff00["..player:GetName().."]: |cffff0000"..text.."") -- Horde Tag
                
                    end
                        end
                            end
                                                         return 0
                                end
                                                               
                                    end
    
    RegisterServerHook(16, "ChatSystem")



    › See More: [LUA] Global Chat System

  2. #2
    Senior Sergeant
    zwroblewski's Avatar
    Join Date
    Jun 2010
    Posts
    115
    Post Thanks / Like
    Rep Power
    16
    Reputation
    13
    1st comment and if i can. . .awesome share!

  3. #3
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    Yeah, it's rather nice for large servers, or even small servers to communicate easily. Looks good and is easy to use.




  4. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  5. #4
    Senior Sergeant
    zwroblewski's Avatar
    Join Date
    Jun 2010
    Posts
    115
    Post Thanks / Like
    Rep Power
    16
    Reputation
    13
    Yupp but it didn't work for my server but i still give you cred

  6. #5
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    What error did it give? If your using ArcEmu should work perfectly, all you do is put it into your Scripts folder, load world.exe up (or type reloadscripts in the world.exe screen). It should say "Loaded 1 script" if thats the only script you have. If there is an error, it'll list it. Second, try in-game typing #c Hello!

    Unless you changed the chat command, then use that.

  7. #6
    Senior Sergeant
    zwroblewski's Avatar
    Join Date
    Jun 2010
    Posts
    115
    Post Thanks / Like
    Rep Power
    16
    Reputation
    13
    Na when i type in #chat to join the channel it just says "#chat" Outloud and trust me i know what to do with lua scripts im no noobs xD

  8. #7
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    It's technically not a "channel" as such. You do not type #chat to join. You type #chat message here. Everyone will get this message.

  9. #8
    Senior Sergeant
    zwroblewski's Avatar
    Join Date
    Jun 2010
    Posts
    115
    Post Thanks / Like
    Rep Power
    16
    Reputation
    13
    So you have to type that everytime lol :P ok it works thanks dude =)

  10. #9
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103

    Register to remove this ad
    No problem

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •