(Private Server) DarkOrbit Packets Thread

08/01/2017 17:03 Vitaliy_Spiker#31
Quote:
Originally Posted by S7K Yuuki View Post
If you're asking about the crown of the Kronos gate is a simple binary (int) number inside the create player command.

Imagine it as two groups of 3 binary digits, each one representing a gg ring.
Code:
000 101 => number 5 (Alpha and Gamma)
101 101 => number 45 (Alpha, Gamma, Zeta and I dont remember the top right one..)

* Having all the galaxy gates should be then..*
111 111 => number 63
To add Kronos there simply increment the value by one.
Code:
1 000 000 => number 64
Nevertheless, if you asked for the UBA crown
[Only registered and activated users can see links. Click Here To Register...]
It's a visual modifier also sent during the player creation.

Regards.-

In which file to replace?
08/02/2017 11:16 Armandito13x#32
Quote:
Originally Posted by S7K Yuuki View Post
If you're asking about the crown of the Kronos gate is a simple binary (int) number inside the create player command.

Imagine it as two groups of 3 binary digits, each one representing a gg ring.
Code:
000 101 => number 5 (Alpha and Gamma)
101 101 => number 45 (Alpha, Gamma, Zeta and I dont remember the top right one..)

* Having all the galaxy gates should be then..*
111 111 => number 63
To add Kronos there simply increment the value by one.
Code:
1 000 000 => number 64
Nevertheless, if you asked for the UBA crown
[Only registered and activated users can see links. Click Here To Register...]
It's a visual modifier also sent during the player creation.

Regards.-
Thank you very much, but in what part is that edited to have the kronos crown?
08/06/2017 20:27 Vitaliy_Spiker#33
So no one has found out in which file this is being replaced?
08/07/2017 02:41 Requi#34
Quote:
Originally Posted by S7K Yuuki View Post
If you're asking about the crown of the Kronos gate is a simple binary (int) number inside the create player command.

Imagine it as two groups of 3 binary digits, each one representing a gg ring.
Code:
000 101 => number 5 (Alpha and Gamma)
101 101 => number 45 (Alpha, Gamma, Zeta and I dont remember the top right one..)

* Having all the galaxy gates should be then..*
111 111 => number 63
To add Kronos there simply increment the value by one.
Code:
1 000 000 => number 64
Nevertheless, if you asked for the UBA crown
[Only registered and activated users can see links. Click Here To Register...]
It's a visual modifier also sent during the player creation.

Regards.-
bruh. bitflags.

Code:
enum GalaxyGate
{
ALPHA,
BETA,
...
...
...
GALAXYGATE_MAX
}

// PSEUDO AF

int galaxyGatesDone = 0;
for (int i = 0; i < GALAXYGATE_MAX; i++)
{
    if (player.HasDoneGate(i))
        galaxyGatesDone |= i;
}
08/07/2017 02:46 Armandito13x#35
Quote:
Originally Posted by Requi View Post
bruh. bitflags.

Code:
enum GalaxyGate
{
ALPHA,
BETA,
...
...
...
GALAXYGATE_MAX
}

// PSEUDO AF

int galaxyGatesDone = 0;
for (int i = 0; i < GALAXYGATE_MAX; i++)
{
    if (player.HasDoneGate(i))
        galaxyGatesDone |= i;
}
Where those men are edited
08/07/2017 02:49 Requi#36
Quote:
Originally Posted by Armandito13x View Post
Where those men are edited
Now in english please?

That's just an easier way to assign galaxygates in the create player command, instead of hardcoding each combination what atleast 90% of the people here would do.

If it's using binary data like that, you can and should use bitflags to make your life easier.

Game will most likely assign the rank in the client like that:

Code:
// On create player
for (int i = 0; i < GALAXYGATE_MAX; i++)
{
    if (galaxyGateDonePart & i)
        GiveGalaxyGateVisuallyNextToName(i);
}
08/07/2017 04:56 Armandito13x#37
Quote:
Originally Posted by Requi View Post
Now in english please?

That's just an easier way to assign galaxygates in the create player command, instead of hardcoding each combination what atleast 90% of the people here would do.

If it's using binary data like that, you can and should use bitflags to make your life easier.

Game will most likely assign the rank in the client like that:

Code:
// On create player
for (int i = 0; i < GALAXYGATE_MAX; i++)
{
    if (galaxyGateDonePart & i)
        GiveGalaxyGateVisuallyNextToName(i);
}
I thank you friend, but my question is, how do you add the crown to rank, kronos crown.
08/07/2017 07:49 Freshek#38
Quote:
Originally Posted by Armandito13x View Post
I thank you friend, but my question is, how do you add the crown to rank, kronos crown.
People already have answered you I think almost 10 times and you still ask the same question...

@[Only registered and activated users can see links. Click Here To Register...] give him an achievement.
08/07/2017 08:29 Armandito13x#39
Quote:
Originally Posted by Freshek View Post
People already have answered you I think almost 10 times and you still ask the same question...

@[Only registered and activated users can see links. Click Here To Register...] give him an achievement.
I have you not been specifically reinstated, where I edit this code, in which part.
08/07/2017 11:14 S7K Yuuki#40
Quote:
Originally Posted by Requi View Post
bruh. bitflags.
Yeah you're completely right, but if they can't even understand the 'binary way' imagine how much it will take to explain bit flags :/

Thanks for the idea anyways ^^
Regards.-
08/07/2017 12:26 Armandito13x#41
Quote:
Originally Posted by S7K Yuuki View Post
Yeah you're completely right, but if they can't even understand the 'binary way' imagine how much it will take to explain bit flags :/

Thanks for the idea anyways ^^
Regards.-
My question is, how do I make the client see the range this way, where I edit those conditions, where I put those codes, or those packages.

[Only registered and activated users can see links. Click Here To Register...]
08/07/2017 12:33 th0rex#42
Quote:
Originally Posted by Requi View Post
bruh. bitflags.

Code:
enum GalaxyGate
{
ALPHA,
BETA,
...
...
...
GALAXYGATE_MAX
}

// PSEUDO AF

int galaxyGatesDone = 0;
for (int i = 0; i < GALAXYGATE_MAX; i++)
{
    if (player.HasDoneGate(i))
        galaxyGatesDone |= i;
}
at least do bitflags right then. i only ever needs to be some power of two. so you can shift left each iteration by 1 instead of doing i++, but you need to start at 1 then. so smth like this

Code:
for(int i = 1; i < bla; i <<= 1) {
    if(hasDone(i))
        dataToSend |= i;
}
08/07/2017 12:40 Armandito13x#43
Quote:
Originally Posted by C0untLizzi View Post
at least do bitflags right then. i only ever needs to be some power of two. so you can shift left each iteration by 1 instead of doing i++, but you need to start at 1 then. so smth like this

Code:
for(int i = 1; i < bla; i <<= 1) {
    if(hasDone(i))
        dataToSend |= i;
}
In which part of the emulator, that is placed.
08/07/2017 13:43 LEJYONER(DS)#44
Quote:
Originally Posted by Armandito13x View Post
In which part of the emulator, that is placed.
Firstly; You need found your ShipInitializationCommand and ShipCreateCommand for while your ship is starting and other ships are being created; You need to change the received information.

Sample: This is your code of ship creation. (other players)

Code:
public ShipCreateCommand(int pMapEntityId, 
String pShipLootId, int pExpansionStage, 
String pClanTag, String pUsername, 
int pPositionX,int pPositionY, 
int pFactionId, int pRingsCount) {
        this.mMapEntityId = pMapEntityId;// User ID or NPC ID
        this.mShipLootId = pShipLootId;//pShipLootId
        this.mExpansionStage = pExpansionStage;
        this.mClanTag = pClanTag;
        this.mUsername = pUsername;
        this.mPositionX = pPositionX;
        this.mPositionY = pPositionY;
        this.mFactionId = pFactionId;
        this.mRingsCount = pRingsCount;
    }
And this is your ShipCreateCommand on Player.java;

Code:
    public ShipCreateCommand getShipCreateCommand() {
        return new ShipCreateCommand(this.getMapEntityId(), //user id
        		             this.getShipLootId(), // ship loot id
        		             this.getAccount()
                                          .getExpansionStage(), // cargo size
                                     this.getAccount()
                                          .getClanTag(), // clan tag
                                     this.getAccount()
                                          .getShipUsername(), // username
                                     this.getCurrentPositionX(), // x position
                                     this.getCurrentPositionY(), // y position 
                                     this.getAccount()
                                          .getFactionId(), // faction id (mmo/eic/vru)
                                     100, // rings count (100 = crown / 63 = 6 ring)
        );
    }
Now the first code I give is code to create ships.
And in your emulator, when you see other players; this ShipCreateCommand start to work with the player information you see.
And as you can see, the order of the information is the same as ShipCreateCommand.
So you need change rings count in your getShipCreateCommand for see crown etc..
The code in the second code I provide is the number of rings.

And ShipInitializationCommand just work like that.

ShipInitializationCommand for your ship informations in game.
ShipCreateCommand for other ship informations in game.

Maybe my english not so good for describe this but i think you can understand me.
08/07/2017 14:52 Armandito13x#45
Quote:
Originally Posted by Armandito13x View Post
I thank you friend, but my question is, how do you add the crown to rank, kronos crown.
Quote:
Originally Posted by LEJYONER(DS) View Post
Firstly; You need found your ShipInitializationCommand and ShipCreateCommand for while your ship is starting and other ships are being created; You need to change the received information.

Sample: This is your code of ship creation. (other players)

Code:
public ShipCreateCommand(int pMapEntityId, 
String pShipLootId, int pExpansionStage, 
String pClanTag, String pUsername, 
int pPositionX,int pPositionY, 
int pFactionId, int pRingsCount) {
        this.mMapEntityId = pMapEntityId;// User ID or NPC ID
        this.mShipLootId = pShipLootId;//pShipLootId
        this.mExpansionStage = pExpansionStage;
        this.mClanTag = pClanTag;
        this.mUsername = pUsername;
        this.mPositionX = pPositionX;
        this.mPositionY = pPositionY;
        this.mFactionId = pFactionId;
        this.mRingsCount = pRingsCount;
    }
And this is your ShipCreateCommand on Player.java;

Code:
    public ShipCreateCommand getShipCreateCommand() {
        return new ShipCreateCommand(this.getMapEntityId(), //user id
        		             this.getShipLootId(), // ship loot id
        		             this.getAccount()
                                          .getExpansionStage(), // cargo size
                                     this.getAccount()
                                          .getClanTag(), // clan tag
                                     this.getAccount()
                                          .getShipUsername(), // username
                                     this.getCurrentPositionX(), // x position
                                     this.getCurrentPositionY(), // y position 
                                     this.getAccount()
                                          .getFactionId(), // faction id (mmo/eic/vru)
                                     100, // rings count (100 = crown / 63 = 6 ring)
        );
    }
Now the first code I give is code to create ships.
And in your emulator, when you see other players; this ShipCreateCommand start to work with the player information you see.
And as you can see, the order of the information is the same as ShipCreateCommand.
So you need change rings count in your getShipCreateCommand for see crown etc..
The code in the second code I provide is the number of rings.

And ShipInitializationCommand just work like that.

ShipInitializationCommand for your ship informations in game.
ShipCreateCommand for other ship informations in game.

Maybe my english not so good for describe this but i think you can understand me.

Thank you very much, send a photo to your facebook, with an error that I have.