Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   [share] Interlude packets (https://postpacific.loc-online.com/showthread.php?t=7356)

[drzoom] 14.04.2007 22:02

[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] 14.04.2007 22:03

CharInfo Packet
Code:

bool CharInfoPacket::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_.invUnder_ = *(int*) &data[pos];
        pos += sizeof(int);                // PAPERDOLL_UNDER
        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

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

        pos += sizeof(int);                // mAtkSpd
        pos += sizeof(int);                // pAtkSpd

        pos += sizeof(int);                // pvp flag ?
        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 += 52; // INTERLUDE - 52 bytes added

    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

    char_.sitting_ = data[pos];
    pos += sizeof(Byte);        // Sitting
    char_.running_ = data[pos];
    pos += sizeof(Byte);        // Running
    char_.inCombat_ = data[pos];
    pos += sizeof(Byte);        // In combat
    char_.dead_ = data[pos];
    pos += sizeof(Byte);        // Dead

    pos += sizeof(Byte);        // Invisible
    pos += sizeof(Byte);        // Mount type
    pos += sizeof(Byte);        // Private store
   
    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);        // Recs left
    pos += sizeof(short);        // Recs has
        char_.subClass_ = *(int*) &data[pos];
        pos += sizeof(int);                // Class ID

    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);            // 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;       
}

Use it:)

mcrabben7 15.04.2007 01:14

Thanks for sharing.

ZeniMax 15.04.2007 03:59

Thank you ^^

humordwarf 15.04.2007 07:28

2drzoom: looks like client-side...
a new walker-like-stuff ?

Zil 15.04.2007 12:11

not client side ;)
As i saw it's from L2j C5 with changed format for Interlude :D
Looks like our first L2j (it was first Interlude server:) then off), corrected under Interlude...It's for teaching Interlude off packet, beacuse on Java more easyest to learn! Very good

But may be I'm wrong

Forcer 15.04.2007 13:00

L2j? Noo...
I so do not think, that is c++ code.

Zil 15.04.2007 13:43

I know :) I can't explain on english (it's very bad)
But that info from L2j ;)
Don't recommend write on C++ - more hardest in realisation...Use ASM :D

humordwarf 15.04.2007 14:08

Quote:

Originally Posted by Zil (Post 83930)
Don't recommend write on C++ - more hardest in realisation...Use ASM :D

bullshit
absolutely

Xari0n 15.04.2007 14:13

yeap, think so

[drzoom] 15.04.2007 14:49

:)
 
Quote:

Originally Posted by humordwarf (Post 83911)
2drzoom: looks like client-side...
a new walker-like-stuff ?


Yes, but not a bot.
It's a radar that shows surrounding enemies on the map, their class\hp\distance\etc, warns u if enemy comming, warns if u're on target, warns if your debuff failed. And support Logitech G15 keyboard (radar on LCD and macro for that) :D

[drzoom] 15.04.2007 14:52

0_o
 
Quote:

Originally Posted by Zil (Post 83930)
But that info from L2j ;)

That info from packets exploring, not from l2j.
I was looking for that info from l2j - but didn't found.

Zil 15.04.2007 16:26

Quote:

Originally Posted by humordwarf (Post 83931)
bullshit
absolutely

As u wish :D I don't like to argue (спорить)

I said only my IMHO :) Mybe I'm not so good in C++ as ASM..

Quote:

Originally Posted by [drzoom] (Post 83938)
That info from packets exploring, not from l2j.
I was looking for that info from l2j - but didn't found.

And we find it! Maybe u look not so good ;)

[drzoom] 15.04.2007 16:36

gimme links pls:)
mb i'm wrong:D

[drzoom] 15.04.2007 23:52

so? where links?:)

Mio 16.04.2007 00:07

Quote:

Originally Posted by [drzoom] (Post 83993)
so? where links?:)

Need some pr0n link? 0__o

[drzoom] 16.04.2007 00:12

No thanks:D

Zil 16.04.2007 12:22

Oke..Try to look at this...but it's not full, cause don't need anymore :D
Now doing it only on off

L2jC6.rar

Aikeleer 16.04.2007 14:25

Just post the L2J link thingy, why use a different host?

Zil 16.04.2007 15:17

?
different host? can't understand...


All times are GMT. The time now is 15:04.