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

Junior Spellweaver
Joined
Nov 27, 2023
Messages
101
Reaction score
45
check this if "iColor" and "bNotify" is declared on GLContrlServerMsg.h you can check those color on uitextcontrol.h
this is my struct for SNET_SERVER_GENERALCHAT found on GLContrlServerMsg.h ... can you compare to yours ?? i also notice that color indeed exist on uitextcontrol.h

Code:
    struct SNET_SERVER_GENERALCHAT
    {
        NET_MSG_GENERIC        nmg;
        DWORD                dwLENGTH;
       
        enum { EMMAX_TEXT = NET_DATA_BUFSIZE-sizeof(NET_MSG_GENERIC)-sizeof(DWORD)-1 };
        char                szTEXT[EMMAX_TEXT];

        SNET_SERVER_GENERALCHAT () :
            dwLENGTH(0)
        {
            nmg.dwSize = sizeof(*this);
            nmg.nType = NET_MSG_SERVER_GENERALCHAT;
            GASSERT(nmg.dwSize<=NET_DATA_BUFSIZE);

            memset(szTEXT, 0, sizeof(char) * EMMAX_TEXT);
        }
 
Banned
Banned
Joined
May 22, 2020
Messages
226
Reaction score
72
this is my struct for SNET_SERVER_GENERALCHAT found on GLContrlServerMsg.h ... can you compare to yours ?? i also notice that color indeed exist on uitextcontrol.h

Code:
    struct SNET_SERVER_GENERALCHAT
    {
        NET_MSG_GENERIC        nmg;
        DWORD                dwLENGTH;
      
        enum { EMMAX_TEXT = NET_DATA_BUFSIZE-sizeof(NET_MSG_GENERIC)-sizeof(DWORD)-1 };
        char                szTEXT[EMMAX_TEXT];

        SNET_SERVER_GENERALCHAT () :
            dwLENGTH(0)
        {
            nmg.dwSize = sizeof(*this);
            nmg.nType = NET_MSG_SERVER_GENERALCHAT;
            GASSERT(nmg.dwSize<=NET_DATA_BUFSIZE);

            memset(szTEXT, 0, sizeof(char) * EMMAX_TEXT);
        }
If this was the source code that is under development, mind to share? So i can contribute some.
 
Junior Spellweaver
Joined
Oct 29, 2008
Messages
171
Reaction score
17
this is my struct for SNET_SERVER_GENERALCHAT found on GLContrlServerMsg.h ... can you compare to yours ?? i also notice that color indeed exist on uitextcontrol.h

Code:
    struct SNET_SERVER_GENERALCHAT
    {
        NET_MSG_GENERIC        nmg;
        DWORD                dwLENGTH;
     
        enum { EMMAX_TEXT = NET_DATA_BUFSIZE-sizeof(NET_MSG_GENERIC)-sizeof(DWORD)-1 };
        char                szTEXT[EMMAX_TEXT];

        SNET_SERVER_GENERALCHAT () :
            dwLENGTH(0)
        {
            nmg.dwSize = sizeof(*this);
            nmg.nType = NET_MSG_SERVER_GENERALCHAT;
            GASSERT(nmg.dwSize<=NET_DATA_BUFSIZE);

            memset(szTEXT, 0, sizeof(char) * EMMAX_TEXT);
        }
You have missing declaration .You should put this below the "DWORD dwLENGTH;"

BOOL bNotify;
int iColor;

hit like button if it helps.
and your done.
 
Experienced Elementalist
Joined
Nov 8, 2023
Messages
245
Reaction score
36
It only needs declaration of the header. try to locate the main cpp where SENDTOALLCLIENT resides and declare its header. it should work.
what's the header file called ? cuz im having a breakdown already hhhh , already tried glcontrlservermsg.h but its still the same
 
Junior Spellweaver
Joined
Apr 2, 2019
Messages
137
Reaction score
27
Welcome Announcement features is only for those who just created a character and enters in-game, not every time it logins in game.
It announces again when re logging in
 
Banned
Banned
Joined
May 22, 2020
Messages
226
Reaction score
72
Lib_Network, Find: s_CFieldServerMsg.cpp

in s_CFieldServerMsg.cpp, Find: if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f)
It will look like this
C++:
if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f)
    {
        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;
        }
    }

Now, to add the welcome message, add the entire code INSIDE the " if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f) " condition. So it will look like this.
C++:
if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f)
    {
        // Author: Jeey
        // Description: Welcome Announcement
        // Date: 23/06/10
        CString strMessage;
        GLMSG::SNET_SERVER_GENERALCHAT netmsgchat;
        strMessage.Format("Welcome Character:%s(s) to '%s'. Thank you for joining our server, have fun!", pGLChar->m_szName, GLCONST_CHAR::strSCHOOLNAME[pGLChar->m_wSchool].c_str(), RANPARAM::ClientWindowTitle);
        netmsgchat.SETTEXT(strMessage.GetString());
        netmsgchat.bNotify = true;
        netmsgchat.iColor = 6;
        SendAllClient(&netmsgchat);

        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;
        }
    }
1705186556756 - [SHARE] Welcome Announcement - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Apr 2, 2019
Messages
137
Reaction score
27
Lib_Network, Find: s_CFieldServerMsg.cpp

in s_CFieldServerMsg.cpp, Find: if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f)
It will look like this
C++:
if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f)
    {
        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;
        }
    }

Now, to add the welcome message, add the entire code INSIDE the " if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f) " condition. So it will look like this.
C++:
if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f)
    {
        // Author: Jeey
        // Description: Welcome Announcement
        // Date: 23/06/10
        CString strMessage;
        GLMSG::SNET_SERVER_GENERALCHAT netmsgchat;
        strMessage.Format("Welcome Character:%s(s) to '%s'. Thank you for joining our server, have fun!", pGLChar->m_szName, GLCONST_CHAR::strSCHOOLNAME[pGLChar->m_wSchool].c_str(), RANPARAM::ClientWindowTitle);
        netmsgchat.SETTEXT(strMessage.GetString());
        netmsgchat.bNotify = true;
        netmsgchat.iColor = 6;
        SendAllClient(&netmsgchat);

        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;
        }
    }
View attachment 254765
Thanks buddy
 
Newbie Spellweaver
Joined
Apr 12, 2022
Messages
67
Reaction score
10
1709209410339 - [SHARE] Welcome Announcement - RaGEZONE Forums


error when relogging gold always resets to 0

1709209461776 - [SHARE] Welcome Announcement - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Back
Top