elitepvpers

elitepvpers (https://www.elitepvpers.com/forum/)
-   DarkOrbit (https://www.elitepvpers.com/forum/darkorbit/)
-   -   [Collection Thread] Private Server Info and Support Thread (https://www.elitepvpers.com/forum/darkorbit/2830133-private-server-info-support-thread.html)

LEJYONER(DS) 06/01/2016 21:02

cryz35, 1 yıldır yokum bro 1 konu hakkında yardımcı olabilicen mi?

Hello, I 'm working on 9.0 emulator, I want to do x and y position according to the database. What should I use instead of the DEFAULT_INC_VALUE?

Code:

package simulator.map_entities;

import simulator.utils.DefaultAssignings;

public class MapEntityPosition
        implements DefaultAssignings {

    // position on map
    protected int mCurrentPositionX = DEFAULT_INC_VALUE;
    protected int mCurrentPositionY = DEFAULT_INC_VALUE;

    public int getCurrentPositionX() {
        return this.mCurrentPositionX;
    }

    protected void setCurrentPositionX(final int pPositionX) {
        this.mCurrentPositionX = pPositionX;
    }

    public int getCurrentPositionY() {
        return this.mCurrentPositionY;
    }

    protected void setCurrentPositionY(final int pPositionY) {
        this.mCurrentPositionY = pPositionY;
    }

    public void setPositionXY(final int pPositionX, final int pPositionY) {
        this.setCurrentPositionX(pPositionX);
        this.setCurrentPositionY(pPositionY);
    }

}


ItsTequila 06/01/2016 22:36

Quote:

Originally Posted by cryz35 (Post 34594002)
[IMG=expandable: 1]http://puu.sh/pcUym/fab7426c85.jpg[/IMG]

Any idea why Spaceplauge and Assembly(crafting) thing are missing titles?

You're missing the resource xmls / language files(not /xml/ folder). I remember to they are located in spacemap folder but under a different server. Use charles and see what's requested when you login to DO.

0wnix 06/04/2016 11:55

Wow lol, just seen this :

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

Funny to see that DarkOrbit is taking inspiration from my CMS ehe :D

Maybe one day, pservers devs & darkorbit devs will come to an agreement ? :rolleyes:


Destiny 06/04/2016 12:03

Quote:

Originally Posted by player.elite (Post 34608630)
Wow lol, just seen this :

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

Funny to see that DarkOrbit is taking inspiration from my CMS ehe :D

Maybe one day, pservers devs & darkorbit devs will come to an agreement ? :rolleyes:


hehe its like your :D

Chirdo 06/06/2016 19:38

hey i need p server files i just want it for making 1 vs 1 :D

45the45 06/07/2016 18:04

Quote:

Originally Posted by Chirdo (Post 34622745)
hey i need p server files i just want it for making 1 vs 1 :D

Download some private server from the start of this thread

Chirdo 06/07/2016 18:11

Quote:

Originally Posted by 45the45 (Post 34628111)
Download some private server from the start of this thread

The Download links dont work

LilYoung 06/07/2016 23:56

Hey, haven't thought about playin on a P-Server yet so I never checked this thread.

Is there a server with none to little lags, PvP only and up to date?

HammerTyrs22 06/08/2016 10:19

Hello Friends :D

I have a Problem, i can read the first packet (666), we can make the Version Response

AS3 CODE FROM CLIENT(version 10.0.4246):

Code:

public function §_-F27§(param1:Boolean, param2:int, param3:int, param4:int) : void
      {
        var _loc5_:* = null;
        if(param1)
        {
            _loc5_ = new §_-52j§();
            if(_loc5_.major == param2 && _loc5_.minor == param3 && _loc5_.build == param4)
            {
              this.§_-oz§();
              this.§_-n3O§();
            }
            else
            {
              this.§_-mb§();
            }
        }
        else
        {
            this.§_-mb§();
        }
      }

public function handleVersionResponce(param1:Boolean, param2:int, param3:int, param4:int) : void
      {
        this.connectionManager.§_-F27§(param1,param2,param3,param4);
      }

READ:

Code:

public void run() {
        try {
            DataInputStream in = new DataInputStream(clientSocket.getInputStream());
            byte[] buffer = new byte[8192];    //If you handle larger data use a bigger buffer size
            int length = in.readShort();
            if (length > 0)
            {
                byte[] byteArray = new byte[length];
                in.read(byteArray, 0, length);
                ByteArrayInputStream packetBAIS = new ByteArrayInputStream(byteArray, 0, byteArray.length);
                DataInputStream packet = new DataInputStream(packetBAIS);
                int id = packet.readShort();
                switch (id)
                {
                    case 666:
                        LOG.INFO(this.serverName, "VERSION REQUEST");
                        VersionRequest vr = new VersionRequest();
                        vr.read(packet);
                        System.out.println("[IN] PacketID: "+ ID + " MAJOR: " +vr.major+ " BUILD: "+vr.build+" MINOR: "+vr.minor);
                        vr.SendVersionResponse();
                        break;
                    default:
                        LOG.INFO(this.serverName, "REQUEST-NOT FUND: " + id);
                        break;
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }


my try (don't work):
Code:

public void SendVersionResponse() throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        baos.write(1); // Param 1 |  True or Flase (1 /0)
        baos.write(this.major); // Param 2 (Major)
        baos.write(this.minor); // Param 3 (minor)
        baos.write(this.build); // Param 4 (Build)
        baos.flush();
        byte[] data = baos.toByteArray();
        System.out.println(Arrays.toString(data));
    }

Result:

Code:

[08.06.2016 - 10:20:55][GAMESERVER][INFO]: VERSION REQUEST
[IN] PacketID: 666 MAJOR: 0 BUILD: 7 MINOR: 86
[1, 0, 86, 7] <---- Array from SendVersionResponse()

can you help me ?

S7K Yuuki 06/08/2016 12:39

Hey there!

Assuming that the rest of the code works properly. The main problem is here...

Code:

public void SendVersionResponse() throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        baos.write(1); // Param 1 |  True or Flase (1 /0)
        baos.write(this.major); // Param 2 (Major)
        baos.write(this.minor); // Param 3 (minor)
        baos.write(this.build); // Param 4 (Build)
        baos.flush();
        byte[] data = baos.toByteArray();
        System.out.println(Arrays.toString(data));
}

When you are using
Code:

baos.write();
you are writing bytes directly to the byte array instead of the real int, short, bool, whatever.

For example, major, minor and build must be integers (1 int == 4 bytes) instead of using 4 bytes for that variable you're using only 1.

Also you're missing the whole packet structure which is:
Code:

2 bytes => packet length
2 bytes => packet ID

*VARIABLE FOR EACH PACKET*

Then you've to take a look into the packet class (the 'answer' of VersionRequest has ID 667). If I'm not wrong the correct structure for that one was:
Code:

2 bytes => length
2 bytes => packet ID (667)
4 bytes => major
4 bytes => minor
4 bytes => build
1 byte  => that boolean

Try using DataOutputStream (example):
Code:

public void SendVersionResponse() throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream os = new DataOutputStream(baos);

    os.writeShort(15);      // If my awesome maths aren't wrong 2+4+4+4+1=15 (Packet Length)
    os.writeShort(667);      // Packet ID
    os.writeInt(this.major); // Param 1 (Major)
    os.writeInt(this.minor); // Param 2 (minor)
    os.writeInt(this.build); // Param 3 (Build)
    os.writeBool(true);      // Param 4 | True or Flase (1/0)
   
    byte[] data = baos.toByteArray();
    YOURSOCKETOBJECT.getOutputStream().write(data, 0, data.length);
    YOURSOCKETOBJECT.getOutputStream().flush();
    System.out.println(Arrays.toString(data));
}

Hope it helps! :)

Regards.-

HammerTyrs22 06/08/2016 13:45

Thanks S7K Yuuki , this way :
Code:

public void SendVersionResponse(Socket clientSocket) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream os = new DataOutputStream(baos);
        os.writeShort(15);
        os.writeShort(667);
        os.writeBoolean(true);
        os.writeInt(this.major);
        os.writeInt(this.minor);
        os.writeInt(this.build);

        byte[] data = baos.toByteArray();
        clientSocket.getOutputStream().write(data,0, data.length);
        clientSocket.getOutputStream().flush();
        System.out.println(Arrays.toString(data));
    }

RESULT:
Code:

[08.06.2016 - 13:41:32][GAMESERVER][INFO]: VERSION REQUEST
[IN] PacketID: 666 MAJOR: 0 BUILD: 7 MINOR: 86
[0, 15, 2, -101, 1, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 7]

i have the Problem , i connect to the Server , the server send this packet and the client
cancel connection to the Server, why ?

Requi 06/08/2016 14:53

Quote:

Originally Posted by HammerTyrs22 (Post 34632570)
Thanks S7K Yuuki , this way :
Code:

public void SendVersionResponse(Socket clientSocket) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream os = new DataOutputStream(baos);
        os.writeShort(15);
        os.writeShort(667);
        os.writeBoolean(true);
        os.writeInt(this.major);
        os.writeInt(this.minor);
        os.writeInt(this.build);

        byte[] data = baos.toByteArray();
        clientSocket.getOutputStream().write(data,0, data.length);
        clientSocket.getOutputStream().flush();
        System.out.println(Arrays.toString(data));
    }

RESULT:
Code:

[08.06.2016 - 13:41:32][GAMESERVER][INFO]: VERSION REQUEST
[IN] PacketID: 666 MAJOR: 0 BUILD: 7 MINOR: 86
[0, 15, 2, -101, 1, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 7]

i have the Problem , i connect to the Server , the server send this packet and the client
cancel connection to the Server, why ?

Either the order of the packet is wrong or you sent false for the boolean.
Order of packets change each version.

Or your packet is not netty encoded (didn't look at the code).

Find the command of the VersionResponse in your decompiled files by searching for "667".

Look for the "read(data:DataInput)" and look at the order it's getting read. You have to write in the same order.

S7K Yuuki 06/08/2016 15:29

Quote:

Originally Posted by HammerTyrs22 (Post 34632570)

[08.06.2016 - 13:41:32][GAMESERVER][INFO]: VERSION REQUEST
[IN] PacketID: 666 MAJOR: 0 BUILD: 7 MINOR: 86
[0, 15, 2, -101, 1, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 7]

The boolean was set to true, which is correct.

But as Requi said, I bet the problem is on the param order. As I wrote in the example I think the bool was the last param instead of the first one. I can't remember the packet structure right now and I'm 3lazy to decompile main now.

Regards.-

HammerTyrs22 06/08/2016 18:02

AS3 Code for paket 667:
Code:

package net.bigpoint.darkorbit.net.netty.commands
{
  import §_-N3c§.ICommand;
  import net.bigpoint.darkorbit.map.model.ship.§_-X1E§;
  import §_-R24§.§_-B4Z§;
  import §_-h3g§.§_-u4a§;
  import net.bigpoint.darkorbit.§_-t8§;
  import flash.utils.IDataInput;
  import flash.utils.IDataOutput;
 
  public class §_-l3C§ implements ICommand
  {
     
      public static const ID:int = 667;
     
      {
        var _loc1_:Boolean = false;
        var _loc2_:Boolean = true;
        if(!_loc2_)
        {
        }
      }
     
      public var major:int = 0;
     
      public var minor:int = 0;
     
      public var build:int = 0;
     
      public var §_-l1H§:Boolean = false;
     
      public function §_-l3C§(param1:int = 0, param2:int = 87, param3:int = 7, param4:Boolean = false)
      {
        var _loc6_:Boolean = false;
        if(_loc5_)
        {
            super();
            if(!_loc6_)
            {
              if(!_loc5_)
              {
                  addr37:
                  while(true)
                  {
                    this.build = param3;
                    if(_loc5_)
                    {
                        if(!_loc6_)
                        {
                          if(!_loc6_)
                          {
                          }
                          this.§_-l1H§ = param4;
                        }
                    }
                  }
              }
              addr82:
              while(true)
              {
                  this.major = param1;
                  if(_loc5_)
                  {
                    if(_loc5_)
                    {
                    }
                    this.minor = param2;
                  }
              }
            }
            while(true)
            {
              if(_loc6_)
              {
                  break;
              }
              §§goto(addr37);
            }
            return;
        }
        while(true)
        {
            if(!_loc5_)
            {
              §§goto(addr82);
            }
            §§goto(addr122);
        }
      }
     
      public function §_-m4Q§() : int
      {
        var _loc1_:Boolean = true;
        var _loc2_:Boolean = false;
        return ID;
      }
     
      public function §_-z5§() : int
      {
        var _loc1_:Boolean = false;
        var _loc2_:Boolean = true;
        §§push(13);
        if(!_loc2_)
        {
            return -§§pop() + 58 + 1;
        }
      }
     
      public function read(param1:IDataInput) : void
      {
        if(_loc3_)
        {
            this.major = param1.readInt();
            if(_loc3_)
            {
              if(_loc2_)
              {
                  addr40:
                  while(true)
                  {
                    this.§_-l1H§ = param1.readBoolean();
                    if(_loc3_)
                    {
                        if(!_loc2_)
                        {
                        }
                        break;
                    }
                  }
                  return;
              }
              while(true)
              {
                  this.minor = param1.readInt();
                  if(!_loc3_)
                  {
                  }
              }
            }
            while(true)
            {
              if(!_loc2_)
              {
              }
              this.build = param1.readInt();
            }
        }
        while(true)
        {
            if(!_loc2_)
            {
              §§goto(addr40);
            }
            §§goto(addr112);
        }
      }
     
      public function write(param1:IDataOutput) : void
      {
        var _loc2_:Boolean = true;
        var _loc3_:Boolean = false;
        if(!_loc3_)
        {
            param1.writeShort(ID);
            if(_loc3_)
            {
            }
            addr29:
            return;
        }
        this.§_-435§(param1);
        §§goto(addr29);
      }
     
      protected function §_-435§(param1:IDataOutput) : void
      {
        if(!_loc3_)
        {
            param1.writeInt(this.major);
            if(!_loc3_)
            {
              if(_loc3_)
              {
                  loop0:
                  while(true)
                  {
                    param1.writeBoolean(this.§_-l1H§);
                    if(!_loc3_)
                    {
                        if(_loc3_)
                        {
                        }
                    }
                    addr98:
                    while(true)
                    {
                        if(!_loc2_)
                        {
                          break loop0;
                        }
                        continue loop0;
                    }
                  }
                  return;
              }
              addr69:
              while(true)
              {
                  param1.writeInt(this.minor);
              }
            }
            while(_loc3_)
            {
              §§goto(addr69);
            }
            §§goto(addr109);
        }
        while(true)
        {
            if(!_loc3_)
            {
            }
            param1.writeInt(this.build);
            §§goto(addr98);
        }
      }
  }
}

and the server send the Command :
Code:

public void SendVersionResponse(Socket clientSocket) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream os = new DataOutputStream(baos);
        os.writeShort(15);
        os.writeShort(667);
        os.writeInt(this.major);
        os.writeBoolean(true);
        os.writeInt(this.minor);
        os.writeInt(this.build);
        //os.writeBoolean(true);

        byte[] data = baos.toByteArray();
        clientSocket.getOutputStream().write(data,0, data.length);
        clientSocket.getOutputStream().flush();
        System.out.println(Arrays.toString(data));
    }

RESULT:
Code:

[08.06.2016 - 18:01:15][GAMESERVER][INFO]: VERSION REQUEST
[IN] PacketID: 666 MAJOR: 0 BUILD: 7 MINOR: 86
[0, 15, 2, -101, 0, 0, 0, 0, 1, 0, 0, 0, 86, 0, 0, 0, 7]

the order is the same or not ?

olitis1 06/08/2016 20:39

Quote:

Originally Posted by HammerTyrs22 (Post 34634052)
the order is the same or not ?

The byte array you should send is:
1. (short) Lenght of the byte array.
2. (short) ID of the packet. // In your case, 667
And now starts the reading of the variables of that packet:
3. (int) Major. // Should be the same one that client sends you in packet 666.
4. (bool) Server agrees that version. // Should be true.
5. (int) Minor. // Should be the same one that client sends you in packet 666.
6. (int) Build. // "

HammerTyrs22 06/08/2016 21:30

Quote:

Originally Posted by S7K Yuuki (Post 34632281)
Hey there!

Assuming that the rest of the code works properly. The main problem is here...

Code:

public void SendVersionResponse() throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        baos.write(1); // Param 1 |  True or Flase (1 /0)
        baos.write(this.major); // Param 2 (Major)
        baos.write(this.minor); // Param 3 (minor)
        baos.write(this.build); // Param 4 (Build)
        baos.flush();
        byte[] data = baos.toByteArray();
        System.out.println(Arrays.toString(data));
}

When you are using
Code:

baos.write();
you are writing bytes directly to the byte array instead of the real int, short, bool, whatever.

For example, major, minor and build must be integers (1 int == 4 bytes) instead of using 4 bytes for that variable you're using only 1.

Also you're missing the whole packet structure which is:
Code:

2 bytes => packet length
2 bytes => packet ID

*VARIABLE FOR EACH PACKET*

Then you've to take a look into the packet class (the 'answer' of VersionRequest has ID 667). If I'm not wrong the correct structure for that one was:
Code:

2 bytes => length
2 bytes => packet ID (667)
4 bytes => major
4 bytes => minor
4 bytes => build
1 byte  => that boolean

Try using DataOutputStream (example):
Code:

public void SendVersionResponse() throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream os = new DataOutputStream(baos);

    os.writeShort(15);      // If my awesome maths aren't wrong 2+4+4+4+1=15 (Packet Length)
    os.writeShort(667);      // Packet ID
    os.writeInt(this.major); // Param 1 (Major)
    os.writeInt(this.minor); // Param 2 (minor)
    os.writeInt(this.build); // Param 3 (Build)
    os.writeBool(true);      // Param 4 | True or Flase (1/0)
   
    byte[] data = baos.toByteArray();
    YOURSOCKETOBJECT.getOutputStream().write(data, 0, data.length);
    YOURSOCKETOBJECT.getOutputStream().flush();
    System.out.println(Arrays.toString(data));
}

Hope it helps! :)

Regards.-

Quote:

Originally Posted by S7K Yuuki (Post 34633138)
The boolean was set to true, which is correct.

But as Requi said, I bet the problem is on the param order. As I wrote in the example I think the bool was the last param instead of the first one. I can't remember the packet structure right now and I'm 3lazy to decompile main now.

Regards.-

Quote:

Originally Posted by olitis1 (Post 34635105)
The byte array you should send is:
1. (short) Lenght of the byte array.
2. (short) ID of the packet. // In your case, 667
And now starts the reading of the variables of that packet:
3. (int) Major. // Should be the same one that client sends you in packet 666.
4. (bool) Server agrees that version. // Should be true.
5. (int) Minor. // Should be the same one that client sends you in packet 666.
6. (int) Build. // "

hmmm it's not work :/ the client cancel connection to the Server, why ? I have no idea... hmmm:confused::confused::confused:

Requi 06/09/2016 22:47

Quote:

Originally Posted by olitis1 (Post 34635105)
The byte array you should send is:
1. (short) Lenght of the byte array.
2. (short) ID of the packet. // In your case, 667
And now starts the reading of the variables of that packet:
3. (int) Major. // Should be the same one that client sends you in packet 666.
4. (bool) Server agrees that version. // Should be true.
5. (int) Minor. // Should be the same one that client sends you in packet 666.
6. (int) Build. // "

The order of the parameters can change.

Quote:

Originally Posted by HammerTyrs22 (Post 34635435)
hmmm it's not work :/ the client cancel connection to the Server, why ? I have no idea... hmmm:confused::confused::confused:

Kannst mir mal einen gefallen tun und den Code Deobfuscator mit rüber jagen lassen wenn du schon jpexs nutzt. Dann kann man den code um einiges besser lesen.
[IMG=expandable: 1]http://i.imgur.com/8ONwZ2Q.png[/IMG]

HammerTyrs22 06/09/2016 23:28

thx for the tip :D here ^^
Code:

package net.bigpoint.darkorbit.net.netty.commands
{
  import §_-j2L§.ICommand;
  import flash.utils.IDataInput;
  import flash.utils.IDataOutput;
  import §_-j3I§.§_-q2F§;
  import §_-13y§.§_-gR§;
 
  public class §_-h8§ implements ICommand
  {
     
      public static const ID:int = 667;
     
      public var major:int = 0;
     
      public var minor:int = 0;
     
      public var build:int = 0;
     
      public var §_-p3q§:Boolean = false;
     
      public function §_-h8§(param1:int = 0, param2:int = 87, param3:int = 7, param4:Boolean = false)
      {
        super();
        this.major = param1;
        this.minor = param2;
        this.build = param3;
        this.§_-p3q§ = param4;
      }
     
      public function §_-S4o§() : int
      {
        return ID;
      }
     
      public function §_-i3r§() : int
      {
        return 13;
      }
     
      public function read(param1:IDataInput) : void
      {
        this.major = param1.readInt();
        this.minor = param1.readInt();
        this.build = param1.readInt();
        this.§_-p3q§ = param1.readBoolean();
      }
     
      public function write(param1:IDataOutput) : void
      {
        param1.writeShort(ID);
        this.§_-8z§(param1);
      }
     
      protected function §_-8z§(param1:IDataOutput) : void
      {
        param1.writeInt(this.major);
        param1.writeInt(this.minor);
        param1.writeInt(this.build);
        param1.writeBoolean(this.§_-p3q§);
      }
  }
}

and my Response from Server:
Code:

public void SendVersionResponse(Socket clientSocket) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream os = new DataOutputStream(baos);
        os.writeShort(15);
        os.writeShort(667);
        os.writeInt(this.major);
        os.writeInt(this.minor);
        os.writeInt(this.build);
        os.writeBoolean(true);

        byte[] data = baos.toByteArray();
        clientSocket.getOutputStream().write(data,0, data.length);
        clientSocket.getOutputStream().flush();
        clientSocket.getOutputStream().close();
        System.out.println(Arrays.toString(data));
    }

RESULT:
Code:

[09.06.2016 - 23:31:06][GAMESERVER][INFO]: VERSION REQUEST
[IN] PacketID: 666 MAJOR: 0 BUILD: 7 MINOR: 87
[0, 15, 2, -101, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 7, 1]


Requi 06/10/2016 00:02

Quote:

Originally Posted by HammerTyrs22 (Post 34642472)
thx for the tip :D here ^^
Code:

package net.bigpoint.darkorbit.net.netty.commands
{
  import §_-j2L§.ICommand;
  import flash.utils.IDataInput;
  import flash.utils.IDataOutput;
  import §_-j3I§.§_-q2F§;
  import §_-13y§.§_-gR§;
 
  public class §_-h8§ implements ICommand
  {
     
      public static const ID:int = 667;
     
      public var major:int = 0;
     
      public var minor:int = 0;
     
      public var build:int = 0;
     
      public var §_-p3q§:Boolean = false;
     
      public function §_-h8§(param1:int = 0, param2:int = 87, param3:int = 7, param4:Boolean = false)
      {
        super();
        this.major = param1;
        this.minor = param2;
        this.build = param3;
        this.§_-p3q§ = param4;
      }
     
      public function §_-S4o§() : int
      {
        return ID;
      }
     
      public function §_-i3r§() : int
      {
        return 13;
      }
     
      public function read(param1:IDataInput) : void
      {
        this.major = param1.readInt();
        this.minor = param1.readInt();
        this.build = param1.readInt();
        this.§_-p3q§ = param1.readBoolean();
      }
     
      public function write(param1:IDataOutput) : void
      {
        param1.writeShort(ID);
        this.§_-8z§(param1);
      }
     
      protected function §_-8z§(param1:IDataOutput) : void
      {
        param1.writeInt(this.major);
        param1.writeInt(this.minor);
        param1.writeInt(this.build);
        param1.writeBoolean(this.§_-p3q§);
      }
  }
}

and my Response from Server:
Code:

public void SendVersionResponse(Socket clientSocket) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream os = new DataOutputStream(baos);
        os.writeShort(15);
        os.writeShort(667);
        os.writeInt(this.major);
        os.writeInt(this.minor);
        os.writeInt(this.build);
        os.writeBoolean(true);

        byte[] data = baos.toByteArray();
        clientSocket.getOutputStream().write(data,0, data.length);
        clientSocket.getOutputStream().flush();
        clientSocket.getOutputStream().close();
        System.out.println(Arrays.toString(data));
    }

RESULT:
Code:

[09.06.2016 - 23:31:06][GAMESERVER][INFO]: VERSION REQUEST
[IN] PacketID: 666 MAJOR: 0 BUILD: 7 MINOR: 87
[0, 15, 2, -101, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 7, 1]


Dein DataOutputStream macht irgendwas falsch:
Code:

[0, 15, 2, 155, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 7, 1]
ist wie das bytearray aussehen muss. Ein byte geht von 0-255. Ein byte kann nicht negativ sein.

[IMG=expandable: 1]http://i.imgur.com/PYR1L8q.png[/IMG]
#sweetestPacketParserAndBuilderLife

manulaiko3.0 06/11/2016 20:52

Hi!

I've decided to start (or continue) a private server. It will be hosted on github so everyone on this section can take a look and contribute (I'll be accepting pull requests).

It will have 2009 client and a custom CMS design.

If you want to contribute:
  • The CMS is on branch cms
  • The emulator is on branch emulator
  • The database is on branch master
  • Read README.md on branch master for more info
If readme files aren't enough you can find me on the discord server or through my skype

This is the repository: [Only registered and activated users can see links. Click Here To Register...]

See you!

HammerTyrs22 06/13/2016 11:23

Hey Guys, i have a question ,
how can find the response packet to a Requestpacket ?

I have from the client the Packet ID = 10966 , how is the Response ID ? and Where find this ?

S7K Yuuki 06/13/2016 13:02

Quote:

Originally Posted by HammerTyrs22 (Post 34661227)
Hey Guys, i have a question ,
how can find the response packet to a Requestpacket ?

I have from the client the Packet ID = 10966 , how is the Response ID ? and Where find this ?

Reverse engineering, there isn't a magic way to get them. Find the command handler and continue from there, most of the times is extremely easy.

Good luck!
Regards.-

d5d 06/20/2016 06:05

someone can give me the source of DarkEmulator v2 whit cms ??

ZeusReally 06/20/2016 21:21

Hi Guys

i how to make extra slot menu ? who help me.

thanks

Requi 06/21/2016 11:40

Quote:

Originally Posted by ZeusReally (Post 34705909)
Hi Guys

i how to make extra slot menu ? who help me.

thanks

Look how the client initializes and handles slotmenus.

YURI-ELIADE.ITALY 07/09/2016 23:48

hello I'm back here as long as I showed in the forum, I hope you are all right :-)

I'm working on my private server project that does not release any training for two years now working there alone quietly (do not try it sun aide).

or changed many things new new new maps laser companies, many events alien ships, items that will be programmed automatically during the week.

(They will design new iris)

There will be many beautiful things I brought to the emulator version 6.5.0.0 with automatic restart every 15 hours.
I am now working on java and flash player version 4.9.3.

best regards YURI-ELIADE.ITALY

BlaXi17 07/10/2016 18:44

When did u planned on releasing it?

Nommo 07/25/2016 16:30

Hello!
I am trying to revive my node.JS DO server project and Im stuck at sending other users ships info.

My packet looks like:
Code:

sock.write('0|C|' + id + '|' + value['shipid'] + '|3|' + value['clantag'] + '|' + value['username'] + '|' + value['x'] + '|' + value['y'] + '|' + value['company'] + '|' + value['clanid'] + '|' + value['rank'] + '|0|' + diplo + '|' + value['galaxygatesdone'] + '\0');
Ofc all datas from Object are correct..
It shows red square insted of ship. TAG/Name/Rank/GG etc. works perfectly. Maybe theres some kind of files problem? It is based on 2008 client.

Regards,
Nommo.

SultanDP 07/27/2016 04:29

Hey i'm back <3 Dark Aster will be back too soon <3

MuffinMario 07/29/2016 23:06

Quote:

Originally Posted by Nommo (Post 34888884)
Hello!
Code:

sock.write('0|C|' + id + '|' + value['shipid'] + '|3|' + value['clantag'] + '|' + value['username'] + '|' + value['x'] + '|' + value['y'] + '|' + value['company'] + '|' + value['clanid'] + '|' + value['rank'] + '|0|' + diplo + '|' + value['galaxygatesdone'] + '\0');

compared it to my text file
0|C|UserID|ShipID|laserLook|Clanname|Username|posX |posY|company|clanID|ranking|showRedSquareOnMinima p|clanstatus|galaxy gates|usebigfont
apparently there must be something wrong in the object value otherwise it should be right.
Or try to add a |0 after the galaxygates, i'm not sure if we are using the same version.
if not, try to use this as an example string
Code:

0|C|20|4|1||-=[ NO USERNAME ]=-|4946|185|1|1|15|1|1|2|1
I dont know your program, but do you need that null terminator at the end?

Nommo 07/29/2016 23:54

I need '\0', it's node.JS, remember how long it took to figure that one out :> Well, other packets work smooth + I tested it with static 0|C packets, like one which you showed and it didnt work aswell... Now im a bit in another project, so that one will wait for now, but will need to figure out smth.

Thanks for your time :)

Regards,
Nommo.

MuffinMario 07/30/2016 00:22

Quote:

Originally Posted by Nommo (Post 34917194)
I need '\0', it's node.JS, remember how long it took to figure that one out :> Well, other packets work smooth + I tested it with static 0|C packets, like one which you showed and it didnt work aswell... Now im a bit in another project, so that one will wait for now, but will need to figure out smth.

Thanks for your time :)

Regards,
Nommo.

if it is only happening with "C" i would
a) assume it has to do something with the length of the transmitted string that might interfere with other synchronous working things (like try to make everything extremely short (name 'a' instead of '123test123' or pos 1|1 instead of pos 1500|1500)
b) assume that something in the swf is wrong, which you might have to check out and try to work with a second swf

otherwise you dont need to try these things if you dont want to :rolleyes:

Nommo 07/30/2016 01:20

Quote:

Originally Posted by MuffinMario (Post 34917372)
if it is only happening with "C" i would
a) assume it has to do something with the length of the transmitted string that might interfere with other synchronous working things (like try to make everything extremely short (name 'a' instead of '123test123' or pos 1|1 instead of pos 1500|1500)
b) assume that something in the swf is wrong, which you might have to check out and try to work with a second swf

otherwise you dont need to try these things if you dont want to :rolleyes:


Well..
I'm more dumb than I thought I am :)
The settings packet turned off "Show Ships and NPCs". That how it works on old client... I've started to write this emu long time ago, so that the reason of my amnesia :)

Thanks for help, I fixed it :P

Regards,
Nommo.

benk980 07/31/2016 19:06

Hi , can someone give me the drone packet , you know those packet when you hide drone it shows IIIIIII . It's for client 4.1

Thanks ,

NoCheatImPGM 07/31/2016 19:09

Quote:

Originally Posted by benk980 (Post 34927227)
Hi , can someone give me the drone packet , you know those packet when you hide drone it shows IIIIIII . It's for client 4.1

Thanks ,

Hi,

Code:

0|n|e|userId|flax(int)/iris(int)
Example:
Code:

0|n|e|1|4/4

benk980 07/31/2016 19:24

Quote:

Originally Posted by NoCheatImPGM (Post 34927238)
Hi,

Code:

0|n|e|userId|flax(int)/iris(int)
Example:
Code:

0|n|e|1|4/4

Thanks a lot man , u such a sweet guys ;)

benk980 08/03/2016 04:53

Hi i would like it so much if someone would give me the packet for this rocket smoke :

[Only registered and activated users can see links. Click Here To Register...]

NoCheatImPGM 08/03/2016 11:36

Quote:

Originally Posted by benk980 (Post 34941962)
Hi i would like it so much if someone would give me the packet for this rocket smoke :

[Only registered and activated users can see links. Click Here To Register...]

Hey,

Code:

0|v|attackerId|targetId|H|selectedRocket|smokeEnabled|redLightEnabled
Example:

Code:

0|v|1|2|H|3|1|0 //smoke enabled
0|v|1|2|H|3|0|0 //smoke disabled

Spoiler:
With the red light enabled you will something like this:
[IMG=expandable: 1]http://i.epvpimg.com/gqenf.png[/IMG]

benk980 08/03/2016 11:58

Quote:

Originally Posted by NoCheatImPGM (Post 34942956)
Hey,

Code:

0|v|attackerId|targetId|H|selectedRocket|smokeEnabled|redLightEnabled
Example:

Code:

0|v|1|2|H|3|1|0 //smoke enabled
0|v|1|2|H|3|0|0 //smoke disabled

Spoiler:
With the red light enabled you will something like this:
[IMG=expandable: 1]http://i.epvpimg.com/gqenf.png[/IMG]

Thanks you so much , what would the world do without you LOL :pimp: . Thanks for all the help you give to ANYONE on this forum!

EsdrasFerreira 08/14/2016 17:20

Error Servidor Privado

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]


All times are GMT +2. The time now is 20:48.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.