Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 14.04.2007, 22:02   #1
[drzoom]
Архивный участник
 
Join Date: Jul 2006
Posts: 65
Default [share] Interlude packets

Some code from my tool:

Key
Code:
	
Byte key[KEY_SIZE];
key[0] = data_[4];
key[1] = data_[5];
key[2] = data_[6];
key[3] = data_[7];
key[4] = 0xA1;
key[5] = 0x6C;
key[6] = 0x54;
key[7] = 0x87;		
key[8]  = 0xC8; // INTERLUDE
key[9]  = 0x27; // INTERLUDE
key[10] = 0x93; // INTERLUDE
key[11] = 0x01; // INTERLUDE
key[12] = 0xA1; // INTERLUDE
key[13] = 0x6C; // INTERLUDE
key[14] = 0x31; // INTERLUDE
key[15] = 0x97; // INTERLUDE
UserInfo Packet
Code:
bool UserInfoPacket::init( const ByteBuffer& data )
{
    int pos = 1;

    char_.x_ = *(int*) &data[pos];
    pos += sizeof(int);		// X
    char_.y_ = *(int*) &data[pos];
    pos += sizeof(int);		// Y
    char_.z_ = *(int*) &data[pos];
    pos += sizeof(int);		// Z
    char_.heading_ = *(int*) &data[pos];
    pos += sizeof(int);		// heading
    char_.objectID_ = *(int*) &data[pos];
    pos += sizeof(int);		// objectID

    char_.name_.clear();
    while ( data[pos] != 0 )
    {
        char_.name_.push_back( (char) data[pos]);
        pos += 2;
    }
    pos += 2;

    char_.race_ = *(int*) &data[pos];
    pos += sizeof(int);		// race
    char_.sex_ = *(int*) &data[pos];
    pos += sizeof(int);		// sex
    char_.baseClass_ = *(int*) &data[pos];
    pos += sizeof(int);		// class
    char_.level_ = *(int*) &data[pos];
    pos += sizeof(int);		// level
    pos += sizeof(long long);// Exp
    pos += sizeof(int);		// Str
    pos += sizeof(int);		// Dex
    pos += sizeof(int);		// Con
    pos += sizeof(int);		// Int
    pos += sizeof(int);		// Wit
    pos += sizeof(int);		// Men
    char_.maxHP_ = *(int*) &data[pos];
    pos += sizeof(int);		// MaxHP
    char_.hp_ = *(int*) &data[pos];
    pos += sizeof(int);		// HP
    char_.maxMP_ = *(int*) &data[pos];
    pos += sizeof(int);		// MaxMP
    char_.mp_ = *(int*) &data[pos];
    pos += sizeof(int);		// MP

    pos += sizeof(int);		// SP
    pos += sizeof(int);		// Cur Load
    pos += sizeof(int);		// Max Load

    pos += sizeof(int);		// Unknown
    
    pos += sizeof(int);		// PAPERDOLL_UNDER
    pos += sizeof(int);		// PAPERDOLL_REAR
    pos += sizeof(int);		// PAPERDOLL_LEAR
    pos += sizeof(int);		// PAPERDOLL_NECK
    pos += sizeof(int);		// PAPERDOLL_RFINGER
    pos += sizeof(int);		// PAPERDOLL_LFINGER
    pos += sizeof(int);		// PAPERDOLL_HEAD
    pos += sizeof(int);		// PAPERDOLL_RHAND
    pos += sizeof(int);		// PAPERDOLL_LHAND
    pos += sizeof(int);		// PAPERDOLL_GLOVES
    pos += sizeof(int);		// PAPERDOLL_CHEST
    pos += sizeof(int);		// PAPERDOLL_LEGS
    pos += sizeof(int);		// PAPERDOLL_FEET
    pos += sizeof(int);		// PAPERDOLL_BACK
    pos += sizeof(int);		// PAPERDOLL_LRHAND
    pos += sizeof(int);		// PAPERDOLL_HAIR

    char_.invUnder_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_UNDER

    pos += sizeof(int);		// PAPERDOLL_REAR
    pos += sizeof(int);		// PAPERDOLL_LEAR
    pos += sizeof(int);		// PAPERDOLL_NECK
    pos += sizeof(int);		// PAPERDOLL_RFINGER
    pos += sizeof(int);		// PAPERDOLL_LFINGER

    char_.invHead_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_HEAD
    char_.invRHand_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_RHAND
    char_.invLHand_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_LHAND
    char_.invGloves_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_GLOVES
    char_.invChest_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_CHEST
    char_.invLegs_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_LEGS
    char_.invFeet_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_FEET
    char_.invBack_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_BACK
    char_.invLRHand_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_LRHAND
    char_.invHair_ = *(int*) &data[pos];
    pos += sizeof(int);		// PAPERDOLL_HAIR

    pos += sizeof(int);		// pAtk
    pos += sizeof(int);		// pAtkSpeed
    pos += sizeof(int);		// pDef
    pos += sizeof(int);		// Evasion
    pos += sizeof(int);		// Accuracy
    pos += sizeof(int);		// Critical
    pos += sizeof(int);		// mAtk
    pos += sizeof(int);		// mAtkSpeed
    pos += sizeof(int);		// pAtkSpeed
    pos += sizeof(int);		// mDef

    char_.pvpFlag_ = *(int*) &data[pos];
    pos += sizeof(int);		// pvp flag
    char_.karma_ = *(int*) &data[pos];
    pos += sizeof(int);		// karma

	char_.runSpeed_ = *(int*) &data[pos];
    pos += sizeof(int); // run speed
	char_.walkSpeed_ = *(int*) &data[pos];
    pos += sizeof(int); // walk speed
    pos += sizeof(int); // swim run speed 
    pos += sizeof(int); // swim walk speed
    pos += sizeof(int); // fl run speed
    pos += sizeof(int); // fl walk speed
    pos += sizeof(int); // fly run speed
    pos += sizeof(int); // fly walk speed
    pos += sizeof(double); // getMovementSpeedMultiplier
    pos += sizeof(double); // getAttackSpeedMultiplier
    pos += sizeof(double); // collision radius
    pos += sizeof(double); // collision height

    pos += sizeof(int); // hair style
    pos += sizeof(int); // hair color
    pos += sizeof(int); // face
    pos += sizeof(int); // access level

	pos += 76; // INTERLUDE - Added 76 bytes (mb new weapon modifications parameters)

    char_.title_.clear();
    while ( data[pos] != 0 )
    {
        char_.title_.push_back( (char) data[pos]);
        pos += 2;
    }
    pos += 2;

    char_.clanID_ = *(int*) &data[pos];
    pos += sizeof(int);		// Clan ID
    char_.clanCrestID_ = *(int*) &data[pos];
    pos += sizeof(int);		// Clan crest ID
    char_.allyID_ = *(int*) &data[pos];
    pos += sizeof(int);		// Ally ID
    char_.allyCrestID_ = *(int*) &data[pos];
    pos += sizeof(int);		// Ally crest ID

    pos += sizeof(int);		// Seige Flag
    pos += sizeof(Byte);	// Mount type
    pos += sizeof(Byte);	// Private Store type
    pos += sizeof(Byte);	// Dwarven Craft
    pos += sizeof(int);		// PK
    pos += sizeof(int);		// PvP

    short numCubics = *(short*) &data[pos];
    pos += sizeof(short);	// Cubics
    for ( int i = 0; i < numCubics; ++i )
    {
        pos += sizeof(short);	// Cubic ID
    }

    pos += sizeof(Byte);	// Find party members
    pos += sizeof(int);		// Abnormal effect
    pos += sizeof(Byte);	// ?
    pos += sizeof(int);		// Clan privilegies

    pos += sizeof(short);	// Recs left
    pos += sizeof(short);	// Recs has
    pos += sizeof(int);		// 
    pos += sizeof(short);	// Inventory limit

    char_.cp_ = *(int*) &data[pos];
    pos += sizeof(int);		// CP
    char_.maxCP_ = *(int*) &data[pos];
    pos += sizeof(int);		// Max CP

    pos += sizeof(Byte);	// Enchant
    pos += sizeof(Byte);	// Team
    pos += sizeof(int);	    // Clan large crest ID

    char_.noble_ = data[pos];
    pos += sizeof(Byte);	// Noble
    char_.hero_ = data[pos];
    pos += sizeof(Byte);	// Hero

    pos += sizeof(Byte);	// in fishing
    pos += sizeof(int);	    // Fish X
    pos += sizeof(int);	    // Fish Y
    pos += sizeof(int);	    // Fish Z

    pos += sizeof(int);	    // Name color
/*
    pos += sizeof(int);	    // ??
    pos += sizeof(int);	    // PAPERDOLL_FACE
    pos += sizeof(int);	    // PAPERDOLL_FACE
    pos += sizeof(int);	    // Pledge class
    pos += sizeof(int);	    // ??
    pos += sizeof(int);	    // Title color
    pos += sizeof(int);	    // ??

    char_.cursedWeapon_ = *(int*) &data[pos];
    pos += sizeof(int);		// cursed weapon
*/
    return true;	
}
[drzoom] is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 21:54.