Useful resources

Results 1 to 1 of 1
  1. #1
    ◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜ Taiga is online now
    ModeratorRank
    May 2007 Join Date
    InternetLocation
    2,578Posts

    Useful resources

    I took these from various notes I had all over the place.

    Spoiler:
    There is a way to automatically make the warrock client join a clan battle.It's set in the authentication packet.the first two blocks after the clan information handle this.- Block 1 contains dwBattleKeyCode- Block 2 contains the server id where the battle takes place. The server's type MUST be id 2.If dwBattleKey is set, then the client will send channel id -1 when you join a channel. -> Everything is untested.


    Spoiler:
    The client wil always attampt to connect to UDP 5350 when you connect to the game server.MAX ROOMS : 500 -> Hardcoded in client. [Including 500]// TRIGGEREDCGiUdpClient::Connect(v3, v2, 5350, v1->PInfo.Tag.PC_Idx, v1->PInfo.Tag.DB_Idx, 1, 40);// --> Packet connect is sent v3 = this; timeGetTime(); v3->m_DataLen = 0; v3->m_DataBF[0] = 16; ++v3->m_DataLen; v3->m_DataBF[v3->m_DataLen++] = 1; v3->m_DataBF[v3->m_DataLen++] = 1; v3->m_DataBF[v3->m_DataLen++] = 0; v3->m_DataBF[v3->m_DataLen++] = HIBYTE(a2); v3->m_DataBF[v3->m_DataLen++] = a2; v3->m_DataBF[v3->m_DataLen++] = 0; v3->m_DataBF[v3->m_DataLen++] = 0; v3->m_DataBF[v3->m_DataLen++] = 0; v3->m_DataBF[v3->m_DataLen++] = 0; v4 = (unsigned int)a3 >> 16; v3->m_DataBF[v3->m_DataLen++] = BYTE1(v4); v3->m_DataBF[v3->m_DataLen++] = (unsigned int)a3 >> 16; v3->m_DataBF[v3->m_DataLen++] = BYTE1(a3); v3->m_DataBF[v3->m_DataLen++] = a3;--> Client expects a 14 byte response back.--> MINIMUM UDP SIZE = 14 Bytes.[Indexes] Iden = 0H-1bAck = 2bCmp = 3SerialNo = 4H-5RoomNo = 6H-7Session= 8H-9Seed = 10H-11 [INT]--> Connect waits for Packet 4097. 0x1001 -> UDP_CONNECT--> if Length >= 28 LOBYTE(v9) = a2[15]; HIBYTE(v9) = a2[14]; v4->m_SockHDR.Cmd = v9; LOBYTE(v10) = a2[17]; HIBYTE(v10) = a2[16]; v4->m_SockHDR.Len = v10; v4->m_SockHDR.EntireNum = a2[18]; v4->m_SockHDR.Seq = a2[19]; v4->m_SockHDR.bUseRelay = a2[20]; v4->m_SockHDR.Flag = a2[21]; LOBYTE(v9) = a2[23]; HIBYTE(v9) = a2[22]; v4->m_SockHDR.ToSerial = v9; LOBYTE(v10) = a2[25]; HIBYTE(v10) = a2[24]; v4->m_SockHDR.ToRoomNum = v10; LOBYTE(v9) = a2[27]; HIBYTE(v9) = a2[26]; v4->m_SockHDR.ToSession = v9;-- NSockClient::SendKeepAlive(Client, *(float *)((_DWORD)Device::Renderer.xyz[0] + 178548));// CGiUdpClient::CheckSNAT((CGiUdpClient *)&v2->NetUdp.vfptr, v2->m_IpAddr, 5351, LOWORD(v2->PInfo.Tag.PC_Idx), v4);// 5351 = Used for NAT CHECK.--> NAT CHECK WAITS FOR PacketID 4097 -> Length 14 -> It will check if ( ntohs(v10.sin_port) != hostshort ) v6 = 0;v6 = Nat state?-- Relaying data to others? LOWPACKETBUFFER::SetRelay(&v5->MTUBuffer.m_sLPB, 1, a2->GameIdx, a2->RoomNum, a2->Session);-- Needs more analyzing -> if ( v4->m_bSNAT || a3->bSymmetricNAT )struct F_HEADER { short Iden; char bAck; char bCmp; short SerialNo; short RoomNum; short Session; DWORD SeedCode;};struct P_HEADER { F_HEADER F_H; short Cmd; short Len; char EntireNum; char Seq; char bUseRelay; char Flag; short ToSerial; short ToRoomNum; short ToSession;};//-- MAX PACKET ID PROCESSED BY THE CLIENT -- if ( rsession >= 0 && rsession < 32 || cmd <= 12288 )


    Spoiler:
    [GAME] RECV >> 173088308 25088 1 1 -1 Developer Developer 21 500 5 -1 -1 -1 -1 -1 -1 0 0 dnjfhr^Client-sided maximum login, displayname & clanname = 0x64 (100)Clanname min length = 2 bytes. NCmdProcess::JoinServ( v23, dwDBKeyCode, AccPlayerInfoData.NxIdxCode, // dwNxKeyCode userid, szNickName, Sex, Age, sc->PInfo.SysInfoData.SysScore, AccessCode, dwClanSerial, dwClanLevel, dwClanUserLevel, clanName, // max = 512 dwBattleKeyCode, rand); return JoinServPacket::Pack( (JoinServPacket *)this->MainClient->NetTcp.pSPacket, this->MainClient, dwDBKeyCode, dwNxKeyCode, szIdName, szNickName, Sex, Age, SysScore, AccessCode, dwClanSerial, dwClanLevel, dwClanUserLevel, ClanName, dwBattleKeyCode, RandCode) != 0;


    Spoiler:
    Code:
    SERVER TYPESSM_ALL           = 0SM_ADULT         = 1SM_CLAN          = 2SM_EVENT         = 3SM_TEST          = 4SM_DEV           = 5SM_GOD           = 63h// ROOM TYPESTYPE_NORMAL      = 0TYPE_CLAN        = 1TYPE_KNIFE       = 2TYPE_BIGHEAD     = 3TYPE_SQUEAKY_HAMMER  = 4BOMB_TYPEBOMB_TIMER       = 0BOMB_BUTTON      = 1BOMB_MINE        = 2MAX_BOMB_TYPE    = 3REPLAYTYPERT_ONETIME       = 0RT_REPEAT        = 1KillTypeKT_TEAM          = 0KT_ENEMY         = 1KT_NEUTRAL       = 2DROP_TYPEDROP_HEALTH      = 0DROP_ARMOR       = 1DROP_KM14MINE    = 2DROP_FLASH_MINE  = 3MAX_DROP_TYPE    = 4


    Moderator & Developer
    I CAN NOT HELP YOU WITH YOUR SERVER, USE THE CORRECT HELP SECTION INSTEAD.
    I AM ONLY TAIGA ON RAGEZONE!


    DO NOT PM ME FOR GAME RELATED QUESTIONS, THESE MESSAGES WILL BE IGNORED!





Advertisement