Protocol Documentation [GS->JS] [JS->GS]

Results 1 to 17 of 17
  1. #1
    Account Upgraded | Title Enabled! Deathway is offline
    MemberRank
    Aug 2005 Join Date
    185Posts

    Protocol Documentation [GS->JS] [JS->GS]

    Here is my cristmas gift, i wanted to make a more important one, but i was lacking of time so my research was stooped many times


    Code:
    // ------------------------------
    // Decompiled by Deathway
    // Date : 2007-03-09
    // ------------------------------
    #ifndef SPROTOCOL_H
    #define SPROTOCOL_H
    #if _MSC_VER > 1000
    #pragma once
    #endif // _MSC_VER > 1000
    #include "protocol.h"
    
    // EventControl
    //-----------------------------
    #define DRAGON_EVENT		0
    #define XMAS_EVENT			1
    #define FIRECRACKER_EVENT	2
    #define HEARTOFLOVE_EVENT	3
    #define MEDAL_EVENT			4
    
    // OptionControl
    //-----------------------------
    #define OPTION_RELOAD		0
    #define MONSTER_RELOAD		1
    #define SHOP_RELOAD			2
    #define ALLOPTION_RELOAD	3
    #define EVENTINFO_RELOAD	4
    #define ETCINFO_RELOAD		5
    #define OPTION_CONTROL		6
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Mu JoinServer Login
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x00
     */
    struct SDHP_SERVERINFO
    {
    	struct PBMSG_HEAD h;
    	unsigned char Type;
    	unsigned short Port;
    	char ServerName[50];
    	unsigned short ServerCode;
    };
    
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet User Close by Id
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x05
     */
    struct SDHP_USERCLOSE_ID
    {
    	PBMSG_HEAD h;
    	char szId[10];
    	char szName[10];
    	unsigned short Level;
    	unsigned char DbClass;
    
    };
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Id Pass Result
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x01
     */
    struct SDHP_IDPASSRESULT
    {
    	PBMSG_HEAD h;
    	unsigned char result;
    	short Number;
    	char Id[10];
    	int UserNumber;
    	int DBNumber;
    	char JoominNumber[13];
    };
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Join Fail
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x02
     */
    struct SDHP_JOINFAIL
    {
    	PBMSG_HEAD h;
    	short Number;
    	char Id[11];
    	int UserNumber;
    	int DBNumber;
    
    };
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Join Fail
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x04
     */
    struct SDHP_COMMAND_BLOCK
    {
    	PBMSG_HEAD h;
    	short Number;
    	char Id[11];
    	int UserNumber;
    	int DBNumber;
    	unsigned char BlockCode;
    };
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Bill Search Result
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x06
     */
    struct SDHP_BILLSEARCH_RESULT
    {
    	PBMSG_HEAD h;
    	char Id[10];
    	short Number;
    	unsigned char cCertifyType;
    	unsigned char PayCode;
    	char EndsDays[12];
    	int EndTime;
    };
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Bill Kill User
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x07, 0x09
     */
    struct SDHP_BILLKILLUSER
    {
    	struct PBMSG_HEAD h;
    	char Id[10];
    	short Number;
    };
    
    
    
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x08
     */
    struct SDHP_OTHERJOINMSG
    {
    	struct PBMSG_HEAD h;
    	char AccountID[10];
    };
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x20
     */
    struct SDHP_EXITMSG
    {
    	PBMSG_HEAD h;
    	unsigned char ExitCode[3];
    };
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x30
     */
    struct SDHP_EVENTSTART
    {
    	PBMSG_HEAD h;
    	unsigned char Event;
    };
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x40
     */
    struct SDHP_EVENTCONTROL
    {
    	PBMSG_HEAD h;
    	unsigned char Event;
    	unsigned char Stat;
    };
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x41
     */
    struct SDHP_OPTIONCONTROL
    {
    	PBMSG_HEAD h;
    	unsigned char Option;
    };
    
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Join Fail
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x30
     */
    struct SDHP_LOVEHEARTEVENT
    {
    	PBMSG_HEAD h;
    	char Account[10];
    	char Name[10];
    };
    
    
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x61
     */
    struct SDHP_LOVEHEARTEVENT_RESULT
    {
    	PBMSG_HEAD h;
    	unsigned char Result;
    	char Name[10];
    	int Number;
    };
    
    
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Join Fail
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x31
     */
    struct SDHP_LOVEHEARTCREATE
    {
    	PBMSG_HEAD h;
    	unsigned char x;
    	unsigned char y;
    	unsigned char MapNumber;
    };
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x62
     */
    struct SDHP_NOTICE
    {
    	PBMSG_HEAD h;
    	char Notice[61];
    };
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x63
     */
    struct SDHP_USER_NOTICE
    {
    	PBMSG_HEAD h;
    	char szId[10];
    	char Notice[61];
    };
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Join Fail
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x7A
     */
    struct PMSG_REQ_MAPSVRMOVE
    {
    	PBMSG_HEAD h;
    	int iIndex;
    	char szAccountID[11];
    	char szCharName[11];
    	unsigned short wCurMapSvrCode;
    	unsigned short wDstMapSvrCode;
    	unsigned short wMapNumber;
    	unsigned char btX;
    	unsigned char btY;
    };
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x7A
     */
    struct PMSG_ANS_MAPSVRMOVE
    {
    	PBMSG_HEAD h;
    	int iIndex;
    	char szAccountID[11];
    	char szCharName[11];
    	unsigned short wCurMapSvrCode;
    	unsigned short wDstMapSvrCode;
    	unsigned short wMapNumber;
    	unsigned char btX;
    	unsigned char btY;
    	int iResult;
    	int iJoinAuthCode1;
    	int iJoinAuthCode2;
    	int iJoinAuthCode3;
    	int iJoinAuthCode4;
    };
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Join Fail
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x7B ?????????????????????????? #error
     */
    struct PMSG_REQ_MAPSVRAUTH
    {
    	PBMSG_HEAD h;
    	int iIndex;
    	char szAccountID[11];
    	char szCharName[11];
    	unsigned short wDstMapSvrCode;
    	int iJoinAuthCode1;
    	int iJoinAuthCode2;
    	int iJoinAuthCode3;
    	int iJoinAuthCode4;
    };
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Other Join Message
     *	Direction : JoinServer -> GameServer
     *  Code : 0xC1
     *	HeadCode : 0x7A ?????????????????????????????? #error
     */
    struct PMSG_ANS_MAPSVRAUTH
    {
    	PBMSG_HEAD h;
    	int iIndex;
    	char szAccountID[11];
    	char szCharName[11];
    	unsigned short wPrevMapSvrCode;
    	unsigned short wMapNumber;
    	unsigned char btX;
    	unsigned char btY;
    	int iResult;
    	int iUserNumber;
    	int iDBNumber;
    	char cJoominNumber[13];
    	unsigned char btBlockCode;
    };
    
    
    
    
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Join Fail
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x7C
     */
    struct PMSG_NOTIFY_MAXUSER
    {
    	PBMSG_HEAD h;
    	int iSvrCode;
    	int iMaxUserCount;
    	int iCurUserCount;
    };
    
    
    /* * * * * * * * * * * * * * * * * * * * * 
     *	Packet Join Fail
     *	Direction : GameServer -> JoinServer
     *  Code : 0xC1
     *	HeadCode : 0x60
     */
    struct PMSG_JG_MEMO_SEND
    {
    	PWMSG_HEAD h;
    	char Name[10];
    	char TargetName[10];
    	char Subject[32];
    	short MemoSize;
    	char Memo[1000];
    };
    
    
    
    
    void SProtocolCore(BYTE protoNum, unsigned char* aRecv, DWORD aLen);
    void GJServerLogin();
    void JGServerLoginResult( SDHP_RESULT * lpMsg);
    void GJPUserClose(char* szAccountID);
    void JGPAccountRequest(SDHP_IDPASSRESULT * lpMsg);
    void GJPAccountFail(short number, char* Id, int DBNumber, int UserNumber);
    void GJPAccountBlock(short number, char * Id, int DBNumber, int UserNumber, int BlockCode);
    void GJPBillCeckRecv(SDHP_BILLSEARCH_RESULT * lpMsg);
    void GJPUserKillRecv(SDHP_BILLKILLUSER * lpMsg);
    void JGOtherJoin(SDHP_OTHERJOINMSG * lpMsg);
    void GJPUserDisconnectRecv( SDHP_BILLKILLUSER * lpMsg);
    void GJPUserDisconnectRecv( SDHP_BILLKILLUSER * lpMsg);
    void JGPExitCodeRecv( SDHP_EXITMSG * lpMsg );
    void JGPEventStart( SDHP_EVENTSTART * lpMsg );
    void JGPEventControl( SDHP_EVENTCONTROL * lpMsg );
    void JGPOptionControl( SDHP_OPTIONCONTROL * lpMsg );
    void LoveHeartEventSend(int aIndex, LPSTR AcountId, LPSTR Name);
    void LoveHeartEventRecv( SDHP_LOVEHEARTEVENT_RESULT * lpMsg );
    void LoveHeartCreateSend();
    void AllNoticeRecv( SDHP_NOTICE * lpMsg);
    void UserNoticeRecv( SDHP_USER_NOTICE * lpMsg);
    void GJReqMapSvrMove(int iIndex, WORD wDesMapSvrCode, WORD wMapNumber, BYTE btX, BYTE btY);
    void JGAnsMapSvrMove(PMSG_ANS_MAPSVRMOVE * lpMsg);
    void GJReqMapSvrAuth(int iIndex, LPSTR lpszAccountID, LPSTR lpszCharName, int iJA1, int iJA2, int iJA3, int iJA4);
    void JGAnsMapSvrAuth(PMSG_ANS_MAPSVRAUTH * lpMsg);
    void GJNotifyMaxUserCount();
    void JGPSendMail(PMSG_JG_MEMO_SEND * lpMsg);
    
    
    #endif

    Code:
    // By Deathway
    
    void SProtocolCore(BYTE protoNum, unsigned char* aRecv, DWORD aLen)
    {
    
    	#ifdef TRACE_PROTOCOL
    		LogAddHeadHex("JOIN_SERVER", aRecv, aLen);
    	#endif
    
    
    	switch ( protoNum )
    	{
    		case 0x00:
    			JGServerLoginResult((SDHP_RESULT *)aRecv);
    			break;
    
    		case 0x01:
    			JGPAccountRequest((SDHP_IDPASSRESULT *)aRecv);
    			break;
    
    		case 0x06:
    			GJPBillCeckRecv((SDHP_BILLSEARCH_RESULT *)aRecv);
    			break;
    
    		case 0x07:
    			GJPUserKillRecv((SDHP_BILLKILLUSER *)aRecv);
    			break;
    
    		case 0x08:
    			JGOtherJoin((SDHP_OTHERJOINMSG *)aRecv);
    			break;
    
    		case 0x09:
    			GJPUserDisconnectRecv((SDHP_BILLKILLUSER *)aRecv);
    			break;
    
    		case 0x20:
    			JGPExitCodeRecv((SDHP_EXITMSG *)aRecv);
    			break;
    
    		case 0x30:
    			JGPEventStart((SDHP_EVENTSTART *)aRecv);
    			break;
    
    		case 0x40:
    			JGPEventControl((SDHP_EVENTCONTROL *)aRecv);
    			break;
    
    		case 0x41:
    			JGPOptionControl((SDHP_OPTIONCONTROL *)aRecv);
    			break;
    
    		case 0x60:
    			JGPSendMail((PMSG_JG_MEMO_SEND *)aRecv);
    			break;
    
    		case 0x61:
    			LoveHeartEventRecv((SDHP_LOVEHEARTEVENT_RESULT *)aRecv);
    			break;
    
    		case 0x62:
    			AllNoticeRecv((SDHP_NOTICE *)aRecv);
    			break;
    
    		case 0x63:
    			UserNoticeRecv((SDHP_USER_NOTICE *)aRecv);
    			break;
    
    		case 0x7A:
    			JGAnsMapSvrMove((PMSG_ANS_MAPSVRMOVE *)aRecv);
    			break;
    
    		case 0x7B:
    			JGAnsMapSvrAuth((PMSG_ANS_MAPSVRAUTH *)aRecv);
    			break;
    	}
    }
    
    
    
    void GJServerLogin()
    {
    	SDHP_SERVERINFO pInfo;
    
    	pInfo.h.c = 0xC1;
    	pInfo.h.size = sizeof(SDHP_SERVERINFO);
    	pInfo.h.headcode = 0x00;
    	pInfo.Port = GameServerPort;
    	pInfo.Type = 1;
    	strcpy(pInfo.ServerName , szServerName);
    	pInfo.ServerCode = gGameServerCode;
    
    	wsJServerCli.DataSend((char*)&pInfo, pInfo.h.size);
    }
    
    
    
    
    
    void JGServerLoginResult( SDHP_RESULT * lpMsg)	
    {
    	if ( lpMsg->Result == false )
    	{
    		LogAdd(lMsg.Get(MSGGET(1, 210)));
    		return;
    	}
    
    	JoinServerConnected=TRUE;
    	gServerReady++;
    	SendMessage(ghWnd, 0x405, 0, 0);
    
    }


  2. #2
    TitansTech / SCFMT bet0x is offline
    MemberRank
    Mar 2004 Join Date
    /dev/nullLocation
    840Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    Very nice dude!

  3. #3
    Proficient Member MuForum.Info is offline
    MemberRank
    Apr 2007 Join Date
    Republic of MoldovaLocation
    199Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    #1, Deathway - Thank man.

  4. #4
    IGCN Co-Founder drakelv is offline
    MemberRank
    Jun 2006 Join Date
    IGCN HQLocation
    1,002Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    Maybe you will release whole emu? xD Just kidding. Great job mate.

  5. #5
    Account Upgraded | Title Enabled! -Rob3r- is offline
    MemberRank
    Oct 2006 Join Date
    RomaniaLocation
    525Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    thx 4 this realase man

  6. #6
    iNewLegend , Leo123 zolamu is offline
    MemberRank
    Apr 2006 Join Date
    Холон, IsrLocation
    737Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    thanks for gift
    merry cristmas :)

  7. #7
    Account Upgraded | Title Enabled! LoveGod is offline
    MemberRank
    Jul 2007 Join Date
    www.MuzicMU.comLocation
    541Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    umm sorry to ask but how can some numbers be a gift? we want some proof

    i don't get what's the use of those

  8. #8
    Account Upgraded | Title Enabled! Holy is offline
    MemberRank
    Jul 2007 Join Date
    Mov eax, 1Location
    551Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    Maybe for you no, but for coders are really a christmas gift ^^.
    Anyway my Christmas gift is better, nahhh i was just joking :PP.

    Great Javier ;)

  9. #9
    Member Netzo is offline
    MemberRank
    Jan 2007 Join Date
    United KingdomLocation
    803Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    what is this ???? new options?

  10. #10
    Hybrid Gembrid is offline
    MemberRank
    Mar 2006 Join Date
    1,121Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    Quote Originally Posted by Fe3lPalN View Post
    what is this ???? new options?
    language of dialogue between gs <-> js =))

  11. #11
    Proficient Member Artie is offline
    MemberRank
    Aug 2007 Join Date
    PolandLocation
    187Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    [quote=H

  12. #12
    Account Upgraded | Title Enabled! LoveGod is offline
    MemberRank
    Jul 2007 Join Date
    www.MuzicMU.comLocation
    541Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    [quote=H

  13. #13
    Don't be a hater 1Word is offline
    MemberRank
    Jan 2006 Join Date
    At homeLocation
    1,779Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    Quote Originally Posted by LoveGod View Post
    for 5 coders in all muonline section?

    it was better via MSN
    So by that post you mean ppl shouldn't release codes and researches for all the persons interested to see? Even if they can't use it, what you said sounds lame...

    People should appreciate other's work and knowledge better.

  14. #14
    Account Upgraded | Title Enabled! Deathway is offline
    MemberRank
    Aug 2005 Join Date
    185Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    Quote Originally Posted by LoveGod View Post
    for 5 coders in all muonline section?

    it was better via MSN
    ... take for sure that will be the last one ;), i don't want to bother you again :trumpet:

  15. #15
    IGCN Co-Founder drakelv is offline
    MemberRank
    Jun 2006 Join Date
    IGCN HQLocation
    1,002Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    Quote Originally Posted by Deathway View Post
    ... take for sure that will be the last one ;), i don't want to bother you again :trumpet:
    man its ragezone xD.

  16. #16
    Account Upgraded | Title Enabled! L0ЯD is offline
    MemberRank
    Nov 2007 Join Date
    In HouseLocation
    235Posts

    Re: [RELEASE] Protocol Documentation [GS->JS] [JS->GS]

    lol, not ragezone,but flamezone! And great release!

  17. #17
    Enthusiast mircosn is offline
    MemberRank
    Apr 2014 Join Date
    Hincesti, LăpuLocation
    32Posts

    Re: Protocol Documentation [GS->JS] [JS->GS]

    Using this information ,
    i can make dissconect module from Game Server?



Advertisement