Initiate Mage
- Joined
- Jun 5, 2023
- Messages
- 3
- Reaction score
- 0
its successful, but when player login every time, its always announces
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!Welcome Announcement features is only for those who just created a character and enters in-game, not every time it logins in game.its successful, but when player login every time, its always announces
hmm maybe you are doing it wrong? this function is very easy to add since this is just a few lines maybe you can improvised and make your own code? modify it a little bit to get the correct data and trigger the correct if condition.This doesn't work on gs source
try ithmm maybe you are doing it wrong? this function is very easy to add since this is just a few lines maybe you can improvised and make your own code? modify it a little bit to get the correct data and trigger the correct if condition.
Already looked at the GS Source and it seems like its gonna be easy to modify and add this featuretry it
Ok would you give me a hint on adding itAlready looked at the GS Source and it seems like its gonna be easy to modify and add this feature
search for the feature where there is a global announcement such as activity completing , guild duel , etc then get the gameword in gui then search it in your source code using that gameword then you will find the source code for global announcementOk would you give me a hint on adding it
check glmsg for bnotify and icolor
hmmn both say they are not defined i delete them??check glmsg for bnotify and icolor
if you delete them then they will not be announced i think you should find the missing source for that on other source code and implement it on your current source or if you want try to find how your source use system announcementhmmn both say they are not defined i delete them??
you should check them it is declared i guess ur using gs clienthmmn both say they are not defined i delete them??
i tried searching " netmsgchat.iColor " on full source this modification is the only resultyou should check them it is declared i guess ur using gs client
if (!pGLChar)
{
sc::writeLogError(std::string("CFieldServer::MsgFieldReqJoin() - Initialized character instance failed"));
m_pGaeaServer->ResetCreatingCharUserID(pCharData->GetUserID());
delete pCharData;
return;
}
if( pGLChar->m_wLevel == 1 )
{
std::string strFormat;
strFormat = sc::string::format("Let's Welcome Character:%s(s) for joining our server", pGLChar->m_szName, GLCONST_CHAR::strSCHOOLNAME[pGLChar->m_wSchool].c_str());
GLMSG::SNET_SERVER_GENERALCHAT NetMsgChat;
if(NetMsgChat.SETTEXT(strFormat))
{
msgpack::sbuffer SendBuffer;
msgpack::pack(SendBuffer, NetMsgChat);
SENDTOALLCLIENT(NET_MSG_SERVER_GENERALCHAT, SendBuffer);
}
}
bool announce_finish = false;
if (!announce_finish) {
announce_finish = true;
CString strMessage;
GLMSG::SNET_SERVER_GENERALCHAT netmsgchat;
strMessage.Format("Let's welcome %s(%s) for joining our server.", pGLChar->m_szName, GLCONST_CHAR::strSCHOOLNAME[pGLChar->m_wSchool].c_str());
netmsgchat.SETTEXT(strMessage.GetString());
//netmsgchat.bNotify = true;
//netmsgchat.iColor = 6;
SendAllClient(&netmsgchat);
}
this doesnt work , Identifier for SENDTOALLCLIENT is missingTry this. RAN GS Source.
in s_CFieldServerMsg.cpp
Find: void CFieldServer::MsgFieldReqJoin(DWORD dwClient, NET_MSG_GENERIC* nmg)
inside that method, look for ->
C++:if (!pGLChar) { sc::writeLogError(std::string("CFieldServer::MsgFieldReqJoin() - Initialized character instance failed")); m_pGaeaServer->ResetCreatingCharUserID(pCharData->GetUserID()); delete pCharData; return; }
and add this below:
C++:if( pGLChar->m_wLevel == 1 ) { std::string strFormat; strFormat = sc::string::format("Let's Welcome Character:%s(s) for joining our server", pGLChar->m_szName, GLCONST_CHAR::strSCHOOLNAME[pGLChar->m_wSchool].c_str()); GLMSG::SNET_SERVER_GENERALCHAT NetMsgChat; if(NetMsgChat.SETTEXT(strFormat)) { msgpack::sbuffer SendBuffer; msgpack::pack(SendBuffer, NetMsgChat); SENDTOALLCLIENT(NET_MSG_SERVER_GENERALCHAT, SendBuffer); } }
Note that i haven't tried to compile this code yet so check it on your own.
It only needs declaration of the header. try to locate the main cpp where SENDTOALLCLIENT resides and declare its header. it should work.this doesnt work , Identifier for SENDTOALLCLIENT is missing