[C++] Broadcast when a GM login menu

User Tag List

Results 1 to 6 of 6
  1. #1
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] Broadcast when a GM login

    *******************************
    **For this tutorial, you need...
    **Visual C++
    **C++ Knowledge
    **To know how to compile ArcEmu
    *******************************

    *******************************
    **All credits for this tutorial go to:
    **DrakeFish(me)
    **I figured how to do this my myself
    *******************************


    This tutorial is basicaly easy to understand, but I'm also adding an extra code at the end that you need to follow one of my tutorials to understand it

    Making Other GMs see it when a GM login


    You need to go in the CharacterHandler.cpp file of ArcEmu source and find sWorld.GetMotd . Make 2 line under it and paste this code:

    Code:
             if ( _player->GetSession()->CanUseCommand('0') )
            {
        char GMAnnounce[1024];
        snprintf(GMAnnounce, 1024, "%s[Team]%s |Hplayer:%s|h[%s]|h just logged in.", MSG_COLOR_RED, MSG_COLOR_GREEN, _player->GetName(), _player->GetName());
        sWorld.SendGMWorldText(GMAnnounce);
            }
    This is showing it to every online GMs when another GM login. The message will be looking like this:
    [Team] [PlayerName] just logged in.
    Extra Code: Making it as a .conf Option

    For this extra code, you need to follow my tutorial about making new configurations. So you need to search for the same thign and do 2 lines under it. But the code will now be using 2 configuration functions. So paste this code:
    Code:
         if (sWorld.staff_login)
        {
            if (!sWorld.staff_login_player)
        {
             if ( _player->GetSession()->CanUseCommand('0') )
            {
        char GMAnnounce[1024];
        snprintf(GMAnnounce, 1024, "%s[Team]%s |Hplayer:%s|h[%s]|h just logged in.", MSG_COLOR_RED, MSG_COLOR_GREEN, _player->GetName(), _player->GetName());
        sWorld.SendGMWorldText(GMAnnounce);
            }
        }
            if (sWorld.staff_login_player)
            {
            char msg[200];
            snprintf(msg, 200, "%s[Team]%s |Hplayer:%s|h[%s]|h just logged in.", MSG_COLOR_RED, MSG_COLOR_GREEN, _player->GetName(), _player->GetName());
            sWorld.SendWorldText(msg);
            }
        }
    staff_login: This function needs to be Bool. In the .conf file, this function needs to be 1 to show the message and 0 to don't show it.
    staff_login_player: This function needs to be Bool. In the .conf file, this functions will be 1 to show that the GM logged in to players and 0 to only show it to other GMs.


    Enjoy this script!
    Last edited by darkgabou15; 11-01-2008 at 11:25 PM.

    [C++] Broadcast when a GM login
  2. #2
    luciferc's Avatar Contributor
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very nice tutorial

  3. #3
    EmuX's Avatar Active Member
    Reputation
    29
    Join Date
    Feb 2008
    Posts
    172
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Weird, can't seem to find that line in the latest Arcemu.

  4. #4
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try with sWorld.GetMotd

  5. #5
    razorwolf49's Avatar Member
    Reputation
    6
    Join Date
    Jul 2008
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Am I able to do this with LUA as well ??

  6. #6
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No this is a C++ script editing the core..

Similar Threads

  1. [Guide] Fixing Authentication Error When Login On!
    By CimSlunt in forum WoW EMU Guides & Tutorials
    Replies: 5
    Last Post: 03-29-2009, 02:08 AM
  2. When login....help..
    By twinkleken in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 12-15-2008, 10:27 PM
  3. when i try to logon it says login failed
    By Donutman123 in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 12-26-2007, 09:21 PM
  4. when i try to logon it says login failed
    By Donutman123 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-26-2007, 07:31 PM
  5. When i login...
    By miquelx in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 09-04-2007, 06:41 AM
All times are GMT -5. The time now is 03:08 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