Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[SHARE] Welcome Announcement

Newbie Spellweaver
Joined
Sep 11, 2018
Messages
61
Reaction score
9
anyone know header file called for SENDTOALLCLIENT function, for GS?
 
Newbie Spellweaver
Joined
Apr 19, 2018
Messages
60
Reaction score
15
if ( m_wLevel == 1 && m_vSavePos.x == 0.0f && m_vSavePos.z == 0.0f )
{
strTEXT.Format ( "Let's welcome '%s'(%s), School of [%s] enjoy your stay."
, m_szName
, COMMENT::CHARCLASS[CharClassToIndex(m_emClass)].c_str()
, GLCONST_CHAR::strSCHOOLNAME[m_wSchool].c_str());

GLMSG::SNET_SERVER_GENERALCHAT NetMsg;
NetMsg.SETTEXT ( strTEXT.GetString() );
NetMsg.iColor = 8;
NetMsg.bNotify = true;
m_pGLGaeaServer->SENDTOAGENT(&NetMsg); // To make it send to all client for multi Field
}
anyone know header file called for SENDTOALLCLIENT function, for GS?
use this if juver base
 
Newbie Spellweaver
Joined
Sep 11, 2018
Messages
61
Reaction score
9
if ( m_wLevel == 1 && m_vSavePos.x == 0.0f && m_vSavePos.z == 0.0f )
{
strTEXT.Format ( "Let's welcome '%s'(%s), School of [%s] enjoy your stay."
, m_szName
, COMMENT::CHARCLASS[CharClassToIndex(m_emClass)].c_str()
, GLCONST_CHAR::strSCHOOLNAME[m_wSchool].c_str());

GLMSG::SNET_SERVER_GENERALCHAT NetMsg;
NetMsg.SETTEXT ( strTEXT.GetString() );
NetMsg.iColor = 8;
NetMsg.bNotify = true;
m_pGLGaeaServer->SENDTOAGENT(&NetMsg); // To make it send to all client for multi Field
}

use this if juver base
for GS base sir, you know what header file called?

because SENDTOALLCLIENT function is missing when compiling
 
Newbie Spellweaver
Joined
Jan 17, 2024
Messages
24
Reaction score
3
C++:
    if( pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f  )
    {
        // insert here
        /*Welcome announcement by Jeey, 06/10/23*/
        CString strMessage;
        GLMSG::SNET_SERVER_GENERALCHAT netmsgchat;
        strMessage.Format("Welcome, %s (%s)", pGLChar->m_szName, GLCONST_CHAR::strSCHOOLNAME[pGLChar->m_wSchool].c_str());
        netmsgchat.SETTEXT(strMessage.GetString());
        netmsgchat.bNotify = true;
        netmsgchat.iColor = 6;
        SendAllClient(&netmsgchat);
        //  end insert
       
        if( pGLChar->m_lnMoney != 0 )
        {
            CConsoleMessage::GetInstance()->Write(_T("#### ERROR:Money is not correct. Name %s Money %I64d ####"), pGLChar->m_szName, pGLChar->m_lnMoney);
            pGLChar->m_lnMoney = 0;
        }
    }

This is the right spot to add the code.
 
Newbie Spellweaver
Joined
Nov 19, 2018
Messages
30
Reaction score
2
C++:
    if( pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f  )
    {
        // insert here
        /*Welcome announcement by Jeey, 06/10/23*/
        CString strMessage;
        GLMSG::SNET_SERVER_GENERALCHAT netmsgchat;
        strMessage.Format("Welcome, %s (%s)", pGLChar->m_szName, GLCONST_CHAR::strSCHOOLNAME[pGLChar->m_wSchool].c_str());
        netmsgchat.SETTEXT(strMessage.GetString());
        netmsgchat.bNotify = true;
        netmsgchat.iColor = 6;
        SendAllClient(&netmsgchat);
        //  end insert
      
        if( pGLChar->m_lnMoney != 0 )
        {
            CConsoleMessage::GetInstance()->Write(_T("#### ERROR:Money is not correct. Name %s Money %I64d ####"), pGLChar->m_szName, pGLChar->m_lnMoney);
            pGLChar->m_lnMoney = 0;
        }
    }

This is the right spot to add the code.
its working but color text not yet to change into green.... but well i try to fix it in other way :D
 
Newbie Spellweaver
Joined
Jan 17, 2024
Messages
24
Reaction score
3
its working but color text not yet to change into green.... but well i try to fix it in other way :D
you should try to adjust the value from 0 to 8:
C++:
netmsgchat.iColor = 6;


of find this
switch(pNetMsg->iColor)
like this


C++:
    {
                case 1:
                    PrintMsgTextDlg ( NS_UITEXTCOLOR::GREENYELLOW, pNetMsg->szTEXT );
                    break;
                case 2:
                    PrintMsgTextDlg ( NS_UITEXTCOLOR::WHITE, pNetMsg->szTEXT );
                    break;
                case 3:
                    PrintMsgTextDlg ( NS_UITEXTCOLOR::LIGHTYELLOW, pNetMsg->szTEXT );
                    break;
                case 4:
                    PrintMsgTextDlg ( NS_UITEXTCOLOR::AQUABLUE, pNetMsg->szTEXT );
                    break;
                case 5:
                    PrintMsgText ( NS_UITEXTCOLOR::YELLOW, pNetMsg->szTEXT );
                    break;
                case 6:
                    PrintMsgText ( NS_UITEXTCOLOR::GREENYELLOW, pNetMsg->szTEXT );
                    break;
                case 7:
                    PrintMsgText ( NS_UITEXTCOLOR::DISABLE, pNetMsg->szTEXT );
                    break;
                case 8:
                    PrintMsgTextDlg(D3DCOLOR_RGBA(101,210,210,255),pNetMsg->szTEXT);
                    break;
                default:
                    DisplayChatMessage ( CHAT_TYPE_CTRL_GLOBAL, "", pNetMsg->szTEXT );
                    break;
                }
 
Last edited:
Newbie Spellweaver
Joined
Mar 30, 2021
Messages
61
Reaction score
2
Why is it incomplete when announced
strMessage.Format("Let's Welcome %s(%s) for joining our server"
WoozyFoozy - [SHARE] Welcome Announcement - RaGEZONE Forums
 
Back
Top