[Trinity] World Chat Script menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    parranoia's Avatar Member
    Reputation
    14
    Join Date
    Feb 2008
    Posts
    34
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Trinity] World Chat Script

    I figured there were some people that might want something like this for their server so I decided to share it here. It shows if the player speaking is horde or alliance or will also display if they are a Mod/GM/Admin. Just type .chat and your message after. Tested and working on TrinityCore 3.3.5a.

    If you have custom GM ranks just PM me and I'd be glad to help you change the script to suit your needs.

    Player: [Horde] or [Alliance]
    Moderator/Trial GM: [Mod]
    Gamemaster: [GM]
    Administrator: [Admin]

    Link: [C++] World Chat - Pastebin.com

    Code:
    #include "ScriptPCH.h"
    #include "Chat.h"
    
    class cs_world_chat : public CommandScript
    {
    	public:
    		cs_world_chat() : CommandScript("cs_world_chat"){}
    
    	ChatCommand * GetCommands() const
    	{
    		static ChatCommand WorldChatCommandTable[] = 
    		{
    			{"chat",	SEC_PLAYER,		true,		&HandleWorldChatCommand,	"", NULL},
    			{NULL,		0,				false,		NULL,						"", NULL}
    		};
    
    		return WorldChatCommandTable;
    	}
    
    	static bool HandleWorldChatCommand(ChatHandler * handler, const char * args)
    	{
    		if (!args)
    			return false;
    
    		std::string msg = "";
    		Player * player = handler->GetSession()->GetPlayer();
    
    		switch(player->GetSession()->GetSecurity())
    		{
    			// Player
    			case SEC_PLAYER:
    				if (player->GetTeam() == ALLIANCE)
    				{
    					msg += "|cff0000ff[Alliance] |cffffffff[";
    					msg += player->GetName();
    					msg += "] |cfffaeb00";
    				}
    
    				if (player->GetTeam() == HORDE)
    				{
    					msg += "|cffff0000[Horde] |cffffffff[";
    					msg += player->GetName();
    					msg += "] |cfffaeb00";
    				}
    				break;
    			// Moderator/trial 
    			case SEC_MODERATOR:
    				msg += "|cffff8a00[Mod] |cffffffff[";
    				msg += player->GetName();
    				msg += "] |cfffaeb00";
    				break;
    			// GM
    			case SEC_GAMEMASTER:
    				msg += "|cff00ffff[GM] |cffffffff[";
    				msg += player->GetName();
    				msg += "] |cfffaeb00";
    				break;
    			// Admin
    			case SEC_ADMINISTRATOR:
    				msg += "|cfffa9900[Admin] |cffffffff[";
    				msg += player->GetName();
    				msg += "] |cfffaeb00";
    				break;
    
    		}
    			
    		msg += args;
    		sWorld->SendServerMessage(SERVER_MSG_STRING, msg.c_str(), 0);	
    
    		return true;
    	}
    };
    
    void AddSC_cs_world_chat()
    {
    	new cs_world_chat();
    }
    This is my first release here so hopefully some people find it helpful.

    Last edited by parranoia; 06-14-2012 at 02:44 AM.

    [Trinity] World Chat Script
  2. #2
    parranoia's Avatar Member
    Reputation
    14
    Join Date
    Feb 2008
    Posts
    34
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    200 views no replies? :/

  3. #3
    DJeXeCute's Avatar Member
    Reputation
    5
    Join Date
    Nov 2007
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's very cool you should add me on msn [email protected]

  4. #4
    Harambeqt's Avatar Elite User CoreCoins Purchaser
    Reputation
    333
    Join Date
    Mar 2010
    Posts
    1,206
    Thanks G/R
    9/29
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice release, not a repack! woho +rep!
    Support the #1 WoW Emulator:
    http://arcemu.org/
    https://github.com/arcemu/arcemu
    - - -

  5. #5
    LilleCarl's Avatar Active Member
    Reputation
    65
    Join Date
    Feb 2008
    Posts
    132
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by parranoia View Post
    I figured there were some people that might want something like this for their server so I decided to share it here. It shows if the player speaking is horde or alliance or will also display if they are a Mod/GM/Admin. Just type .chat and your message after. Tested and working on TrinityCore 3.3.5a.

    If you have custom GM ranks just PM me and I'd be glad to help you change the script to suit your needs.

    Player: [Horde] or [Alliance]
    Moderator/Trial GM: [Mod]
    Gamemaster: [GM]
    Administrator: [Admin]

    Link: [C++] World Chat - Pastebin.com

    Code:
    #include "ScriptPCH.h"
    #include "Chat.h"
    
    class cs_world_chat : public CommandScript
    {
        public:
            cs_world_chat() : CommandScript("cs_world_chat"){}
    
        ChatCommand * GetCommands() const
        {
            static ChatCommand WorldChatCommandTable[] = 
            {
                {"chat",    SEC_PLAYER,        true,        &HandleWorldChatCommand,    "", NULL},
                {NULL,        0,                false,        NULL,                        "", NULL}
            };
    
            return WorldChatCommandTable;
        }
    
        static bool HandleWorldChatCommand(ChatHandler * handler, const char * args)
        {
            if (!args)
                return false;
    
            std::string msg = "";
            Player * player = handler->GetSession()->GetPlayer();
    
            switch(player->GetSession()->GetSecurity())
            {
                // Player
                case SEC_PLAYER:
                    if (player->GetTeam() == ALLIANCE)
                    {
                        msg += "|cff0000ff[Alliance] |cffffffff[";
                        msg += player->GetName();
                        msg += "] |cfffaeb00";
                    }
    
                    if (player->GetTeam() == HORDE)
                    {
                        msg += "|cffff0000[Horde] |cffffffff[";
                        msg += player->GetName();
                        msg += "] |cfffaeb00";
                    }
                    break;
                // Moderator/trial 
                case SEC_MODERATOR:
                    msg += "|cffff8a00[Mod] |cffffffff[";
                    msg += player->GetName();
                    msg += "] |cfffaeb00";
                    break;
                // GM
                case SEC_GAMEMASTER:
                    msg += "|cff00ffff[GM] |cffffffff[";
                    msg += player->GetName();
                    msg += "] |cfffaeb00";
                    break;
                // Admin
                case SEC_ADMINISTRATOR:
                    msg += "|cfffa9900[Admin] |cffffffff[";
                    msg += player->GetName();
                    msg += "] |cfffaeb00";
                    break;
    
            }
                
            msg += args;
            sWorld->SendServerMessage(SERVER_MSG_STRING, msg.c_str(), 0);    
    
            return true;
        }
    };
    
    void AddSC_cs_world_chat()
    {
        new cs_world_chat();
    }
    This is my first release here so hopefully some people find it helpful.

    You should rewrite officer chat ( /o ) to be world chat, its to moch of a pain to type .chat each time you wanna chat

    Originally Posted by parranoia View Post
    200 views no replies? :/
    People are and will always be leechers!

    Originally Posted by DJeXeCute View Post
    It's very cool you should add me on msn [email protected]
    Why should he add you on msn because his script is cool? xD

    Originally Posted by AfterDawn View Post
    Nice release, not a repack! woho +rep!
    Indeed, im happy aswell! Someone who knows more then how to build a core! Someone who really knows something about the C++ laguage!!! This is insane!
    Violence doesn't solve shit, but everything else.

  6. #6
    chyssler's Avatar Member
    Reputation
    1
    Join Date
    Jun 2011
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where shall i put that Text?

    i made an notepad paste in the text, called it worldchat.h and saved it as ".h"

    then compile with cmake. then ???

    i dont find it in the MVSE 2013 . i have taken the "trinityCore" file from Build folder into MVSE 2013. and i cant find worldchat.h somewhere

Similar Threads

  1. [RELEASE][C++] World Chat [Trinity]!!
    By EG3 in forum WoW EMU General Releases
    Replies: 0
    Last Post: 12-23-2013, 03:44 AM
  2. [Trinity] [Eluna Lua Script] World Chat Script
    By Foereaper in forum WoW EMU General Releases
    Replies: 1
    Last Post: 06-04-2013, 03:45 PM
  3. [C++ Script] Trinity World Chat Script by Command
    By ak47sigh in forum WoW EMU General Releases
    Replies: 0
    Last Post: 02-21-2013, 04:49 PM
  4. [C++ Script] [Trinity] World Chat Script
    By parranoia in forum WoW EMU General Releases
    Replies: 0
    Last Post: 02-02-2012, 11:13 PM
  5. (Request) Web chat script
    By brock106 in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 05-08-2009, 06:43 PM
All times are GMT -5. The time now is 04:35 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search